fix: boot flag on boot partition The boot partition needs to have a boot flag so it is detected by u-boot as a partition to boot from. Unfortunately Guix uses this flag to check if a partition is root partition, and then sets the uuid of the root partition based on that. As a workaround, move the boot partition as second, this ensures the root partition will be detected as root. However, this is problematic, because the BootROM on the ZynqMP cannot read the whole disk for the boot.bin file. It reads only first part of it. Because of that, if the boot partition was second on the disk, it would not be possible to boot into SPL and U-Boot from it. Because of that, the offset is chosen so that the boot partition actually comes first despite being partition 2.
1 files changed, 6 insertions(+), 5 deletions(-) M modules/zynqmp/packages/images.scm
M modules/zynqmp/packages/images.scm => modules/zynqmp/packages/images.scm +6 -5
@@ 15,7 15,7 @@ #:use-module (gnu bootloader extlinux) #:use-module (gnu bootloader)) (define root-offset (* 512 2048)) (define root-offset (+ 512 (* 256 1024 1024))) ;; TODO: FDT @@ (define* (install-xilinx-bootloader fdt) 91,6 91,7 @@ (size 'guess) (label "root") (file-system "ext4") (offset root-offset) ;; Disable the metadata_csum and 64bit features of ext4, for compatibility ;; with U-Boot. @@ (file-system-options (list "-O" "^metadata_csum,^64bit")) 122,8 123,8 @@ (size (* 256 1024 1024)) (label "BOOT") (file-system "vfat") (offset root-offset) (flags '()) (offset 512) (flags '(boot)) (initializer (with-imported-modules (source-module-closure @@ '((guix build utils) 173,8 174,8 @@ (partition-table-type 'mbr) ;; TODO (volatile-root? #f) (partitions (list boot-partition root-partition)))) (list root-partition boot-partition)))) (define-public zynqmp-base-system-image (package