4d523a54a9fda0ed5cf026e10f2be73a191209a8
ImageBuilder
Brought to you by OERV team.
Overview
It is driven by GNU Makefile for target management.
It will produce:
- RootFS tarball
- rpm-based package manager
- yum
dpkg-based package manager- Archiving method
- tar.zst
- rpm-based package manager
- Embedded system images for SBC-like devices
- Single disk image with all partitions inside
- GUID partition table
- Partition UUID
- Partition GUID type and attributes
- Partition name
- msdos parition table
- MTD
- GUID partition table
- Separated files for each filesystem
- Filesystems
- vfat
- ext4
- Single disk image with all partitions inside
- Post-process for specific usage
- qcow2 format
- Vendor-defined package format
It can be interrupted at any time, without harming your host OS.
Prerequirements
- Root-mode docker with
--priviledgedoption available- May not be necessary in the future
- rsync
- GNU Makefile
And other basic shell utils
Usage
Build New Images
Bash tab completition will print all available targets
Firstly, let it build a container image for later use:
make container
It will be tagged and managed by docker.
Listing all available targets:
make list
Build a single rootfs target:
make openEuler-24.03-LTS-SP1-base-rootfs
Build all rootfs targets one by one, under a different directory /tmp/build:
make O=/tmp/build openEuler-24.03-LTS-SP1-base-rootfs
Build all available BSP targets, parallelly:
make -j$(nproc) all_bsp
BSP target will be rebuilt each time even if no configuration is changed
Cleanup:
make clean
Add New Targets
Add RootFS Targets
- Creating a directory for your distro under
receipes - Filling
receipes/${DISTRO_NAME}/distro.mk, taking existing ones as reference - Creating a directory for the distro release, under
receipes/${DISTRO_NAME} - Filling
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/release.mk - Creating a directory for rootfs receipe (such as minimal, base or desktop), under
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace - Filling
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/receipe.mk - Listing required packages under
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/packages.d - Listing repo URLs required to install those packages under
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/repos.d - Listing scripts to be run after all package installation under
receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/post.d
Add BSP Targets
TBD
Common Usage
packages.d
post.d
repos.d
Description
Languages
Shell
75.2%
Makefile
23.1%
Dockerfile
1.7%