2014-04-27 02:49:55 +00:00
|
|
|
From 2d29a19e398f752ce7398d184051d12a191ccbb1 Mon Sep 17 00:00:00 2001
|
2014-03-12 19:56:30 +00:00
|
|
|
From: Dennis Gilmore <dennis@ausil.us>
|
2014-04-21 17:43:34 +00:00
|
|
|
Date: Mon, 21 Apr 2014 12:27:22 -0500
|
2014-04-27 02:49:55 +00:00
|
|
|
Subject: [PATCH 09/36] move beaglebone over to use the generic distro
|
2014-04-21 17:43:34 +00:00
|
|
|
configuation and environment
|
2014-03-12 19:56:30 +00:00
|
|
|
|
2014-04-21 17:43:34 +00:00
|
|
|
port beaglebone to use the generic distro configuation.
|
|
|
|
remove duplicated config options, clean up the environment, include new
|
|
|
|
environment.
|
2014-03-12 19:56:30 +00:00
|
|
|
---
|
2014-04-21 17:43:34 +00:00
|
|
|
include/configs/am335x_evm.h | 71 ++++++++++++++------------------------------
|
|
|
|
1 file changed, 23 insertions(+), 48 deletions(-)
|
2014-03-12 19:56:30 +00:00
|
|
|
|
|
|
|
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
|
2014-04-21 17:43:34 +00:00
|
|
|
index ebe2ab3..a874c7d 100644
|
2014-03-12 19:56:30 +00:00
|
|
|
--- a/include/configs/am335x_evm.h
|
|
|
|
+++ b/include/configs/am335x_evm.h
|
2014-04-21 17:43:34 +00:00
|
|
|
@@ -18,6 +18,15 @@
|
|
|
|
|
|
|
|
#include <configs/ti_am335x_common.h>
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * * Include the generic config options and boot environment when not
|
|
|
|
+ * * building our SPL
|
|
|
|
+ * */
|
|
|
|
+#ifndef CONFIG_SPL_BUILD
|
|
|
|
+#include <config_distro_defaults.h>
|
|
|
|
+#include <config_distro_bootcmd.h>
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
#define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */
|
|
|
|
#define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM
|
|
|
|
#define CONFIG_BOARD_LATE_INIT
|
|
|
|
@@ -50,9 +59,9 @@
|
2014-03-12 19:56:30 +00:00
|
|
|
"nandrootfstype=ubifs rootwait=1\0" \
|
|
|
|
"nandboot=echo Booting from nand ...; " \
|
|
|
|
"run nandargs; " \
|
|
|
|
- "nand read ${fdtaddr} u-boot-spl-os; " \
|
|
|
|
- "nand read ${loadaddr} kernel; " \
|
|
|
|
- "bootz ${loadaddr} - ${fdtaddr}\0"
|
|
|
|
+ "nand read ${fdt_addr_r} u-boot-spl-os; " \
|
|
|
|
+ "nand read ${kernel_addr_r} kernel; " \
|
|
|
|
+ "bootz ${kernel_addr_r} - ${fdt_addr_r}\0"
|
|
|
|
#else
|
|
|
|
#define NANDARGS ""
|
|
|
|
#endif
|
2014-04-21 17:43:34 +00:00
|
|
|
@@ -100,60 +109,28 @@
|
2014-03-12 19:56:30 +00:00
|
|
|
"nfsroot=${serverip}:${rootpath},${nfsopts} rw " \
|
|
|
|
"ip=dhcp\0" \
|
|
|
|
"bootenv=uEnv.txt\0" \
|
|
|
|
- "loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \
|
|
|
|
+ "loadbootenv=load mmc ${mmcdev} ${kernel_addr_r} ${bootenv}\0" \
|
|
|
|
"importbootenv=echo Importing environment from mmc ...; " \
|
|
|
|
- "env import -t $loadaddr $filesize\0" \
|
|
|
|
+ "env import -t $kernel_addr_r $filesize\0" \
|
|
|
|
"ramargs=setenv bootargs console=${console} " \
|
|
|
|
"${optargs} " \
|
|
|
|
"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; " \
|
|
|
|
- "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
|
|
|
|
- "if run loadfdt; then " \
|
|
|
|
- "bootz ${loadaddr} - ${fdtaddr}; " \
|
|
|
|
- "else " \
|
|
|
|
- "if test ${boot_fdt} = try; then " \
|
|
|
|
- "bootz; " \
|
|
|
|
- "else " \
|
|
|
|
- "echo WARN: Cannot load the DT; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "fi; " \
|
|
|
|
- "else " \
|
|
|
|
- "bootz; " \
|
|
|
|
- "fi;\0" \
|
|
|
|
- "mmcboot=mmc dev ${mmcdev}; " \
|
|
|
|
- "if mmc rescan; then " \
|
|
|
|
- "echo SD/MMC found on device ${mmcdev};" \
|
|
|
|
- "if run loadbootenv; then " \
|
|
|
|
- "echo Loaded environment from ${bootenv};" \
|
|
|
|
- "run importbootenv;" \
|
|
|
|
- "fi;" \
|
|
|
|
- "if test -n $uenvcmd; then " \
|
|
|
|
- "echo Running uenvcmd ...;" \
|
|
|
|
- "run uenvcmd;" \
|
|
|
|
- "fi;" \
|
|
|
|
- "if run loadimage; then " \
|
|
|
|
- "run mmcloados;" \
|
|
|
|
- "fi;" \
|
|
|
|
- "fi;\0" \
|
|
|
|
"spiboot=echo Booting from spi ...; " \
|
|
|
|
"run spiargs; " \
|
|
|
|
"sf probe ${spibusno}:0; " \
|
|
|
|
- "sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; " \
|
|
|
|
- "bootz ${loadaddr}\0" \
|
|
|
|
+ "sf read ${kernel_addr_r} ${spisrcaddr} ${spiimgsize}; " \
|
|
|
|
+ "bootz ${kernel_addr_r}\0" \
|
|
|
|
"netboot=echo Booting from network ...; " \
|
|
|
|
"setenv autoload no; " \
|
|
|
|
"dhcp; " \
|
|
|
|
- "tftp ${loadaddr} ${bootfile}; " \
|
|
|
|
- "tftp ${fdtaddr} ${fdtfile}; " \
|
|
|
|
+ "tftp ${kernel_addr_r} ${bootfile}; " \
|
|
|
|
+ "tftp ${fdt_addr_r} ${fdtfile}; " \
|
|
|
|
"run netargs; " \
|
|
|
|
- "bootz ${loadaddr} - ${fdtaddr}\0" \
|
|
|
|
+ "bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
|
|
|
|
"ramboot=echo Booting from ramdisk ...; " \
|
|
|
|
"run ramargs; " \
|
|
|
|
- "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \
|
|
|
|
+ "bootz ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
|
|
|
|
"findfdt="\
|
|
|
|
"if test $board_name = A335BONE; then " \
|
|
|
|
"setenv fdtfile am335x-bone.dtb; fi; " \
|
2014-04-21 17:43:34 +00:00
|
|
|
@@ -166,15 +143,13 @@
|
2014-03-12 19:56:30 +00:00
|
|
|
"if test $fdtfile = undefined; then " \
|
|
|
|
"echo WARNING: Could not determine device tree to use; fi; \0" \
|
|
|
|
NANDARGS \
|
|
|
|
- DFUARGS
|
|
|
|
+ DFUARGS \
|
|
|
|
+ BOOTCMDS_COMMON
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
|
|
|
"run findfdt; " \
|
|
|
|
- "run mmcboot;" \
|
|
|
|
- "setenv mmcdev 1; " \
|
|
|
|
- "setenv bootpart 1:2; " \
|
|
|
|
- "run mmcboot;" \
|
2014-04-21 17:43:34 +00:00
|
|
|
+ "for target in ${boot_targets}; do run bootcmd_${target}; done ;" \
|
2014-03-12 19:56:30 +00:00
|
|
|
"run nandboot;"
|
|
|
|
|
|
|
|
/* NS16550 Configuration */
|
|
|
|
--
|
|
|
|
1.9.0
|
|
|
|
|