diff options
| author | Jason Wu <jason.wu.misc@gmail.com> | 2016-04-09 00:09:30 +1000 |
|---|---|---|
| committer | Nathan Rossi <nathan@nathanrossi.com> | 2016-05-03 21:50:58 +1000 |
| commit | 5066fef048366ced30a346e2dca67b009f0d32be (patch) | |
| tree | d4dc4274b8a59d5c8b2edc4e93b79538213e0085 /recipes-bsp/reference-design | |
| parent | 2cc62e42b062a6eef2664088b1b1bf4eac99074d (diff) | |
| download | meta-xilinx-5066fef048366ced30a346e2dca67b009f0d32be.tar.gz | |
conf/machine: Add zybo-linux-bd-zynq7 machine support
* base on Zybo linux_bd reference design
* Add device tree with required nodes
* hdf is fetch from Digilent github
Signed-off-by: Jason Wu <jason.wu.misc@gmail.com>
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Diffstat (limited to 'recipes-bsp/reference-design')
| -rw-r--r-- | recipes-bsp/reference-design/zybo-linux-bd.bb | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/recipes-bsp/reference-design/zybo-linux-bd.bb b/recipes-bsp/reference-design/zybo-linux-bd.bb new file mode 100644 index 00000000..9224d2d1 --- /dev/null +++ b/recipes-bsp/reference-design/zybo-linux-bd.bb | |||
| @@ -0,0 +1,68 @@ | |||
| 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 | DEPENDS += "unzip" | ||
| 7 | |||
| 8 | LICENSE = "Proprietary" | ||
| 9 | LIC_FILES_CHKSUM = "file://Projects/${HW_BD}/readme.txt;md5=e1cb7639bf00b6e730ff3a7f13714951" | ||
| 10 | |||
| 11 | COMPATIBLE_MACHINE = "zybo-linux-bd-zynq7" | ||
| 12 | |||
| 13 | HW_BD = "linux_bd" | ||
| 14 | |||
| 15 | SRC_URI = "git://github.com/Digilent/ZYBO.git;protocol=https;nobranch=1" | ||
| 16 | SRCREV = "63ca49fe027da49f3b0ac636bd404fd31fbbd945" | ||
| 17 | |||
| 18 | PV = "+git${SRCPV}" | ||
| 19 | |||
| 20 | S = "${WORKDIR}/git" | ||
| 21 | |||
| 22 | HDF = "/Projects/${HW_BD}/hw_handoff/${HW_BD}_wrapper.hdf" | ||
| 23 | |||
| 24 | S ?= "${WORKDIR}/${MACHINE}" | ||
| 25 | |||
| 26 | PROVIDES = "virtual/bitstream virtual/zynq7-platform-init" | ||
| 27 | |||
| 28 | PLATFORM_INIT ?= "ps7_init_gpl.c \ | ||
| 29 | ps7_init_gpl.h" | ||
| 30 | |||
| 31 | FILES_${PN}-platform-init += " \ | ||
| 32 | ${PLATFORM_INIT_DIR}/ps7_init_gpl.c \ | ||
| 33 | ${PLATFORM_INIT_DIR}/ps7_init_gpl.h \ | ||
| 34 | " | ||
| 35 | |||
| 36 | FILES_${PN}-bitstream += " \ | ||
| 37 | download.bit \ | ||
| 38 | " | ||
| 39 | |||
| 40 | PACKAGES = "${PN}-platform-init ${PN}-bitstream" | ||
| 41 | |||
| 42 | BITSTREAM ?= "bitstream-${PV}-${PR}.bit" | ||
| 43 | |||
| 44 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
| 45 | |||
| 46 | inherit zynq7-platform-paths | ||
| 47 | |||
| 48 | do_install() { | ||
| 49 | fn=$(unzip -l ${S}/${HDF} | awk '{print $NF}' | grep ".bit$") | ||
| 50 | unzip -o ${S}/${HDF} ${fn} -d ${D} | ||
| 51 | [ "${fn}" == "download.bit" ] || mv ${D}/${fn} ${D}/download.bit | ||
| 52 | |||
| 53 | install -d ${D}${PLATFORM_INIT_DIR} | ||
| 54 | for fn in ${PLATFORM_INIT}; do | ||
| 55 | unzip -o ${S}/${HDF} ${fn} -d ${D}${PLATFORM_INIT_DIR} | ||
| 56 | done | ||
| 57 | } | ||
| 58 | |||
| 59 | do_deploy () { | ||
| 60 | if [ -e ${D}/download.bit ]; then | ||
| 61 | install -d ${DEPLOY_DIR_IMAGE} | ||
| 62 | install -m 0644 ${D}/download.bit ${DEPLOY_DIR_IMAGE}/${BITSTREAM} | ||
| 63 | ln -sf ${BITSTREAM} ${DEPLOY_DIR_IMAGE}/download.bit | ||
| 64 | # for u-boot 2016.3 with spl load bitstream patch | ||
| 65 | ln -sf ${BITSTREAM} ${DEPLOY_DIR_IMAGE}/bitstream | ||
| 66 | fi | ||
| 67 | } | ||
| 68 | addtask deploy before do_build after do_install \ No newline at end of file | ||
