public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd.
@ 2018-07-25  3:18 Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 1/4] arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r Vagrant Cascadian
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2018-07-25  3:18 UTC (permalink / raw)
  To: u-boot


Switch odroid platform to use distro_bootcmd, adjusting to use
standardized environment variable names, and use the default
bootdelay.

The additional environment variables from distro_bootcmd requires
increasing the default environment size, which would break backwards
compatibility with saved environments. At Marek's suggestion, I've
bumped it well over the size needed (~4.5k vs. 16k) to give room for
future growth.

Variations on these patches have been in use in Debian's u-boot
packages since 2016.

A variation of this patch series was originally submitted to u-boot
over a year ago, and resent a few times since, with little to no
response.

Thanks for considering!

Changes in v2:
- Change from 16384 to SZ_16K, as suggested by Minkyu Kang.

Vagrant Cascadian (4):
  arm: odroid: Use standard environment variable names kernel_addr_r,
    ramdisk_addr_r and fdt_addr_r.
  arm: odroid: Increase default env size in preparation for
    distro_bootcmd.
  arm: odroid: Enable distro_bootcmd support.
  arm: odroid: Inherit default value for bootdelay from distro_bootcmd.

 include/configs/odroid.h | 36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

-- 
2.11.0

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

* [U-Boot] [PATCH v2 1/4] arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r.
  2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
@ 2018-07-25  3:18 ` Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 2/4] arm: odroid: Increase default env size in preparation for distro_bootcmd Vagrant Cascadian
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2018-07-25  3:18 UTC (permalink / raw)
  To: u-boot

Replace non-standard variable names kerneladdr, initrdaddr and fdtaddr
with kernel_addr_r, ramdisk_addr_r and fdt_addr_r, as documented in
u-boot README.

Acked-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---

Changes in v2: None

 include/configs/odroid.h | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 92811cfc54..b7b75c0dc0 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -100,21 +100,21 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"loadbootscript=load mmc ${mmcbootdev}:${mmcbootpart} ${scriptaddr} " \
 		"boot.scr\0" \
-	"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kerneladdr} " \
+	"loadkernel=load mmc ${mmcbootdev}:${mmcbootpart} ${kernel_addr_r} " \
 		"${kernelname}\0" \
-	"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${initrdaddr} " \
+	"loadinitrd=load mmc ${mmcbootdev}:${mmcbootpart} ${ramdisk_addr_r} " \
 		"${initrdname}\0" \
-	"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdtaddr} " \
+	"loaddtb=load mmc ${mmcbootdev}:${mmcbootpart} ${fdt_addr_r} " \
 		"${fdtfile}\0" \
 	"check_ramdisk=" \
 		"if run loadinitrd; then " \
-			"setenv initrd_addr ${initrdaddr};" \
+			"setenv initrd_addr ${ramdisk_addr_r};" \
 		"else " \
 			"setenv initrd_addr -;" \
 		"fi;\0" \
 	"check_dtb=" \
 		"if run loaddtb; then " \
-			"setenv fdt_addr ${fdtaddr};" \
+			"setenv fdt_addr ${fdt_addr_r};" \
 		"else " \
 			"setenv fdt_addr;" \
 		"fi;\0" \
@@ -125,27 +125,24 @@
 		"run loadbootscript;" \
 		"source ${scriptaddr}\0" \
 	"boot_fit=" \
-		"setenv kerneladdr 0x42000000;" \
 		"setenv kernelname Image.itb;" \
 		"run loadkernel;" \
 		"run kernel_args;" \
-		"bootm ${kerneladdr}#${boardname}\0" \
+		"bootm ${kernel_addr_r}#${boardname}\0" \
 	"boot_uimg=" \
-		"setenv kerneladdr 0x40007FC0;" \
 		"setenv kernelname uImage;" \
 		"run check_dtb;" \
 		"run check_ramdisk;" \
 		"run loadkernel;" \
 		"run kernel_args;" \
-		"bootm ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
+		"bootm ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
 	"boot_zimg=" \
-		"setenv kerneladdr 0x40007FC0;" \
 		"setenv kernelname zImage;" \
 		"run check_dtb;" \
 		"run check_ramdisk;" \
 		"run loadkernel;" \
 		"run kernel_args;" \
-		"bootz ${kerneladdr} ${initrd_addr} ${fdt_addr};\0" \
+		"bootz ${kernel_addr_r} ${initrd_addr} ${fdt_addr};\0" \
 	"autoboot=" \
 		"if test -e mmc 0 boot.scr; then; " \
 			"run boot_script; " \
@@ -167,9 +164,10 @@
 	"consoleon=set console console=ttySAC1,115200n8; save; reset\0" \
 	"consoleoff=set console console=ram; save; reset\0" \
 	"initrdname=uInitrd\0" \
-	"initrdaddr=42000000\0" \
+	"ramdisk_addr_r=0x42000000\0" \
 	"scriptaddr=0x42000000\0" \
-	"fdtaddr=40800000\0"
+	"fdt_addr_r=0x40800000\0" \
+	"kernel_addr_r=0x41000000\0"
 
 /* GPT */
 
-- 
2.11.0

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

* [U-Boot] [PATCH v2 2/4] arm: odroid: Increase default env size in preparation for distro_bootcmd.
  2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 1/4] arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r Vagrant Cascadian
@ 2018-07-25  3:18 ` Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 3/4] arm: odroid: Enable distro_bootcmd support Vagrant Cascadian
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2018-07-25  3:18 UTC (permalink / raw)
  To: u-boot

