[PATCH 0/3] Developerbox: Cleanup and document update

This series removes the obsolete UEFI capsule update definition and updates the build instruction. Another patch[1] is required to complete the cleanup.
From U-Boot v2023.10 release, A/B update and new NOR Flash layout
is enabled by default. We would like to pin the U-Boot version to v2023.07 when the user want to use U-Boot as a replacement of factory default EDK2.
[1] https://lore.kernel.org/u-boot/20231019135419.162726-1-ilias.apalodimas@lina...
Masahisa Kojima (3): board: developerbox: remove obsolete NOR flash layout definition board: developerbox: update old NOR flash layout build instruction board: developerbox: update flash rawwrite binary size
doc/board/socionext/developerbox.rst | 7 ++++--- include/configs/synquacer.h | 19 ------------------- 2 files changed, 4 insertions(+), 22 deletions(-)

There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org --- include/configs/synquacer.h | 19 ------------------- 1 file changed, 19 deletions(-)
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index cd7359c2f8..e36e63e81e 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -40,20 +40,6 @@
/* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
-#ifdef CONFIG_FWU_MULTI_BANK_UPDATE -#define DEFAULT_DFU_ALT_INFO -#else -#define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \ - "mtd nor1=u-boot.bin raw 200000 100000;" \ - "fip.bin raw 180000 78000;" \ - "optee.bin raw 500000 100000\0" -#endif - -/* GUIDs for capsule updatable firmware images */ -#define DEVELOPERBOX_UBOOT_IMAGE_GUID \ - EFI_GUID(0x53a92e83, 0x4ef4, 0x473a, 0x8b, 0x0d, \ - 0xb5, 0xd8, 0xc7, 0xb2, 0xd6, 0x00) - #ifdef CONFIG_FWU_MULTI_BANK_UPDATE #define DEVELOPERBOX_FIP_IMAGE_GUID \ EFI_GUID(0x7d6dc310, 0x52ca, 0x43b8, 0xb7, 0xb9, \ @@ -64,10 +50,6 @@ 0x33, 0xe0, 0xb9, 0x16, 0xf3, 0x98) #endif
-#define DEVELOPERBOX_OPTEE_IMAGE_GUID \ - EFI_GUID(0xc1b629f1, 0xce0e, 0x4894, 0x82, 0xbf, \ - 0xf0, 0xa3, 0x83, 0x87, 0xe6, 0x30) - /* Distro boot settings */ #ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICE_USB(func) func(USB, usb, 0) @@ -107,7 +89,6 @@ "ramdisk_addr_r=0xa0000000\0" \ "scriptaddr=0x88000000\0" \ "pxefile_addr_r=0x88100000\0" \ - DEFAULT_DFU_ALT_INFO \ BOOTENV
#endif /* __CONFIG_H */

On Wed, 25 Oct 2023 at 09:52, Masahisa Kojima masahisa.kojima@linaro.org wrote:
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org
include/configs/synquacer.h | 19 ------------------- 1 file changed, 19 deletions(-)
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index cd7359c2f8..e36e63e81e 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -40,20 +40,6 @@
/* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
-#ifdef CONFIG_FWU_MULTI_BANK_UPDATE -#define DEFAULT_DFU_ALT_INFO -#else -#define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \
"mtd nor1=u-boot.bin raw 200000 100000;" \
"fip.bin raw 180000 78000;" \
"optee.bin raw 500000 100000\0"
-#endif
We don't need any of these because we use the .dfu_alt_string to generate those right?
-/* GUIDs for capsule updatable firmware images */ -#define DEVELOPERBOX_UBOOT_IMAGE_GUID \
EFI_GUID(0x53a92e83, 0x4ef4, 0x473a, 0x8b, 0x0d, \
0xb5, 0xd8, 0xc7, 0xb2, 0xd6, 0x00)
#ifdef CONFIG_FWU_MULTI_BANK_UPDATE #define DEVELOPERBOX_FIP_IMAGE_GUID \ EFI_GUID(0x7d6dc310, 0x52ca, 0x43b8, 0xb7, 0xb9, \ @@ -64,10 +50,6 @@ 0x33, 0xe0, 0xb9, 0x16, 0xf3, 0x98) #endif
-#define DEVELOPERBOX_OPTEE_IMAGE_GUID \
EFI_GUID(0xc1b629f1, 0xce0e, 0x4894, 0x82, 0xbf, \
0xf0, 0xa3, 0x83, 0x87, 0xe6, 0x30)
/* Distro boot settings */ #ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICE_USB(func) func(USB, usb, 0) @@ -107,7 +89,6 @@ "ramdisk_addr_r=0xa0000000\0" \ "scriptaddr=0x88000000\0" \ "pxefile_addr_r=0x88100000\0" \
DEFAULT_DFU_ALT_INFO \ BOOTENV
#endif /* __CONFIG_H */
2.34.1
Thanks /Ilias

