2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
11 FAT32_BLOCKS
=$(shell echo
$$(($(CONFIG_TARGET_KERNEL_PARTSIZE
)*1024*1024/$(FAT32_BLOCK_SIZE
))))
13 define Build
/zynq-sdcard
15 mkfs.fat
$@.boot
-C
$(FAT32_BLOCKS
)
16 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)-boot.bin
::boot.bin
17 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)-u-boot.img
::u-boot.img
18 mcopy
-i
$@.boot
$(STAGING_DIR_IMAGE
)/$(DEVICE_NAME
)-uEnv.txt
::uEnv.txt
19 mcopy
-i
$@.boot
$(IMAGE_KERNEL
) ::fit.itb
20 .
/gen_zynq_sdcard_img.sh
$@ \
23 $(CONFIG_TARGET_KERNEL_PARTSIZE
) \
24 $(CONFIG_TARGET_ROOTFS_PARTSIZE
)
28 #################################################
29 # Default and templates
30 #################################################
34 KERNEL_DEPENDS
= $$(wildcard $(DTS_DIR
)/$$(DEVICE_DTS
).dts
)
35 KERNEL_INITRAMFS_PREFIX
:= $$(IMG_PREFIX
)-$(1)-initramfs
36 KERNEL_PREFIX
:= $$(IMAGE_PREFIX
)
37 KERNEL_LOADADDR
:= 0x8000
38 IMAGES
:= sdcard.img.gz
39 IMAGE
/sdcard.img.gz
:= zynq-sdcard | gzip
42 define Device
/FitImageGzip
43 KERNEL_SUFFIX
:= -fit-uImage.itb
44 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
48 #################################################
50 #################################################
52 define Device
/avnet_zynq-zed
53 $(call Device
/FitImageGzip
)
54 DEVICE_TITLE
:= Avnet ZedBoard
55 DEVICE_DTS
:= zynq-zed
57 TARGET_DEVICES
+= avnet_zynq-zed
59 define Device
/digilent_zynq-zybo
60 $(call Device
/FitImageGzip
)
61 DEVICE_TITLE
:= Digilent Zybo
62 DEVICE_DTS
:= zynq-zybo
64 TARGET_DEVICES
+= digilent_zynq-zybo
66 define Device
/digilent_zynq-zybo-z7
67 $(call Device
/FitImageGzip
)
68 DEVICE_TITLE
:= Digilent Zybo Z7
69 DEVICE_DTS
:= zynq-zybo-z7
71 TARGET_DEVICES
+= digilent_zynq-zybo-z7
73 define Device
/xlnx_zynq-zc702
74 $(call Device
/FitImageGzip
)
75 DEVICE_TITLE
:= Xilinx ZC702
76 DEVICE_DTS
:= zynq-zc702
77 DEVICE_PACKAGES
:=kmod-can kmod-can-xilinx-can
79 TARGET_DEVICES
+= xlnx_zynq-zc702
81 $(eval
$(call BuildImage
))