[openwrt/openwrt] u-boot-mvebu: set configuration options in Makefile

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 31 07:33:07 PDT 2018


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/0a3e07b2f5a5a8b20da173663007cb1f4b8f3eb8

commit 0a3e07b2f5a5a8b20da173663007cb1f4b8f3eb8
Author: Josua Mayer <josua.mayer97 at gmail.com>
AuthorDate: Wed Mar 21 00:10:17 2018 +0100

    u-boot-mvebu: set configuration options in Makefile
    
    CONFIG_* variables can easily be set by overriding Build/Configure.
    so set NET_RANDOM_ETHADDR=y and CMD_SETEXPR=y here.
    
    This replaces the following patches:
    0001-clearfog-generate-random-MAC-address.patch
    0004-clearfog-enable-setexpr-command-by-default.patch
    
    Signed-off-by: Josua Mayer <josua.mayer97 at gmail.com>
---
 package/boot/uboot-mvebu/Makefile                  |  8 +++++++
 ...0001-clearfog-generate-random-MAC-address.patch | 28 ----------------------
 ...learfog-enable-setexpr-command-by-default.patch | 24 -------------------
 3 files changed, 8 insertions(+), 52 deletions(-)

diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index 53abcaf..cb48b67 100644
--- a/package/boot/uboot-mvebu/Makefile
+++ b/package/boot/uboot-mvebu/Makefile
@@ -31,6 +31,14 @@ endef
 UBOOT_TARGETS:= \
 	clearfog
 
+define Build/Configure
+	# enable additional options beyond clearfog_defconfig
+	echo CONFIG_NET_RANDOM_ETHADDR=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
+	echo CONFIG_CMD_SETEXPR=y >> $(PKG_BUILD_DIR)/configs/$(BUILD_VARIANT)_defconfig
+
+	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(UBOOT_CONFIGURE_VARS) $(UBOOT_CONFIG)_config
+endef
+
 define Build/InstallDev
 	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
 	$(CP) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-spl.kwb
diff --git a/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch b/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch
deleted file mode 100644
index c346162..0000000
--- a/package/boot/uboot-mvebu/patches/0001-clearfog-generate-random-MAC-address.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ee16ee20205ea374613c3ac7f50209451eb29068 Mon Sep 17 00:00:00 2001
-From: Josua Mayer <josua.mayer97 at gmail.com>
-Date: Sun, 23 Apr 2017 18:02:40 +0200
-Subject: [PATCH 1/4] clearfog: generate random MAC address
-
-The Clearfog does not come with predetermined MACs.
-Falling back to random ones ensures ethernet can still operate anyway.
-
-Signed-off-by: Josua Mayer >josua.mayer97 at gmail.com>
----
- configs/clearfog_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
-index 1264871e83..41e94e6daf 100644
---- a/configs/clearfog_defconfig
-+++ b/configs/clearfog_defconfig
-@@ -47,6 +47,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
--- 
-2.12.2
-
diff --git a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch b/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch
deleted file mode 100644
index ca73466..0000000
--- a/package/boot/uboot-mvebu/patches/0004-clearfog-enable-setexpr-command-by-default.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 7b53a0f5ddf0b1201a09c368b06cd5750d5fbe3a Mon Sep 17 00:00:00 2001
-From: Josua Mayer <josua.mayer97 at gmail.com>
-Date: Sun, 23 Apr 2017 17:45:11 +0200
-Subject: [PATCH 4/4] clearfog: enable setexpr command by default
-
-Turns out this command is pretty useful in advanced boot-scripts.
--> enable
-
-Signed-off-by: Josua Mayer <josua.mayer97 at gmail.com>
----
- configs/clearfog_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/configs/clearfog_defconfig
-+++ b/configs/clearfog_defconfig
-@@ -23,7 +23,7 @@ CONFIG_CMD_SF=y
- CONFIG_CMD_SPI=y
- CONFIG_CMD_I2C=y
- CONFIG_CMD_USB=y
--# CONFIG_CMD_SETEXPR is not set
-+CONFIG_CMD_SETEXPR=y
- CONFIG_CMD_TFTPPUT=y
- CONFIG_CMD_DHCP=y
- CONFIG_CMD_MII=y



More information about the lede-commits mailing list