arm: mvebu: enable generic distro boot config
PATCH 1/1 arm: mvebu: enable generic distro boot config
Switch all of the mvebu boards to support disto generic booting This will enable Fedora, Debian and other distros to support mvebu systems easier. Tested on SolidRun ClearFog
--- include/configs/clearfog.h | 5 --- include/configs/mv-common.h | 86 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 6 deletions(-)
include/configs/clearfog.h +0 -5
@@ -104,11 +104,6 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST -/* Keep device tree and initrd in lower memory so the kernel can access them */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "fdt_high=0x10000000\0" \ - "initrd_high=0x10000000\0" -/* SPL */ /* * Select the boot device here
include/configs/mv-common.h +85 -1
96 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 1/1 arm: mvebu: enable generic distro boot config
Hi Dennis,
Quoted 3 lines · Dennis Gilmore
Switch all of the mvebu boards to support disto generic booting This will enable Fedora, Debian and other distros to support mvebu systems easier. Tested on SolidRun ClearFog
Sorry for the late review. I have a few issues with this patch. It generates build errors on some mvebu boards:
ds414 db-88f6820-gp db-mv784mp-gp
Mostly because of redefined macros:
This one (db-mv784mp-gp):
include/configs/mv-common.h:187:0: warning: "CONFIG_PREBOOT" redefined
#define CONFIG_PREBOOT "sata init"
^
In file included from include/configs/db-mv784mp-gp.h:100:0,
from include/config.h:5,
from include/common.h:18,
from examples/standalone/hello_world.c:8:include/configs/mv-common.h:61:0: note: this is the location of the previous definition
#define CONFIG_PREBOOT
Or this one (db-88f6820-gp):
include/configs/mv-common.h:236:0: warning: "CONFIG_EXTRA_ENV_SETTINGS" redefined
#define CONFIG_EXTRA_ENV_SETTINGS
^
In file included from include/config.h:5:0,
from include/common.h:18,
from drivers/ddr/marvell/a38x/xor.c:7:include/configs/db-88f6820-gp.h:108:0: note: this is the location of the previous definition
#define CONFIG_EXTRA_ENV_SETTINGS \
Or this one (ds414):
include/configs/ds414.h:156:0: warning: "CONFIG_BOOTCOMMAND" redefined #define CONFIG_BOOTCOMMAND "sf read ${loadaddr} 0xd0000 0x700000; bootm" ^
In file included from include/configs/mv-common.h:204:0, from include/configs/ds414.h:104,
from include/config.h:5,
from include/common.h:18,
from include/ubi_uboot.h:17,
from fs/ubifs/ubifs.h:37,
from fs/ubifs/recovery.c:45:
Perhaps it makes sense to not move all mvebu boards to the generic distro booting. But only the Marvell eval boards and the community boards, like the clearfog (and not the ds414 for example).
What do you think?
Quoted 11 lines
Signed-off-by Dennis Gilmore <[email protected]>--- include/configs/clearfog.h | 5 --- include/configs/mv-common.h | 86 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 6 deletions(-)include/configs/clearfog.h +0
-0
include/configs/clearfog.h line 111
Quoted 8 lines
include/configs/clearfog.h +0
-5@@ -104,11 +104,6 @@#define CONFIG_SYS_CONSOLE_INFO_QUIET /* don't print console @ startup */ #define CONFIG_SYS_ALT_MEMTEST -/* Keep device tree and initrd in lower memory so the kernel can access them */ -#define CONFIG_EXTRA_ENV_SETTINGS \ - "fdt_high=0x10000000\0" \ - "initrd_high=0x10000000\0" -
Are these settings really configured to this value in the distro include files?
Quoted 43 lines
include/configs/clearfog.h +0
-0/* SPL */ /* * Select the boot device here include/configs/mv-common.h +24
-1@@ -57,7 +57,7 @@#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, \ 115200,230400, 460800, 921600 }/* auto boot */ -#define CONFIG_BOOTDELAY 3/* default enable autoboot */ +#define CONFIG_BOOTDELAY 2/* default enable autoboot */ #define CONFIG_PREBOOT #define CONFIG_OF_LIBFDT /* Device tree support */ @@ -152,4 +152,88 @@#define CONFIG_LZO #endif +#ifndef CONFIG_SPL_BUILD +#include <config_distro_defaults.h> + +/* +* 160M RAM (256M minimum minus 64MB heap + 32MB for u-boot, stack, fb, etc. +* 32M uncompressed kernel, 16M compressed kernel, 1M fdt, +* 1M script, 1M pxe and the ramdisk at the end. +*/ +#define SDRAM_OFFSET (x) 0x0##x + +#define KERNEL_ADDR_R __stringify(SDRAM_OFFSET(2000000)) +#define FDT_ADDR_R __stringify(SDRAM_OFFSET(3000000)) +#define SCRIPT_ADDR_R __stringify(SDRAM_OFFSET(3100000)) +#define PXEFILE_ADDR_R __stringify(SDRAM_OFFSET(3200000)) +#define RAMDISK_ADDR_R __stringify(SDRAM_OFFSET(3300000)) + +#define MEM_LAYOUT_ENV_SETTINGS \ + "bootm_size=0xa000000\0" \ + "kernel_addr_r=" KERNEL_ADDR_R "\0" \ + "fdt_addr_r=" FDT_ADDR_R "\0" \ + "scriptaddr=" SCRIPT_ADDR_R "\0" \ + "pxefile_addr_r=" PXEFILE_ADDR_R "\0" \ + "ramdisk_addr_r=" RAMDISK_ADDR_R "\0"
include/configs/mv-common.h line 187
Quoted 10 lines
include/configs/mv-common.h +10
-0+ +#ifdef CONFIG_MMC +#define BOOT_TARGET_DEVICES_MMC (func) func(MMC, mmc, 0) +#else +#define BOOT_TARGET_DEVICES_MMC (func) +#endif + +#ifdef CONFIG_CMD_SATA +#define BOOT_TARGET_DEVICES_SATA (func) func(SATA, sata, 0) func(SATA, sata, 1) +#define CONFIG_PREBOOT "sata init"
CONFIG_PREBOOT is already defined in this file above.
Quoted 43 lines
include/configs/mv-common.h +42
-0+#else +#define BOOT_TARGET_DEVICES_SATA (func) +#endif + +#ifdef CONFIG_USB_STORAGE +#define BOOT_TARGET_DEVICES_USB (func) func(USB, usb, 0) +#else +#define BOOT_TARGET_DEVICES_USB (func) +#endif + +#define BOOT_TARGET_DEVICES (func) \ + BOOT_TARGET_DEVICES_MMC(func) \ + BOOT_TARGET_DEVICES_SATA(func) \ + BOOT_TARGET_DEVICES_USB(func) \ + func(PXE, pxe, na) + +#include <config_distro_bootcmd.h> + +#ifdef CONFIG_USB_KEYBOARD +#define CONSOLE_STDIN_SETTINGS \ + "preboot=usb start\0" \ + "stdin=serial,usbkbd\0" +#else +#define CONSOLE_STDIN_SETTINGS \ + "stdin=serial\0" +#endif + +#ifdef CONFIG_VIDEO +#define CONSOLE_STDOUT_SETTINGS \ + "stdout=serial,vga\0" \ + "stderr=serial,vga\0" +#else +#define CONSOLE_STDOUT_SETTINGS \ + "stdout=serial\0" \ + "stderr=serial\0" +#endif + +#define CONSOLE_ENV_SETTINGS \ + CONSOLE_STDIN_SETTINGS \ + CONSOLE_STDOUT_SETTINGS + +#define CONFIG_EXTRA_ENV_SETTINGS \
include/configs/mv-common.h line 239
Quoted 10 lines
include/configs/mv-common.h +9
-0+CONSOLE_ENV_SETTINGS \ + MEM_LAYOUT_ENV_SETTINGS \ +"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ +"console=ttyS0,115200\0" \ + BOOTENV +#else /* ifndef CONFIG_SPL_BUILD */ +#define CONFIG_EXTRA_ENV_SETTINGS +#endif +#endif /* _MV_COMMON_H */
I'll make sure to review and apply your next patch version faster, I promise. ;)
Thanks,
Stefan
PATCH 1/1 arm: mvebu: enable generic distro boot config
Hi Dennis,
Quoted 53 lines · Stefan Roese
Hi Dennis,
Quoted 3 lines · Dennis Gilmore
Switch all of the mvebu boards to support disto generic booting This will enable Fedora, Debian and other distros to support mvebu systems easier. Tested on SolidRun ClearFog
Sorry for the late review. I have a few issues with this patch. It generates build errors on some mvebu boards:
ds414 db-88f6820-gp db-mv784mp-gp
Mostly because of redefined macros:
This one (db-mv784mp-gp):
include/configs/mv-common.h:187:0: warning: "CONFIG_PREBOOT" redefined
#defineCONFIG_PREBOOT"sata init"
^
In file included frominclude/configs/db-mv784mp-gp.h:100:0,
frominclude/config.h:5,
frominclude/common.h:18,
fromexamples/standalone/hello_world.c:8:include/configs/mv-common.h:61:0: note: this is the location of the previous definition
#defineCONFIG_PREBOOTOr this one (db-88f6820-gp):
include/configs/mv-common.h:236:0: warning: "CONFIG_EXTRA_ENV_SETTINGS" redefined
#defineCONFIG_EXTRA_ENV_SETTINGS
^
In file included frominclude/config.h:5:0,from include/common.h:18, from drivers/ddr/marvell/a38x/xor.c:7:
include/configs/db-88f6820-gp.h:108:0: note: this is the location of the previous definition
#defineCONFIG_EXTRA_ENV_SETTINGS\Or this one (ds414):
include/configs/ds414.h:156:0: warning: "CONFIG_BOOTCOMMAND" redefined #defineCONFIG_BOOTCOMMAND"sf read ${loadaddr}0xd00000x700000; bootm" ^
In file included frominclude/configs/mv-common.h:204:0, frominclude/configs/ds414.h:104,
frominclude/config.h:5,
frominclude/common.h:18,
frominclude/ubi_uboot.h:17,
fromfs/ubifs/ubifs.h:37,
fromfs/ubifs/recovery.c:45:
Quoted 6 lines
Perhaps it makes sense to not move all mvebu boards to the generic distro booting. But only the Marvell eval boards and the community boards, like the clearfog (and not the ds414 for example).
What do you think?
Did you find the time to look into this?
Thanks,
Stefan