All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot
@ 2025-12-04  8:07 Primoz Fiser
  2025-12-04  8:07 ` [PATCH 2/3] board: phytec: phycore-imx93: Set boot_targets dynamically Primoz Fiser
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Primoz Fiser @ 2025-12-04  8:07 UTC (permalink / raw)
  To: Mathieu Othacehe, Christoph Stoidner, Stefano Babic,
	Fabio Estevam, uboot-imx, Tom Rini, Benjamin Hahn
  Cc: u-boot, upstream

Enable standard boot for the phyCORE-i.MX93 board and use it as a new
default. Add required standard boot variables to the environment, while
removing old boot scripts and now unnecessary environment variables.
Adjust variables according to the requirements of PHYTEC ampliphy-boot
distro-boot. Last but not least, order environment vars by alphabet and
run 'make savedefconfig' to resync defconfig.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
 arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi | 16 +++++
 board/phytec/phycore_imx93/phycore_imx93.env  | 69 ++-----------------
 configs/imx93-phycore_defconfig               | 12 +++-
 3 files changed, 33 insertions(+), 64 deletions(-)

diff --git a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
index 0c8d0ba9693f..646b617949d6 100644
--- a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
+++ b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
@@ -30,6 +30,22 @@
 		ethernet1 = &eqos;
 	};
 
+	bootstd {
+		bootph-verify;
+		compatible = "u-boot,boot-std";
+
+		filename-prefixes = "/", "/boot/";
+		bootdev-order = "mmc0", "mmc1", "ethernet";
+
+		rauc {
+			compatible = "u-boot,distro-rauc";
+		};
+
+		script {
+			compatible = "u-boot,script";
+		};
+	};
+
 	firmware {
 		optee {
 			compatible = "linaro,optee-tz";
diff --git a/board/phytec/phycore_imx93/phycore_imx93.env b/board/phytec/phycore_imx93/phycore_imx93.env
index 7b0a90e64472..8a2161e4abdf 100644
--- a/board/phytec/phycore_imx93/phycore_imx93.env
+++ b/board/phytec/phycore_imx93/phycore_imx93.env
@@ -1,70 +1,13 @@
 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
 
-#include <env/phytec/rauc.env>
-#include <env/phytec/overlays.env>
-
-bootcmd=
-	mmc dev ${mmcdev};
-	if mmc rescan; then
-		if test ${doraucboot} = 1; then
-			run raucinit;
-		fi;
-		if run loadimage; then
-			run mmcboot;
-		else
-			run netboot;
-		fi;
-	fi;
-image=Image
+boot_script_dhcp=net_boot_fit.scr.uimg
+bootcmd=bootflow scan -lb;
 console=ttyLP0
 fdt_addr_r=0x90000000
-fdtoverlay_addr_r=0x900c0000
-bootenv_addr_r=0x90500000
 fdtfile=CONFIG_DEFAULT_FDT_FILE
+fdtoverlay_addr_r=0x900c0000
 ip_dyn=yes
+kernel_addr_r=0x88000000
+nfsroot=/srv/nfs
 prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted"
-mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
-mmcpart=1
-mmcroot=2
-mmcautodetect=yes
-mmcargs=setenv bootargs console=${console},${baudrate} earlycon
-	root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw ${optargs}
-loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
-loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
-mmcboot=
-	echo Booting from mmc ...;
-	if test ${no_bootenv} = 0; then
-		if run mmc_load_bootenv; then
-			env import -t ${bootenv_addr_r} ${filesize};
-		fi;
-	fi;
-	run mmcargs;
-	if run loadfdt; then
-		run mmc_apply_overlays;
-		booti ${loadaddr} - ${fdt_addr_r};
-	else
-		echo WARN: Cannot load the DT;
-	fi;
-nfsroot=/nfs
-netargs=setenv bootargs console=${console},${baudrate} earlycon
-	root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp ${optargs}
-netboot=
-	echo Booting from net ...;
-	run netargs;
-	if test ${ip_dyn} = yes; then
-		setenv get_cmd dhcp;
-	else
-		setenv get_cmd tftp;
-	fi;
-	if test ${no_bootenv} = 0; then
-		if run net_load_bootenv; then
-			env import -t ${bootenv_addr_r} ${filesize};
-		fi;
-	fi;
-	${get_cmd} ${loadaddr} ${image};
-	if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
-		run net_apply_overlays;
-		booti ${loadaddr} - ${fdt_addr_r};
-	else
-		echo WARN: Cannot load the DT;
-	fi;
+scriptaddr=0x83500000
diff --git a/configs/imx93-phycore_defconfig b/configs/imx93-phycore_defconfig
index 4c952e966d1a..9e8ff9b6ca90 100644
--- a/configs/imx93-phycore_defconfig
+++ b/configs/imx93-phycore_defconfig
@@ -5,10 +5,10 @@ CONFIG_SYS_MALLOC_LEN=0x2000000
 CONFIG_SYS_MALLOC_F_LEN=0x20000
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_ENV_SOURCE_FILE="phycore_imx93"
 CONFIG_NR_DRAM_BANKS=2
 CONFIG_PHYTEC_SOM_DETECTION=y
 CONFIG_PHYTEC_EEPROM_BUS=2
-CONFIG_ENV_SOURCE_FILE="phycore_imx93"
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x700000
 CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
@@ -33,8 +33,13 @@ CONFIG_SYS_MEMTEST_START=0x80000000
 CONFIG_SYS_MEMTEST_END=0x90000000
 CONFIG_REMAKE_ELF=y
 # CONFIG_ANDROID_BOOT_IMAGE is not set
+CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_BOOTSTD_FULL=y
+# CONFIG_BOOTSTD_DEFAULTS is not set
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_OF_SYSTEM_SETUP=y
+# CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_DEFAULT_FDT_FILE="oftree"
 CONFIG_SYS_CBSIZE=2048
 CONFIG_SYS_PBSIZE=2074
@@ -52,6 +57,9 @@ CONFIG_SPL_I2C=y
 CONFIG_SPL_POWER=y
 CONFIG_SPL_WATCHDOG=y
 CONFIG_SYS_PROMPT="u-boot=> "
+# CONFIG_CMD_BOOTDEV is not set
+# CONFIG_CMD_BOOTMETH is not set
+# CONFIG_CMD_BOOTSTD is not set
 CONFIG_CMD_ERASEENV=y
 CONFIG_CMD_NVEDIT_EFI=y
 CONFIG_CRC32_VERIFY=y
@@ -149,5 +157,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
 CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
 CONFIG_CI_UDC=y
 CONFIG_ULP_WATCHDOG=y
+# CONFIG_RSA is not set
+# CONFIG_SPL_SHA256 is not set
 CONFIG_LZO=y
 CONFIG_BZIP2=y
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] board: phytec: phycore-imx93: Set boot_targets dynamically
  2025-12-04  8:07 [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Primoz Fiser
@ 2025-12-04  8:07 ` Primoz Fiser
  2025-12-04  8:07 ` [PATCH 3/3] board: phytec: phycore-imx93: env: Add required uuu variables Primoz Fiser
  2025-12-05  9:41 ` [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Benjamin Hahn
  2 siblings, 0 replies; 5+ messages in thread
From: Primoz Fiser @ 2025-12-04  8:07 UTC (permalink / raw)
  To: Mathieu Othacehe, Christoph Stoidner, Stefano Babic,
	Fabio Estevam, uboot-imx, Tom Rini, Benjamin Hahn
  Cc: u-boot, upstream

Set boot_targets environment variable dynamically, so that when booting
from SD-card, boot binaries are also preferably fetched from the SD-card
by default. If the user decides to set their own boot_targets, we should
not overwrite them.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
 board/phytec/phycore_imx93/phycore-imx93.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/phytec/phycore_imx93/phycore-imx93.c b/board/phytec/phycore_imx93/phycore-imx93.c
index c6a4e923b074..cfc6d91f20f2 100644
--- a/board/phytec/phycore_imx93/phycore-imx93.c
+++ b/board/phytec/phycore_imx93/phycore-imx93.c
@@ -38,6 +38,8 @@ int board_late_init(void)
 	switch (get_boot_device()) {
 	case SD2_BOOT:
 		env_set_ulong("mmcdev", 1);
+		if (!env_get("boot_targets"))
+			env_set("boot_targets", "mmc1 mmc0 ethernet");
 		break;
 	case MMC1_BOOT:
 		env_set_ulong("mmcdev", 0);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] board: phytec: phycore-imx93: env: Add required uuu variables
  2025-12-04  8:07 [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Primoz Fiser
  2025-12-04  8:07 ` [PATCH 2/3] board: phytec: phycore-imx93: Set boot_targets dynamically Primoz Fiser
@ 2025-12-04  8:07 ` Primoz Fiser
  2025-12-05  9:41 ` [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Benjamin Hahn
  2 siblings, 0 replies; 5+ messages in thread
From: Primoz Fiser @ 2025-12-04  8:07 UTC (permalink / raw)
  To: Mathieu Othacehe, Christoph Stoidner, Stefano Babic,
	Fabio Estevam, uboot-imx, Tom Rini, Benjamin Hahn
  Cc: u-boot, upstream

Add variable 'emmc_dev' and 'sd_dev' required for NXP uuu flash scripts.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
---
 board/phytec/phycore_imx93/phycore_imx93.env | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/phytec/phycore_imx93/phycore_imx93.env b/board/phytec/phycore_imx93/phycore_imx93.env
index 8a2161e4abdf..b6613d015032 100644
--- a/board/phytec/phycore_imx93/phycore_imx93.env
+++ b/board/phytec/phycore_imx93/phycore_imx93.env
@@ -3,6 +3,7 @@
 boot_script_dhcp=net_boot_fit.scr.uimg
 bootcmd=bootflow scan -lb;
 console=ttyLP0
+emmc_dev=0  /* This is needed by built-in uuu flash scripts */
 fdt_addr_r=0x90000000
 fdtfile=CONFIG_DEFAULT_FDT_FILE
 fdtoverlay_addr_r=0x900c0000
@@ -11,3 +12,4 @@ kernel_addr_r=0x88000000
 nfsroot=/srv/nfs
 prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted"
 scriptaddr=0x83500000
+sd_dev=1    /* This is needed by built-in uuu flash scripts */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot
  2025-12-04  8:07 [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Primoz Fiser
  2025-12-04  8:07 ` [PATCH 2/3] board: phytec: phycore-imx93: Set boot_targets dynamically Primoz Fiser
  2025-12-04  8:07 ` [PATCH 3/3] board: phytec: phycore-imx93: env: Add required uuu variables Primoz Fiser
@ 2025-12-05  9:41 ` Benjamin Hahn
  2025-12-05 10:03   ` Primoz Fiser
  2 siblings, 1 reply; 5+ messages in thread
From: Benjamin Hahn @ 2025-12-05  9:41 UTC (permalink / raw)
  To: Primoz Fiser, Mathieu Othacehe, Christoph Stoidner, Stefano Babic,
	Fabio Estevam, uboot-imx@nxp.com, Tom Rini
  Cc: u-boot@lists.denx.de, upstream@lists.phytec.de

Hi Primoz,
On 04.12.25 09:07, Primoz Fiser wrote:
> Enable standard boot for the phyCORE-i.MX93 board and use it as a new
> default. Add required standard boot variables to the environment, while
> removing old boot scripts and now unnecessary environment variables.
> Adjust variables according to the requirements of PHYTEC ampliphy-boot
> distro-boot. Last but not least, order environment vars by alphabet and
> run 'make savedefconfig' to resync defconfig.
>
> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
> ---
>   arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi | 16 +++++
>   board/phytec/phycore_imx93/phycore_imx93.env  | 69 ++-----------------
>   configs/imx93-phycore_defconfig               | 12 +++-
>   3 files changed, 33 insertions(+), 64 deletions(-)
>
> diff --git a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
> index 0c8d0ba9693f..646b617949d6 100644
> --- a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
> +++ b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
> @@ -30,6 +30,22 @@
>   		ethernet1 = &eqos;
>   	};
>   
> +	bootstd {
> +		bootph-verify;
> +		compatible = "u-boot,boot-std";
> +
> +		filename-prefixes = "/", "/boot/";
> +		bootdev-order = "mmc0", "mmc1", "ethernet";
> +
> +		rauc {
> +			compatible = "u-boot,distro-rauc";
> +		};
> +
> +		script {
> +			compatible = "u-boot,script";
> +		};
> +	};
> +
>   	firmware {
>   		optee {
>   			compatible = "linaro,optee-tz";
> diff --git a/board/phytec/phycore_imx93/phycore_imx93.env b/board/phytec/phycore_imx93/phycore_imx93.env
> index 7b0a90e64472..8a2161e4abdf 100644
> --- a/board/phytec/phycore_imx93/phycore_imx93.env
> +++ b/board/phytec/phycore_imx93/phycore_imx93.env
> @@ -1,70 +1,13 @@
>   /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
>   
> -#include <env/phytec/rauc.env>
> -#include <env/phytec/overlays.env>
> -
> -bootcmd=
> -	mmc dev ${mmcdev};
> -	if mmc rescan; then
> -		if test ${doraucboot} = 1; then
> -			run raucinit;
> -		fi;
> -		if run loadimage; then
> -			run mmcboot;
> -		else
> -			run netboot;
> -		fi;
> -	fi;
> -image=Image
> +boot_script_dhcp=net_boot_fit.scr.uimg
> +bootcmd=bootflow scan -lb;

If you leave CONFIG_USE_BOOTCOMMAND and CONFIG_BOOTSTD_DEFAULTS 
activated, you can remove th bootcmd env variable, as standardboot will 
set it for you automatically.

Benjamin

>   console=ttyLP0
>   fdt_addr_r=0x90000000
> -fdtoverlay_addr_r=0x900c0000
> -bootenv_addr_r=0x90500000
>   fdtfile=CONFIG_DEFAULT_FDT_FILE
> +fdtoverlay_addr_r=0x900c0000
>   ip_dyn=yes
> +kernel_addr_r=0x88000000
> +nfsroot=/srv/nfs
>   prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted"
> -mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
> -mmcpart=1
> -mmcroot=2
> -mmcautodetect=yes
> -mmcargs=setenv bootargs console=${console},${baudrate} earlycon
> -	root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw ${optargs}
> -loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
> -loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
> -mmcboot=
> -	echo Booting from mmc ...;
> -	if test ${no_bootenv} = 0; then
> -		if run mmc_load_bootenv; then
> -			env import -t ${bootenv_addr_r} ${filesize};
> -		fi;
> -	fi;
> -	run mmcargs;
> -	if run loadfdt; then
> -		run mmc_apply_overlays;
> -		booti ${loadaddr} - ${fdt_addr_r};
> -	else
> -		echo WARN: Cannot load the DT;
> -	fi;
> -nfsroot=/nfs
> -netargs=setenv bootargs console=${console},${baudrate} earlycon
> -	root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp ${optargs}
> -netboot=
> -	echo Booting from net ...;
> -	run netargs;
> -	if test ${ip_dyn} = yes; then
> -		setenv get_cmd dhcp;
> -	else
> -		setenv get_cmd tftp;
> -	fi;
> -	if test ${no_bootenv} = 0; then
> -		if run net_load_bootenv; then
> -			env import -t ${bootenv_addr_r} ${filesize};
> -		fi;
> -	fi;
> -	${get_cmd} ${loadaddr} ${image};
> -	if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
> -		run net_apply_overlays;
> -		booti ${loadaddr} - ${fdt_addr_r};
> -	else
> -		echo WARN: Cannot load the DT;
> -	fi;
> +scriptaddr=0x83500000
> diff --git a/configs/imx93-phycore_defconfig b/configs/imx93-phycore_defconfig
> index 4c952e966d1a..9e8ff9b6ca90 100644
> --- a/configs/imx93-phycore_defconfig
> +++ b/configs/imx93-phycore_defconfig
> @@ -5,10 +5,10 @@ CONFIG_SYS_MALLOC_LEN=0x2000000
>   CONFIG_SYS_MALLOC_F_LEN=0x20000
>   CONFIG_SPL_LIBCOMMON_SUPPORT=y
>   CONFIG_SPL_LIBGENERIC_SUPPORT=y
> +CONFIG_ENV_SOURCE_FILE="phycore_imx93"
>   CONFIG_NR_DRAM_BANKS=2
>   CONFIG_PHYTEC_SOM_DETECTION=y
>   CONFIG_PHYTEC_EEPROM_BUS=2
> -CONFIG_ENV_SOURCE_FILE="phycore_imx93"
>   CONFIG_ENV_SIZE=0x10000
>   CONFIG_ENV_OFFSET=0x700000
>   CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
> @@ -33,8 +33,13 @@ CONFIG_SYS_MEMTEST_START=0x80000000
>   CONFIG_SYS_MEMTEST_END=0x90000000
>   CONFIG_REMAKE_ELF=y
>   # CONFIG_ANDROID_BOOT_IMAGE is not set
> +CONFIG_FIT=y
> +CONFIG_FIT_SIGNATURE=y
> +CONFIG_BOOTSTD_FULL=y
> +# CONFIG_BOOTSTD_DEFAULTS is not set
>   CONFIG_DISTRO_DEFAULTS=y
>   CONFIG_OF_SYSTEM_SETUP=y
> +# CONFIG_USE_BOOTCOMMAND is not set
>   CONFIG_DEFAULT_FDT_FILE="oftree"
>   CONFIG_SYS_CBSIZE=2048
>   CONFIG_SYS_PBSIZE=2074
> @@ -52,6 +57,9 @@ CONFIG_SPL_I2C=y
>   CONFIG_SPL_POWER=y
>   CONFIG_SPL_WATCHDOG=y
>   CONFIG_SYS_PROMPT="u-boot=> "
> +# CONFIG_CMD_BOOTDEV is not set
> +# CONFIG_CMD_BOOTMETH is not set
> +# CONFIG_CMD_BOOTSTD is not set
>   CONFIG_CMD_ERASEENV=y
>   CONFIG_CMD_NVEDIT_EFI=y
>   CONFIG_CRC32_VERIFY=y
> @@ -149,5 +157,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
>   CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
>   CONFIG_CI_UDC=y
>   CONFIG_ULP_WATCHDOG=y
> +# CONFIG_RSA is not set
> +# CONFIG_SPL_SHA256 is not set
>   CONFIG_LZO=y
>   CONFIG_BZIP2=y



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot
  2025-12-05  9:41 ` [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Benjamin Hahn
@ 2025-12-05 10:03   ` Primoz Fiser
  0 siblings, 0 replies; 5+ messages in thread
From: Primoz Fiser @ 2025-12-05 10:03 UTC (permalink / raw)
  To: Benjamin Hahn, Mathieu Othacehe, Christoph Stoidner,
	Stefano Babic, Fabio Estevam, uboot-imx@nxp.com, Tom Rini
  Cc: u-boot@lists.denx.de, upstream@lists.phytec.de

Hi Benjamin,

On 5. 12. 25 10:41, Benjamin Hahn wrote:
> Hi Primoz,
> On 04.12.25 09:07, Primoz Fiser wrote:
>> Enable standard boot for the phyCORE-i.MX93 board and use it as a new
>> default. Add required standard boot variables to the environment, while
>> removing old boot scripts and now unnecessary environment variables.
>> Adjust variables according to the requirements of PHYTEC ampliphy-boot
>> distro-boot. Last but not least, order environment vars by alphabet and
>> run 'make savedefconfig' to resync defconfig.
>>
>> Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
>> ---
>>   arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi | 16 +++++
>>   board/phytec/phycore_imx93/phycore_imx93.env  | 69 ++-----------------
>>   configs/imx93-phycore_defconfig               | 12 +++-
>>   3 files changed, 33 insertions(+), 64 deletions(-)
>>
>> diff --git a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
>> index 0c8d0ba9693f..646b617949d6 100644
>> --- a/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
>> +++ b/arch/arm/dts/imx93-phyboard-segin-u-boot.dtsi
>> @@ -30,6 +30,22 @@
>>   		ethernet1 = &eqos;
>>   	};
>>   
>> +	bootstd {
>> +		bootph-verify;
>> +		compatible = "u-boot,boot-std";
>> +
>> +		filename-prefixes = "/", "/boot/";
>> +		bootdev-order = "mmc0", "mmc1", "ethernet";
>> +
>> +		rauc {
>> +			compatible = "u-boot,distro-rauc";
>> +		};
>> +
>> +		script {
>> +			compatible = "u-boot,script";
>> +		};
>> +	};
>> +
>>   	firmware {
>>   		optee {
>>   			compatible = "linaro,optee-tz";
>> diff --git a/board/phytec/phycore_imx93/phycore_imx93.env b/board/phytec/phycore_imx93/phycore_imx93.env
>> index 7b0a90e64472..8a2161e4abdf 100644
>> --- a/board/phytec/phycore_imx93/phycore_imx93.env
>> +++ b/board/phytec/phycore_imx93/phycore_imx93.env
>> @@ -1,70 +1,13 @@
>>   /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
>>   
>> -#include <env/phytec/rauc.env>
>> -#include <env/phytec/overlays.env>
>> -
>> -bootcmd=
>> -	mmc dev ${mmcdev};
>> -	if mmc rescan; then
>> -		if test ${doraucboot} = 1; then
>> -			run raucinit;
>> -		fi;
>> -		if run loadimage; then
>> -			run mmcboot;
>> -		else
>> -			run netboot;
>> -		fi;
>> -	fi;
>> -image=Image
>> +boot_script_dhcp=net_boot_fit.scr.uimg
>> +bootcmd=bootflow scan -lb;
> 
> If you leave CONFIG_USE_BOOTCOMMAND and CONFIG_BOOTSTD_DEFAULTS 
> activated, you can remove th bootcmd env variable, as standardboot will 
> set it for you automatically.

True! Lets simplify it even more.

I will send v2 for that.

Thanks,

BR,
Primoz

> 
> Benjamin
> 
>>   console=ttyLP0
>>   fdt_addr_r=0x90000000
>> -fdtoverlay_addr_r=0x900c0000
>> -bootenv_addr_r=0x90500000
>>   fdtfile=CONFIG_DEFAULT_FDT_FILE
>> +fdtoverlay_addr_r=0x900c0000
>>   ip_dyn=yes
>> +kernel_addr_r=0x88000000
>> +nfsroot=/srv/nfs
>>   prepare_mcore=setenv optargs "${optargs} clk-imx93.mcore_booted"
>> -mmcdev=CONFIG_ENV_MMC_DEVICE_INDEX
>> -mmcpart=1
>> -mmcroot=2
>> -mmcautodetect=yes
>> -mmcargs=setenv bootargs console=${console},${baudrate} earlycon
>> -	root=/dev/mmcblk${mmcdev}p${mmcroot} ${raucargs} rootwait rw ${optargs}
>> -loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
>> -loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr_r} ${fdtfile}
>> -mmcboot=
>> -	echo Booting from mmc ...;
>> -	if test ${no_bootenv} = 0; then
>> -		if run mmc_load_bootenv; then
>> -			env import -t ${bootenv_addr_r} ${filesize};
>> -		fi;
>> -	fi;
>> -	run mmcargs;
>> -	if run loadfdt; then
>> -		run mmc_apply_overlays;
>> -		booti ${loadaddr} - ${fdt_addr_r};
>> -	else
>> -		echo WARN: Cannot load the DT;
>> -	fi;
>> -nfsroot=/nfs
>> -netargs=setenv bootargs console=${console},${baudrate} earlycon
>> -	root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp ${optargs}
>> -netboot=
>> -	echo Booting from net ...;
>> -	run netargs;
>> -	if test ${ip_dyn} = yes; then
>> -		setenv get_cmd dhcp;
>> -	else
>> -		setenv get_cmd tftp;
>> -	fi;
>> -	if test ${no_bootenv} = 0; then
>> -		if run net_load_bootenv; then
>> -			env import -t ${bootenv_addr_r} ${filesize};
>> -		fi;
>> -	fi;
>> -	${get_cmd} ${loadaddr} ${image};
>> -	if ${get_cmd} ${fdt_addr_r} ${fdtfile}; then
>> -		run net_apply_overlays;
>> -		booti ${loadaddr} - ${fdt_addr_r};
>> -	else
>> -		echo WARN: Cannot load the DT;
>> -	fi;
>> +scriptaddr=0x83500000
>> diff --git a/configs/imx93-phycore_defconfig b/configs/imx93-phycore_defconfig
>> index 4c952e966d1a..9e8ff9b6ca90 100644
>> --- a/configs/imx93-phycore_defconfig
>> +++ b/configs/imx93-phycore_defconfig
>> @@ -5,10 +5,10 @@ CONFIG_SYS_MALLOC_LEN=0x2000000
>>   CONFIG_SYS_MALLOC_F_LEN=0x20000
>>   CONFIG_SPL_LIBCOMMON_SUPPORT=y
>>   CONFIG_SPL_LIBGENERIC_SUPPORT=y
>> +CONFIG_ENV_SOURCE_FILE="phycore_imx93"
>>   CONFIG_NR_DRAM_BANKS=2
>>   CONFIG_PHYTEC_SOM_DETECTION=y
>>   CONFIG_PHYTEC_EEPROM_BUS=2
>> -CONFIG_ENV_SOURCE_FILE="phycore_imx93"
>>   CONFIG_ENV_SIZE=0x10000
>>   CONFIG_ENV_OFFSET=0x700000
>>   CONFIG_IMX_CONFIG="arch/arm/mach-imx/imx9/imximage.cfg"
>> @@ -33,8 +33,13 @@ CONFIG_SYS_MEMTEST_START=0x80000000
>>   CONFIG_SYS_MEMTEST_END=0x90000000
>>   CONFIG_REMAKE_ELF=y
>>   # CONFIG_ANDROID_BOOT_IMAGE is not set
>> +CONFIG_FIT=y
>> +CONFIG_FIT_SIGNATURE=y
>> +CONFIG_BOOTSTD_FULL=y
>> +# CONFIG_BOOTSTD_DEFAULTS is not set
>>   CONFIG_DISTRO_DEFAULTS=y
>>   CONFIG_OF_SYSTEM_SETUP=y
>> +# CONFIG_USE_BOOTCOMMAND is not set
>>   CONFIG_DEFAULT_FDT_FILE="oftree"
>>   CONFIG_SYS_CBSIZE=2048
>>   CONFIG_SYS_PBSIZE=2074
>> @@ -52,6 +57,9 @@ CONFIG_SPL_I2C=y
>>   CONFIG_SPL_POWER=y
>>   CONFIG_SPL_WATCHDOG=y
>>   CONFIG_SYS_PROMPT="u-boot=> "
>> +# CONFIG_CMD_BOOTDEV is not set
>> +# CONFIG_CMD_BOOTMETH is not set
>> +# CONFIG_CMD_BOOTSTD is not set
>>   CONFIG_CMD_ERASEENV=y
>>   CONFIG_CMD_NVEDIT_EFI=y
>>   CONFIG_CRC32_VERIFY=y
>> @@ -149,5 +157,7 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x1fc9
>>   CONFIG_USB_GADGET_PRODUCT_NUM=0x0152
>>   CONFIG_CI_UDC=y
>>   CONFIG_ULP_WATCHDOG=y
>> +# CONFIG_RSA is not set
>> +# CONFIG_SPL_SHA256 is not set
>>   CONFIG_LZO=y
>>   CONFIG_BZIP2=y
> 
> 

-- 
Primoz Fiser
phone: +386-41-390-545
email: primoz.fiser@norik.com
--
Norik systems d.o.o.
Your embedded software partner
Slovenia, EU
phone: +386-41-540-545
email: info@norik.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-05 10:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  8:07 [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Primoz Fiser
2025-12-04  8:07 ` [PATCH 2/3] board: phytec: phycore-imx93: Set boot_targets dynamically Primoz Fiser
2025-12-04  8:07 ` [PATCH 3/3] board: phytec: phycore-imx93: env: Add required uuu variables Primoz Fiser
2025-12-05  9:41 ` [PATCH 1/3] board: phytec: phycore-imx93: Switch to standard boot Benjamin Hahn
2025-12-05 10:03   ` Primoz Fiser

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.