arm: odroid: Convert to distro_bootcmd.
cover arm: odroid: Convert to distro_bootcmd.
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!
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(-)
Signature · 1 line
2.11.0
PATCH 1/4 arm: odroid: Use standard environment variable names kernel_addr_r, ramdisk_addr_r and fdt_addr_r.
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.
---
include/configs/odroid.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-)
include/configs/odroid.h +11 -13
@@ -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 */
Signature · 1 line
2.11.0
PATCH 2/4 arm: odroid: Increase default env size in preparation for distro_bootcmd.
In reply to Vagrant CascadianAdding distro_bootcmd support bumps the default environment size over 4500. Increase to 16384 to allow for room to grow in the future.
---
include/configs/odroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/odroid.h +1 -1
@@ -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 16384#define CONFIG_ENV_OFFSET (SZ_1K * 1280)/* 1.25 MiB offset */ #define CONFIG_ENV_OVERWRITE
Signature · 1 line
2.11.0
PATCH 2/4 arm: odroid: Increase default env size in preparation for distro_bootcmd.
Dear Vagrant Cascadian,
2018년 6월 6일 (수) 06:16, Vagrant Cascadian <[email protected]>님이 작성:
Quoted 14 lines
Adding
distro_bootcmdsupport bumps the default environment size over 4500. Increase to 16384 to allow for room to grow in the future.Signed-off-by Vagrant Cascadian <[email protected]>---
include/configs/odroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/odroid.h +0
-0
include/configs/odroid.h line 54
Quoted 6 lines
include/configs/odroid.h +1
-1@@ -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 16384
I think it's better to use SZ_16K.
What do you think?
#define CONFIG_ENV_OFFSET (SZ_1K * 1280) /* 1.25 MiB offset */
Quoted 9 lines
include/configs/odroid.h +0
-1#define CONFIG_ENV_OVERWRITE --2.11.0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
Thanks,
Minkyu Kang.
PATCH 2/4 arm: odroid: Increase default env size in preparation for distro_bootcmd.
Quoted 18 lines · Minkyu Kang
2018년 6월 6일 (수) 06:16, Vagrant Cascadian <[email protected]>님이 작성:
Quoted 16 lines
Adding
distro_bootcmdsupport bumps the default environment size over 4500. Increase to 16384 to allow for room to grow in the future.Signed-off-by Vagrant Cascadian <[email protected]>---
include/configs/odroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/configs/odroid.h +0
-0@@ -50,7 +50,7 @@#define CONFIG_SYS_MONITOR_BASE 0x00000000
Quoted 7 lines
include/configs/odroid.h line 56
Quoted 4 lines
include/configs/odroid.h +1
-1#define CONFIG_SYS_MMC_ENV_DEV CONFIG_MMC_DEFAULT_DEV -#define CONFIG_ENV_SIZE 4096 +#define CONFIG_ENV_SIZE 16384I think it's better to use
SZ_16K.
What do you think?
No real opinion either way.
live well,
vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180607/62f07d13/attachment.sig>
PATCH 3/4 arm: odroid: Enable distro_bootcmd support.
In reply to Vagrant CascadianEnable distro_bootcmd for a standardized boot process across multiple platforms.
---
include/configs/odroid.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
include/configs/odroid.h +9 -2
@@ -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 */
Signature · 1 line
2.11.0
PATCH 4/4 arm: odroid: Inherit default value for bootdelay from distro_bootcmd.
In reply to Vagrant CascadianThe 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.
---
include/configs/odroid.h | 1 - 1 file changed, 1 deletion(-)
include/configs/odroid.h +0 -1
@@ -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" \
Signature · 1 line
2.11.0
cover arm: odroid: Convert to distro_bootcmd.
In reply to Vagrant CascadianQuoted 10 lines · On Tue, 5 Jun 2018 14:13:51 -0700 Vagrant Cascadian <[email protected]> wrote:
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_bootcmdrequires 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.
Quoted 8 lines
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!
For the whole series:
Quoted 11 lines
Vagrant Cascadian (4):
arm: odroid: Use standard environment variable nameskernel_addr_r,
ramdisk_addr_randfdt_addr_r.
arm: odroid: Increase default env size in preparation for
distro_bootcmd.
arm: odroid: Enabledistro_bootcmdsupport.
arm: odroid: Inherit default value for bootdelay fromdistro_bootcmd.
Quoted 3 lines
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/20180607/26f190cb/attachment.sig>