Updated verification case, and verified SRU as working accordingly on a
Pi 3B and Pi 4B with the noble image specified in the test plan, and the
u-boot currently in -proposed.

** Description changed:

  [ Impact ]
  
  The current u-boot-rpi package does not include support for FIT images.
  Enabling this feature has been requested by an internal team.
  
  [ Test Plan ]
  
  To test FIT image generation:
  
  * Flash the Ubuntu Server for Raspberry Pi 24.04.1 image [1] to an SD card
- * Place the following content in a file named "image.its":
- 
+ * Boot Ubuntu Server and login
+ * cp /boot/firmware/vmlinuz .
+ * cp /boot/firmware/initrd.img .
+ * cat << EOF > image.its
  /dts-v1/;
  / {
-     description = "FIT payload";
-     #address-cells = <2>;
-     images {
-         kernel {
-             description = "kernel";
-             data = /incbin/("vmlinux.zst");
-             type = "kernel";
-             arch = "arm64";
-             os = "linux";
-             compression = "zstd";
-             load =  <0x200000>;
-             entry = <0x200000>;
-             hash {
-                 algo = "sha1";
-             };
-         };
-         initrd {
-             description = "initramfs";
-             data = /incbin/("initrd.cpio.zst");
-             type = "ramdisk";
-             arch = "arm64";
-             os = "linux";
-             compression = "none";
-             hash {
-                 algo = "sha1";
-             };
-         };
-     };
-     configurations {
-         default = "standard";
-         standard {
-             description = "config";
-             kernel = "kernel";
-             ramdisk = "initrd";
-             hash {
-                 algo = "sha1";
-             };
-         };
-     };
+     description = "FIT payload";
+     #address-cells = <2>;
+     images {
+         kernel {
+             description = "kernel";
+             data = /incbin/("vmlinuz");
+             type = "kernel";
+             arch = "arm64";
+             os = "linux";
+             compression = "gzip";
+             load =  <0x200000>;
+             entry = <0x200000>;
+             hash {
+                 algo = "sha1";
+             };
+         };
+         initrd {
+             description = "initramfs";
+             data = /incbin/("initrd.img");
+             type = "ramdisk";
+             arch = "arm64";
+             os = "linux";
+             compression = "none";
+             hash {
+                 algo = "sha1";
+             };
+         };
+     };
+     configurations {
+         default = "standard";
+         standard {
+             description = "config";
+             kernel = "kernel";
+             ramdisk = "initrd";
+             hash {
+                 algo = "sha1";
+             };
+         };
+     };
  };
- 
- * Run mkimage -f image.its -T flat_dt
+ EOF
+ * Run mkimage -f image.its -T flat_dt image.fit
  * Observe failure with current version
  * Upgrade u-boot-rpi to version in -proposed
- * Run mkimage -f image.its -T flat_dt
- * Observe successful generation of image
+ * Run mkimage -f image.its -T flat_dt image.fit
+ * Observe successful generation of image in image.fit
  
- To test no regression in boot operation:
+ To test no regression in boot operation (carrying on from previous
+ instructions):
  
- * Flash the Ubuntu Server for Raspberry Pi 24.04.1 image [1] to an SD card
  * Modify the boot sequence to include u-boot. In config.txt:
-   - Set kernel=uboot_rpi_4.bin (adjust as appropriate for test board)
-   - Set device_tree_address=0x03000000
+   - Set kernel=uboot_rpi_4.bin (adjust as appropriate for test board)
+   - Set device_tree_address=0x03000000
+   - Comment out initramfs line
+ * sudo cp image.fit /boot/firmware/
  * sudo reboot
+ * Interrupt u-boot
+ * setexpr loadaddr $fdt_addr + 0x100000
+ * load mmc 0:1 $loadaddr image.fit
+ * bootm :kernel :initrd $fdt_addr
  * Ensure boot succeeds
  
  [1]:
  
http://cdimage.ubuntu.com/releases/24.04.1/release/ubuntu-24.04.1-preinstalled-
  desktop-arm64+raspi.img.xz
  
  [ Regression Potential ]
  
  Varied; the u-boot package hasn't been used in the classic images since
  focal (and jammy upgrades includes a quirk to remove it from the boot
  chain), so the impact on the server and desktop images should be nil
  even if it failed entirely. However, the Core images still use u-boot so
  its operation should be checked on all boards supported by Core 24
  (specifically the Pi 3, 4, and 5 series) by following the second part of
  the test plan above.
  
  [ Original Description ]
  
  Support for signed FIT images has been requested; the following config
  items should be enabled for the rpi 3 and 4 configurations (in both
  armhf and arm64):
  
  CONFIG_FIT=y
  CONFIG_FIT_SIGNATURE=y
  CONFIG_FIT_VERBOSE=y
  CONFIG_FIT_PRINT=y
  CONFIG_TOOLS_FIT=y
  CONFIG_TOOLS_FIT_SIGNATURE=y
  CONFIG_TOOLS_FIT_VERBOSE=y
  CONFIG_TOOLS_FIT_PRINT=y
  CONFIG_ZSTD=y
  
  Check this doesn't affect core 24 images (there will inevitably be a
  size increase as a result of enabling more flags; this is probably a
  good time to unseed u-boot on the pi images for oracular).

** Tags removed: verification-needed-noble
** Tags added: verification-done-noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2054092

Title:
  [SRU] Add support for FIT images to rpi config

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/2054092/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to