[U-Boot] [RFC v2] implementation of generic distro configs

From V2 ive added support to cmd_pxe.c for any filesystem and added generic
suppport to the distro config, the result is /boot can be vfat or ext and will just work.
I have fixed up the arch in pxe so taht it is only represented as armv7 on v7 builds
Left to go is to deal with memory addresses correctly in the most flexible way, and Wolfgang's objections to the use of fdt_addr to have u-boot load a dtb automatically without the need to pass in a fdt line in the extlinux.conf
the patches are all posted at http://fedorapeople.org/cgit/ausil/public_git/u-boot.git/ as well
Dennis

Signed-off-by: Dennis Gilmore dennis@ausil.us --- common/cmd_pxe.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index db6b156..08c0ff5 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -11,6 +11,7 @@ #include <linux/ctype.h> #include <errno.h> #include <linux/list.h> +#include <fs.h>
#include "menu.h"
@@ -160,6 +161,19 @@ static int do_get_fat(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) return -ENOENT; }
+static int do_get_any(cmd_tbl_t *cmdtp, const char *file_path, char *file_addr) +{ +#ifdef CONFIG_CMD_FS_GENERIC + fs_argv[0] = "load"; + fs_argv[3] = file_addr; + fs_argv[4] = (void *)file_path; + + if (!do_load(cmdtp, 0, 5, fs_argv, FS_TYPE_ANY)) + return 1; +#endif + return -ENOENT; +} + /* * As in pxelinux, paths to files referenced from files we retrieve are * relative to the location of bootfile. get_relfile takes such a path and @@ -1539,6 +1553,8 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) do_getfile = do_get_ext2; else if (strstr(argv[3], "fat")) do_getfile = do_get_fat; + else if (strstr(argv[3], "any")) + do_getfile = do_get_any; else { printf("Invalid filesystem: %s\n", argv[3]); return 1; @@ -1576,7 +1592,7 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) U_BOOT_CMD( sysboot, 7, 1, do_sysboot, "command to get and boot from syslinux files", - "[-p] <interface> <dev[:part]> <ext2|fat> [addr] [filename]\n" - " - load and parse syslinux menu file 'filename' from ext2 or fat\n" - " filesystem on 'dev' on 'interface' to address 'addr'" + "[-p] <interface> <dev[:part]> <ext2|fat|any> [addr] [filename]\n" + " - load and parse syslinux menu file 'filename' from ext2, fat\n" + " or any filesystem on 'dev' on 'interface' to address 'addr'" );

On 12/17/2013 12:16 AM, Dennis Gilmore wrote:
Signed-off-by: Dennis Gilmore dennis@ausil.us
Nit pick: A patch description might be useful.
@@ -1539,6 +1553,8 @@ int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) do_getfile = do_get_ext2; else if (strstr(argv[3], "fat")) do_getfile = do_get_fat;
- else if (strstr(argv[3], "any"))
do_getfile = do_get_any;
This is a total bikeshed, so feel free to ignore it cmopletely:
Is "any" the best choice here? In other U-Boot commands, "-" is used to mean something similar, so perhaps "-" would work better here? Still, I guess "-" usually means "none" or "missing" more than "any", so perhaps "any" is better after all. Anyway, just a point for thought; I'm fine either way.

Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/common.h | 5 ++++ include/config_distro_default.h | 55 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 include/config_distro_default.h
diff --git a/include/common.h b/include/common.h index d49c514..00969a5 100644 --- a/include/common.h +++ b/include/common.h @@ -99,6 +99,11 @@ typedef volatile unsigned char vu_char; #include <flash.h> #include <image.h>
+/* use generic distro config */ +#ifdef DISTRO_DEFAULTS +#include <config_distro_default.h> +#endif + #ifdef DEBUG #define _DEBUG 1 #else diff --git a/include/config_distro_default.h b/include/config_distro_default.h new file mode 100644 index 0000000..7b13586 --- /dev/null +++ b/include/config_distro_default.h @@ -0,0 +1,55 @@ +/* + * Copyright 2013 Red Hat, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _CONFIG_CMD_DISTRO_DEFAULT_H +#define _CONFIG_CMD_DISTRO_DEFAULT_H + +/* + * List of all commands and options that when defined enables support for features + * required by distros to support boards in a standardised and consitant manner. + */ + +#define CONFIG_BOOTP_BOOTPATH +#define CONFIG_BOOTP_DNS +#define CONFIG_BOOTP_GATEWAY +#define CONFIG_BOOTP_HOSTNAME +#define CONFIG_BOOTP_PXE +#define CONFIG_BOOTP_SUBNETMASK + +#if defined(__arm__) +#define CONFIG_BOOTP_PXE_CLIENTARCH 0x100 +#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) +#define CONFIG_BOOTP_VCI_STRING "U-boot.armv7" +#else +#define CONFIG_BOOTP_VCI_STRING "U-boot.arm" +#endif +#endif + +#define CONFIG_OF_LIBFDT + +#define CONFIG_CMD_BOOTZ +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_ELF +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_FS_GENERIC +#define CONFIG_CMD_MII +#define CONFIG_CMD_NET +#define CONFIG_CMD_PING +#define CONFIG_CMD_PXE + +#define CONFIG_CMDLINE_EDITING +#define CONFIG_AUTO_COMPLETE +#define CONFIG_BOOTDELAY 2 +#define CONFIG_SYS_LONGHELP +#define CONFIG_MENU +#define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION +#define CONFIG_SUPPORT_RAW_INITRD +#define CONFIG_SYS_HUSH_PARSER + +#endif /* _CONFIG_CMD_DISTRO_DEFAULT_H */

On 12/17/2013 12:16 AM, Dennis Gilmore wrote:
Signed-off-by: Dennis Gilmore dennis@ausil.us
Nit: A patch description might be useful; e.g. to describe that distros need to know that the bootloader enables a common set of options they can rely on, and this file is the definition of that set.
diff --git a/include/common.h b/include/common.h
+/* use generic distro config */ +#ifdef DISTRO_DEFAULTS +#include <config_distro_default.h> +#endif
Can we wrap that in the following also:
+#ifdef DISTRO_DEFAULTS +#ifndef CONFIG_SPL_BUILD +#include <config_distro_default.h> +#endif +#endif
That way, this header won't bloat up the size of Tegra's SPL, which is limited to ~16K. Or, would you expect that extra ifdef to be placed around the #define DISTRO_DEFAULTS?
diff --git a/include/config_distro_default.h b/include/config_distro_default.h
Bike-shed: At least for Tegra, the headers which define common config options are in include/configs/tegra_*.h, just like the top-level board config files. Would this be better as include/configs/distro_defaults.h?

On 12/17/2013 12:16 AM, Dennis Gilmore wrote:
diff --git a/include/config_distro_default.h b/include/config_distro_default.h
+#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_EXT4 +#define CONFIG_CMD_FAT
For a generic config, I would be tempted to drop the fs-specific command sets enabled by the options above, and rely /only/ on the generic commands enabled by:
+#define CONFIG_CMD_FS_GENERIC

On 12/17/2013 12:16 AM, Dennis Gilmore wrote:
diff --git a/include/common.h b/include/common.h
#include <flash.h> #include <image.h>
+/* use generic distro config */ +#ifdef DISTRO_DEFAULTS +#include <config_distro_default.h> +#endif
There is another issue with including this header at this location:
This include is pretty late in <common.h>. In particular, <part.h> is included before this point, and only prototypes some functions such as test_part_dos() if the relevant config option is enabled.
I want to simplify all the Tegra config headers and remove any options that are also set by <config_distro_default.h>. However, if I do this, then e.g. CONFIG_DOS_PARTITION isn't set when <part.h> is included, and the build breaks.
One could probably move the include of <config_distro_default.h> very near the top of <common.h>, i.e. just after the include of <config.h>. However, this still doesn't solve all problems, since <config.h> itself (which is an auto-generated file) includes <config_fallbacks.h>, which is where e.g. CONFIG_FS_FAT gets auto-enabled if CONFIG_CMD_FAT is enabled. This can cause the build to break since the makefiles don't know to link in the FAT fs code.
I'd like to propose that instead of board config files doing:
#define DISTRO_DEFAULTS
They simply do:
#include <distro_defaults.h>
That way, there's nothing unusual about the handling of this header file; it's just some common location that sets up some common values, and the control flow of all the includes doesn't look any different to the tools that process the board config header file.
Would you like me to post revised versions of your patches to show what I mean?

Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/configs/wandboard.h | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index e9c7e64..41c84ae 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -40,6 +40,9 @@ #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE 115200
+/* enable generic distro config */ +#define DISTRO_DEFAULTS 1 + /* Command definition */ #include <config_cmd_default.h>
@@ -48,7 +51,6 @@ #define CONFIG_CMD_BMODE #define CONFIG_CMD_SETEXPR
-#define CONFIG_BOOTDELAY 5
#define CONFIG_SYS_MEMTEST_START 0x10000000 #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M) @@ -65,6 +67,9 @@ #define CONFIG_CMD_MMC #define CONFIG_GENERIC_MMC #define CONFIG_BOUNCE_BUFFER + +#define CONFIG_BOOTDELAY 5 + #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_DOS_PARTITION @@ -74,6 +79,11 @@ #define CONFIG_CMD_DHCP #define CONFIG_CMD_MII #define CONFIG_CMD_NET + +#define CONFIG_OF_LIBFDT +#define CONFIG_CMD_BOOTZ + +/* Ethernet Configuration */ #define CONFIG_FEC_MXC #define CONFIG_MII #define IMX_FEC_BASE ENET_BASE_ADDR @@ -113,8 +123,30 @@ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ - "fdt_addr=0x11000000\0" \ + "fdt_addr=0x11100000\0" \ + "fdt_addr_r=0x11200000\0" \ + "pxefile_addr_r=0x11300000\0" \ + "scr_addr_r=0x11400000\0" \ + "kernel_addr_r=0x11500000\0" \ + "ramdisk_addr_r=0x13500000\0" \ "boot_fdt=try\0" \ + "bootcmd_setup=mmc rescan\0" \ + "bootcmd_pxe=setenv bootfile "" ;dhcp; tftp ${fdt_addr} /dtb/${fdt_file}; pxe get; pxe boot\0" \ + "bootcmd_disk_scr=load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr && source ${scr_addr_r}\0" \ + "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_uenv=load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \ + "bootcmd_disk_kernel=load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz && load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \ + "bootcmd_disk=load ${boot_ifc} ${bootdevice} ${fdt_addr} /boot/dtb/${fdt_file}; load ${boot_ifc} ${bootdevice} ${fdt_addr} /dtb/${fdt_file};run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \ + "bootcmd_sata=setenv boot_ifc scsi; scsi scan && run bootcmd_disk\0" \ + "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \ + "bootcmd_default=run bootcmd_mmc; run bootcmd_sata; run bootcmd_pxe\0" \ + "localcmd=run bootcmd_mmc\0" \ + "bootdevice=0\0" \ + "bootargs=console=ttymxc0 root=LABEL=rootfs\0" \ + "bootdelay=2\0" \ + "bootretry=90\0" \ + "netretry=once\0" \ "ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ "mmcpart=1\0" \ @@ -183,6 +215,7 @@
#define CONFIG_BOOTCOMMAND \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "run bootcmd_default; " \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \ @@ -230,9 +263,6 @@ #define CONFIG_ENV_OFFSET (6 * 64 * 1024) #define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_OF_LIBFDT -#define CONFIG_CMD_BOOTZ - #ifndef CONFIG_SYS_DCACHE_OFF #define CONFIG_CMD_CACHE #endif

Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/configs/am335x_evm.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 8af4d6a..206166f 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -55,11 +55,14 @@
#ifndef CONFIG_SPL_BUILD #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x80200000\0" \ - "fdtaddr=0x80F80000\0" \ + "loadaddr=0x81000000\0" \ + "pxefile_addr_r=0x81300000\0" \ + "kernel_addr_r=0x81400000\0" \ + "ramdisk_addr_r=0x83400000\0" \ + "fdt_addr_r=0x81100000\0" \ + "fdt_addr=0x81200000\0" \ "fdt_high=0xffffffff\0" \ "boot_fdt=try\0" \ - "rdaddr=0x81000000\0" \ "bootpart=0:2\0" \ "bootdir=/boot\0" \ "bootfile=zImage\0" \ @@ -75,7 +78,7 @@ "nfsopts=nolock\0" \ "static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}" \ "::off\0" \ - "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ + "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${ramdisk_addr_r},64M\0" \ "ramrootfstype=ext2\0" \ "mmcargs=setenv bootargs console=${console} " \ "${optargs} " \ @@ -104,13 +107,13 @@ "${optargs} " \ "root=${ramroot} " \ "rootfstype=${ramrootfstype}\0" \ - "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ + "loadramdisk=load mmc ${mmcdev} ${ramdisk_addr_r} ramdisk.gz\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdt_addr_r} ${bootdir}/${fdtfile}\0" \ "mmcloados=run mmcargs; " \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ - "bootz ${loadaddr} - ${fdtaddr}; " \ + "bootz ${loadaddr} - ${fdt_addr_r}; " \ "else " \ "if test ${boot_fdt} = try; then " \ "bootz; " \ @@ -145,12 +148,12 @@ "setenv autoload no; " \ "dhcp; " \ "tftp ${loadaddr} ${bootfile}; " \ - "tftp ${fdtaddr} ${fdtfile}; " \ + "tftp ${fdt_addr_r} ${fdtfile}; " \ "run netargs; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" \ + "bootz ${loadaddr} - ${fdt_addr_r}\0" \ "ramboot=echo Booting from ramdisk ...; " \ "run ramargs; " \ - "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ + "bootz ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}\0" \ "findfdt="\ "if test $board_name = A335BONE; then " \ "setenv fdtfile am335x-bone.dtb; fi; " \

Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/configs/omap3_beagle.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h index 3acb854..7d0fa45 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h @@ -127,6 +127,9 @@ /* commands to include */ #include <config_cmd_default.h>
+/* enable generic distro config */ +#define DISTRO_DEFAULTS 1 + #define CONFIG_CMD_ASKENV
#define CONFIG_CMD_CACHE @@ -190,9 +193,13 @@
#define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x80200000\0" \ + "pxefile_addr_r=0x82000000\0" \ + "kernel_addr_r=0x84000000\0" \ + "ramdisk_addr_r=0x90000000\0" \ + "fdt_addr_r=0x83000000\0" \ "rdaddr=0x81000000\0" \ "fdt_high=0xffffffff\0" \ - "fdtaddr=0x80f80000\0" \ + "fdt_addr=0x80f80000\0" \ "usbtty=cdc_acm\0" \ "bootfile=uImage\0" \ "ramdisk=ramdisk.gz\0" \ @@ -244,6 +251,22 @@ "setenv fdtfile omap3-beagle-xm.dtb; fi; " \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ + "bootcmd_setup=mmc rescan\0" \ + "bootcmd_pxe=setenv bootfile "" ;dhcp; pxe get; pxe boot\0" \ + "bootcmd_disk_scr=ext2load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr && source ${scr_addr_r}\0" \ + "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_uenv=ext2load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \ + "bootcmd_disk_kernel=ext2load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz && ext2load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \ + "bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \ + "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \ + "bootcmd_default=run bootcmd_mmc; run bootcmd_pxe\0" \ + "localcmd=run bootcmd_mmc\0" \ + "bootdevice=0\0" \ + "bootargs=console=${console} root=LABEL=rootfs\0" \ + "bootdelay=2\0" \ + "bootretry=90\0" \ + "netretry=once\0" \ "bootenv=uEnv.txt\0" \ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ "importbootenv=echo Importing environment from mmc ...; " \ @@ -259,13 +282,13 @@ "rootfstype=${ramrootfstype}\0" \ "loadramdisk=load mmc ${bootpart} ${rdaddr} ${bootdir}/${ramdisk}\0" \ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ - "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdt_addr} ${bootdir}/${fdtfile}\0" \ "mmcboot=echo Booting from mmc ...; " \ "run mmcargs; " \ "bootm ${loadaddr}\0" \ "mmcbootz=echo Booting with DT from mmc${mmcdev} ...; " \ "run mmcargs; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "nandboot=echo Booting from nand ...; " \ "run nandargs; " \ "nand read ${loadaddr} 280000 400000; " \ @@ -281,6 +304,7 @@ #define CONFIG_BOOTCOMMAND \ "run findfdt; " \ "mmc dev ${mmcdev}; if mmc rescan; then " \ + "run bootcmd_default; " \ "if run userbutton; then " \ "setenv bootenv uEnv.txt;" \ "else " \

Signed-off-by: Dennis Gilmore dennis@ausil.us --- include/configs/omap4_common.h | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/include/configs/omap4_common.h b/include/configs/omap4_common.h index ea56eeb..96c94a1 100644 --- a/include/configs/omap4_common.h +++ b/include/configs/omap4_common.h @@ -55,6 +55,9 @@
#include <configs/ti_armv7_common.h>
+/* enable generic distro config */ +#define DISTRO_DEFAULTS 1 + /* * Hardware drivers */ @@ -88,9 +91,13 @@ */ #define CONFIG_EXTRA_ENV_SETTINGS \ "loadaddr=0x82000000\0" \ + "pxefile_addr_r=0x82000000\0" \ + "kernel_addr_r=0x84000000\0" \ + "ramdisk_addr_r=0x90000000\0" \ + "fdt_addr_r=0x83000000\0" \ "console=ttyO2,115200n8\0" \ "fdt_high=0xffffffff\0" \ - "fdtaddr=0x80f80000\0" \ + "fdt_addr=0x80f80000\0" \ "fdtfile=undefined\0" \ "bootpart=0:2\0" \ "bootdir=/boot\0" \ @@ -104,6 +111,22 @@ "vram=${vram} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ + "bootcmd_setup=mmc rescan\0" \ + "bootcmd_pxe=setenv bootfile "" ;dhcp; pxe get; pxe boot\0" \ + "bootcmd_disk_scr=load ${boot_ifc} ${bootdevice} ${scr_addr_r} boot.scr && source ${scr_addr_r}\0" \ + "bootcmd_disk_sysboot1=setenv bootfile /boot/extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_sysboot2=setenv bootfile /extlinux/extlinux.conf; sysboot ${boot_ifc} ${bootdevice} any\0" \ + "bootcmd_disk_uenv=load ${boot_ifc} ${bootdevice} ${uenv_addr_r} uEnv.txt; env import -t ${uenv_addr_r} ${filesize}; run bootcmd_uenv\0" \ + "bootcmd_disk_kernel=load ${boot_ifc} ${bootdevice} ${kernel_addr_r} vmlinuz && load ${boot_ifc} ${bootdevice} ${ramdisk_addr_r} initrd.img && bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}\0" \ + "bootcmd_disk=run bootcmd_disk_sysboot1; run bootcmd_disk_sysboot2; run bootcmd_disk_uenv; run bootcmd_disk_scr; run bootcmd_disk_kernel\0" \ + "bootcmd_mmc=setenv boot_ifc mmc; mmc rescan && run bootcmd_disk\0" \ + "bootcmd_default=run bootcmd_mmc; run bootcmd_pxe\0" \ + "localcmd=run bootcmd_mmc\0" \ + "bootdevice=0\0" \ + "bootargs=console=${console} root=LABEL=rootfs\0" \ + "bootdelay=2\0" \ + "bootretry=90\0" \ + "netretry=once\0" \ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \ "source ${loadaddr}\0" \ @@ -113,7 +136,7 @@ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \ "mmcboot=echo Booting from mmc${mmcdev} ...; " \ "run mmcargs; " \ - "bootz ${loadaddr} - ${fdtaddr}\0" \ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "findfdt="\ "if test $board_name = sdp4430; then " \ "setenv fdtfile omap4-sdp.dtb; fi; " \ @@ -125,12 +148,13 @@ "setenv fdtfile omap4-panda-es.dtb; fi;" \ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" \ - "loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "loadfdt=load mmc ${bootpart} ${fdt_addr} ${bootdir}/${fdtfile}\0" \
#define CONFIG_BOOTCOMMAND \ "run findfdt; " \ "mmc dev ${mmcdev}; if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ + "run bootcmd_default; " \ "if run loadbootscript; then " \ "run bootscript; " \ "else " \
participants (2)
-
Dennis Gilmore
-
Stephen Warren