1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-19 05:04:04 +02:00

adm8668: build gzip compressed uImage for testing

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31479 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2012-04-25 18:53:48 +00:00
parent c363d3b566
commit b2a1169d98

View File

@ -8,10 +8,27 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk include $(INCLUDE_DIR)/image.mk
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(IMG_PREFIX)-uImage
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
endif endif
define kernel_entry
-a 0x80002000 -e 0x80002000
endef
define CompressGzip
gzip -9 -c $(1) > $(2)
endef
define MkImage
mkimage -A mips -O linux -T kernel $(call kernel_entry) -C $(1) $(2) \
-n "ADM8668 Linux Kernel(2.4.31)" \
-d $(3) $(4)
endef
define Build/Clean define Build/Clean
$(MAKE) -C lzma-loader clean $(MAKE) -C lzma-loader clean
endef endef
@ -34,6 +51,8 @@ endef
define Image/BuildKernel define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(VMLINUX).elf cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
cp $(KDIR)/vmlinux $(VMLINUX).bin cp $(KDIR)/vmlinux $(VMLINUX).bin
$(call CompressGzip,$(KDIR)/vmlinux,$(KDIR)/vmlinux.bin.gz)
$(call MkImage,gzip,,$(KDIR)/vmlinux.bin.gz,$(BIN_DIR)/$(UIMAGE)-gzip.bin)
endef endef
$(eval $(call BuildImage)) $(eval $(call BuildImage))