diff options
Diffstat (limited to 'target/linux/zynq/image/Makefile')
-rw-r--r-- | target/linux/zynq/image/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index aa98f4b..92174db 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -7,6 +7,24 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +FAT32_BLOCK_SIZE=1024 +FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_KERNEL_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) + +define Build/zynq-sdcard + rm -f $@.boot + mkfs.fat $@.boot -C $(FAT32_BLOCKS) + mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-boot.bin ::boot.bin + mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.img ::u-boot.img + mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-uEnv.txt ::uEnv.txt + mcopy -i $@.boot $(IMAGE_KERNEL) ::fit.itb + ./gen_zynq_sdcard_img.sh $@ \ + $@.boot \ + $(IMAGE_ROOTFS) \ + $(CONFIG_TARGET_KERNEL_PARTSIZE) \ + $(CONFIG_TARGET_ROOTFS_PARTSIZE) + rm -f $@.boot +endef + ################################################# # Default and templates ################################################# @@ -17,6 +35,8 @@ define Device/Default KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs KERNEL_PREFIX := $$(IMAGE_PREFIX) KERNEL_LOADADDR := 0x8000 + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := zynq-sdcard | gzip endef define Device/FitImageGzip |