Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ass:labs-2025:04:tasks:01 [2025/08/07 12:37]
florin.stancu
ass:labs-2025:04:tasks:01 [2026/07/16 14:36] (current)
florin.stancu
Line 1: Line 1:
 ==== 01. Preparations ==== ==== 01. Preparations ====
  
-Download here (WIP) 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 (skeletonfiles scripts. ​
  
-Extract it somewhere in your working directory ​(it already contains a parent directory named ''​rauc-lab'',​ so you can do this directly in your home!).+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 
-│   ​├── linux.itb ​            # A kernel image (after removing the initrd+│   ​├── ​Makefile ​    # a Makefile to build linux.itb (finally!
-│   ── ​uboot.env             U-Boot environment variables (just the var file) +│   ── ​Image,​imx93-11x11-frdm.dtb,​rootfs.cpio ​  copied by the Makefile 
-├── utils/+├── ​rauc-utils/ ​     # RAUC installation '​package'​! 
 +│   ​├── 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            # Optionalcustom fstab to mount /boot 
-├── ​scripts        ​<-- you're main job to finish those! +├── ​linux              ​Linux kernel source directory 
-│   ├── ​00-create-base-disk.sh +├── u-boot/              # u-boot source directory 
-│   ├── ​01-populate-base-disk.sh +├── ​debian-rootfs/ ​      # will be created by 'mk-debian-rootfs.sh' 
-│   ├── ​05-modify-bootcmd.sh +├── ​Makefile ​            # Makefile to build flash.bin from labs 1-3 (u-boot mainline!) 
-│   ├── ​10-install-kernel-env.sh +├── newdefault.env       # new/​recommended u-boot default environment 
-│   └── ​15-install-rauc.sh +├── uboot-extra.config ​  ​# extra config to use (used by Makefile above) 
-── ​run-all.sh               ​Will run all scripts ​in order+├── ​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
 </​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'':​
Line 52: Line 57:
 For Arch Linux users: check out [[https://​wiki.archlinux.org/​title/​QEMU#​Chrooting_into_arm/​arm64_environment_from_x86_64|this guide for installable dependencies]]! For Arch Linux users: check out [[https://​wiki.archlinux.org/​title/​QEMU#​Chrooting_into_arm/​arm64_environment_from_x86_64|this guide for installable dependencies]]!
  
-=+
ass/labs-2025/04/tasks/01.1754559438.txt.gz · Last modified: 2025/08/07 12:37 by florin.stancu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0