From 82ac762e83e37e45db3fbe38ad1e21114a3426b6 Mon Sep 17 00:00:00 2001 From: Manjukumar Matha Date: Thu, 30 Nov 2017 13:46:24 -0800 Subject: qemu-devicetrees_2017.3.bb: Rewire QEMU devicetree recipe Rewire so that we can update the Xilinx QEMU devicetree release just like other recipes Acked-by: Alistair Francis Signed-off-by: Manjukumar Matha --- recipes-devtools/qemu/qemu-devicetrees.inc | 37 ++++++++++++++++++++++++ recipes-devtools/qemu/qemu-devicetrees_2017.3.bb | 34 ++-------------------- 2 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 recipes-devtools/qemu/qemu-devicetrees.inc diff --git a/recipes-devtools/qemu/qemu-devicetrees.inc b/recipes-devtools/qemu/qemu-devicetrees.inc new file mode 100644 index 00000000..d4044ed7 --- /dev/null +++ b/recipes-devtools/qemu/qemu-devicetrees.inc @@ -0,0 +1,37 @@ +SUMMARY = "Xilinx's hardware device trees required for QEMU" +HOMEPAGE = "https://github.com/xilinx/qemu-devicetrees/" +LICENSE = "BSD" +DEPENDS += "dtc-native" + +inherit deploy + +LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=27;md5=7348b6cbcae69912cb1dee68d6c68d99" + +PV = "xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}" + +BRANCH ?= "" +REPO ?= "git://github.com/Xilinx/qemu-devicetrees.git;protocol=https" + +BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != '']}" +SRC_URI = "${REPO};${BRANCHARG}" + +S = "${WORKDIR}/git" + +# Don't need to do anything +do_install() { + : +} + +do_deploy() { + # single-arch dtbs + for DTS_FILE in ${S}/LATEST/SINGLE_ARCH/*.dtb; do + install -Dm 0644 $DTS_FILE ${DEPLOYDIR}/qemu-hw-devicetrees/$(basename $DTS_FILE .dtb).dtb + done + + # multi-arch dtbs + for DTS_FILE in ${S}/LATEST/MULTI_ARCH/*.dtb; do + install -Dm 0644 $DTS_FILE ${DEPLOYDIR}/qemu-hw-devicetrees/multiarch/$(basename $DTS_FILE .dtb).dtb + done +} + +addtask deploy after do_install diff --git a/recipes-devtools/qemu/qemu-devicetrees_2017.3.bb b/recipes-devtools/qemu/qemu-devicetrees_2017.3.bb index d5cfe0b0..ec6093b7 100644 --- a/recipes-devtools/qemu/qemu-devicetrees_2017.3.bb +++ b/recipes-devtools/qemu/qemu-devicetrees_2017.3.bb @@ -1,32 +1,4 @@ -SUMMARY = "Xilinx's hardware device trees required for QEMU" -HOMEPAGE = "https://github.com/xilinx/qemu-devicetrees/" -LICENSE = "BSD" -DEPENDS += "dtc-native" +require qemu-devicetrees.inc -inherit deploy - -LIC_FILES_CHKSUM = "file://Makefile;beginline=1;endline=27;md5=7348b6cbcae69912cb1dee68d6c68d99" - -SRCREV = "4b951c594078562e9dd828430075968dd91ac425" -SRC_URI = "git://github.com/Xilinx/qemu-devicetrees.git;protocol=https;nobranch=1" - -S = "${WORKDIR}/git" - -# Don't need to do anything -do_install() { - : -} - -do_deploy() { - # single-arch dtbs - for DTS_FILE in ${S}/LATEST/SINGLE_ARCH/*.dtb; do - install -Dm 0644 $DTS_FILE ${DEPLOYDIR}/qemu-hw-devicetrees/$(basename $DTS_FILE .dtb).dtb - done - - # multi-arch dtbs - for DTS_FILE in ${S}/LATEST/MULTI_ARCH/*.dtb; do - install -Dm 0644 $DTS_FILE ${DEPLOYDIR}/qemu-hw-devicetrees/multiarch/$(basename $DTS_FILE .dtb).dtb - done -} - -addtask deploy after do_install +XILINX_RELEASE_VERSION = "v2017.3" +SRCREV ?= "4b951c594078562e9dd828430075968dd91ac425" -- cgit v1.2.3-54-g00ecf