uboot-tools/0009-move-beaglebone-over-to-use-the-generic-distro-confi.patch

138 lines
4.3 KiB
Diff
Raw Normal View History

2014-04-27 02:49:55 +00:00
From 2d29a19e398f752ce7398d184051d12a191ccbb1 Mon Sep 17 00:00:00 2001
From: Dennis Gilmore <dennis@ausil.us>
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
configuation and environment
port beaglebone to use the generic distro configuation.
remove duplicated config options, clean up the environment, include new
environment.
---
include/configs/am335x_evm.h | 71 ++++++++++++++------------------------------
1 file changed, 23 insertions(+), 48 deletions(-)
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index ebe2ab3..a874c7d 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -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 @@
"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
@@ -100,60 +109,28 @@
"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; " \
@@ -166,15 +143,13 @@
"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;" \
+ "for target in ${boot_targets}; do run bootcmd_${target}; done ;" \
"run nandboot;"
/* NS16550 Configuration */
--
1.9.0