[source] mvebu: fix boot script for booting from mmc

LEDE Commits lede-commits at lists.infradead.org
Fri Sep 2 05:44:14 PDT 2016


nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/7130833a27929de8c66c4d65bc4b520ecfaf6ea8

commit 7130833a27929de8c66c4d65bc4b520ecfaf6ea8
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Sep 1 15:29:14 2016 +0200

    mvebu: fix boot script for booting from mmc
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/boot/uboot-mvebu/Makefile                  |  3 +-
 .../patches/002-enable_random_mac_addr.patch       | 10 +++++++
 .../boot/uboot-mvebu/patches/003-boot_script.patch | 32 ++++++++++++++++++++++
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index 170da6d..9554421 100644
--- a/package/boot/uboot-mvebu/Makefile
+++ b/package/boot/uboot-mvebu/Makefile
@@ -21,6 +21,7 @@ PKG_MD5SUM:=973c1d896be751321cc3aafa564f64b2
 
 PKG_LICENSE:=GPL-2.0 GPL-2.0+
 PKG_LICENSE_FILES:=Licenses/README
+PKG_TARGETS:=bin
 
 PKG_BUILD_PARALLEL:=1
 
@@ -45,7 +46,7 @@ define Package/uboot-mvebu-$(1)
   TITLE:=$(2)
   URL:=http://www.denx.de/wiki/U-Boot
   VARIANT:=$(1)
-  MAINTAINER:=Luka Perkov <luka at openwrt.org>
+  MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 endef
 endef
 
diff --git a/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch b/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch
new file mode 100644
index 0000000..2dd9f28
--- /dev/null
+++ b/package/boot/uboot-mvebu/patches/002-enable_random_mac_addr.patch
@@ -0,0 +1,10 @@
+--- a/configs/clearfog_defconfig
++++ b/configs/clearfog_defconfig
+@@ -14,6 +14,7 @@ CONFIG_DEBUG_UART=y
+ CONFIG_DEBUG_UART_BASE=0xd0012000
+ CONFIG_DEBUG_UART_CLOCK=250000000
+ CONFIG_DEBUG_UART_SHIFT=2
++CONFIG_NET_RANDOM_ETHADDR=y
+ CONFIG_SYS_NS16550=y
+ CONFIG_USB=y
+ CONFIG_DM_USB=y
diff --git a/package/boot/uboot-mvebu/patches/003-boot_script.patch b/package/boot/uboot-mvebu/patches/003-boot_script.patch
new file mode 100644
index 0000000..2e156b7
--- /dev/null
+++ b/package/boot/uboot-mvebu/patches/003-boot_script.patch
@@ -0,0 +1,32 @@
+--- a/include/configs/clearfog.h
++++ b/include/configs/clearfog.h
+@@ -107,7 +107,18 @@
+ /* Keep device tree and initrd in lower memory so the kernel can access them */
+ #define CONFIG_EXTRA_ENV_SETTINGS	\
+ 	"fdt_high=0x10000000\0"		\
+-	"initrd_high=0x10000000\0"
++	"initrd_high=0x10000000\0"	\
++	"script=boot.scr\0"		\
++	"loadaddr=0x01000000\0"		\
++	"mmcdev=0\0"			\
++	"mmcpart=1\0"			\
++	"loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
++	"bootscript=echo Running bootscript from mmc ...; source ${loadaddr}\0"
++
++#define CONFIG_BOOTCOMMAND		\
++	"if run loadbootscript; then "	\
++		"run bootscript; "	\
++	"fi"
+ 
+ /* SPL */
+ /*
+--- a/configs/clearfog_defconfig
++++ b/configs/clearfog_defconfig
+@@ -3,6 +3,7 @@ CONFIG_ARCH_MVEBU=y
+ CONFIG_SYS_MALLOC_F_LEN=0x2000
+ CONFIG_TARGET_CLEARFOG=y
+ CONFIG_DEFAULT_DEVICE_TREE="armada-388-clearfog"
++CONFIG_HUSH_PARSER=y
+ CONFIG_SPL=y
+ # CONFIG_CMD_IMLS is not set
+ # CONFIG_CMD_FLASH is not set



More information about the lede-commits mailing list