aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/lzma-loader
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-08-02 09:54:33 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-08-02 09:54:33 +0000
commite29d6bec6f012ccd39872bd65ecec6407630379e (patch)
treed7857411fdda7ab4e1f86a8706a6a28090913864 /target/linux/ar71xx/image/lzma-loader
parent79a8660d679b711598794dfab9f1bebe390dfac4 (diff)
downloadupstream-e29d6bec6f012ccd39872bd65ecec6407630379e.tar.gz
upstream-e29d6bec6f012ccd39872bd65ecec6407630379e.tar.bz2
upstream-e29d6bec6f012ccd39872bd65ecec6407630379e.zip
ar71xx: image: allow to use board specific code in the lzma-loader
SVN-Revision: 32945
Diffstat (limited to 'target/linux/ar71xx/image/lzma-loader')
-rw-r--r--target/linux/ar71xx/image/lzma-loader/Makefile2
-rw-r--r--target/linux/ar71xx/image/lzma-loader/src/Makefile7
2 files changed, 8 insertions, 1 deletions
diff --git a/target/linux/ar71xx/image/lzma-loader/Makefile b/target/linux/ar71xx/image/lzma-loader/Makefile
index 8d36691cb5..2e0b9111f2 100644
--- a/target/linux/ar71xx/image/lzma-loader/Makefile
+++ b/target/linux/ar71xx/image/lzma-loader/Makefile
@@ -15,6 +15,7 @@ LOADER_DATA :=
TARGET_DIR :=
FLASH_OFFS :=
FLASH_MAX :=
+BOARD :=
ifeq ($(TARGET_DIR),)
TARGET_DIR := $(KDIR)
@@ -40,6 +41,7 @@ loader-compile: $(PKG_BUILD_DIR)/.prepared
LOADER_DATA=$(LOADER_DATA) \
FLASH_OFFS=$(FLASH_OFFS) \
FLASH_MAX=$(FLASH_MAX) \
+ BOARD="$(BOARD)" \
clean all
loader.gz: $(PKG_BUILD_DIR)/loader.bin
diff --git a/target/linux/ar71xx/image/lzma-loader/src/Makefile b/target/linux/ar71xx/image/lzma-loader/src/Makefile
index c5965c9bde..3e6839c7c3 100644
--- a/target/linux/ar71xx/image/lzma-loader/src/Makefile
+++ b/target/linux/ar71xx/image/lzma-loader/src/Makefile
@@ -18,7 +18,7 @@
LOADADDR :=
LZMA_TEXT_START := 0x80a00000
LOADER_DATA :=
-CONFIG_BOARD :=
+BOARD :=
FLASH_OFFS :=
FLASH_MAX :=
@@ -63,6 +63,11 @@ ifneq ($(strip $(FLASH_MAX)),)
CFLAGS += -DCONFIG_FLASH_MAX=$(FLASH_MAX)
endif
+BOARD_DEF := $(shell echo $(strip $(BOARD)) | tr a-z A-Z | tr - _)
+ifneq ($(BOARD_DEF),)
+CFLAGS += -DCONFIG_BOARD_$(BOARD_DEF)
+endif
+
all: loader.bin
# Don't build dependencies, this may die if $(CC) isn't gcc