Download here the starter archive containing starter (skeleton) files & scripts.
Extract it somewhere in your base working directory.
The code structure should be similar to this:
arm-summer-school/ ├── staging/ # you should have this from lab02 │ ├── linux-*.its # Two variants of Linux uImage source descriptors │ ├── Makefile # a Makefile to build linux.itb (finally!) │ └── Image,imx93-11x11-frdm.dtb,rootfs.cpio # copied by the Makefile ├── rauc-utils/ # RAUC installation 'package'! │ ├── install.sh # RAUC installation script (must be ran inside the chroot!) │ ├── ca.cert.pem │ ├── rauc-mark-good.service │ ├── system.conf │ └── fstab # Optional, custom fstab to mount /boot ├── linux/ # Linux kernel source directory ├── u-boot/ # u-boot source directory ├── debian-rootfs/ # will be created by 'mk-debian-rootfs.sh' ├── Makefile # Makefile to build flash.bin from labs 1-3 (u-boot mainline!) ├── newdefault.env # new/recommended u-boot default environment ├── uboot-extra.config # extra config to use (used by Makefile above) ├── mk-disk-image.sh # script to build a FAT32 + EXT4 disk image (solved in lab02/03) ├── mk-disk-image2.sh # new disk image script, modified to make 2*rootfs+data partitions ├── mk-debian-rootfs.sh # script to debootstrap your debian directory └── chroot-enter.sh # utility script to execute commands in your debian rootfs
We will need the static qemu-aarch64 binaries if we're cross-building, since we need to execute Debian install scripts on our native host archivecture (e.g., x86_64).
First, make sure you have these packages installed (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!