Skip to contentSkip to conversation

am43xx/am33xx NAND fixes and am43xx_evm NAND boot

PATCH New Roger Quadros 2 participants 10 messages Jun 5, 2015 – Jun 13, 2015

lore
Share & tools
lore
#0 lore raw

cover am43xx/am33xx NAND fixes and am43xx_evm NAND boot

Hi,

These are some NAND boot cleanups and NAND boot support for am43xx_evm.

cheers,
-roger

Roger Quadros (2):
am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition
name
am335x_evm: nand: Fix boot from NAND

Tom Rini (1):
am43xx_evm: Enable NAND boot

 include/configs/am335x_evm.h |  8 ++++----
 include/configs/am43xx_evm.h | 26 +++++++++++++++++++++++---
 include/configs/dra7xx_evm.h |  2 +-
 3 files changed, 28 insertions(+), 8 deletions(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/3 am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name

We almost always use UBIFS for user accessible NAND file systems and the UBIFS file system might contain more than one volume within the single NAND partition. The last NAND partition is therefore more appropriately named as "NAND.file-system" instead of "NAND.rootfs"

The Linux kernel (as of v3.16) also uses "NAND.file-system" to name the last NAND partition. This patch makes the partition name consistent between u-boot and the kernel.

---
 include/configs/am335x_evm.h | 2 +-
 include/configs/am43xx_evm.h | 2 +-
 include/configs/dra7xx_evm.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/configs/am335x_evm.h +1 -1
index 8da3325..1c6cbd7 100644
@@ -248,7 +248,7 @@
 					"128k(NAND.u-boot-env)," \
 					"128k(NAND.u-boot-env.backup1)," \
 					"8m(NAND.kernel)," \
-					"-(NAND.rootfs)"
+					"-(NAND.file-system)"
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
 #undef CONFIG_ENV_IS_NOWHERE
 #define CONFIG_ENV_IS_IN_NAND
include/configs/am43xx_evm.h +1 -1
index d4f4c23..482a99a 100644
@@ -378,7 +378,7 @@
 					"256k(NAND.u-boot-env)," \
 					"256k(NAND.u-boot-env.backup1)," \
 					"7m(NAND.kernel)," \
-					"-(NAND.rootfs)"
+					"-(NAND.file-system)"
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x00180000
 /* NAND: SPL related configs */
 #ifdef CONFIG_SPL_NAND_SUPPORT
include/configs/dra7xx_evm.h +1 -1
index 77edc21..9133a0d 100644
@@ -248,7 +248,7 @@
 					"128k(NAND.u-boot-env)," \
 					"128k(NAND.u-boot-env.backup1)," \
 					"8m(NAND.kernel)," \
-					"-(NAND.rootfs)"
+					"-(NAND.file-system)"
 #define CONFIG_SYS_NAND_U_BOOT_OFFS	0x000c0000
 /* NAND: SPL related configs */
 #ifdef CONFIG_SPL_NAND_SUPPORT
Signature · 1 line
2.1.4
#2 lore raw

PATCH 1/3 am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name

Quoted 10 lines · Roger Quadros

We almost always use UBIFS for user accessible NAND file systems and the UBIFS file system might contain more than one volume within the single NAND partition. The last NAND partition is therefore more appropriately named as "NAND.file-system" instead of "NAND.rootfs"

The Linux kernel (as of v3.16) also uses "NAND.file-system" to name the last NAND partition. This patch makes the partition name consistent between u-boot and the kernel.

Signature · 1 line
Tom
#3 lore raw

PATCH 1/3 am335x_evm: am44xx_evm: dra7xx_evm: nand: Fix file-system partition name

In reply to Roger Quadros
Quoted 11 lines · Roger Quadros

We almost always use UBIFS for user accessible NAND file systems and the UBIFS file system might contain more than one volume within the single NAND partition. The last NAND partition is therefore more appropriately named as "NAND.file-system" instead of "NAND.rootfs"

The Linux kernel (as of v3.16) also uses "NAND.file-system" to name the last NAND partition. This patch makes the partition name consistent between u-boot and the kernel.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150612/0a733d9c/attachment.sig>
#4 lore raw

PATCH 2/3 am335x_evm: nand: Fix boot from NAND

In reply to Roger Quadros

Use the correct partition names from with the Device Tree blob and the kernel is picked up. Also use partition name instead of number for the root filesystem in the kernel boot arguments.

---
 include/configs/am335x_evm.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/configs/am335x_evm.h +3 -3
index 1c6cbd7..a5f1f06 100644
@@ -54,12 +54,12 @@
 		"${optargs} " \
 		"root=${nandroot} " \
 		"rootfstype=${nandrootfstype}\0" \
-	"nandroot=ubi0:rootfs rw ubi.mtd=9,2048\0" \
+	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
 	"nandrootfstype=ubifs rootwait=1\0" \
 	"nandboot=echo Booting from nand ...; " \
 		"run nandargs; " \
-		"nand read ${fdtaddr} u-boot-spl-os; " \
-		"nand read ${loadaddr} kernel; " \
+		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+		"nand read ${loadaddr} NAND.kernel; " \
 		"bootz ${loadaddr} - ${fdtaddr}\0"
 #else
 #define NANDARGS ""
Signature · 1 line
2.1.4
#5 lore raw

PATCH 2/3 am335x_evm: nand: Fix boot from NAND

Quoted 5 lines · Roger Quadros

Use the correct partition names from with the Device Tree blob and the kernel is picked up. Also use partition name instead of number for the root filesystem in the kernel boot arguments.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150605/db1a1788/attachment.sig>
#6 lore raw

PATCH 2/3 am335x_evm: nand: Fix boot from NAND

In reply to Roger Quadros
Quoted 6 lines · Roger Quadros

Use the correct partition names from with the Device Tree blob and the kernel is picked up. Also use partition name instead of number for the root filesystem in the kernel boot arguments.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150612/20a76d58/attachment.sig>
#7 lore raw

PATCH 3/3 am43xx_evm: Enable NAND boot

In reply to Roger Quadros

From: Tom Rini <[email protected]>

Enable booting from NAND on the am437xx-evm.

---
 include/configs/am43xx_evm.h | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
include/configs/am43xx_evm.h +22 -2
index 482a99a..fce34fa 100644
@@ -295,13 +295,15 @@
 			"setenv fdtfile am437x-idk-evm.dtb; fi; " \
 		"if test $fdtfile = undefined; then " \
 			"echo WARNING: Could not determine device tree; fi; \0" \
+	NANDARGS \
 	NETARGS \
 	DFUARGS \
 
 #define CONFIG_BOOTCOMMAND \
 	"run findfdt; " \
 	"run mmcboot;" \
-	"run usbboot;"
+	"run usbboot;" \
+	NANDBOOT \
 
 #endif
 
@@ -390,6 +392,24 @@
 #define CONFIG_SYS_NAND_SPL_KERNEL_OFFS	0x00300000 /* kernel offset */
 #define CONFIG_CMD_SPL_WRITE_SIZE	CONFIG_SYS_NAND_BLOCK_SIZE
 #endif
-#endif /* !CONFIG_NAND */
+#define NANDARGS \
+	"mtdids=" MTDIDS_DEFAULT "\0" \
+	"mtdparts=" MTDPARTS_DEFAULT "\0" \
+	"nandargs=setenv bootargs console=${console} " \
+		"${optargs} " \
+		"root=${nandroot} " \
+		"rootfstype=${nandrootfstype}\0" \
+	"nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096\0" \
+	"nandrootfstype=ubifs rootwait=1\0" \
+	"nandboot=echo Booting from nand ...; " \
+		"run nandargs; " \
+		"nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+		"nand read ${loadaddr} NAND.kernel; " \
+		"bootz ${loadaddr} - ${fdtaddr}\0"
+#define NANDBOOT			"run nandboot; "
+#else /* !CONFIG_NAND */
+#define NANDARGS
+#define NANDBOOT
+#endif /* CONFIG_NAND */
 
 #endif	/* __CONFIG_AM43XX_EVM_H */
Signature · 1 line
2.1.4
#8 lore raw

PATCH 3/3 am43xx_evm: Enable NAND boot

Quoted 6 lines · Roger Quadros

From: Tom Rini <[email protected]>

Enable booting from NAND on the am437xx-evm.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150605/57e385c5/attachment.sig>
#9 lore raw

PATCH 3/3 am43xx_evm: Enable NAND boot

In reply to Roger Quadros
Quoted 7 lines · Roger Quadros

From: Tom Rini <[email protected]>

Enable booting from NAND on the am437xx-evm.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150612/8face66a/attachment.sig>