Switch odroid to use distro_bootcmd.
v2 cover Switch odroid to use distro_bootcmd.
Using distro_bootcmd standardizes board behavior across many platforms. This is particularly useful for distributions supporting multiple boards without requiring custom configuration for each board.
There are a few changes needed to support distro_bootcmd, such as fixing the default value for the console setting, increasing the environment size, and allowing distro bootcmd to set the default bootdelay.
These patches have been used in Debian's u-boot packaging since May of 2016.
Vagrant Cascadian (4):
Fix default console on odroid to only specify the device, as
"console=" is redundant with the boot environment.
Increase the default environment size on odroid, as
config_distro_bootcmd requires a more space for the environment.
Switch odroid to use config_distro_bootcmd.
Inherit default value for bootdelay from distro_bootcmd on odroid.
include/configs/odroid.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-)
Signature · 1 line
2.11.0
PATCH v2 1/4 Fix default console on odroid to only specify the device, as "console=" is redundant with the boot environment.
---
include/configs/odroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/odroid.h +1 -1
@@ -44,7 +44,7 @@/* Console configuration */ #define CONFIG_BOOTCOMMAND "run autoboot" -#define CONFIG_DEFAULT_CONSOLE "console=ttySAC1,115200n8\0" +#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8\0"#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \ - GENERATED_GBL_DATA_SIZE)
Signature · 1 line
2.11.0
PATCH v2 2/4 Increase the default environment size on odroid, as config_distro_bootcmd requires a more space for the environment.
In reply to Vagrant Cascadian---
include/configs/odroid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/odroid.h +1 -1
@@ -52,7 +52,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 8192#define CONFIG_ENV_OFFSET (SZ_1K * 1280)/* 1.25 MiB offset */ #define CONFIG_ENV_OVERWRITE
Signature · 1 line
2.11.0
PATCH v2 3/4 Switch odroid to use config_distro_bootcmd.
In reply to Vagrant CascadianUsing distro_bootcmd standardizes board behavior across many platforms. This is particularly useful for distributions supporting multiple boards without requiring custom configuration for each board.
---
include/configs/odroid.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
include/configs/odroid.h +17 -2
@@ -43,7 +43,6 @@/* Console configuration */ -#define CONFIG_BOOTCOMMAND "run autoboot"#define CONFIG_DEFAULT_CONSOLE "ttySAC1,115200n8\0"#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_LOAD_ADDR \
@@ -85,6 +84,20 @@"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> + +#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0x10000000\0" \ + "kernel_addr_r=0x42000000\0" \ + "fdt_addr_r=0x43000000\0" \ + "ramdisk_addr_r=0x43300000\0" \ + "scriptaddr=0x50000000\0" \ + "pxefile_addr_r=0x51000000\0" +/* * Bootable media layout: * dev: SD eMMC(part boot)
@@ -171,7 +184,9 @@"initrdname=uInitrd\0" \"initrdaddr=42000000\0" \"scriptaddr=0x42000000\0" \ -"fdtaddr=40800000\0" +"fdtaddr=40800000\0" \ +MEM_LAYOUT_ENV_SETTINGS \ +BOOTENV /* GPT */ #define CONFIG_RANDOM_UUID
Signature · 1 line
2.11.0
PATCH v2 4/4 Inherit default value for bootdelay from distro_bootcmd on odroid.
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
@@ -176,7 +176,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