Adding distro_bootcmd support bumps the default environment size over
4500. Increase to SZ_16K to allow for room to grow in the future.

Acked-by: Lukasz Majewski <lukma@denx.de>

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---

Changes in v2:
- Change from 16384 to SZ_16K, as suggested by Minkyu Kang.

 include/configs/odroid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index b7b75c0dc0..07882aca9a 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -50,7 +50,7 @@
 #define CONFIG_SYS_MONITOR_BASE	0x00000000
 
 #define CONFIG_SYS_MMC_ENV_DEV		CONFIG_MMC_DEFAULT_DEV
-#define CONFIG_ENV_SIZE			4096
+#define CONFIG_ENV_SIZE			SZ_16K
 #define CONFIG_ENV_OFFSET		(SZ_1K * 1280) /* 1.25 MiB offset */
 #define CONFIG_ENV_OVERWRITE
 
-- 
2.11.0

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

* [U-Boot] [PATCH v2 3/4] arm: odroid: Enable distro_bootcmd support.
  2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 1/4] arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 2/4] arm: odroid: Increase default env size in preparation for distro_bootcmd Vagrant Cascadian
@ 2018-07-25  3:18 ` Vagrant Cascadian
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 4/4] arm: odroid: Inherit default value for bootdelay from distro_bootcmd Vagrant Cascadian
  2018-07-25  7:25 ` [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Lukasz Majewski
  4 siblings, 0 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2018-07-25  3:18 UTC (permalink / raw)
  To: u-boot

Enable distro_bootcmd for a standardized boot process across multiple
platforms.

Acked-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---

Changes in v2: None

 include/configs/odroid.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 07882aca9a..a4d1a76c36 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -41,7 +41,7 @@
 
 /* Console configuration */
 
-#define CONFIG_BOOTCOMMAND		"run autoboot"
+#define CONFIG_BOOTCOMMAND		"run distro_bootcmd ; run autoboot"
 #define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
@@ -83,6 +83,12 @@
 	"bl2 raw 0x1f 0x1d;" \
 	"tzsw raw 0x83f 0x138\0"
 
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 1) \
+	func(MMC, mmc, 0)
+
+#include <config_distro_bootcmd.h>
+
 /*
  * Bootable media layout:
  * dev:    SD   eMMC(part boot)
@@ -167,7 +173,8 @@
 	"ramdisk_addr_r=0x42000000\0" \
 	"scriptaddr=0x42000000\0" \
 	"fdt_addr_r=0x40800000\0" \
-	"kernel_addr_r=0x41000000\0"
+	"kernel_addr_r=0x41000000\0" \
+	BOOTENV
 
 /* GPT */
 
-- 
2.11.0

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

