1 include $(TOPDIR
)/rules.mk
3 PKG_OS
:=$(shell uname
-s
)
4 PKG_CPU
:=$(shell uname
-m
)
6 IB_NAME
:=OpenWrt-ImageBuilder-
$(PKG_OS
)-$(PKG_CPU
)
7 IB_DIR
:=$(BUILD_DIR
)/$(IB_NAME
)
12 $(MAKE
) -C
$(2)-$(1) BOARD
="$(2)" clean
15 $(MAKE
) -C
$(2)-$(1) BOARD
="$(2)" prepare
18 $(MAKE
) -C
$(2)-$(1) BOARD
="$(2)" compile
21 $(MAKE
) -C
$(2)-$(1) BOARD
="$(2)" rebuild
24 $(MAKE
) -C
$(2)-$(1) BOARD
="$(2)" install
26 $(1)/$(2)-image
: $(1)/$(2)-install
27 $(MAKE
) -C image KERNEL
="$(1)" BOARD
="$(2)" install
30 $(MAKE
) -C image KERNEL
="$(1)" BOARD
="$(2)" IB_DIR
="$(IB_DIR)" install-ib
31 echo
'$$$$(eval $$$$(call image_template,$(2),$(1)))' >> $(IB_DIR
)/kernel.mk
34 ifeq ($(CONFIG_LINUX_
$(3)),y
)
35 clean: $(1)/$(2)-clean
36 prepare
: $(1)/$(2)-prepare
37 compile
: $(1)/$(2)-compile
38 rebuild
: $(1)/$(2)-rebuild
39 $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
install: $(1)/$(2)-image
40 install-ib
: $(1)/$(2)-install-ib
43 .PHONY
: $(1)/$(2)-clean $(1)/$(2)-prepare
$(1)/$(2)-compile
$(1)/$(2)-rebuild
$(1)/$(2)-install $(1)/$(2)-image
$(1)/$(2)-install-ib
46 .PHONY
: clean prepare compile rebuild
install imagebuilder install-ib
50 $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
:
52 mkdir
-p
$(IB_DIR
)/packages
53 mkdir
-p
$(IB_DIR
)/scripts
54 $(CP
) .
/imagebuilder
/* $(IB_DIR
)/
55 $(CP
) $(TOPDIR
)/bin
/packages
/*.ipk
$(IB_DIR
)/packages
/
56 $(CP
) $(TOPDIR
)/scripts
/ipkg
$(IB_DIR
)/scripts
/
58 $(CP
) $(TOPDIR
)/rules.mk
$(IB_DIR
)
59 $(CP
) .
/image
$(IB_DIR
)/
60 $(CP
) $(TOPDIR
)/.config
$(IB_DIR
)/
61 find
$(IB_DIR
) -name .svn | xargs
rm -rf
62 find
$(IB_DIR
) -name CVS | xargs
rm -rf
63 (cd
$(BUILD_DIR
); tar c
$(IB_NAME
) | bzip2
-c
> $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
)
65 ifeq ($(CONFIG_PACKAGE_IMAGEBUILDER
),y
)
66 install: $(BIN_DIR
)/$(IB_NAME
).
tar.bz2
70 $(MAKE
) -C image prepare
72 $(MAKE
) -C image compile
77 $(eval
$(call kernel_template
,2.4,brcm
,2_4_BRCM
))
78 $(eval
$(call kernel_template
,2.4,ar7
,2_4_AR7
))
79 $(eval
$(call kernel_template
,2.4,x86
,2_4_X86
))
80 $(eval
$(call kernel_template
,2.6,brcm
,2_6_BRCM
))
81 $(eval
$(call kernel_template
,2.6,x86
,2_6_X86
))
82 $(eval
$(call kernel_template
,2.4,ar531x
,2_4_AR531X
))
83 $(eval
$(call kernel_template
,2.6,aruba
,2_6_ARUBA
))
84 $(eval
$(call kernel_template
,2.6,au1000
,2_6_AU1000
))
85 $(eval
$(call kernel_template
,2.6,xscale
,2_6_XSCALE
))
86 $(eval
$(call kernel_template
,2.6,sibyte
,2_6_SIBYTE
))