This shows you the differences between two versions of the page.
|
ass:labs-2025:04:tasks:01 [2025/08/07 20:54] florin.stancu |
ass:labs-2025:04:tasks:01 [2026/07/16 14:36] (current) florin.stancu |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== 01. Preparations ==== | ==== 01. Preparations ==== | ||
| - | {{:ass:labs-2025:04:rauc-lab-skel.tar.gz|Download here the starter archive}} containing skeleton files + scripts. | + | {{:ass:labs-2025:04:deb-rauc-lab-skel-2026.tar.gz|Download here the starter archive}} containing starter (skeleton) files & scripts. |
| - | Extract it somewhere in a new directory (e.g., create ''rauc-lab''). | + | Extract it somewhere in your base working directory. |
| - | The code structure will become (mostly is, but some are TODO) as follows: | + | The code structure should be similar to this: |
| <code> | <code> | ||
| - | rauc-lab/ | + | arm-summer-school/ |
| - | ├── artifacts/ # <-- you'll create this | + | ├── staging/ # you should have this from lab02 |
| - | │ ├── flash_spl.bin # A working flash.bin image you already have | + | │ ├── linux-*.its # Two variants of Linux uImage source descriptors |
| - | │ ├── flash_emmc.bin # Your new flash.bin (see tasks) | + | │ ├── Makefile # a Makefile to build linux.itb (finally!) |
| - | │ ├── linux.itb # A kernel image (after removing the initrd) | + | │ └── Image,imx93-11x11-frdm.dtb,rootfs.cpio # copied by the Makefile |
| - | │ ├── uboot.env # U-Boot environment variables (just the var file) | + | ├── rauc-utils/ # RAUC installation 'package'! |
| - | ├── utils/ | + | │ ├── install.sh # RAUC installation script (must be ran inside the chroot!) |
| │ ├── ca.cert.pem | │ ├── ca.cert.pem | ||
| │ ├── rauc-mark-good.service | │ ├── rauc-mark-good.service | ||
| │ ├── system.conf | │ ├── system.conf | ||
| - | │ └── fstab # Optional custom fstab | + | │ └── fstab # Optional, custom fstab to mount /boot |
| - | ├── scripts/ # <-- your main job to finish those! | + | ├── linux/ # Linux kernel source directory |
| - | │ ├── 05-debootstrap.sh | + | ├── u-boot/ # u-boot source directory |
| - | │ ├── 10-create-base-disk.sh | + | ├── debian-rootfs/ # will be created by 'mk-debian-rootfs.sh' |
| - | │ ├── 11-populate-disk-image.sh | + | ├── Makefile # Makefile to build flash.bin from labs 1-3 (u-boot mainline!) |
| - | │ ├── 20-modify-bootcmd.sh | + | ├── newdefault.env # new/recommended u-boot default environment |
| - | │ ├── 21-install-boot.sh | + | ├── uboot-extra.config # extra config to use (used by Makefile above) |
| - | │ └── 30-install-rauc.sh | + | ├── mk-disk-image.sh # script to build a FAT32 + EXT4 disk image (solved in lab02/03) |
| - | ├── run-all.sh # Will run all scripts in order | + | ├── 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 | ||
| </code> | </code> | ||
| === Prerequisites === | === Prerequisites === | ||
| - | First, make sure you have these packages installed on your host system (they were already installed on the VM, so you can skip this): | + | 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): | ||
| <code bash> | <code bash> | ||
| sudo apt install qemu-user-static binfmt-support debootstrap parted dosfstools e2fsprogs u-boot-tools | sudo apt install qemu-user-static binfmt-support debootstrap parted dosfstools e2fsprogs u-boot-tools | ||
| </code> | </code> | ||
| - | |||
| Then, check that ''binfmt_misc'' is active and register the QEMU handler for ''aarch64'': | Then, check that ''binfmt_misc'' is active and register the QEMU handler for ''aarch64'': | ||