[dunfell][PATCH 1/2] conf: machine: wic: Fix HS image boot partition


Andrew Davis
 

From: Manorit Chawdhry <m-chawdhry@...>

IMAGE_BOOT_FILES was being overwritten in the HS recipes leading to
incomplete binaries in /boot and the naming of the binaries were not
correct.

Fixes /boot partition for HS devices.

Signed-off-by: Manorit Chawdhry <m-chawdhry@...>
[afd: Extended fix to all HS platforms]
Signed-off-by: Andrew Davis <afd@...>
---
conf/machine/am64xx-hs-evm.conf | 4 +---
conf/machine/am65xx-hs-evm.conf | 4 +---
conf/machine/include/k3.inc | 5 +++--
conf/machine/j7-hs-evm.conf | 4 +---
conf/machine/j7200-hs-evm.conf | 4 +---
5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/conf/machine/am64xx-hs-evm.conf b/conf/machine/am64xx-hs-evm.conf
index 44e81463..c0d904e1 100644
--- a/conf/machine/am64xx-hs-evm.conf
+++ b/conf/machine/am64xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/am65xx-hs-evm.conf b/conf/machine/am65xx-hs-evm.conf
index e4eebb6a..a7514663 100644
--- a/conf/machine/am65xx-hs-evm.conf
+++ b/conf/machine/am65xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc
index e0970698..f85e6b98 100644
--- a/conf/machine/include/k3.inc
+++ b/conf/machine/include/k3.inc
@@ -22,6 +22,7 @@ UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

SPL_BINARY = "tispl.bin"
+SPL_BINARYNAME = "tispl.bin"
UBOOT_SUFFIX = "img"

EXTRA_IMAGEDEPENDS += "virtual/bootloader"
@@ -40,8 +41,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet pci"

IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"

-IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
-IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin"
+IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
+IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin"

IMAGE_BOOT_FILES ?= "${IMAGE_BOOT_FILES_LEGACY}"

diff --git a/conf/machine/j7-hs-evm.conf b/conf/machine/j7-hs-evm.conf
index f2e3ccf5..629a5ccd 100644
--- a/conf/machine/j7-hs-evm.conf
+++ b/conf/machine/j7-hs-evm.conf
@@ -15,9 +15,7 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

BBMULTICONFIG += "k3r5-sr1-1"

diff --git a/conf/machine/j7200-hs-evm.conf b/conf/machine/j7200-hs-evm.conf
index a5bd637e..54b7906f 100644
--- a/conf/machine/j7200-hs-evm.conf
+++ b/conf/machine/j7200-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
--
2.36.1


Denys Dmytriyenko
 

On Thu, Jun 02, 2022 at 03:24:47PM -0500, Andrew Davis via lists.yoctoproject.org wrote:
From: Manorit Chawdhry <m-chawdhry@...>

IMAGE_BOOT_FILES was being overwritten in the HS recipes leading to
incomplete binaries in /boot and the naming of the binaries were not
correct.

Fixes /boot partition for HS devices.

Signed-off-by: Manorit Chawdhry <m-chawdhry@...>
[afd: Extended fix to all HS platforms]
Signed-off-by: Andrew Davis <afd@...>
Reviewed-by: Denys Dmytriyenko <denys@...>


---
conf/machine/am64xx-hs-evm.conf | 4 +---
conf/machine/am65xx-hs-evm.conf | 4 +---
conf/machine/include/k3.inc | 5 +++--
conf/machine/j7-hs-evm.conf | 4 +---
conf/machine/j7200-hs-evm.conf | 4 +---
5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/conf/machine/am64xx-hs-evm.conf b/conf/machine/am64xx-hs-evm.conf
index 44e81463..c0d904e1 100644
--- a/conf/machine/am64xx-hs-evm.conf
+++ b/conf/machine/am64xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/am65xx-hs-evm.conf b/conf/machine/am65xx-hs-evm.conf
index e4eebb6a..a7514663 100644
--- a/conf/machine/am65xx-hs-evm.conf
+++ b/conf/machine/am65xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc
index e0970698..f85e6b98 100644
--- a/conf/machine/include/k3.inc
+++ b/conf/machine/include/k3.inc
@@ -22,6 +22,7 @@ UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

