Nixos BPI-R4 Uboot: small fixes

This commit is contained in:
Victor Mignot 2024-10-05 19:47:28 +02:00
parent b968a676bf
commit 71ff657b4c
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D

View file

@ -88,10 +88,6 @@ Luckily, nixpkgs provides two functions to build these two elements as Nix deriv
# Cross compilation on NixOS (for Nix-beginners) # Cross compilation on NixOS (for Nix-beginners)
<!-- If you're not on an aarch64 machine (or did not enable native build through QEMU on your configuration), -->
<!-- you won't be able to build the following derivations. -->
As I plan to build everything from a x86_64 host, we have to set up a cross-compilation system to build our boot sequence As I plan to build everything from a x86_64 host, we have to set up a cross-compilation system to build our boot sequence
for ARMv8A. for ARMv8A.
Once again, nixpkgs make it fairly easy with its embedded cross-compilation system. Once again, nixpkgs make it fairly easy with its embedded cross-compilation system.
@ -295,9 +291,9 @@ runCommand "bpi-r4-image" {
dd if=/dev/zero of=$IMAGE bs=1M count=4000 dd if=/dev/zero of=$IMAGE bs=1M count=4000
sgdisk -o $IMAGE sgdisk -o $IMAGE
sgdisk -a 1 -n 1:34:8191 -A 1:set:2 -t 1:8300 -c 1:"bl2" $IMAGE sgdisk -a 1 -n 1:34:8191 -A 1:set:2 -t 1:8300 -c 1:"bl2" $IMAGE
sgdisk -a 1 -n 2:8192:9215 -A 2:set:63 -t 2:8300 -c 2:"u-boot-env" $IMAGE sgdisk -a 1 -n 2:8192:9215 -A 2:set:63 -t 2:8300 -c 2:"u-boot-env" $IMAGE
sgdisk -a 1 -n 3:9216:13311 -A 3:set:63 -t 3:8300 -c 3:"factory" $IMAGE sgdisk -a 1 -n 3:9216:13311 -A 3:set:63 -t 3:8300 -c 3:"factory" $IMAGE
sgdisk -a 1 -n 4:13312:17407 -A 4:set:63 -t 4:8300 -c 4:"fip" $IMAGE sgdisk -a 1 -n 4:13312:17407 -A 4:set:63 -t 4:8300 -c 4:"fip" $IMAGE
dd if=${armTrustedFirmwareBpiR4}/bl2.img of=$IMAGE seek=34 conv=notrunc,fsync dd if=${armTrustedFirmwareBpiR4}/bl2.img of=$IMAGE seek=34 conv=notrunc,fsync
dd if=${armTrustedFirmwareBpiR4}/fip.bin of=$IMAGE seek=13312 conv=notrunc,fsync dd if=${armTrustedFirmwareBpiR4}/fip.bin of=$IMAGE seek=13312 conv=notrunc,fsync