Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 1 | SUMMARY = "The reference design for zybo-linux-bd" |
| 2 | DESCRIPTION = "Contains the Reference Design Files and hardware software \ |
| 3 | hand-off file. The HDF provides bitstream and Xilinx ps7_init_gpl.c/h \ |
| 4 | platform headers." |
| 5 | SECTION = "bsp" |
| 6 | |
| 7 | DEPENDS += "unzip-native" |
| 8 | |
| 9 | LICENSE = "Proprietary" |
| 10 | LIC_FILES_CHKSUM = "file://Projects/${HW_BD}/readme.txt;md5=e1cb7639bf00b6e730ff3a7f13714951" |
| 11 | |
| 12 | COMPATIBLE_MACHINE = "zybo-linux-bd-zynq7" |
| 13 | |
| 14 | HW_BD = "linux_bd" |
| 15 | |
| 16 | SRC_URI = "git://github.com/Digilent/ZYBO.git;protocol=https;nobranch=1" |
| 17 | SRCREV = "63ca49fe027da49f3b0ac636bd404fd31fbbd945" |
| 18 | |
| 19 | PV = "+git${SRCPV}" |
| 20 | |
| 21 | S = "${WORKDIR}/git" |
| 22 | |
| 23 | HDF = "/Projects/${HW_BD}/hw_handoff/${HW_BD}_wrapper.hdf" |
| 24 | |
| 25 | S ?= "${WORKDIR}/${MACHINE}" |
| 26 | |
| 27 | PROVIDES = "virtual/bitstream virtual/xilinx-platform-init" |
| 28 | |
| 29 | FILES_${PN}-platform-init += "${PLATFORM_INIT_DIR}/*" |
| 30 | |
| 31 | FILES_${PN}-bitstream += " \ |
| 32 | download.bit \ |
| 33 | " |
| 34 | |
| 35 | PACKAGES = "${PN}-platform-init ${PN}-bitstream" |
| 36 | |
| 37 | BITSTREAM ?= "bitstream-${PV}-${PR}.bit" |
| 38 | |
| 39 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 40 | |
| 41 | inherit xilinx-platform-init |
| 42 | inherit deploy |
| 43 | |
| 44 | SYSROOT_DIRS += "${PLATFORM_INIT_DIR}" |
| 45 | |
| 46 | do_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 | |
| 57 | do_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 | } |
| 66 | addtask deploy before do_build after do_install |