summaryrefslogtreecommitdiff
path: root/target/linux/adm8668/image
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-04-25 18:53:48 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-04-25 18:53:48 +0000
commit7f09ba740af1f8f964009114ee10cfd8ad0ec787 (patch)
tree0dcaceb180b6365d422c9bc20e3ef0efd7bd7dbb /target/linux/adm8668/image
parent15d641eee1485c73852661c79d0487f2c43f6091 (diff)
downloadmtk-20170518-7f09ba740af1f8f964009114ee10cfd8ad0ec787.zip
mtk-20170518-7f09ba740af1f8f964009114ee10cfd8ad0ec787.tar.gz
mtk-20170518-7f09ba740af1f8f964009114ee10cfd8ad0ec787.tar.bz2
adm8668: build gzip compressed uImage for testing
SVN-Revision: 31479
Diffstat (limited to 'target/linux/adm8668/image')
-rw-r--r--target/linux/adm8668/image/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/adm8668/image/Makefile b/target/linux/adm8668/image/Makefile
index 5864663..bc412a6 100644
--- a/target/linux/adm8668/image/Makefile
+++ b/target/linux/adm8668/image/Makefile
@@ -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))