This branch is 39 commits behind OERV-BSP/image-builder:master
2025-09-05 15:40:18 +08:00
2025-08-22 16:51:27 +08:00
2025-09-05 15:14:00 +08:00
2025-09-08 16:54:11 +08:00
2025-09-08 11:00:50 +08:00

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
  • 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
    • Separated files for each filesystem
    • Filesystems
      • vfat
      • ext4
  • 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 --priviledged option 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

  1. Creating a directory for your distro under receipes
  2. Filling receipes/${DISTRO_NAME}/distro.mk, taking existing ones as reference
  3. Creating a directory for the distro release, under receipes/${DISTRO_NAME}
  4. Filling receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/release.mk
  5. Creating a directory for rootfs receipe (such as minimal, base or desktop), under receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace
  6. Filling receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/receipe.mk
  7. Listing required packages under receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/packages.d
  8. Listing repo URLs required to install those packages under receipes/${DISTRO_NAME}/${DISTRO_RELEASE}/userspace/${receipe}/repos.d
  9. 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
No description provided
Readme 151 KiB
Languages
Shell 75.9%
Makefile 23.3%
Dockerfile 0.8%