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
bf2bce9
commit 1a42820
Showing
1 changed file
with
149 additions
and
0 deletions.
There are no files selected for viewing
149 changes: 149 additions & 0 deletions
149
v2013.04-rc2/0001-mx6qsabre_common-uEnv.txt-bootz-n-fixes.patch
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 |
---|---|---|
@@ -0,0 +1,149 @@ | ||
From c99113f2c2fc3a269c2f490288420deaa0771a39 Mon Sep 17 00:00:00 2001 | ||
From: Robert Nelson <[email protected]> | ||
Date: Fri, 15 Mar 2013 10:20:35 -0500 | ||
Subject: [PATCH] mx6qsabre_common: 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/mx6qsabre_common.h | 78 +++++++++++++----------------------- | ||
1 file changed, 27 insertions(+), 51 deletions(-) | ||
|
||
diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h | ||
index 9eda9ed..d98631c 100644 | ||
--- a/include/configs/mx6qsabre_common.h | ||
+++ b/include/configs/mx6qsabre_common.h | ||
@@ -47,6 +47,11 @@ | ||
|
||
#define CONFIG_MMC | ||
#define CONFIG_CMD_MMC | ||
+#define CONFIG_FS_FAT | ||
+#define CONFIG_FS_EXT4 | ||
+#define CONFIG_CMD_FS_GENERIC /* Generic load commands */ | ||
+#define CONFIG_CMD_BOOTZ /* bootz zImage support */ | ||
+#define CONFIG_SUPPORT_RAW_INITRD /* bootz raw initrd support */ | ||
#define CONFIG_GENERIC_MMC | ||
#define CONFIG_BOUNCE_BUFFER | ||
#define CONFIG_CMD_EXT2 | ||
@@ -98,64 +103,35 @@ | ||
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ | ||
"mmcargs=setenv bootargs console=${console},${baudrate} " \ | ||
"root=${mmcroot}\0" \ | ||
- "loadbootscript=" \ | ||
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\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" \ | ||
+ "loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage\0" \ | ||
+ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}\0" \ | ||
"mmcboot=echo Booting from mmc ...; " \ | ||
"run mmcargs; " \ | ||
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | ||
- "if run loadfdt; then " \ | ||
- "bootm ${loadaddr} - ${fdt_addr}; " \ | ||
- "else " \ | ||
- "if test ${boot_fdt} = try; then " \ | ||
- "bootm; " \ | ||
- "else " \ | ||
- "echo WARN: Cannot load the DT; " \ | ||
- "fi; " \ | ||
- "fi; " \ | ||
- "else " \ | ||
- "bootm; " \ | ||
- "fi;\0" \ | ||
- "netargs=setenv bootargs console=${console},${baudrate} " \ | ||
- "root=/dev/nfs " \ | ||
- "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ | ||
- "netboot=echo Booting from net ...; " \ | ||
- "run netargs; " \ | ||
- "if test ${ip_dyn} = yes; then " \ | ||
- "setenv get_cmd dhcp; " \ | ||
- "else " \ | ||
- "setenv get_cmd tftp; " \ | ||
- "fi; " \ | ||
- "${get_cmd} ${uimage}; " \ | ||
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | ||
- "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ | ||
- "bootm ${loadaddr} - ${fdt_addr}; " \ | ||
- "else " \ | ||
- "if test ${boot_fdt} = try; then " \ | ||
- "bootm; " \ | ||
- "else " \ | ||
- "echo WARN: Cannot load the DT; " \ | ||
- "fi; " \ | ||
- "fi; " \ | ||
- "else " \ | ||
- "bootm; " \ | ||
- "fi;\0" | ||
+ "bootz ${loadaddr} - ${fdt_addr};\0" | ||
|
||
#define CONFIG_BOOTCOMMAND \ | ||
"mmc dev ${mmcdev};" \ | ||
- "if mmc rescan ${mmcdev}; then " \ | ||
- "if run loadbootscript; then " \ | ||
- "run bootscript; " \ | ||
- "else " \ | ||
- "if run loaduimage; then " \ | ||
- "run mmcboot; " \ | ||
- "else run netboot; " \ | ||
- "fi; " \ | ||
- "fi; " \ | ||
- "else run netboot; fi" | ||
+ "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;" | ||
|
||
#define CONFIG_ARP_TIMEOUT 200UL | ||
|
||
-- | ||
1.7.10.4 | ||
|