Hi Ilias,
On Fri, 27 Oct 2023 at 03:58, Ilias Apalodimas ilias.apalodimas@linaro.org wrote:
On Wed, 25 Oct 2023 at 09:52, Masahisa Kojima masahisa.kojima@linaro.org wrote:
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org
include/configs/synquacer.h | 19 ------------------- 1 file changed, 19 deletions(-)
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index cd7359c2f8..e36e63e81e 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -40,20 +40,6 @@
/* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
-#ifdef CONFIG_FWU_MULTI_BANK_UPDATE -#define DEFAULT_DFU_ALT_INFO -#else -#define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \
"mtd nor1=u-boot.bin raw 200000 100000;" \
"fip.bin raw 180000 78000;" \
"optee.bin raw 500000 100000\0"
-#endif
We don't need any of these because we use the .dfu_alt_string to generate those right?
You are correct. We can generate dfu_alt_info from .dfu_string.
Thanks, Masahisa Kojima
-/* GUIDs for capsule updatable firmware images */ -#define DEVELOPERBOX_UBOOT_IMAGE_GUID \
EFI_GUID(0x53a92e83, 0x4ef4, 0x473a, 0x8b, 0x0d, \
0xb5, 0xd8, 0xc7, 0xb2, 0xd6, 0x00)
#ifdef CONFIG_FWU_MULTI_BANK_UPDATE #define DEVELOPERBOX_FIP_IMAGE_GUID \ EFI_GUID(0x7d6dc310, 0x52ca, 0x43b8, 0xb7, 0xb9, \ @@ -64,10 +50,6 @@ 0x33, 0xe0, 0xb9, 0x16, 0xf3, 0x98) #endif
-#define DEVELOPERBOX_OPTEE_IMAGE_GUID \
EFI_GUID(0xc1b629f1, 0xce0e, 0x4894, 0x82, 0xbf, \
0xf0, 0xa3, 0x83, 0x87, 0xe6, 0x30)
/* Distro boot settings */ #ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICE_USB(func) func(USB, usb, 0) @@ -107,7 +89,6 @@ "ramdisk_addr_r=0xa0000000\0" \ "scriptaddr=0x88000000\0" \ "pxefile_addr_r=0x88100000\0" \
DEFAULT_DFU_ALT_INFO \ BOOTENV
#endif /* __CONFIG_H */
2.34.1
Thanks /Ilias

