summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorChristopher Clark <christopher.clark@starlab.io>2021-07-27 17:07:39 -0700
committerBruce Ashfield <bruce.ashfield@gmail.com>2021-07-29 10:55:42 -0400
commit29796322c23ce6b425cd0adce380391b70f492df (patch)
tree8339afc1554a5995a60a67335d920bb8a26fcc33 /recipes-kernel
parent11036424a95764707621c92f0e787c9d2c80a431 (diff)
downloadmeta-virtualization-29796322c23ce6b425cd0adce380391b70f492df.tar.gz
lopper, python-dtc: add new recipes for device tree tools
This device tree tooling is being added as a prequisite for enabling qemuboot with the Arm 64-bit version of the Xen hypervisor. lopper: a tool for performing operations on device tree files. A new recipe inspired by the original from meta-xilinx-bsp. python-dtc: a python library for the Device Tree compiler. This is a prerequisite for lopper. Updated import of recipe from meta-xilinx-bsp for the latest release, version 1.6.1. Signed-off-by: Christopher Clark <christopher.clark@starlab.io> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/dtc/python3-dtc_1.6.1.bb28
-rw-r--r--recipes-kernel/lopper/lopper.bb45
2 files changed, 73 insertions, 0 deletions
diff --git a/recipes-kernel/dtc/python3-dtc_1.6.1.bb b/recipes-kernel/dtc/python3-dtc_1.6.1.bb
new file mode 100644
index 00000000..90889314
--- /dev/null
+++ b/recipes-kernel/dtc/python3-dtc_1.6.1.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Python Library for the Device Tree Compiler"
2HOMEPAGE = "https://devicetree.org/"
3DESCRIPTION = "A python library for the Device Tree Compiler, a tool used to manipulate Device Tree files which contain a data structure for describing hardware."
4SECTION = "bootloader"
5LICENSE = "GPLv2 | BSD"
6
7DEPENDS = "flex-native bison-native swig-native libyaml dtc"
8
9SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
10
11UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
12
13LIC_FILES_CHKSUM = "file://pylibfdt/libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90"
14
15SRCREV = "ecaeb97fec013973360e94888a7de645f084345c"
16
17S = "${WORKDIR}/git"
18
19inherit distutils3
20
21DISTUTILS_SETUP_PATH = "${S}/pylibfdt"
22
23do_configure_prepend() {
24 oe_runmake -C "${S}" version_gen.h
25 mv "${S}/version_gen.h" "${DISTUTILS_SETUP_PATH}/"
26}
27
28BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-kernel/lopper/lopper.bb b/recipes-kernel/lopper/lopper.bb
new file mode 100644
index 00000000..274d5b9a
--- /dev/null
+++ b/recipes-kernel/lopper/lopper.bb
@@ -0,0 +1,45 @@
1SUMMARY = "Device Tree Lopper"
2DESCRIPTION = "Tool for manipulation of system device tree files"
3LICENSE = "BSD-3-Clause"
4SECTION = "bootloader"
5
6SRC_URI = "git://github.com/devicetree-org/lopper.git"
7SRCREV = "0c23e51d585608ab04009ccf3499f168e2f4d478"
8S = "${WORKDIR}/git"
9
10LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8e5f5f691f01c9fdfa7a7f2d535be619"
11
12RDEPENDS_${PN} = " \
13 python3-core \
14 python3-dtc \
15 python3-humanfriendly \
16 "
17
18do_install() {
19 install -d "${D}/${bindir}"
20 install -d "${D}/${datadir}/${BPN}"
21
22 install -m 0644 "${S}/README" "${D}/${datadir}/${BPN}"
23 install -m 0644 "${S}/README-architecture.txt" "${D}/${datadir}/${BPN}"
24 install -m 0644 "${S}/README.pydoc" "${D}/${datadir}/${BPN}"
25 install -m 0644 "${S}/LICENSE.md" "${D}/${datadir}/${BPN}"
26
27 install -d "${D}/${datadir}/${BPN}/assists"
28 install -m 0644 "${S}/assists/"* "${D}/${datadir}/${BPN}/assists/"
29
30 install -d "${D}/${datadir}/${BPN}/lops"
31 install -m 0644 "${S}/lops/"* "${D}/${datadir}/${BPN}/lops/"
32
33 install -d "${D}/${datadir}/${BPN}/device-trees"
34 install -m 0644 "${S}/device-trees/"* "${D}/${datadir}/${BPN}/device-trees/"
35
36 install -m 0755 "${S}/"lopper*.py "${D}/${datadir}/${BPN}/"
37
38 datadir_relpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}
39 ln -s "${datadir_relpath}/${BPN}/lopper.py" "${D}/${bindir}/"
40}
41
42do_configure[noexec] = "1"
43do_compile[noexec] = "1"
44
45BBCLASSEXTEND = "native nativesdk"