SPL_BINARY = "tispl.bin"
+SPL_BINARYNAME = "tispl.bin"
UBOOT_SUFFIX = "img"

EXTRA_IMAGEDEPENDS += "virtual/bootloader"
@@ -40,8 +41,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet pci"

IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"

-IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
-IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin"
+IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
+IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin"

IMAGE_BOOT_FILES ?= "${IMAGE_BOOT_FILES_LEGACY}"

diff --git a/conf/machine/j7-hs-evm.conf b/conf/machine/j7-hs-evm.conf
index f2e3ccf5..629a5ccd 100644
--- a/conf/machine/j7-hs-evm.conf
+++ b/conf/machine/j7-hs-evm.conf
@@ -15,9 +15,7 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

BBMULTICONFIG += "k3r5-sr1-1"

diff --git a/conf/machine/j7200-hs-evm.conf b/conf/machine/j7200-hs-evm.conf
index a5bd637e..54b7906f 100644
--- a/conf/machine/j7200-hs-evm.conf
+++ b/conf/machine/j7200-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
--
2.36.1


Manorit Chawdhry
 

On 17:01-20220603, Denys Dmytriyenko wrote:
On Thu, Jun 02, 2022 at 03:24:47PM -0500, Andrew Davis via lists.yoctoproject.org wrote:
From: Manorit Chawdhry <m-chawdhry@...>

IMAGE_BOOT_FILES was being overwritten in the HS recipes leading to
incomplete binaries in /boot and the naming of the binaries were not
correct.

Fixes /boot partition for HS devices.

Signed-off-by: Manorit Chawdhry <m-chawdhry@...>
[afd: Extended fix to all HS platforms]
Signed-off-by: Andrew Davis <afd@...>
Reviewed-by: Denys Dmytriyenko <denys@...>

Hi,

Running this patch on j721e-hsevm seems to break the secure boot mechanism on
u-boot stage. Will need fixes.

Regards,
Manorit

---
conf/machine/am64xx-hs-evm.conf | 4 +---
conf/machine/am65xx-hs-evm.conf | 4 +---
conf/machine/include/k3.inc | 5 +++--
conf/machine/j7-hs-evm.conf | 4 +---
conf/machine/j7200-hs-evm.conf | 4 +---
5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/conf/machine/am64xx-hs-evm.conf b/conf/machine/am64xx-hs-evm.conf
index 44e81463..c0d904e1 100644
--- a/conf/machine/am64xx-hs-evm.conf
+++ b/conf/machine/am64xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/am65xx-hs-evm.conf b/conf/machine/am65xx-hs-evm.conf
index e4eebb6a..a7514663 100644
--- a/conf/machine/am65xx-hs-evm.conf
+++ b/conf/machine/am65xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc
index e0970698..f85e6b98 100644
--- a/conf/machine/include/k3.inc
+++ b/conf/machine/include/k3.inc
@@ -22,6 +22,7 @@ UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

SPL_BINARY = "tispl.bin"
+SPL_BINARYNAME = "tispl.bin"
UBOOT_SUFFIX = "img"

EXTRA_IMAGEDEPENDS += "virtual/bootloader"
@@ -40,8 +41,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet pci"

IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"

-IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
-IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin"
+IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
+IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin"

IMAGE_BOOT_FILES ?= "${IMAGE_BOOT_FILES_LEGACY}"

diff --git a/conf/machine/j7-hs-evm.conf b/conf/machine/j7-hs-evm.conf
index f2e3ccf5..629a5ccd 100644
--- a/conf/machine/j7-hs-evm.conf
+++ b/conf/machine/j7-hs-evm.conf
@@ -15,9 +15,7 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

BBMULTICONFIG += "k3r5-sr1-1"

diff --git a/conf/machine/j7200-hs-evm.conf b/conf/machine/j7200-hs-evm.conf
index a5bd637e..54b7906f 100644
--- a/conf/machine/j7200-hs-evm.conf
+++ b/conf/machine/j7200-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"

SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"

TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
--
2.36.1


Andrew Davis
 

On 6/6/22 9:26 AM, Manorit Chawdhry wrote:
On 17:01-20220603, Denys Dmytriyenko wrote:
On Thu, Jun 02, 2022 at 03:24:47PM -0500, Andrew Davis via lists.yoctoproject.org wrote:
From: Manorit Chawdhry <m-chawdhry@...>

IMAGE_BOOT_FILES was being overwritten in the HS recipes leading to
incomplete binaries in /boot and the naming of the binaries were not
correct.

Fixes /boot partition for HS devices.

Signed-off-by: Manorit Chawdhry <m-chawdhry@...>
[afd: Extended fix to all HS platforms]
Signed-off-by: Andrew Davis <afd@...>
Reviewed-by: Denys Dmytriyenko <denys@...>

Hi,
Running this patch on j721e-hsevm seems to break the secure boot mechanism on
u-boot stage. Will need fixes.

Thanks for testing, will fix and send v2.

Thanks,
Andrew


Regards,
Manorit

---
conf/machine/am64xx-hs-evm.conf | 4 +---
conf/machine/am65xx-hs-evm.conf | 4 +---
conf/machine/include/k3.inc | 5 +++--
conf/machine/j7-hs-evm.conf | 4 +---
conf/machine/j7200-hs-evm.conf | 4 +---
5 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/conf/machine/am64xx-hs-evm.conf b/conf/machine/am64xx-hs-evm.conf
index 44e81463..c0d904e1 100644
--- a/conf/machine/am64xx-hs-evm.conf
+++ b/conf/machine/am64xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"
SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/am65xx-hs-evm.conf b/conf/machine/am65xx-hs-evm.conf
index e4eebb6a..a7514663 100644
--- a/conf/machine/am65xx-hs-evm.conf
+++ b/conf/machine/am65xx-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"
SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
diff --git a/conf/machine/include/k3.inc b/conf/machine/include/k3.inc
index e0970698..f85e6b98 100644
--- a/conf/machine/include/k3.inc
+++ b/conf/machine/include/k3.inc
@@ -22,6 +22,7 @@ UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"
SPL_BINARY = "tispl.bin"
+SPL_BINARYNAME = "tispl.bin"
UBOOT_SUFFIX = "img"
EXTRA_IMAGEDEPENDS += "virtual/bootloader"
@@ -40,8 +41,8 @@ MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet pci"
IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
-IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
-IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARY} u-boot.${UBOOT_SUFFIX} tiboot3.bin"
+IMAGE_BOOT_FILES_LEGACY = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin sysfw.itb"
+IMAGE_BOOT_FILES_MULTI_CERT = "${SPL_BINARYNAME} u-boot.${UBOOT_SUFFIX} tiboot3.bin"
IMAGE_BOOT_FILES ?= "${IMAGE_BOOT_FILES_LEGACY}"
diff --git a/conf/machine/j7-hs-evm.conf b/conf/machine/j7-hs-evm.conf
index f2e3ccf5..629a5ccd 100644
--- a/conf/machine/j7-hs-evm.conf
+++ b/conf/machine/j7-hs-evm.conf
@@ -15,9 +15,7 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"
SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"
BBMULTICONFIG += "k3r5-sr1-1"
diff --git a/conf/machine/j7200-hs-evm.conf b/conf/machine/j7200-hs-evm.conf
index a5bd637e..54b7906f 100644
--- a/conf/machine/j7200-hs-evm.conf
+++ b/conf/machine/j7200-hs-evm.conf
@@ -15,8 +15,6 @@ UBOOT_DTBO_LOADADDRESS = "0x83080000"
UBOOT_DTBO_OFFSET = "0x00010000"
SPL_BINARY = "tispl.bin_HS"
-SPL_BINARYNAME = "tispl.bin"
-UBOOT_BINARY = "u-boot.img_HS"
-IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
+UBOOT_IMAGE = "u-boot.img_HS"
TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
--
2.36.1