2 # Copyright (C) 2010 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 $(STAGING_DIR_HOST
)/bin
/lzma e
$(1) -lc1
-lp2
-pb2
$(2)
15 gzip
-9n
-c
$(1) > $(2)
19 mkimage
-A mips
-O linux
-T kernel
-a
0x80100000 -C
$(1) $(2) \
20 -e
0x80100000 -n
'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
25 $(call CompressLzma
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.lzma
)
26 $(call MkuImage
,lzma
,,$(KDIR
)/vmlinux.bin.lzma
,$(KDIR
)/uImage.lzma
)
27 $(call CompressGzip
,$(KDIR
)/vmlinux
,$(KDIR
)/vmlinux.bin.gz
)
28 $(call MkuImage
,gzip
,,$(KDIR
)/vmlinux.bin.gz
,$(KDIR
)/uImage.gz
)
31 define Image
/BuildKernel
32 cp
$(KDIR
)/vmlinux.elf
$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux.elf
33 cp
$(KDIR
)/uImage.lzma
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-lzma
34 cp
$(KDIR
)/uImage.gz
$(BIN_DIR
)/$(IMG_PREFIX
)-uImage-gzip
37 define Image
/Build
/Initramfs
38 cp
$(KDIR
)/vmlinux-initramfs.elf
$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux-initramfs.elf
39 cp
$(KDIR
)/vmlinux-initramfs
$(BIN_DIR
)/$(IMG_PREFIX
)-vmlinux-initramfs.bin
42 define Image
/Build
/gzip
43 gzip
-f9n
$(BIN_DIR
)/$(IMG_ROOTFS
)-$(1).img
46 $(eval
$(call Image
/gzip-ext4-padded-squashfs
))
49 $(call Image
/Build
/$(1))
50 $(CP
) $(KDIR
)/root.
$(1) $(BIN_DIR
)/$(IMG_ROOTFS
)-$(1).img
51 $(call Image
/Build
/gzip
/$(1))
54 $(eval
$(call BuildImage
))