diff options
author | Luis Araneda <luaraneda@gmail.com> | 2018-05-13 14:05:38 -0400 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-06-07 09:00:49 +0200 |
commit | dfac3ffd07f5a99b1605aec5a6b24f389a1a8827 (patch) | |
tree | b938158c55768ca6e648f43a97c0e9c2a6d35c25 /target/linux/zynq/image/Makefile | |
parent | c335649629e641209a3539209defffeea090ad8f (diff) | |
download | upstream-dfac3ffd07f5a99b1605aec5a6b24f389a1a8827.tar.gz upstream-dfac3ffd07f5a99b1605aec5a6b24f389a1a8827.tar.bz2 upstream-dfac3ffd07f5a99b1605aec5a6b24f389a1a8827.zip |
zynq: reworked image creation process
After commit a1248da (zynq: convert to new image build code),
all boards, became unbootable, entering into a boot loop.
Replace the compressed kernel zImage by an uncompressed Image,
which is compressed after with gzip. Also, enable the creation
of an initramfs image by default.
Change images' filename to match the compatible string from the
respective .dts file (<vendor>_<model>). Also, use the shared
mkits.sh script and remove the target specific one.
Fixes: FS#1204
Run-tested: ZedBoard
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
Diffstat (limited to 'target/linux/zynq/image/Makefile')
-rw-r--r-- | target/linux/zynq/image/Makefile | 74 |
1 files changed, 28 insertions, 46 deletions
diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index a4400c7287..70fb00be69 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -8,64 +8,46 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk ################################################# -# Images +# Default and templates ################################################# -# $(1): rootfs contents directory -define Image/mkfs/cpio - ( cd $(call mkfs_target_dir,$(1))/; find . | cpio -o -H newc | gzip -9n > $@ ) +define Device/Default + PROFILES := Default + KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) + KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs + KERNEL_PREFIX := $$(IMAGE_PREFIX) + KERNEL_LOADADDR := 0x8000 endef -# $(1): zynq board id -define Build/dtb - $(call Image/BuildDTB,$(DTS_DIR)/zynq-$(1).dts,$@.dtb) -endef - -define Build/uRamdisk - # Create uboot cpio.gz - mkimage -A arm -T ramdisk -C gzip -n "$(PROFILE) OpenWRT rootfs" \ - -d $(IMAGE_ROOTFS) $@.new - mv $@.new $@ -endef - -# $(1): FIT name/description -define Build/fit - # create FIT image with rootfs - ./mkits.sh \ - -D $(1) -o $@.its -k $(IMAGE_KERNEL) -d $(IMAGE_KERNEL).dtb \ - -C none -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY) \ - -A $(ARCH) -v $(LINUX_VERSION) -r $(IMAGE_ROOTFS) -z gzip - - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@ +define Device/FitImageGzip + KERNEL_SUFFIX := -fit-uImage.itb + KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb + KERNEL_NAME := Image endef ################################################# # Devices ################################################# -# default kernel load address -KERNEL_LOADADDR=0x8000 -KERNEL_ENTRY=0x8000 - -TARGET_FILESYSTEMS += cpio +define Device/digilent_zynq-zybo + $(call Device/FitImageGzip) + DEVICE_TITLE := ZYBO Development Board + DEVICE_DTS := zynq-zybo +endef +TARGET_DEVICES += digilent_zynq-zybo -# $(1): canonical device name -# $(2): lowercase device id -define ZynqDevice - define Device/$(1) - DEVICE_TITLE := $(1) development board - KERNEL := dtb $(2) | kernel-bin | uImage none - KERNEL_NAME = zImage - IMAGES := uramdisk.image.gz fit.itb - IMAGE/uramdisk.image.gz := uRamdisk - IMAGE/fit.itb := fit $(2) - IMAGE_NAME = $$$$(IMG_PREFIX)-$(2)-$$$$(2) - endef - TARGET_DEVICES += $(1) +define Device/xlnx_zynq-zc702 + $(call Device/FitImageGzip) + DEVICE_TITLE := ZC702 Development Board + DEVICE_DTS := zynq-zc702 endef +TARGET_DEVICES += xlnx_zynq-zc702 -$(eval $(call ZynqDevice,ZC702,zc702)) -$(eval $(call ZynqDevice,ZedBoard,zed)) -$(eval $(call ZynqDevice,ZYBO,zybo)) +define Device/xlnx_zynq-zed + $(call Device/FitImageGzip) + DEVICE_TITLE := Zed Development Board + DEVICE_DTS := zynq-zed +endef +TARGET_DEVICES += xlnx_zynq-zed $(eval $(call BuildImage)) |