[ELDK] [PATCH 01/10] META-ELDK: u-boot: Adjust loading from UBI on M28EVK
Marek Vasut
marex at denx.de
Tue Apr 1 22:41:39 CEST 2014
This patch adjusts two things. First of all, it adjusts the 'nandload' command
to load the kernel from UBIFS instead of raw NAND. Having the kernel on UBIFS
is very important, since even thought the M28 uses SLC NAND, the NAND is still
very prone to data corruption and bitrot. Placing the kernel into UBI/UBIFS
partition mitigates the data corruption.
Moreover, to reflect that we no longer load the kernel from raw NAND, rename
the 'nand.*' commands to 'ubi.*' to be consistent with their true function.
Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Wolfgang Denk <wd at denx.de>
---
...003-ARM-m28evk-Update-default-environment.patch | 32 ++++++++++++----------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/0003-ARM-m28evk-Update-default-environment.patch b/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/0003-ARM-m28evk-Update-default-environment.patch
index aa997d8..ed52294 100644
--- a/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/0003-ARM-m28evk-Update-default-environment.patch
+++ b/meta-eldk/recipes-bsp/uboot/u-boot/m28evk/0003-ARM-m28evk-Update-default-environment.patch
@@ -6,8 +6,8 @@ Subject: [PATCH 3/3] ARM: m28evk: Update default environment
Signed-off-by: Marek Vasut <marex at denx.de>
Signed-off-by: Lothar Rubusch <lothar at denx.de>
---
- include/configs/m28evk.h | 85 ++++++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 82 insertions(+), 3 deletions(-)
+ include/configs/m28evk.h | 87 ++++++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 84 insertions(+), 3 deletions(-)
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index e44344b..92e0afa 100644
@@ -53,7 +53,7 @@ index e44344b..92e0afa 100644
"setexpr update_off ${loadaddr} + ${update_nand_fcb} ; " \
"setexpr update_sz ${filesize} - ${update_nand_fcb} ; " \
"nand write ${update_off} ${update_nand_fcb} ${update_sz} ; " \
-@@ -203,6 +217,71 @@
+@@ -203,6 +217,73 @@
"setexpr fw_sz ${fw_sz} + 1 ; " \
"mmc write ${loadaddr} 0x800 ${fw_sz} ; " \
"fi ; " \
@@ -78,12 +78,14 @@ index e44344b..92e0afa 100644
+ "mmcload=" \
+ "mmc rescan ; " \
+ "ext4load mmc 0:2 ${kernel_addr_r} ${bootfile}\0" \
-+ "nandload=nand read ${kernel_addr_r} kernel\0" \
++ "ubiload=" \
++ "ubi part UBI ; ubifsmount ubi0:rootfs ; " \
++ "ubifsload ${kernel_addr_r} /boot/${bootfile}\0" \
+ "netload=" \
+ "tftp ${kernel_addr_r} ${hostname}/${bootfile}\0" \
+ "miscargs=nohlt panic=1\0" \
+ "mmcargs=setenv bootargs root=${rootdev} rw rootwait\0" \
-+ "nandargs=" \
++ "ubiargs=" \
+ "setenv bootargs ubi.mtd=5 " \
+ "root=ubi0:rootfs rootfstype=ubifs\0" \
+ "nfsargs=" \
@@ -92,26 +94,26 @@ index e44344b..92e0afa 100644
+ "mmc_mmc=" \
+ "run mmcload mmcargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
-+ "mmc_nand=" \
-+ "run mmcload nandargs addargs ; " \
++ "mmc_ubi=" \
++ "run mmcload ubiargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
+ "mmc_nfs=" \
+ "run mmcload nfsargs addip addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
-+ "nand_mmc=" \
-+ "run nandload mmcargs addargs ; " \
++ "ubi_mmc=" \
++ "run ubiload mmcargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
-+ "nand_nand=" \
-+ "run nandload nandargs addargs ; " \
++ "ubi_ubi=" \
++ "run ubiload ubiargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
-+ "nand_nfs=" \
-+ "run nandload nfsargs addip addargs ; " \
++ "ubi_nfs=" \
++ "run ubiload nfsargs addip addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
+ "net_mmc=" \
+ "run netload mmcargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
-+ "net_nand=" \
-+ "run netload nandargs addargs ; " \
++ "net_ubi=" \
++ "run netload ubiargs addargs ; " \
+ "bootm ${kernel_addr_r}\0" \
+ "net_nfs=" \
+ "run netload nfsargs addip addargs ; " \
--
1.9.0
More information about the eldk
mailing list