2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
11 $(MAKE
) -C u-boot
clean
15 $(MAKE
) -C u-boot compile
18 define Image
/BuildKernel
19 $(STAGING_DIR_HOST
)/bin
/lzma e
$(KDIR
)/vmlinux
$(KDIR
)/vmlinux.lzma
20 mkimage
-A mips
-O linux
-T kernel
-a
0x80002000 -C lzma
-e \
22 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
23 -d
$(KDIR
)/vmlinux.lzma
$(KDIR
)/uImage
25 cp
$(KDIR
)/uImage
$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-uImage
28 define Image
/Build
/squashfs
29 cat
$(KDIR
)/uImage
$(KDIR
)/root.
$(1) > $(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).image
30 $(call prepare_generic_squashfs
,$(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).image
)
33 define Image
/Build
/jffs2-64k
34 dd if
=$(KDIR
)/uImage of
=$(KDIR
)/uImage.
$(1) bs
=64k conv
=sync
35 cat
$(KDIR
)/uImage.
$(1) $(KDIR
)/root.
$(1) > $(BIN_DIR
)/openwrt-
$(BOARD
)-$(KERNEL
)-$(1).image
39 $(call Image
/Build
/$(1),$(1))
42 $(eval
$(call BuildImage
))