fix lzma loader dependency
[openwrt.git] / target / linux / imagebuilder / Makefile
1 default: clean all
2
3 TOPDIR:=${shell pwd}
4 export TOPDIR
5 IB:=1
6 export IB
7 include ./rules.mk
8
9 LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
10 IPKG_KERNEL:=IPKG_TMP=$(BUILD_DIR)/tmp IPKG_INSTROOT=$(LINUX_BUILD_DIR)/root IPKG_CONF_DIR=$(LINUX_BUILD_DIR) $(SCRIPT_DIR)/ipkg -force-defaults -force-depends
11
12 define image_template
13
14 all: all-$(1)-$(2)
15
16 all-$(1)-$(2):
17 @for listfile in ./lists/*.$(1)-$(2); do \
18 $(MAKE) -s `echo $$$$listfile | sed 's,.*lists/\(.*\).$(1)-$(2),BOARD=$(1) KERNEL=$(2) LIST=\1,'` build; \
19 done
20 endef
21
22 include ./kernel.mk
23
24 clean:
25 @rm -rf $(LINUX_BUILD_DIR)/root*
26 @rm -rf $(BIN_DIR)
27 all:
28
29 build:
30 echo
31 echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)'
32 echo
33 rm -rf $(LINUX_BUILD_DIR)/root*
34 mkdir -p $(BIN_DIR)/$(LIST)
35 mkdir -p $(LINUX_BUILD_DIR)/tmp
36 mkdir -p $(LINUX_BUILD_DIR)/root
37 echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
38 $(IPKG_KERNEL) install $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk
39 for package in `cat lists/$(LIST).$(BOARD)-$(KERNEL)`; do \
40 $(IPKG_KERNEL) install `ls packages/$${package}_*`; \
41 done
42 $(MAKE) -S -C image KERNEL="$(KERNEL)" BOARD="$(BOARD)" BIN_DIR="$(BIN_DIR)/$(LIST)" install
This page took 0.044647 seconds and 5 git commands to generate.