On Fri, 27 Oct 2023 at 03:21, Masahisa Kojima masahisa.kojima@linaro.org wrote:
Hi Ilias,
On Fri, 27 Oct 2023 at 03:58, Ilias Apalodimas ilias.apalodimas@linaro.org wrote:
On Wed, 25 Oct 2023 at 09:52, Masahisa Kojima masahisa.kojima@linaro.org wrote:
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org
include/configs/synquacer.h | 19 ------------------- 1 file changed, 19 deletions(-)
diff --git a/include/configs/synquacer.h b/include/configs/synquacer.h index cd7359c2f8..e36e63e81e 100644 --- a/include/configs/synquacer.h +++ b/include/configs/synquacer.h @@ -40,20 +40,6 @@
/* Since U-Boot 64bit PCIe support is limited, disable 64bit MMIO support */
-#ifdef CONFIG_FWU_MULTI_BANK_UPDATE -#define DEFAULT_DFU_ALT_INFO -#else -#define DEFAULT_DFU_ALT_INFO "dfu_alt_info=" \
"mtd nor1=u-boot.bin raw 200000 100000;" \
"fip.bin raw 180000 78000;" \
"optee.bin raw 500000 100000\0"
-#endif
We don't need any of these because we use the .dfu_alt_string to generate those right?
You are correct. We can generate dfu_alt_info from .dfu_string.
Thanks, Masahisa Kojima
-/* GUIDs for capsule updatable firmware images */ -#define DEVELOPERBOX_UBOOT_IMAGE_GUID \
EFI_GUID(0x53a92e83, 0x4ef4, 0x473a, 0x8b, 0x0d, \
0xb5, 0xd8, 0xc7, 0xb2, 0xd6, 0x00)
#ifdef CONFIG_FWU_MULTI_BANK_UPDATE #define DEVELOPERBOX_FIP_IMAGE_GUID \ EFI_GUID(0x7d6dc310, 0x52ca, 0x43b8, 0xb7, 0xb9, \ @@ -64,10 +50,6 @@ 0x33, 0xe0, 0xb9, 0x16, 0xf3, 0x98) #endif
-#define DEVELOPERBOX_OPTEE_IMAGE_GUID \
EFI_GUID(0xc1b629f1, 0xce0e, 0x4894, 0x82, 0xbf, \
0xf0, 0xa3, 0x83, 0x87, 0xe6, 0x30)
/* Distro boot settings */ #ifdef CONFIG_CMD_USB #define BOOT_TARGET_DEVICE_USB(func) func(USB, usb, 0) @@ -107,7 +89,6 @@ "ramdisk_addr_r=0xa0000000\0" \ "scriptaddr=0x88000000\0" \ "pxefile_addr_r=0x88100000\0" \
DEFAULT_DFU_ALT_INFO \ BOOTENV
#endif /* __CONFIG_H */
2.34.1
Thanks /Ilias
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org

On Wed, Oct 25, 2023 at 03:51:01PM +0900, Masahisa Kojima wrote:
There are two kinds of NOR flash layout for the Developerbox. Capsule update for the old layout is no longer available since it has small capacity for secure world images and can not house the TA such as fTPM. This commit removes the definition related to the obsolete NOR flash layout for the UEFI capsule update.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
Applied to u-boot/master, thanks!

v2023.07 is the last version supporting old NOR flash layout by default. The later versions of U-Boot, Developerbox is configured to enable A/B update and new NOR Flash layout by default. This commit updates the documentation to pin the U-Boot version for the old NOR flash layout. It is still useful for the user wants to replace the factory default EDK II firmware to U-Boot.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org --- doc/board/socionext/developerbox.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/board/socionext/developerbox.rst b/doc/board/socionext/developerbox.rst index aa7080e26c..596cf9f908 100644 --- a/doc/board/socionext/developerbox.rst +++ b/doc/board/socionext/developerbox.rst @@ -42,9 +42,10 @@ Compile from source You can build U-Boot without any additinal source code.::
cd u-boot + git checkout v2023.07 export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-gnu- - make SynQuacer_defconfig + make synquacer_developerbox_defconfig make -j `noproc`
Then, expand the binary to 1MB for preparing flash.::