* [U-Boot] [PATCH v2 4/4] arm: odroid: Inherit default value for bootdelay from distro_bootcmd.
  2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
                   ` (2 preceding siblings ...)
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 3/4] arm: odroid: Enable distro_bootcmd support Vagrant Cascadian
@ 2018-07-25  3:18 ` Vagrant Cascadian
  2018-07-25  7:25 ` [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Lukasz Majewski
  4 siblings, 0 replies; 8+ messages in thread
From: Vagrant Cascadian @ 2018-07-25  3:18 UTC (permalink / raw)
  To: u-boot

The default value with distro_bootcmd is 2 seconds, which is
reasonably fast, and provides a consistent experience across platforms
supporting distro_bootcmd.

The current bootdelay value of 0 seconds is a bit challenging to
interrupt when desired.

Acked-by: Lukasz Majewski <lukma@denx.de>

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
---

Changes in v2: None

 include/configs/odroid.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index a4d1a76c36..67a790ef02 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -164,7 +164,6 @@
 	"mmcbootpart=1\0" \
 	"mmcrootdev=0\0" \
 	"mmcrootpart=2\0" \
-	"bootdelay=0\0" \
 	"dfu_alt_system="CONFIG_DFU_ALT \
 	"dfu_alt_info=Please reset the board\0" \
 	"consoleon=set console console=ttySAC1,115200n8; save; reset\0" \
-- 
2.11.0

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

* [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd.
  2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
                   ` (3 preceding siblings ...)
  2018-07-25  3:18 ` [U-Boot] [PATCH v2 4/4] arm: odroid: Inherit default value for bootdelay from distro_bootcmd Vagrant Cascadian
@ 2018-07-25  7:25 ` Lukasz Majewski
  2018-07-25  7:45   ` Minkyu Kang
  4 siblings, 1 reply; 8+ messages in thread
From: Lukasz Majewski @ 2018-07-25  7:25 UTC (permalink / raw)
  To: u-boot

Hi Vagrant,

> Switch odroid platform to use distro_bootcmd, adjusting to use
> standardized environment variable names, and use the default
> bootdelay.
> 
> The additional environment variables from distro_bootcmd requires
> increasing the default environment size, which would break backwards
> compatibility with saved environments. At Marek's suggestion, I've
> bumped it well over the size needed (~4.5k vs. 16k) to give room for
> future growth.
> 
> Variations on these patches have been in use in Debian's u-boot
> packages since 2016.
> 
> A variation of this patch series was originally submitted to u-boot
> over a year ago, and resent a few times since, with little to no
> response.

Yes, the Samsung port of u-boot could work better.

I think that Tom can apply those patches directly if no response is
given in a reasonable time.

> 
> Thanks for considering!

I would like to emphasize this one more time - thanks for your patches.

> 
> Changes in v2:
> - Change from 16384 to SZ_16K, as suggested by Minkyu Kang.
> 
> Vagrant Cascadian (4):
>   arm: odroid: Use standard environment variable names kernel_addr_r,
>     ramdisk_addr_r and fdt_addr_r.
>   arm: odroid: Increase default env size in preparation for
>     distro_bootcmd.
>   arm: odroid: Enable distro_bootcmd support.
>   arm: odroid: Inherit default value for bootdelay from
> distro_bootcmd.
> 
>  include/configs/odroid.h | 36 ++++++++++++++++++++----------------
>  1 file changed, 20 insertions(+), 16 deletions(-)
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180725/53ed03b6/attachment.sig>

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

* [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd.
  2018-07-25  7:25 ` [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Lukasz Majewski
@ 2018-07-25  7:45   ` Minkyu Kang
  2018-07-27  6:55     ` Minkyu Kang
  0 siblings, 1 reply; 8+ messages in thread
From: Minkyu Kang @ 2018-07-25  7:45 UTC (permalink / raw)
  To: u-boot

Hi,

2018년 7월 25일 (수) 16:25, Lukasz Majewski <lukma@denx.de>님이 작성:

> Hi Vagrant,
>
> > Switch odroid platform to use distro_bootcmd, adjusting to use
> > standardized environment variable names, and use the default
> > bootdelay.
> >
> > The additional environment variables from distro_bootcmd requires
> > increasing the default environment size, which would break backwards
> > compatibility with saved environments. At Marek's suggestion, I've
> > bumped it well over the size needed (~4.5k vs. 16k) to give room for
> > future growth.
> >
> > Variations on these patches have been in use in Debian's u-boot
> > packages since 2016.
> >
> > A variation of this patch series was originally submitted to u-boot
> > over a year ago, and resent a few times since, with little to no
> > response.
>
> Yes, the Samsung port of u-boot could work better.
>
> I think that Tom can apply those patches directly if no response is
> given in a reasonable time.
>

I was waiting v2 of this patchset.
It will be accepted soon.


> >
> > Thanks for considering!
>
> I would like to emphasize this one more time - thanks for your patches.
>
> >
> > Changes in v2:
> > - Change from 16384 to SZ_16K, as suggested by Minkyu Kang.
> >
> > Vagrant Cascadian (4):
> >   arm: odroid: Use standard environment variable names kernel_addr_r,
> >     ramdisk_addr_r and fdt_addr_r.
> >   arm: odroid: Increase default env size in preparation for
> >     distro_bootcmd.
> >   arm: odroid: Enable distro_bootcmd support.
> >   arm: odroid: Inherit default value for bootdelay from
> > distro_bootcmd.
> >
> >  include/configs/odroid.h | 36 ++++++++++++++++++++----------------
> >  1 file changed, 20 insertions(+), 16 deletions(-)
> >
>
>
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de


Thanks,
Minkyu Kang.

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

* [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd.
  2018-07-25  7:45   ` Minkyu Kang
@ 2018-07-27  6:55     ` Minkyu Kang
  0 siblings, 0 replies; 8+ messages in thread
From: Minkyu Kang @ 2018-07-27  6:55 UTC (permalink / raw)
  To: u-boot

Hi,

2018년 7월 25일 (수) 16:45, Minkyu Kang <promsoft@gmail.com>님이 작성:

> Hi,
>
> 2018년 7월 25일 (수) 16:25, Lukasz Majewski <lukma@denx.de>님이 작성:
>
>> Hi Vagrant,
>>
>> > Switch odroid platform to use distro_bootcmd, adjusting to use
>> > standardized environment variable names, and use the default
>> > bootdelay.
>> >
>> > The additional environment variables from distro_bootcmd requires
>> > increasing the default environment size, which would break backwards
>> > compatibility with saved environments. At Marek's suggestion, I've
>> > bumped it well over the size needed (~4.5k vs. 16k) to give room for
>> > future growth.
>> >
>> > Variations on these patches have been in use in Debian's u-boot
>> > packages since 2016.
>> >
>> > A variation of this patch series was originally submitted to u-boot
>> > over a year ago, and resent a few times since, with little to no
>> > response.
>>
>> Yes, the Samsung port of u-boot could work better.
>>
>> I think that Tom can apply those patches directly if no response is
>> given in a reasonable time.
>>
>
> I was waiting v2 of this patchset.
> It will be accepted soon.
>
>
>> >
>> > Thanks for considering!
>>
>> I would like to emphasize this one more time - thanks for your patches.
>>
>> >
>> > Changes in v2:
>> > - Change from 16384 to SZ_16K, as suggested by Minkyu Kang.
>> >
>> > Vagrant Cascadian (4):
>> >   arm: odroid: Use standard environment variable names kernel_addr_r,
>> >     ramdisk_addr_r and fdt_addr_r.
>> >   arm: odroid: Increase default env size in preparation for
>> >     distro_bootcmd.
>> >   arm: odroid: Enable distro_bootcmd support.
>> >   arm: odroid: Inherit default value for bootdelay from
>> > distro_bootcmd.
>> >
>> >  include/configs/odroid.h | 36 ++++++++++++++++++++----------------
>> >  1 file changed, 20 insertions(+), 16 deletions(-)
>> >
>>
>>
>>
>>
>> Best regards,
>>
>> Lukasz Majewski
>>
>> --
>>
>> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
>
>
> Thanks,
> Minkyu Kang.
>

applied to u-boot-samsung.

Thanks,
Minkyu Kang.

>

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

end of thread, other threads:[~2018-07-27  6:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-25  3:18 [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Vagrant Cascadian
2018-07-25  3:18 ` [U-Boot] [PATCH v2 1/4] arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r Vagrant Cascadian
2018-07-25  3:18 ` [U-Boot] [PATCH v2 2/4] arm: odroid: Increase default env size in preparation for distro_bootcmd Vagrant Cascadian
2018-07-25  3:18 ` [U-Boot] [PATCH v2 3/4] arm: odroid: Enable distro_bootcmd support Vagrant Cascadian
2018-07-25  3:18 ` [U-Boot] [PATCH v2 4/4] arm: odroid: Inherit default value for bootdelay from distro_bootcmd Vagrant Cascadian
2018-07-25  7:25 ` [U-Boot] [PATCH v2 0/4] arm: odroid: Convert to distro_bootcmd Lukasz Majewski
2018-07-25  7:45   ` Minkyu Kang
2018-07-27  6:55     ` Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox