-rm -rf $(KDIR)/lzma-loader
$(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)"\
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
- LOADER_DATA="$(KDIR)/vmlinux.bin.lzma" \
+ LOADER_DATA="$(KDIR)/vmlinux.bin.lzma" BOARD="$(1)" \
compile loader.$(2)
endef
-rm -rf $(KDIR)/lzma-loader
$(LOADER_MAKE) LOADER=loader-$(1).$(2) KERNEL_CMDLINE="$(3)" \
LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
- FLASH_OFFS=$(4) FLASH_MAX=$(5) \
+ BOARD="$(1)" FLASH_OFFS=$(4) FLASH_MAX=$(5) \
compile loader.$(2)
endef
LOADADDR :=
LZMA_TEXT_START := 0x80a00000
LOADER_DATA :=
-CONFIG_BOARD :=
+BOARD :=
FLASH_OFFS :=
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