Skip to content
Snippets Groups Projects
Commit d77e2f8c authored by Davide Cardillo's avatar Davide Cardillo
Browse files

[IMX93EVK][BOOTENV] Add dynamic selection for bootscript partition


Clea OS provide a well defined GPT type GUID for its partitions. These
are used to dynamically identify various partitions. This includes the
selection of the parition where the bootscript is stored.

Inside the boot environment, this task has been added.

Signed-off-by: default avatarDavide Cardillo <davide.cardillo@seco.com>
parent a696a0f7
No related branches found
No related tags found
1 merge request!495[LAYER] i.MX platform support compatible with Clea OS
From b99dba6a728538259ff15771948a56a4d8301977 Mon Sep 17 00:00:00 2001 From ba65afca8a123b1776b62239b15e119efeead008 Mon Sep 17 00:00:00 2001
From: Davide Cardillo <davide.cardillo@seco.com> From: Davide Cardillo <davide.cardillo@seco.com>
Date: Fri, 24 Jan 2025 12:08:05 +0100 Date: Tue, 27 May 2025 11:44:47 +0200
Subject: [ENVIRONMENT][IMX93EVK] Change environment to make it compatible with Subject: [ENVIRONMENT][IMX93EVK] Change environment for Clea OS compatibility
Clea OS
This change allows to use directly the bootscr script stored inside the This change allows to use directly the bootscr script stored inside the
boot device. It have to be placed inside theq fist partition. boot device. It have to be placed inside theq fist partition.
Signed-off-by: Davide Cardillo <davide.cardillo@seco.com>
--- ---
configs/imx93_11x11_evk_defconfig | 2 +- configs/imx93_11x11_evk_defconfig | 2 +-
include/configs/imx93_evk.h | 4 +++- include/configs/imx93_evk.h | 6 +++++-
2 files changed, 4 insertions(+), 2 deletions(-) 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig diff --git a/configs/imx93_11x11_evk_defconfig b/configs/imx93_11x11_evk_defconfig
index 93b5c5a6575..a136f6d9c4d 100644 index 93b5c5a6575..a136f6d9c4d 100644
...@@ -25,20 +26,36 @@ index 93b5c5a6575..a136f6d9c4d 100644 ...@@ -25,20 +26,36 @@ index 93b5c5a6575..a136f6d9c4d 100644
CONFIG_SYS_CBSIZE=2048 CONFIG_SYS_CBSIZE=2048
CONFIG_SYS_PBSIZE=2074 CONFIG_SYS_PBSIZE=2074
diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h diff --git a/include/configs/imx93_evk.h b/include/configs/imx93_evk.h
index 27313d272bd..834d019e75c 100644 index 27313d272bd..4a1758f81b5 100644
--- a/include/configs/imx93_evk.h --- a/include/configs/imx93_evk.h
+++ b/include/configs/imx93_evk.h +++ b/include/configs/imx93_evk.h
@@ -83,7 +83,9 @@ @@ -10,6 +10,7 @@
#include <linux/stringify.h>
#include <asm/arch/imx-regs.h>
#include "imx_env.h"
+#include "clea-os.h"
#define CFG_SYS_UBOOT_BASE \
(QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512)
@@ -83,7 +84,8 @@
"mmcroot=/dev/mmcblk1p2 rootwait rw\0" \ "mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
"mmcautodetect=yes\0" \ "mmcautodetect=yes\0" \
"mmcargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot}\0 " \ "mmcargs=setenv bootargs ${jh_clk} ${mcore_clk} console=${console} root=${mmcroot}\0 " \
- "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ - "loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+ "script=boot.scr\0" \ + "script=boot.scr\0" \
+ "bootscript_partition_id=1\0" \
+ "loadbootscript=fatload mmc ${mmcdev}:${bootscript_partition_id} ${loadaddr} ${script};\0" \ + "loadbootscript=fatload mmc ${mmcdev}:${bootscript_partition_id} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \ "bootscript=echo Running bootscript from mmc ...; " \
"source\0" \ "source\0" \
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
@@ -141,6 +143,8 @@
"fi;\0" \
"bsp_bootcmd=echo Running BSP bootcmd ...; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
+ "if test -n ${mmcdev}; then setenv bootscript_device_id ${mmcdev}; else setenv bootscript_device_id 0; fi; " \
+ "part getIDbyType mmc ${bootscript_device_id} " __stringify(CFG_CLEA_OS_GPT_TYPE_BOOTING) " bootscript_partition_id; " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
-- --
2.43.0 2.49.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment