Skip to contentSkip to conversation

implementation of generic distro configs

RFC New Dennis Gilmore 2 participants 11 messages Dec 17, 2013 – Jan 16, 2014

lore
Share & tools
lore
#1 lore raw

PATCH 1/6 cmd_pxe.c add any option for filesystem with sysboot uses generic load

---
 common/cmd_pxe.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
common/cmd_pxe.c +19 -3
index db6b156..08c0ff5 100644
@@ -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'"
 );
Signature · 1 line
1.8.4.2
#2 lore raw

PATCH 1/6 cmd_pxe.c add any option for filesystem with sysboot uses generic load

Quoted 1 line · Dennis Gilmore

Nit pick: A patch description might be useful.

common/cmd_pxe.c int do_sysboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) · line 1557

Quoted 6 lines
common/cmd_pxe.c +2 -0
@@ -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.

#3 lore raw

PATCH 2/6 add a generic set of configs to enable Distros to more easier support u-boot based systems

In reply to Dennis Gilmore
---
 include/common.h                |  5 ++++
 include/config_distro_default.h | 55 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
 create mode 100644 include/config_distro_default.h
include/common.h +5 -0
index d49c514..00969a5 100644
@@ -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
include/config_distro_default.h new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
1.8.4.2
#4 lore raw

PATCH 2/6 add a generic set of configs to enable Distros to more easier support u-boot based systems

Quoted 1 line · Dennis Gilmore

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.

include/common.h typedef volatile unsigned char vu_char; · line 105

Quoted 6 lines
include/common.h +4 -0
 
+/* 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?

include/config_distro_default.h

Quoted 1 line
include/config_distro_default.h +0 -0

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?

#5 lore raw

PATCH 2/6 add a generic set of configs to enable Distros to more easier support u-boot based systems

In reply to Dennis Gilmore

include/config_distro_default.h line 38

Quoted 5 lines · Dennis Gilmore
include/config_distro_default.h +3 -0
 
+#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:

Quoted 1 line

+#define CONFIG_CMD_FS_GENERIC

#6 lore raw

PATCH 2/6 add a generic set of configs to enable Distros to more easier support u-boot based systems

In reply to Dennis Gilmore

include/common.h typedef volatile unsigned char vu_char; · line 105

Quoted 9 lines · Dennis Gilmore
include/common.h +4 -0
 
 #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?

#7 lore raw

PATCH 3/6 port andboard to use generic distro config

In reply to Dennis Gilmore
---
 include/configs/wandboard.h | 40 +++++++++++++++++++++++++++++++++++-----
 1 file changed, 35 insertions(+), 5 deletions(-)
include/configs/wandboard.h +35 -5
index e9c7e64..41c84ae 100644
@@ -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
Signature · 1 line
1.8.4.2
#8 lore raw

PATCH 4/6 port am335x_evm to use generic distro configs

In reply to Dennis Gilmore
---
 include/configs/am335x_evm.h | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)
include/configs/am335x_evm.h +13 -10
index 8af4d6a..206166f 100644
@@ -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; " \
Signature · 1 line
1.8.4.2
#9 lore raw

PATCH 5/6 port beagleboard to use generic distro configs

In reply to Dennis Gilmore
---
 include/configs/omap3_beagle.h | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
include/configs/omap3_beagle.h +27 -3
index 3acb854..7d0fa45 100644
@@ -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 " \
Signature · 1 line
1.8.4.2
#10 lore raw

PATCH 6/6 port omap4 boards to use generic distro configs

In reply to Dennis Gilmore
---
 include/configs/omap4_common.h | 30 +++++++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
include/configs/omap4_common.h +27 -3
index ea56eeb..96c94a1 100644
@@ -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 " \
Signature · 1 line
1.8.4.2