From 38503ca000a748ca884417423482fe78b9fe9063 Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei.gherzan@huawei.com>
Date: Tue, 3 Aug 2021 10:54:38 +0100
Subject: [PATCH] wic: Reuse BOOT_PARTITION_LABEL as opposed to hardcoding the
 boot partition label

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
---
 meta-ohos-core/wic/x-avenger96.wks.in             | 2 +-
 meta-ohos-core/wic/x-efi-systemd-microcode.wks.in | 2 +-
 meta-ohos-core/wic/x-imx-uboot-bootpart.wks.in    | 2 +-
 meta-ohos-core/wic/x-qemux86-directdisk.wks.in    | 2 +-
 meta-ohos-core/wic/x-raspberrypi.wks.in           | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta-ohos-core/wic/x-avenger96.wks.in b/meta-ohos-core/wic/x-avenger96.wks.in
index 9295493f..db5d903f 100644
--- a/meta-ohos-core/wic/x-avenger96.wks.in
+++ b/meta-ohos-core/wic/x-avenger96.wks.in
@@ -20,7 +20,7 @@ bootloader --ptable gpt
 part fsbl1 --source rawcopy --sourceparams="file=arm-trusted-firmware/tf-a-stm32mp157a-av96-sdcard.stm32" --part-name fsbl1 --part-type 8DA63339-0007-60C0-C436-083AC8230908 --offset 17
 part fsbl2 --source rawcopy --sourceparams="file=arm-trusted-firmware/tf-a-stm32mp157a-av96-sdcard.stm32" --part-name fsbl2 --part-type 8DA63339-0007-60C0-C436-083AC8230908 --offset 273
 part fip --source rawcopy --sourceparams="file=fip/fip-stm32mp157a-av96-trusted.bin" --part-name fip --part-type 8DA63339-0007-60C0-C436-083AC8230908  --offset 529
-part --source bootimg-partition --fstype=ext4 --label boot --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
+part --source bootimg-partition --fstype=ext4 --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
 ${WIC_DEVDATA_PARTITION}
diff --git a/meta-ohos-core/wic/x-efi-systemd-microcode.wks.in b/meta-ohos-core/wic/x-efi-systemd-microcode.wks.in
index 9f46e67f..9fbaa69c 100644
--- a/meta-ohos-core/wic/x-efi-systemd-microcode.wks.in
+++ b/meta-ohos-core/wic/x-efi-systemd-microcode.wks.in
@@ -18,7 +18,7 @@
 
 bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "
 
-part --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --label boot --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
+part --source bootimg-efi --sourceparams="loader=systemd-boot,initrd=microcode.cpio" --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
 ${WIC_DEVDATA_PARTITION}
diff --git a/meta-ohos-core/wic/x-imx-uboot-bootpart.wks.in b/meta-ohos-core/wic/x-imx-uboot-bootpart.wks.in
index cffa5c9f..ec480360 100644
--- a/meta-ohos-core/wic/x-imx-uboot-bootpart.wks.in
+++ b/meta-ohos-core/wic/x-imx-uboot-bootpart.wks.in
@@ -22,7 +22,7 @@
 bootloader --ptable msdos
 
 part u-boot --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --no-table --align 1
-part --source bootimg-partition --fstype=vfat --label boot --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
+part --source bootimg-partition --fstype=vfat --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
 ${WIC_DEVDATA_PARTITION}
diff --git a/meta-ohos-core/wic/x-qemux86-directdisk.wks.in b/meta-ohos-core/wic/x-qemux86-directdisk.wks.in
index 357478cf..c1578be2 100644
--- a/meta-ohos-core/wic/x-qemux86-directdisk.wks.in
+++ b/meta-ohos-core/wic/x-qemux86-directdisk.wks.in
@@ -20,7 +20,7 @@
 
 bootloader --source bootimg-pcbios-label --timeout=0 --append="oprofile.timer=1 rootfstype=${ROOT_FSTYPE}"
 
-part --source bootimg-pcbios-label --label boot --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
+part --source bootimg-pcbios-label --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
 ${WIC_DEVDATA_PARTITION}
diff --git a/meta-ohos-core/wic/x-raspberrypi.wks.in b/meta-ohos-core/wic/x-raspberrypi.wks.in
index a5713131..50863bed 100644
--- a/meta-ohos-core/wic/x-raspberrypi.wks.in
+++ b/meta-ohos-core/wic/x-raspberrypi.wks.in
@@ -25,7 +25,7 @@
 
 bootloader --ptable msdos
 
-part --source bootimg-partition --fstype=vfat --label boot --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
+part --source bootimg-partition --fstype=vfat --label ${BOOT_PARTITION_LABEL} --align 4096 --fixed-size ${BOOT_PARTITION_SIZE} --active --offset 4096
 ${WIC_ROOTA_PARTITION}
 ${WIC_ROOTB_PARTITION}
 ${WIC_DEVDATA_PARTITION}
-- 
GitLab