diff mbox series

[1/3] smegw01: Allow booting the Yocto image by default

Message ID 20210615233840.2340227-1-festevam@denx.de
State Accepted
Commit 364212ca291ca884f692be93d6779ba78311ce12
Delegated to: Stefano Babic
Headers show
Series [1/3] smegw01: Allow booting the Yocto image by default | expand

Commit Message

Fabio Estevam June 15, 2021, 11:38 p.m. UTC
On the Yocto image there is a single partition and the kernel
and dtb are present in the 'boot' directory.

Change it accordingly so that the board can boot the Yocto
image by default.

Use the generic 'load' command instead, which is able to
read from an ext4 partition.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 include/configs/smegw01.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tom Rini June 16, 2021, 3:17 a.m. UTC | #1
On Tue, Jun 15, 2021 at 08:38:38PM -0300, Fabio Estevam wrote:

> On the Yocto image there is a single partition and the kernel
> and dtb are present in the 'boot' directory.
> 
> Change it accordingly so that the board can boot the Yocto
> image by default.
> 
> Use the generic 'load' command instead, which is able to
> read from an ext4 partition.
> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  include/configs/smegw01.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h
> index 50f00136ac46..a92c583c8669 100644
> --- a/include/configs/smegw01.h
> +++ b/include/configs/smegw01.h
> @@ -29,11 +29,11 @@
>  	"bootm_size=0x10000000\0" \
>  	"mmcdev=0\0" \
>  	"mmcpart=1\0" \
> -	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
> +	"mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
>  	"mmcargs=setenv bootargs console=${console},${baudrate} " \
>  		"root=${mmcroot}\0" \
> -	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
> -	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
> +	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
> +	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
>  	"mmcboot=echo Booting from mmc ...; " \
>  		"run mmcargs; " \
>  		"if run loadfdt; then " \

Shouldn't this be using the generic distro boot and then generating an
extlinux.conf in OE?  Thanks!
Stefano Babic July 10, 2021, 3:52 p.m. UTC | #2
> On the Yocto image there is a single partition and the kernel
> and dtb are present in the 'boot' directory.
> Change it accordingly so that the board can boot the Yocto
> image by default.
> Use the generic 'load' command instead, which is able to
> read from an ext4 partition.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
Stefano Babic July 10, 2021, 7:34 p.m. UTC | #3
> On the Yocto image there is a single partition and the kernel
> and dtb are present in the 'boot' directory.
> Change it accordingly so that the board can boot the Yocto
> image by default.
> Use the generic 'load' command instead, which is able to
> read from an ext4 partition.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
Stefano Babic July 12, 2021, 11:19 a.m. UTC | #4
Hi,

just for the note because there is an open comment and I applied it:

On 16.06.21 05:17, Tom Rini wrote:
> On Tue, Jun 15, 2021 at 08:38:38PM -0300, Fabio Estevam wrote:
> 
>> On the Yocto image there is a single partition and the kernel
>> and dtb are present in the 'boot' directory.
>>
>> Change it accordingly so that the board can boot the Yocto
>> image by default.
>>
>> Use the generic 'load' command instead, which is able to
>> read from an ext4 partition.
>>
>> Signed-off-by: Fabio Estevam <festevam@denx.de>
>> ---
>>   include/configs/smegw01.h | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h
>> index 50f00136ac46..a92c583c8669 100644
>> --- a/include/configs/smegw01.h
>> +++ b/include/configs/smegw01.h
>> @@ -29,11 +29,11 @@
>>   	"bootm_size=0x10000000\0" \
>>   	"mmcdev=0\0" \
>>   	"mmcpart=1\0" \
>> -	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
>> +	"mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
>>   	"mmcargs=setenv bootargs console=${console},${baudrate} " \
>>   		"root=${mmcroot}\0" \
>> -	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
>> -	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
>> +	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
>> +	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
>>   	"mmcboot=echo Booting from mmc ...; " \
>>   		"run mmcargs; " \
>>   		"if run loadfdt; then " \
> 
> Shouldn't this be using the generic distro boot and then generating an
> extlinux.conf in OE?  Thanks!
> 

This is not an evaluation board but a customer's project with strict 
rules about environment (secure boot is required) and with a short list 
of variable that can be modified (from both U-Boot and user space). A 
generic distro boot is then unwanted, and just a few set of variables 
are allowed in this project. An extlinux.conf is not allowed. So I 
merged it, I have not ignored the comment, I had to answer before, sorry 
for that.

Best regards,
Stefano
diff mbox series

Patch

diff --git a/include/configs/smegw01.h b/include/configs/smegw01.h
index 50f00136ac46..a92c583c8669 100644
--- a/include/configs/smegw01.h
+++ b/include/configs/smegw01.h
@@ -29,11 +29,11 @@ 
 	"bootm_size=0x10000000\0" \
 	"mmcdev=0\0" \
 	"mmcpart=1\0" \
-	"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
+	"mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
 		"root=${mmcroot}\0" \
-	"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
-	"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdtfile}\0" \
+	"loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} boot/${image}\0" \
+	"loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} boot/${fdtfile}\0" \
 	"mmcboot=echo Booting from mmc ...; " \
 		"run mmcargs; " \
 		"if run loadfdt; then " \