OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | # |
2 | # Copyright (C) 2015 OpenWrt.org |
||
3 | # |
||
4 | # This is free software, licensed under the GNU General Public License v2. |
||
5 | # See /LICENSE for more information. |
||
6 | # |
||
7 | include $(TOPDIR)/rules.mk |
||
8 | include $(INCLUDE_DIR)/image.mk |
||
9 | |||
10 | FAT32_BLOCK_SIZE=1024 |
||
11 | FAT32_BLOCKS=$(shell echo $$(($(CONFIG_TARGET_KERNEL_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE)))) |
||
12 | |||
13 | define Build/zynq-sdcard |
||
14 | rm -f $@.boot |
||
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 $@ \ |
||
21 | $@.boot \ |
||
22 | $(IMAGE_ROOTFS) \ |
||
23 | $(CONFIG_TARGET_KERNEL_PARTSIZE) \ |
||
24 | $(CONFIG_TARGET_ROOTFS_PARTSIZE) |
||
25 | rm -f $@.boot |
||
26 | endef |
||
27 | |||
28 | ################################################# |
||
29 | # Default and templates |
||
30 | ################################################# |
||
31 | |||
32 | define Device/Default |
||
33 | PROFILES := Default |
||
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 |
||
40 | endef |
||
41 | |||
42 | define Device/FitImageGzip |
||
43 | KERNEL_SUFFIX := -fit-uImage.itb |
||
44 | KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb |
||
45 | KERNEL_NAME := Image |
||
46 | endef |
||
47 | |||
48 | ################################################# |
||
49 | # Devices |
||
50 | ################################################# |
||
51 | |||
52 | define Device/avnet_zynq-zed |
||
53 | $(call Device/FitImageGzip) |
||
54 | DEVICE_TITLE := Avnet ZedBoard board |
||
55 | DEVICE_DTS := zynq-zed |
||
56 | endef |
||
57 | TARGET_DEVICES += avnet_zynq-zed |
||
58 | |||
59 | define Device/digilent_zynq-zybo |
||
60 | $(call Device/FitImageGzip) |
||
61 | DEVICE_TITLE := ZYBO Development Board |
||
62 | DEVICE_DTS := zynq-zybo |
||
63 | endef |
||
64 | TARGET_DEVICES += digilent_zynq-zybo |
||
65 | |||
66 | define Device/digilent_zynq-zybo-z7 |
||
67 | $(call Device/FitImageGzip) |
||
68 | DEVICE_TITLE := Digilent Zybo Z7 board |
||
69 | DEVICE_DTS := zynq-zybo-z7 |
||
70 | endef |
||
71 | TARGET_DEVICES += digilent_zynq-zybo-z7 |
||
72 | |||
73 | define Device/xlnx_zynq-zc702 |
||
74 | $(call Device/FitImageGzip) |
||
75 | DEVICE_TITLE := ZC702 Development Board |
||
76 | DEVICE_DTS := zynq-zc702 |
||
77 | endef |
||
78 | TARGET_DEVICES += xlnx_zynq-zc702 |
||
79 | |||
80 | $(eval $(call BuildImage)) |