[1/2] arm-bsp/trusted-firmware-a: use full option names in sgdisk call

Message ID 20220104210558.3504309-1-ross.burton@arm.com
State New
Headers show
Series [1/2] arm-bsp/trusted-firmware-a: use full option names in sgdisk call | expand

Commit Message

Ross Burton Jan. 4, 2022, 9:05 p.m. UTC
The TC appends include a long sgdisk invocation which can be made a lot
clearer by using the full option names (e.g. --change-name) instead of
short (e.g. -c).

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../trusted-firmware-a-tc.inc                 | 26 +++++++++++++++----
 1 file changed, 21 insertions(+), 5 deletions(-)

Comments

Jon Mason Jan. 5, 2022, 5:24 p.m. UTC | #1
On Tue, 4 Jan 2022 21:05:57 +0000, Ross Burton wrote:
> The TC appends include a long sgdisk invocation which can be made a lot
> clearer by using the full option names (e.g. --change-name) instead of
> short (e.g. -c).

Applied, thanks!

[1/2] arm-bsp/trusted-firmware-a: use full option names in sgdisk call
      commit: 8d53f4c3eb03218d9b1c31f6bbfda8e6f2dc5bb1
[2/2] arm-bsp/trusted-firmware-a: upgrade TC to 2.6
      commit: b398c1bcdfd653adc72d10882b21695d0d236988

Best regards,

Patch

diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc
index 1074d143..f47856b2 100644
--- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc
+++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc
@@ -101,11 +101,27 @@  do_generate_gpt() {
     dd if=/dev/zero of=$gpt_image bs=$gpt_size count=1
 
     # create the GPT layout
-    sgdisk -a 1 -U $location_uuid \
-           -n 1:$start_sector_1:+$num_sectors_fip -c 1:FIP_A -t 1:$fip_type_uuid -u 1:$FIP_A_uuid \
-           -n 2:$start_sector_2:+$num_sectors_fip -c 2:FIP_B -t 2:$fip_type_uuid -u 2:$FIP_B_uuid \
-           -n 3:$start_sector_3:+$num_sectors_metadata -c 3:FWU-Metadata -t 3:$metadata_type_uuid \
-           -n 4:$start_sector_4:+$num_sectors_metadata -c 4:Bkup-FWU-Metadata -t 4:$metadata_type_uuid $gpt_image
+    sgdisk $gpt_image \
+           --set-alignment 1 \
+           --disk-guid $location_uuid \
+           \
+           --new 1:$start_sector_1:+$num_sectors_fip \
+           --change-name 1:FIP_A \
+           --typecode 1:$fip_type_uuid \
+           --partition-guid 1:$FIP_A_uuid \
+           \
+           --new 2:$start_sector_2:+$num_sectors_fip \
+           --change-name 2:FIP_B \
+           --typecode 2:$fip_type_uuid \
+           --partition-guid 2:$FIP_B_uuid \
+           \
+           --new 3:$start_sector_3:+$num_sectors_metadata \
+           --change-name 3:FWU-Metadata \
+           --typecode 3:$metadata_type_uuid \
+           \
+           --new 4:$start_sector_4:+$num_sectors_metadata \
+           --change-name 4:Bkup-FWU-Metadata \
+           --typecode 4:$metadata_type_uuid
 
     # populate the GPT partitions
     dd if=$fip_bin of=$gpt_image bs=$sector_size seek=$start_sector_1 count=$num_sectors_fip conv=notrunc