diff options
| author | Adriano Cordova <[email protected]> | 2025-06-03 09:56:34 -0400 |
|---|---|---|
| committer | Adriano Cordova <[email protected]> | 2025-06-06 00:17:14 -0400 |
| commit | fbd733935921c00254ebf1cb7c7e122396803375 (patch) | |
| tree | 902fb43f1adc3e451ccf03f9985d37eb88df5048 | |
| parent | f4a346cbf9c5a4aef3bd4fd0928aaf40ab5bb953 (diff) | |
tools/add_riscv_gpt: rework partition naming and numbering
Let U-Boot SPL be stored on a partition called loader1 and
main U-Boot on a partition called loader2. This is expected
by the Unmatched board for U-Boot upgrades.
Let the ESP be at the end of the partition table, so that
partitions are in disk order.
Signed-off-by: Adriano Cordova <[email protected]>
| -rwxr-xr-x | tools/add_riscv_gpt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/add_riscv_gpt b/tools/add_riscv_gpt index 454b63d0..f48cdb0d 100755 --- a/tools/add_riscv_gpt +++ b/tools/add_riscv_gpt @@ -27,10 +27,10 @@ gdisk -l "${disk_image}" || { echo "GPT table not found!"; exit 1; } sgdisk "$disk_image" \ --set-alignment=2 \ -d 1 \ - -n 1:2082:10273 -c 1:U-Boot -t 1:2E54B353-1271-4842-806F-E436D6AF6985 \ - -n 3:10274:12321 -c 3:U-Boot-SPL -t 3:5B193300-FC78-40CD-8002-E86C45580B47 \ - -c 2:ESP || { echo "Failed to modify partitions."; exit 1; } - + -n 1:2082:10273 -c 1:loader2 -t 1:2E54B353-1271-4842-806F-E436D6AF6985 \ + -n 3:10274:12321 -c 3:loader1 -t 3:5B193300-FC78-40CD-8002-E86C45580B47 \ + -c 2:ESP \ + -r=2:3 || { echo "Failed to modify partitions."; exit 1; } # Write u-boot.itb to the first partition echo "Writing u-boot.itb to first partition" dd if="u-boot-sifive/usr/lib/u-boot/sifive_unmatched/u-boot.itb" of="$disk_image" bs=512 seek=2082 conv=notrunc || { echo "Failed to write u-boot.itb to disk image."; exit 1; } |
