Download here the starter archive containing skeleton files + scripts.
Extract it somewhere in a new directory (e.g., create rauc-lab
).
The code structure will become (mostly is, but some are TODO) as follows:
rauc-lab/ ├── artifacts/ # <-- you'll create this │ ├── flash_spl.bin # A working flash.bin image you already have │ ├── flash_emmc.bin # Your new flash.bin (see tasks) │ ├── linux.itb # A kernel image (after removing the initrd) │ ├── uboot.env # U-Boot environment variables (just the var file) ├── utils/ │ ├── ca.cert.pem │ ├── rauc-mark-good.service │ ├── system.conf │ └── fstab # Optional custom fstab ├── scripts/ # <-- your main job to finish those! │ ├── 05-debootstrap.sh │ ├── 10-create-base-disk.sh │ ├── 11-populate-disk-image.sh │ ├── 20-modify-bootcmd.sh │ ├── 21-install-boot.sh │ └── 30-install-rauc.sh ├── run-all.sh # Will run all scripts in order
First, make sure you have these packages installed on your host system (they were already installed on the VM, so you can skip this):
sudo apt install qemu-user-static binfmt-support debootstrap parted dosfstools e2fsprogs u-boot-tools
Then, check that binfmt_misc
is active and register the QEMU handler for aarch64
:
grep aarch64 /proc/sys/fs/binfmt_misc/qemu-aarch64
If it’s empty, run:
sudo su echo ':qemu-aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff:/usr/bin/qemu-aarch64-static:CF' > /proc/sys/fs/binfmt_misc/register exit
For Arch Linux users: check out this guide for installable dependencies!