All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher Clark" <christopher.w.clark@gmail.com>
To: meta-virtualization@lists.yoctoproject.org
Cc: Christopher Clark <christopher.clark@starlab.io>,
	bruce.ashfield@gmail.com, cardoe@gentoo.org,
	diego.sueiro@arm.com, Bertrand.Marquis@arm.com,
	andrew.cooper3@citrix.com, dpsmith@apertussolutions.com,
	persaur@gmail.com, scott.davis@starlab.io,
	adam.schwalm@starlab.io
Subject: [meta-virtualization][PATCH 1/2] lopper, python-dtc: add new recipes for device tree tools
Date: Wed,  7 Jul 2021 21:42:59 -0700	[thread overview]
Message-ID: <20210708044300.127016-2-christopher.w.clark@gmail.com> (raw)
In-Reply-To: <20210708044300.127016-1-christopher.w.clark@gmail.com>

From: Christopher Clark <christopher.clark@starlab.io>

This device tree tooling is being added as a prequisite for enabling
qemuboot to run Xen system images with device trees generated for Qemu.

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. Imported from meta-xilinx-bsp with an
updated SRCREV and DESCRIPTION for the latest release, version 1.6.1.

Signed-off-by: Christopher Clark <christopher.clark@starlab.io>
---
 recipes-kernel/dtc/python3-dtc_1.6.1.bb | 26 ++++++++++++++
 recipes-kernel/lopper/lopper.bb         | 45 +++++++++++++++++++++++++
 2 files changed, 71 insertions(+)
 create mode 100644 recipes-kernel/dtc/python3-dtc_1.6.1.bb
 create mode 100644 recipes-kernel/lopper/lopper.bb

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 0000000..5374029
--- /dev/null
+++ b/recipes-kernel/dtc/python3-dtc_1.6.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Python Library for the Device Tree Compiler"
+HOMEPAGE = "https://devicetree.org/"
+DESCRIPTION = "A python library for the Device Tree Compiler, a tool used to manipulate Device Tree files which contain a data structure for describing hardware."
+SECTION = "bootloader"
+LICENSE = "GPLv2 | BSD"
+
+DEPENDS = "flex-native bison-native swig-native libyaml dtc"
+
+SRC_URI = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
+
+LIC_FILES_CHKSUM = "file://libfdt.i;beginline=1;endline=6;md5=afda088c974174a29108c8d80b5dce90"
+
+SRCREV = "ecaeb97fec013973360e94888a7de645f084345c"
+
+S = "${WORKDIR}/git/pylibfdt"
+
+inherit distutils3
+
+do_configure_prepend() {
+    make -C "${S}/.." version_gen.h
+    mv "${S}/../version_gen.h" "${S}/"
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-kernel/lopper/lopper.bb b/recipes-kernel/lopper/lopper.bb
new file mode 100644
index 0000000..274d5b9
--- /dev/null
+++ b/recipes-kernel/lopper/lopper.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Device Tree Lopper"
+DESCRIPTION = "Tool for manipulation of system device tree files"
+LICENSE = "BSD-3-Clause"
+SECTION = "bootloader"
+
+SRC_URI = "git://github.com/devicetree-org/lopper.git"
+SRCREV = "0c23e51d585608ab04009ccf3499f168e2f4d478"
+S = "${WORKDIR}/git"
+
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=8e5f5f691f01c9fdfa7a7f2d535be619"
+
+RDEPENDS_${PN} = " \
+    python3-core \
+    python3-dtc \
+    python3-humanfriendly \
+    "
+
+do_install() {
+    install -d "${D}/${bindir}"
+    install -d "${D}/${datadir}/${BPN}"
+
+    install -m 0644 "${S}/README" "${D}/${datadir}/${BPN}"
+    install -m 0644 "${S}/README-architecture.txt" "${D}/${datadir}/${BPN}"
+    install -m 0644 "${S}/README.pydoc" "${D}/${datadir}/${BPN}"
+    install -m 0644 "${S}/LICENSE.md" "${D}/${datadir}/${BPN}"
+
+    install -d "${D}/${datadir}/${BPN}/assists"
+    install -m 0644 "${S}/assists/"* "${D}/${datadir}/${BPN}/assists/"
+
+    install -d "${D}/${datadir}/${BPN}/lops"
+    install -m 0644 "${S}/lops/"* "${D}/${datadir}/${BPN}/lops/"
+
+    install -d "${D}/${datadir}/${BPN}/device-trees"
+    install -m 0644 "${S}/device-trees/"* "${D}/${datadir}/${BPN}/device-trees/"
+
+    install -m 0755 "${S}/"lopper*.py "${D}/${datadir}/${BPN}/"
+
+    datadir_relpath=${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}
+    ln -s "${datadir_relpath}/${BPN}/lopper.py" "${D}/${bindir}/"
+}
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.25.1


  reply	other threads:[~2021-07-08  4:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  4:42 [meta-virtualization][PATCH 0/2] Xen: qemuboot device tree support (Arm 64-bit) Christopher Clark
2021-07-08  4:42 ` Christopher Clark [this message]
2021-07-21  2:41   ` [meta-virtualization][PATCH 1/2] lopper, python-dtc: add new recipes for device tree tools Bruce Ashfield
2021-07-26 22:24     ` Christopher Clark
2021-07-08  4:43 ` [meta-virtualization][PATCH 2/2] qemuboot, xen-image-minimal: enable runqemu for qemuarm64 Xen images Christopher Clark
2021-07-21  2:49   ` Bruce Ashfield
2021-07-26 22:37     ` Christopher Clark
2021-07-27  2:16       ` Bruce Ashfield
2021-07-14 19:34 ` [meta-virtualization][PATCH 0/2] Xen: qemuboot device tree support (Arm 64-bit) Bruce Ashfield
     [not found] ` <1691BF505C93703B.29316@lists.yoctoproject.org>
2021-07-21  2:50   ` Bruce Ashfield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210708044300.127016-2-christopher.w.clark@gmail.com \
    --to=christopher.w.clark@gmail.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=adam.schwalm@starlab.io \
    --cc=andrew.cooper3@citrix.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=cardoe@gentoo.org \
    --cc=christopher.clark@starlab.io \
    --cc=diego.sueiro@arm.com \
    --cc=dpsmith@apertussolutions.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=persaur@gmail.com \
    --cc=scott.davis@starlab.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.