On Wed, 25 Oct 2023 at 09:52, Masahisa Kojima masahisa.kojima@linaro.org wrote:
v2023.07 is the last version supporting old NOR flash layout by default. The later versions of U-Boot, Developerbox is configured to enable A/B update and new NOR Flash layout by default. This commit updates the documentation to pin the U-Boot version for the old NOR flash layout. It is still useful for the user wants to replace the factory default EDK II firmware to U-Boot.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org
doc/board/socionext/developerbox.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/board/socionext/developerbox.rst b/doc/board/socionext/developerbox.rst index aa7080e26c..596cf9f908 100644 --- a/doc/board/socionext/developerbox.rst +++ b/doc/board/socionext/developerbox.rst @@ -42,9 +42,10 @@ Compile from source You can build U-Boot without any additinal source code.::
cd u-boot
- git checkout v2023.07 export ARCH=arm64 export CROSS_COMPILE=aarch64-linux-gnu-
- make SynQuacer_defconfig
- make synquacer_developerbox_defconfig make -j `noproc`
Then, expand the binary to 1MB for preparing flash.::
2.34.1
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org

On Wed, Oct 25, 2023 at 03:51:02PM +0900, Masahisa Kojima wrote:
v2023.07 is the last version supporting old NOR flash layout by default. The later versions of U-Boot, Developerbox is configured to enable A/B update and new NOR Flash layout by default. This commit updates the documentation to pin the U-Boot version for the old NOR flash layout. It is still useful for the user wants to replace the factory default EDK II firmware to U-Boot.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
Applied to u-boot/master, thanks!

Current documentation limits the firmware size to 1.5MB. When the fTPM and StandaloneMM-based RPMB secure storage is enabled, firmware size is bigger than that size. Let's specify the A/B update bank size(4MB) for flash rawwrite parameter.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org --- doc/board/socionext/developerbox.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/board/socionext/developerbox.rst b/doc/board/socionext/developerbox.rst index 596cf9f908..46712c379b 100644 --- a/doc/board/socionext/developerbox.rst +++ b/doc/board/socionext/developerbox.rst @@ -212,8 +212,8 @@ can be installed via NOR flash writer. Once the flasher tool is running we are ready to flash the images.:: Write the FIP image to the Bank-0 & 1 at 6MB and 10MB offset.::
- flash rawwrite 600000 180000 - flash rawwrite a00000 180000 + flash rawwrite 600000 400000 + flash rawwrite a00000 400000
Send SPI_NOR_NEWFIP.fd via XMODEM (Control-A S in minicom) <<
flash rawwrite 500000 1000

On Wed, 25 Oct 2023 at 09:52, Masahisa Kojima masahisa.kojima@linaro.org wrote:
Current documentation limits the firmware size to 1.5MB. When the fTPM and StandaloneMM-based RPMB secure storage is enabled, firmware size is bigger than that size. Let's specify the A/B update bank size(4MB) for flash rawwrite parameter.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org
doc/board/socionext/developerbox.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/board/socionext/developerbox.rst b/doc/board/socionext/developerbox.rst index 596cf9f908..46712c379b 100644 --- a/doc/board/socionext/developerbox.rst +++ b/doc/board/socionext/developerbox.rst @@ -212,8 +212,8 @@ can be installed via NOR flash writer. Once the flasher tool is running we are ready to flash the images.:: Write the FIP image to the Bank-0 & 1 at 6MB and 10MB offset.::
- flash rawwrite 600000 180000
- flash rawwrite a00000 180000
flash rawwrite 600000 400000
flash rawwrite a00000 400000
Send SPI_NOR_NEWFIP.fd via XMODEM (Control-A S in minicom) <<
flash rawwrite 500000 1000
-- 2.34.1
Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org

On Wed, Oct 25, 2023 at 03:51:03PM +0900, Masahisa Kojima wrote:
Current documentation limits the firmware size to 1.5MB. When the fTPM and StandaloneMM-based RPMB secure storage is enabled, firmware size is bigger than that size. Let's specify the A/B update bank size(4MB) for flash rawwrite parameter.
Signed-off-by: Masahisa Kojima masahisa.kojima@linaro.org Acked-by: Jassi Brar jaswinder.singh@linaro.org Reviewed-by: Ilias Apalodimas ilias.apalodimas@linaro.org
Applied to u-boot/master, thanks!
participants (3)
-
Ilias Apalodimas
-
Masahisa Kojima
-
Tom Rini