2005-08-14 18:00:56 +03:00
|
|
|
default: clean all
|
|
|
|
|
|
|
|
TOPDIR:=${shell pwd}
|
|
|
|
export TOPDIR
|
|
|
|
IB:=1
|
|
|
|
export IB
|
|
|
|
include ./rules.mk
|
|
|
|
|
|
|
|
LINUX_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
|
|
|
|
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
|
|
|
|
|
|
|
|
define image_template
|
|
|
|
|
|
|
|
all: all-$(1)-$(2)
|
|
|
|
|
|
|
|
all-$(1)-$(2):
|
|
|
|
@for listfile in ./lists/*.$(1)-$(2); do \
|
|
|
|
$(MAKE) -s `echo $$$$listfile | sed 's,.*lists/\(.*\).$(1)-$(2),BOARD=$(1) KERNEL=$(2) LIST=\1,'` build; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
include ./kernel.mk
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@rm -rf $(LINUX_BUILD_DIR)/root*
|
|
|
|
@rm -rf $(BIN_DIR)
|
|
|
|
all:
|
|
|
|
|
|
|
|
build:
|
|
|
|
echo
|
|
|
|
echo '### BUILDING IMAGE FROM lists/$(LIST).$(BOARD)-$(KERNEL)'
|
|
|
|
echo
|
|
|
|
rm -rf $(LINUX_BUILD_DIR)/root*
|
|
|
|
mkdir -p $(BIN_DIR)/$(LIST)
|
|
|
|
mkdir -p $(LINUX_BUILD_DIR)/tmp
|
|
|
|
mkdir -p $(LINUX_BUILD_DIR)/root
|
|
|
|
echo -e 'dest root /\noption offline_root $(LINUX_BUILD_DIR)/root' > $(LINUX_BUILD_DIR)/ipkg.conf
|
|
|
|
$(IPKG_KERNEL) install $(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)/kernel[-_]*.ipk
|
|
|
|
for package in `cat lists/$(LIST).$(BOARD)-$(KERNEL)`; do \
|
|
|
|
$(IPKG_KERNEL) install `ls packages/$${package}_*`; \
|
|
|
|
done
|
2005-08-27 14:46:12 +03:00
|
|
|
if [ -d ./files ]; then \
|
|
|
|
cp -fpR ./files/* $(LINUX_BUILD_DIR)/root; \
|
|
|
|
fi
|
2005-08-27 15:00:52 +03:00
|
|
|
if [ -d ./files.$(LIST) ]; then \
|
|
|
|
cp -fpR ./files.$(LIST)/* $(LINUX_BUILD_DIR)/root; \
|
2005-08-27 14:58:59 +03:00
|
|
|
fi
|
2005-08-14 18:00:56 +03:00
|
|
|
$(MAKE) -S -C image KERNEL="$(KERNEL)" BOARD="$(BOARD)" BIN_DIR="$(BIN_DIR)/$(LIST)" install
|