diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-08-14 15:10:54 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2015-08-14 15:10:54 +0000 |
commit | c7d8377931c70410b253b75948979d5f8e2266d4 (patch) | |
tree | 2b8e392e6adbf89a841f3ba29ef339d4a04b3b40 /target/linux/ipq806x | |
parent | 4e81a1473e0c7bc8620babb32ae6dc6418f1b13d (diff) | |
download | mtk-20170518-c7d8377931c70410b253b75948979d5f8e2266d4.zip mtk-20170518-c7d8377931c70410b253b75948979d5f8e2266d4.tar.gz mtk-20170518-c7d8377931c70410b253b75948979d5f8e2266d4.tar.bz2 |
ipq806x: switch to new image build system
Switch ipq806x to the new image build system. Image files might change
slightly their names, but the generated files should not change.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46602
Diffstat (limited to 'target/linux/ipq806x')
-rw-r--r-- | target/linux/ipq806x/image/Makefile | 68 |
1 files changed, 44 insertions, 24 deletions
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 99e9811..b64d629 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -6,27 +6,7 @@ include $(INCLUDE_DIR)/image.mk UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 -U -F UBINIZE_OPTS = -m 2048 -p 128KiB -E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024))) - -define Image/BuildKernel/zImage - cat $(KDIR)/zImage $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb > $(KDIR)/zImage-$(1) - $(CP) $(KDIR)/zImage-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - cat $(KDIR)/zImage-initramfs $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb > $(KDIR)/zImage-initramfs-$(1) - $(CP) $(KDIR)/zImage-initramfs-$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-zImage-initramfs -endif -endef - -define Image/BuildKernel/FIT - gzip -9n -c $(KDIR)/Image > $(KDIR)/Image.gz - $(call CompressLzma,$(KDIR)/Image,$(KDIR)/Image.gz) - $(call Image/BuildKernel/MkFIT,$(1), $(KDIR)/Image.gz, $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb,gzip,0x42208000,0x42208000) - $(CP) $(KDIR)/fit-$(1).itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage.itb -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - $(call Image/BuildKernel/MkFIT,$(1), $(KDIR)/Image-initramfs, $(LINUX_DIR)/arch/arm/boot/dts/$(1).dtb, none,0x42208000,0x42208000) - $(CP) $(KDIR)/fit-$(1).itb $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fit-uImage-initramfs.itb -endif -endef +KERNEL_LOADADDR := 0x42208000 define Image/Prepare $(CP) $(LINUX_DIR)/vmlinux $(KDIR)/$(IMG_PREFIX)-vmlinux.elf @@ -34,9 +14,6 @@ endef define Image/BuildKernel $(CP) $(KDIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR) - $(call Image/BuildKernel/FIT,qcom-ipq8064-ap148) - $(call Image/BuildKernel/zImage,qcom-ipq8064-ap148) - $(call Image/BuildKernel/FIT,qcom-ipq8064-db149) endef define Image/Build/squashfs @@ -48,4 +25,47 @@ define Image/Build dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-root.img bs=2k conv=sync endef +define Build/append-dtb + cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@ +endef + +define Device/Default + PROFILES := Default + KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs + DEVICE_DTS := + KERNEL_PREFIX := $$(IMAGE_PREFIX) +endef +DEVICE_VARS += DEVICE_DTS + +define Device/LegacyImage + KERNEL_SUFFIX := -zImage + KERNEL = kernel-bin | append-dtb + KERNEL_NAME := zImage + KERNEL_INSTALL := 1 +endef + +define Device/FitImage + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL_NAME := Image + KERNEL_INSTALL := 1 +endef + +define Device/AP148 + $(call Device/FitImage) + DEVICE_DTS := qcom-ipq8064-ap148 +endef + +define Device/AP148-legacy + $(call Device/LegacyImage) + DEVICE_DTS := qcom-ipq8064-ap148 +endef + +define Device/DB149 + $(call Device/FitImage) + DEVICE_DTS := qcom-ipq8064-db149 +endef + +TARGET_DEVICES += AP148 AP148-legacy DB149 + $(eval $(call BuildImage)) |