This shows you the differences between two versions of the page.
|
ass:labs-2025:04:tasks:02 [2026/07/16 14:36] florin.stancu |
ass:labs-2025:04:tasks:02 [2026/07/16 15:08] (current) florin.stancu |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| Since we need to install the Debian binaries executable on a 64-bit ARM architecture, we will need to split the installation into two stages: first, the .deb (Debian install packages) are downloaded from a Debian mirror server and unpacked into the target rootfs directory. Afterwards, since Debian will need to run some scripts to setup its distro system, we must **emulate** the target architecture. Enter [[https://www.qemu.org/|qemu]] which will help us to just that! | Since we need to install the Debian binaries executable on a 64-bit ARM architecture, we will need to split the installation into two stages: first, the .deb (Debian install packages) are downloaded from a Debian mirror server and unpacked into the target rootfs directory. Afterwards, since Debian will need to run some scripts to setup its distro system, we must **emulate** the target architecture. Enter [[https://www.qemu.org/|qemu]] which will help us to just that! | ||
| - | Finally, we need to obtain the ''debian-rootfs.tar.gz'' archive with the contents of our newly-created Aarch64 Debian. Use ''tar'' to ''c''reate a g''z''ipped archive, and be sure to ''p''reserve permissions! | + | Finally, we need to obtain the ''debian-rootfs.tar.gz'' archive with the contents of our newly-created Aarch64 Debian. Use ''tar'' to ''c''reate a g''z''ipped archive, and be sure to ''p''reserve permissions: |
| - | The final results should be something like: | + | <code bash> |
| - | <code> | + | sudo tar czpf debian-rootfs.tar.gz -C debian-rootfs/ . |
| - | -rw-r--r-- 1 root root 213M 2026-07-26 14:23 debian-rootfs.tar.gz | + | |
| </code> | </code> | ||
| Line 38: | Line 37: | ||
| If you wish to enter your newly bootstrapped Debian rootfs, you can readily use the ''chroot-enter.sh'' script (read its code to see its arguments!) | If you wish to enter your newly bootstrapped Debian rootfs, you can readily use the ''chroot-enter.sh'' script (read its code to see its arguments!) | ||
| + | |||
| + | There's one critical thing to do if we want to be able to use our rootfs live: set up a login password! So: | ||
| + | <code bash> | ||
| + | # in chroot, you are root, so set up a "secure" password | ||
| + | # (joking, you can use '1234') | ||
| + | passwd | ||
| + | </code> | ||
| You can even run ''apt install'' in there ;) try it out (we'll use it later to install RAUC packages + configuration files). | You can even run ''apt install'' in there ;) try it out (we'll use it later to install RAUC packages + configuration files). | ||
| - | Just to verify this, inside the chroot, try to ''ls -l /lib/modules/*''. The kernel modules you installed in the previous step should be listed in there for your kernel version! | + | Let's also check something.. while still inside the chroot, try to ''ls -l /lib/modules/*''. The kernel modules you installed in the previous step should be listed in there for your kernel version! |
| === 2.3. Re-build linux.itb === | === 2.3. Re-build linux.itb === | ||
| Line 59: | Line 65: | ||
| But before booting the board, we must do some minor re-configuration to our u-boot... | But before booting the board, we must do some minor re-configuration to our u-boot... | ||
| - | === 2.6. Bootloader [re]configuration === | + | === 2.5. Bootloader [re]configuration === |
| You'll need the mainline u-boot for this task. Simply delete your ''u-boot'' directory (do backup your configs, if you want) and use the ''Makefile'' provided for lab02 (also found inside today's archive) to build & properly reconfigure a full Firmware Image Package. | You'll need the mainline u-boot for this task. Simply delete your ''u-boot'' directory (do backup your configs, if you want) and use the ''Makefile'' provided for lab02 (also found inside today's archive) to build & properly reconfigure a full Firmware Image Package. | ||
| Note the new configuration options inside ''uboot-extra.config'' and the default environment variables in ''new-default.env''. | Note the new configuration options inside ''uboot-extra.config'' and the default environment variables in ''new-default.env''. | ||
| + | |||
| + | Now we can power up the board! Use ''uuu -b spl flash.bin'' and enter U-Boot. Let ''fastboot 0'' start and use ''fastboot flash 0:0 disk.img'' to quickly burn the image. After the flashing finishes, use Ctrl+C on u-boot to exit fastboot mode and ''run linux''! | ||
| <note warning> | <note warning> | ||