[BeagleBone Black Test PATCH 1/2] BeagleBone Black: port latest u-boot (u-boot-2014.04-rc3.tar.bz2)

Xuebing Wang xbing6 at gmail.com
Mon Apr 7 09:25:49 UTC 2014


Procedure to build:
1) gmake CROSS_COMPILE=arm-eabi- am335x_boneblack_config
2) gmake CROSS_COMPILE=arm-eabi-  (can add -j4 to make build faster)

Known issues:

1) On 11-current, FreeBSD reboots every 50 seconds after ubldr boots kernel.
   This is reproducible.

2) In u-boot, type command "usb start" command shows:
U-Boot# usb start
(Re)start USB...
USB0:   lowlevel init failed
USB error: all controllers failed lowlevel init
---
 include/configs/am335x_evm.h      | 32 +++++++++++++++++++-------------
 include/configs/ti_armv7_common.h |  2 +-
 2 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 884a42b..3755ac0 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -18,6 +18,12 @@
 
 #include <configs/ti_am335x_common.h>
 
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_CMD_ELF
+#define CONFIG_API
+#define CONFIG_SYS_MMC_MAX_DEVICE 2
+#endif
+
 #define MACH_TYPE_TIAM335EVM		3589	/* Until the next sync */
 #define CONFIG_MACH_TYPE		MACH_TYPE_TIAM335EVM
 #define CONFIG_BOARD_LATE_INIT
@@ -61,14 +67,14 @@
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_EXTRA_ENV_SETTINGS \
-	"loadaddr=0x80200000\0" \
-	"fdtaddr=0x80F80000\0" \
+	"loadaddr=0x88000000\0" \
+	"fdtaddr=0x80000100\0" \
+	"bootfile=bbubldr\0" \
 	"fdt_high=0xffffffff\0" \
 	"boot_fdt=try\0" \
 	"rdaddr=0x81000000\0" \
 	"bootpart=0:2\0" \
 	"bootdir=/boot\0" \
-	"bootfile=zImage\0" \
 	"fdtfile=undefined\0" \
 	"console=ttyO0,115200n8\0" \
 	"partitions=" \
@@ -102,8 +108,8 @@
 		"root=/dev/nfs " \
 		"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
 		"ip=dhcp\0" \
-	"bootenv=uEnv.txt\0" \
-	"loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
+	"bootenv=bb-uEnv.txt\0" \
+	"loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
 	"importbootenv=echo Importing environment from mmc ...; " \
 		"env import -t $loadaddr $filesize\0" \
 	"ramargs=setenv bootargs console=${console} " \
@@ -111,21 +117,21 @@
 		"root=${ramroot} " \
 		"rootfstype=${ramrootfstype}\0" \
 	"loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
-	"loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
-	"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
-	"mmcloados=run mmcargs; " \
+	"loadimage=fatload mmc ${mmcdev} ${loadaddr} ${bootfile}\0" \
+	"loadfdt=fatload mmc ${mmcdev} ${fdtaddr} ${fdtfile};fdt addr ${fdtaddr}\0" \
+	"mmcloados=" \
 		"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
 			"if run loadfdt; then " \
-				"bootz ${loadaddr} - ${fdtaddr}; " \
+				"bootelf ${loadaddr};" \
 			"else " \
 				"if test ${boot_fdt} = try; then " \
-					"bootz; " \
+					"bootelf ${loadaddr};" \
 				"else " \
 					"echo WARN: Cannot load the DT; " \
 				"fi; " \
 			"fi; " \
 		"else " \
-			"bootz; " \
+			"bootelf ${loadaddr};" \
 		"fi;\0" \
 	"mmcboot=mmc dev ${mmcdev}; " \
 		"if mmc rescan; then " \
@@ -159,9 +165,9 @@
 		"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
 	"findfdt="\
 		"if test $board_name = A335BONE; then " \
-			"setenv fdtfile am335x-bone.dtb; fi; " \
+			"setenv fdtfile bbone.dtb; fi; " \
 		"if test $board_name = A335BNLT; then " \
-			"setenv fdtfile am335x-boneblack.dtb; fi; " \
+			"setenv fdtfile bboneblk.dtb; fi; " \
 		"if test $board_name = A33515BB; then " \
 			"setenv fdtfile am335x-evm.dtb; fi; " \
 		"if test $board_name = A335X_SK; then " \
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 69d69a5..3f0be68 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -201,7 +201,7 @@
 
 /* FAT sd card locations. */
 #define CONFIG_SYS_MMC_SD_FAT_BOOT_PARTITION	1
-#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"u-boot.img"
+#define CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME	"bb-uboot.img"
 
 #ifdef CONFIG_SPL_OS_BOOT
 #define CONFIG_SYS_SPL_ARGS_ADDR		0x80F80000
-- 
1.9.0



More information about the freebsd-arm mailing list