From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Stefano Babic <sbabic@nabladev.com>,
Fabio Estevam <festevam@gmail.com>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
Tom Rini <trini@konsulko.com>
Cc: u-boot@lists.denx.de, Peng Fan <peng.fan@nxp.com>
Subject: [PATCH v2 4/5] imx93: evk: Add support for capsule update
Date: Mon, 23 Jun 2025 15:02:32 +0800 [thread overview]
Message-ID: <20250623-sr-v2-4-e97fc53f0f8d@nxp.com> (raw)
In-Reply-To: <20250623-sr-v2-0-e97fc53f0f8d@nxp.com>
From: Peng Fan <peng.fan@nxp.com>
Capsule update is EFI based firmware update which is widely
used in various OS distributions. This feature is required
by ARM System-Ready compliance test. So
- Define image array and GUID
- Select configs for EFI Capsule update
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
board/freescale/imx93_evk/imx93_evk.c | 21 +++++++++++++++++++++
configs/imx93_11x11_evk_defconfig | 14 ++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/board/freescale/imx93_evk/imx93_evk.c b/board/freescale/imx93_evk/imx93_evk.c
index c9171df330e2ffe519807b5f04ec2b7bdadf84f9..d84d56be5e1f863d50cb1a832040acf009f011ff 100644
--- a/board/freescale/imx93_evk/imx93_evk.c
+++ b/board/freescale/imx93_evk/imx93_evk.c
@@ -4,6 +4,7 @@
*/
#include <env.h>
+#include <efi_loader.h>
#include <init.h>
#include <miiphy.h>
#include <netdev.h>
@@ -28,6 +29,26 @@ static iomux_v3_cfg_t const uart_pads[] = {
MX93_PAD_UART1_TXD__LPUART1_TX | MUX_PAD_CTRL(UART_PAD_CTRL),
};
+#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
+#define IMX_BOOT_IMAGE_GUID \
+ EFI_GUID(0xbc550d86, 0xda26, 0x4b70, 0xac, 0x05, \
+ 0x2a, 0x44, 0x8e, 0xda, 0x6f, 0x21)
+
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = IMX_BOOT_IMAGE_GUID,
+ .fw_name = u"IMX93-11X11-EVK-RAW",
+ .image_index = 1,
+ },
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "mmc 0=flash-bin raw 0 0x2000 mmcpart 1",
+ .num_images = ARRAY_SIZE(fw_images),
+ .images = fw_images,
+};
+#endif /* EFI_HAVE_CAPSULE_SUPPORT */
+
int board_early_init_f(void)
{
imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig
index 16596a89d60930a0bd906a955d218fa1b096513a..98f6bc2390ca1c42caf6af8b843d3dc94dc25856 100644
--- a/configs/imx93_11x11_evk_defconfig
+++ b/configs/imx93_11x11_evk_defconfig
@@ -26,6 +26,12 @@ CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x88000000
CONFIG_SYS_MEMTEST_START=0x80000000
CONFIG_SYS_MEMTEST_END=0x90000000
CONFIG_REMAKE_ELF=y
+CONFIG_EFI_SET_TIME=y
+CONFIG_EFI_MM_COMM_TEE=y
+CONFIG_EFI_VAR_BUF_SIZE=139264
+CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
+CONFIG_EFI_CAPSULE_ON_DISK=y
+CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
CONFIG_BOOTCOMMAND="bootflow scan -lb; run bsp_bootcmd"
CONFIG_DEFAULT_FDT_FILE="imx93-11x11-evk.dtb"
CONFIG_SYS_CBSIZE=2048
@@ -51,6 +57,7 @@ CONFIG_SPL_WATCHDOG=y
CONFIG_SYS_PROMPT="u-boot=> "
CONFIG_CMD_CPU=y
CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_NVEDIT_EFI=y
# CONFIG_CMD_CRC32 is not set
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_CLK=y
@@ -60,9 +67,11 @@ CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
+CONFIG_CMD_OPTEE_RPMB=y
CONFIG_CMD_POWEROFF=y
CONFIG_CMD_SNTP=y
CONFIG_CMD_CACHE=y
+CONFIG_CMD_EFIDEBUG=y
CONFIG_CMD_RTC=y
CONFIG_CMD_TIME=y
CONFIG_CMD_GETTIME=y
@@ -89,10 +98,12 @@ CONFIG_ADC=y
CONFIG_ADC_IMX93=y
CONFIG_SPL_CLK_IMX93=y
CONFIG_CLK_IMX93=y
+CONFIG_DFU_MMC=y
CONFIG_IMX_RGPIO2P=y
CONFIG_DM_PCA953X=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_IMX_LPI2C=y
+CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
@@ -122,9 +133,12 @@ CONFIG_FSL_LPUART=y
CONFIG_SYSRESET=y
CONFIG_SYSRESET_CMD_POWEROFF=y
CONFIG_SYSRESET_PSCI=y
+CONFIG_TEE=y
+CONFIG_OPTEE=y
CONFIG_DM_THERMAL=y
CONFIG_ULP_WATCHDOG=y
CONFIG_WDT=y
+CONFIG_SHA384=y
CONFIG_LZO=y
CONFIG_BZIP2=y
CONFIG_UTHREAD=y
--
2.35.3
next prev parent reply other threads:[~2025-06-23 5:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-23 7:02 [PATCH v2 0/5] imx: Support capsule update Peng Fan (OSS)
2025-06-23 7:02 ` [PATCH v2 1/5] imx8mp: evk: Add support for " Peng Fan (OSS)
2025-06-23 7:02 ` [PATCH v2 2/5] imx8mm: " Peng Fan (OSS)
2025-06-23 7:02 ` [PATCH v2 3/5] imx8mn: " Peng Fan (OSS)
2025-06-23 7:02 ` Peng Fan (OSS) [this message]
2025-06-23 7:02 ` [PATCH v2 5/5] imx8mq: " Peng Fan (OSS)
2025-07-01 1:43 ` [PATCH v2 0/5] imx: Support " Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250623-sr-v2-4-e97fc53f0f8d@nxp.com \
--to=peng.fan@oss.nxp.com \
--cc=festevam@gmail.com \
--cc=peng.fan@nxp.com \
--cc=sbabic@nabladev.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.