blob: be68918cfeaccd5bcb384d418019510dd6441759 [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001SUMMARY = "The reference design for zybo-linux-bd"
2DESCRIPTION = "Contains the Reference Design Files and hardware software \
3hand-off file. The HDF provides bitstream and Xilinx ps7_init_gpl.c/h \
4platform headers."
5SECTION = "bsp"
6
7DEPENDS += "unzip-native"
8
9LICENSE = "Proprietary"
10LIC_FILES_CHKSUM = "file://Projects/${HW_BD}/readme.txt;md5=e1cb7639bf00b6e730ff3a7f13714951"
11
12COMPATIBLE_MACHINE = "zybo-linux-bd-zynq7"
13
14HW_BD = "linux_bd"
15
16SRC_URI = "git://github.com/Digilent/ZYBO.git;protocol=https;nobranch=1"
17SRCREV = "63ca49fe027da49f3b0ac636bd404fd31fbbd945"
18
19PV = "+git${SRCPV}"
20
21S = "${WORKDIR}/git"
22
23HDF = "/Projects/${HW_BD}/hw_handoff/${HW_BD}_wrapper.hdf"
24
25S ?= "${WORKDIR}/${MACHINE}"
26
27PROVIDES = "virtual/bitstream virtual/xilinx-platform-init"
28
29FILES_${PN}-platform-init += "${PLATFORM_INIT_DIR}/*"
30
31FILES_${PN}-bitstream += " \
32 download.bit \
33 "
34
35PACKAGES = "${PN}-platform-init ${PN}-bitstream"
36
37BITSTREAM ?= "bitstream-${PV}-${PR}.bit"
38
39PACKAGE_ARCH = "${MACHINE_ARCH}"
40
41inherit xilinx-platform-init
42inherit deploy
43
44SYSROOT_DIRS += "${PLATFORM_INIT_DIR}"
45
46do_install() {
47 fn=$(unzip -l ${S}/${HDF} | awk '{print $NF}' | grep ".bit$")
48 unzip -o ${S}/${HDF} ${fn} -d ${D}
49 [ "${fn}" == "download.bit" ] || mv ${D}/${fn} ${D}/download.bit
50
51 install -d ${D}${PLATFORM_INIT_DIR}
52 for fn in ${PLATFORM_INIT_FILES}; do
53 unzip -o ${S}/${HDF} ${fn} -d ${D}${PLATFORM_INIT_DIR}
54 done
55}
56
57do_deploy () {
58 if [ -e ${D}/download.bit ]; then
59 install -d ${DEPLOYDIR}
60 install -m 0644 ${D}/download.bit ${DEPLOYDIR}/${BITSTREAM}
61 ln -sf ${BITSTREAM} ${DEPLOYDIR}/download.bit
62 # for u-boot 2016.3 with spl load bitstream patch
63 ln -sf ${BITSTREAM} ${DEPLOYDIR}/bitstream
64 fi
65}
66addtask deploy before do_build after do_install