forked from eewiki/u-boot-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Robert Nelson <[email protected]>
- Loading branch information
1 parent
0bf21d1
commit 0e567e1
Showing
1 changed file
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,46 @@ From: Robert Nelson <[email protected]> | |
Date: Fri, 15 Mar 2013 10:16:23 -0500 | ||
Subject: [PATCH] mx53loco: uEnv.txt, bootz, n fixes | ||
|
||
Defaults: | ||
#define CONFIG_BOOTDELAY 1 | ||
|
||
#define CONFIG_CMD_FAT | ||
#define CONFIG_CMD_EXT2 | ||
#define CONFIG_CMD_EXT4 | ||
#define CONFIG_CMD_FS_GENERIC | ||
|
||
/* bootz: zImage/initrd.img support */ | ||
#define CONFIG_CMD_BOOTZ | ||
#define CONFIG_SUPPORT_RAW_INITRD | ||
|
||
fatload -> load | ||
bootm -> bootz | ||
|
||
#define CONFIG_BOOTCOMMAND \ | ||
"mmc dev ${mmcdev};" \ | ||
"if mmc rescan; then " \ | ||
"echo SD/MMC found on device ${mmcdev};" \ | ||
"if run loadbootenv; then " \ | ||
"echo Loaded environment from uEnv.txt;" \ | ||
"run importbootenv;" \ | ||
"fi;" \ | ||
"if test -n $uenvcmd; then " \ | ||
"echo Running uenvcmd ...;" \ | ||
"run uenvcmd;" \ | ||
"fi;" \ | ||
"if run loadzimage; then " \ | ||
"run loadfdt;" \ | ||
"run mmcboot;" \ | ||
"fi;" \ | ||
"fi;" | ||
|
||
Signed-off-by: Robert Nelson <[email protected]> | ||
--- | ||
include/configs/mx53loco.h | 76 +++++++++++++++----------------------------- | ||
1 file changed, 25 insertions(+), 51 deletions(-) | ||
include/configs/mx53loco.h | 94 ++++++++++++++++++-------------------------- | ||
1 file changed, 38 insertions(+), 56 deletions(-) | ||
|
||
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h | ||
index a4b610f..59ff4de 100644 | ||
index a4b610f..693cf66 100644 | ||
--- a/include/configs/mx53loco.h | ||
+++ b/include/configs/mx53loco.h | ||
@@ -53,6 +53,11 @@ | ||
|
@@ -24,7 +57,7 @@ index a4b610f..59ff4de 100644 | |
#define CONFIG_GENERIC_MMC | ||
#define CONFIG_CMD_FAT | ||
#define CONFIG_CMD_EXT2 | ||
@@ -119,72 +124,41 @@ | ||
@@ -119,72 +124,49 @@ | ||
#define CONFIG_EXTRA_ENV_SETTINGS \ | ||
"script=boot.scr\0" \ | ||
"uimage=uImage\0" \ | ||
|
@@ -33,22 +66,30 @@ index a4b610f..59ff4de 100644 | |
"fdt_addr=0x71000000\0" \ | ||
"boot_fdt=try\0" \ | ||
"ip_dyn=yes\0" \ | ||
+ "console=ttymxc0,115200\0" \ | ||
+ "optargs=\0" \ | ||
"mmcdev=0\0" \ | ||
- "mmcpart=2\0" \ | ||
- "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ | ||
+ "mmcpart=1\0" \ | ||
+ "mmcroot=/dev/mmcblk0p2 ro rootwait\0" \ | ||
"mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \ | ||
"loadbootscript=" \ | ||
- "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \ | ||
- "loadbootscript=" \ | ||
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | ||
+ "mmcpart=1\0" \ | ||
+ "mmcroot=/dev/mmcblk0p2 ro\0" \ | ||
+ "mmcrootfstype=ext4 rootwait\0" \ | ||
+ "mmcargs=setenv bootargs console=${console} " \ | ||
+ "${optargs} " \ | ||
+ "root=${mmcroot} " \ | ||
+ "rootfstype=${mmcrootfstype}\0" \ | ||
+ "loadbootenv=" \ | ||
+ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt;\0" \ | ||
+ "importbootenv=echo Importing environment from mmc ...; " \ | ||
+ "env import -t ${loadaddr} ${filesize}\0" \ | ||
"bootscript=echo Running bootscript from mmc ...; " \ | ||
"source\0" \ | ||
- "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ | ||
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | ||
+ "loaduimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \ | ||
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \ | ||
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | ||
"mmcboot=echo Booting from mmc ...; " \ | ||
"run mmcargs; " \ | ||
|
@@ -93,23 +134,28 @@ index a4b610f..59ff4de 100644 | |
+ "bootz ${loadaddr} - ${fdt_addr}\0" | ||
|
||
#define CONFIG_BOOTCOMMAND \ | ||
"mmc dev ${mmcdev}; if mmc rescan; then " \ | ||
"if run loadbootscript; then " \ | ||
- "mmc dev ${mmcdev}; if mmc rescan; then " \ | ||
- "if run loadbootscript; then " \ | ||
- "run bootscript; " \ | ||
- "else " \ | ||
- "if run loaduimage; then " \ | ||
- "run mmcboot; " \ | ||
- "else run netboot; " \ | ||
- "fi; " \ | ||
+ "echo Loaded environment from ${bootenv}; " \ | ||
+ "run importbootenv; " \ | ||
"fi; " \ | ||
- "fi; " \ | ||
- "else run netboot; fi" | ||
+ "mmc dev ${mmcdev};" \ | ||
+ "if mmc rescan; then " \ | ||
+ "echo SD/MMC found on device ${mmcdev};" \ | ||
+ "if run loadbootenv; then " \ | ||
+ "echo Loaded environment from uEnv.txt;" \ | ||
+ "run importbootenv;" \ | ||
+ "fi;" \ | ||
+ "if test -n $uenvcmd; then " \ | ||
+ "echo Running uenvcmd ...;" \ | ||
+ "run uenvcmd;" \ | ||
+ "fi;" \ | ||
+ "if run loaduimage; then " \ | ||
+ "if run loadzimage; then " \ | ||
+ "run loadfdt;" \ | ||
+ "run mmcboot;" \ | ||
+ "fi;" \ | ||
|