adm8668: build gzip compressed uImage for testing
authorGabor Juhos <juhosg@openwrt.org>
Wed, 25 Apr 2012 18:53:48 +0000 (18:53 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 25 Apr 2012 18:53:48 +0000 (18:53 +0000)
SVN-Revision: 31479

target/linux/adm8668/image/Makefile

index 58646638eac9a0f7e0aae1425f9ba1d966b7a346..bc412a609e207c50668d6a1d867ade6d407e1300 100644 (file)
@@ -8,10 +8,27 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
+UIMAGE:=$(IMG_PREFIX)-uImage
 ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
        VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
+       UIMAGE:=$(IMG_PREFIX)-uImage-initramfs
 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
        $(MAKE) -C lzma-loader clean
 endef
@@ -34,6 +51,8 @@ endef
 define Image/BuildKernel
        cp $(KDIR)/vmlinux.elf $(VMLINUX).elf
        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
 
 $(eval $(call BuildImage))