* [Buildroot] [PATCH 1/1] package/dtbocfg: new package
@ 2021-09-28 8:23 Herve Codina
2021-09-28 8:51 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Herve Codina @ 2021-09-28 8:23 UTC (permalink / raw)
To: buildroot; +Cc: Herve Codina, Thomas Petazzoni
dtbocfg, which stands for Device Tree Blob Overlay Configuration
File System, was developed to serve as a userspace API of Device
Tree Overlay.
https://github.com/ikwzm/dtbocfg
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
---
DEVELOPERS | 3 ++
package/Config.in | 1 +
package/dtbocfg/Config.in | 9 +++++
package/dtbocfg/dtbocfg.hash | 3 ++
package/dtbocfg/dtbocfg.mk | 18 +++++++++
support/testing/tests/package/test_dtbocfg.py | 37 +++++++++++++++++++
6 files changed, 71 insertions(+)
create mode 100644 package/dtbocfg/Config.in
create mode 100644 package/dtbocfg/dtbocfg.hash
create mode 100644 package/dtbocfg/dtbocfg.mk
create mode 100644 support/testing/tests/package/test_dtbocfg.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 1f977190ab..ac14a11978 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1148,6 +1148,9 @@ F: package/sysrepo/
N: Henrique Camargo <henrique@henriquecamargo.com>
F: package/json-glib/
+N: Hervé Codina <herve.codina@bootlin.com>
+F: package/dtbocfg/
+
N: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
F: package/gauche/
F: package/gmrender-resurrect/
diff --git a/package/Config.in b/package/Config.in
index 2f83c87582..0ce2f64d8a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -460,6 +460,7 @@ endmenu
source "package/dmidecode/Config.in"
source "package/dmraid/Config.in"
source "package/dt-utils/Config.in"
+ source "package/dtbocfg/Config.in"
source "package/dtv-scan-tables/Config.in"
source "package/dump1090/Config.in"
source "package/dvb-apps/Config.in"
diff --git a/package/dtbocfg/Config.in b/package/dtbocfg/Config.in
new file mode 100644
index 0000000000..1e6ce3952d
--- /dev/null
+++ b/package/dtbocfg/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_DTBOCFG
+ bool "dtbocfg"
+ help
+ dtbocfg, which stands for Device Tree Blob Overlay Configuration
+ File System, was developed to serve as a userspace API of Device
+ Tree Overlay.
+
+ https://github.com/ikwzm/dtbocfg
+
diff --git a/package/dtbocfg/dtbocfg.hash b/package/dtbocfg/dtbocfg.hash
new file mode 100644
index 0000000000..4312878c99
--- /dev/null
+++ b/package/dtbocfg/dtbocfg.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256 faa53aefd7f7636c65e2b56bec223d2bc7676354e3ad9b5c1691aca349b9bbb8 dtbocfg-v0.0.9.tar.gz
+sha256 e57cb9f2ed607cd95bf1b64371325c505c1ac8fe640a8c9933e7fe7637a38567 LICENSE
diff --git a/package/dtbocfg/dtbocfg.mk b/package/dtbocfg/dtbocfg.mk
new file mode 100644
index 0000000000..bc1b8a1aba
--- /dev/null
+++ b/package/dtbocfg/dtbocfg.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# dtbocfg
+#
+################################################################################
+
+DTBOCFG_VERSION = v0.0.9
+DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,$(DTBOCFG_VERSION))
+DTBOCFG_LICENSE = BSD-2-Clause
+DTBOCFG_LICENSE_FILES = LICENSE
+
+define DTBOCFG_LINUX_CONFIG_FIXUPS
+ $(call KCONFIG_ENABLE_OPT,CONFIG_OF_OVERLAY)
+ $(call KCONFIG_ENABLE_OPT,CONFIG_CONFIGFS_FS)
+endef
+
+$(eval $(kernel-module))
+$(eval $(generic-package))
diff --git a/support/testing/tests/package/test_dtbocfg.py b/support/testing/tests/package/test_dtbocfg.py
new file mode 100644
index 0000000000..d25b1692b4
--- /dev/null
+++ b/support/testing/tests/package/test_dtbocfg.py
@@ -0,0 +1,37 @@
+import os
+
+import infra.basetest
+
+
+class TestDtbocfg(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.7"
+ BR2_LINUX_KERNEL_USE_DEFCONFIG=y
+ BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
+ BR2_PACKAGE_DTBOCFG=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def test_run(self):
+ img = os.path.join(self.builddir, "images", "rootfs.cpio")
+ kernel = os.path.join(self.builddir, "images", "zImage")
+ kernel_cmdline = ["console=ttyAMA0"]
+ dtb = infra.download(self.downloaddir, "vexpress-v2p-ca9.dtb")
+ options = ["-M", "vexpress-a9", "-dtb", dtb, "-initrd", img]
+
+ self.emulator.boot(arch="armv7", kernel=kernel,
+ kernel_cmdline=kernel_cmdline,
+ options=options)
+ self.emulator.login()
+ self.assertRunOk("modprobe dtbocfg.ko")
+ self.assertRunOk("mkdir /tmp/config && mount -t configfs none /tmp/config")
+
+ # Check that overlays directory is present.
+ # From dtbocfg site (https://github.com/ikwzm/dtbocfg):
+ # If /config/device-tree/overlays is created, it is ready to use
+ # dtbocfg
+ self.assertRunOk("ls /tmp/config/device-tree/overlays/")
--
2.31.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dtbocfg: new package
2021-09-28 8:23 [Buildroot] [PATCH 1/1] package/dtbocfg: new package Herve Codina
@ 2021-09-28 8:51 ` Thomas Petazzoni
2021-09-28 15:40 ` Herve Codina
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2021-09-28 8:51 UTC (permalink / raw)
To: Herve Codina; +Cc: buildroot
Hello Hervé,
Thanks for this patch. Two small comments below.
On Tue, 28 Sep 2021 10:23:28 +0200
Herve Codina <herve.codina@bootlin.com> wrote:
> diff --git a/package/dtbocfg/Config.in b/package/dtbocfg/Config.in
> new file mode 100644
> index 0000000000..1e6ce3952d
> --- /dev/null
> +++ b/package/dtbocfg/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_DTBOCFG
> + bool "dtbocfg"
> + help
> + dtbocfg, which stands for Device Tree Blob Overlay Configuration
> + File System, was developed to serve as a userspace API of Device
> + Tree Overlay.
There is an indentation issue here. The continuation lines should also
have a one tab + 2 spaces indentation. I guess this is probably
reported by "make check-package".
> +DTBOCFG_VERSION = v0.0.9
> +DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,$(DTBOCFG_VERSION))
This should be:
DTBOCFG_VERSION = 0.0.9
DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,v$(DTBOCFG_VERSION))
Indeed, we don't want the "v" prefix to appear in the version, so that
the version can match with what release-monitoring.org reports.
> diff --git a/support/testing/tests/package/test_dtbocfg.py b/support/testing/tests/package/test_dtbocfg.py
> new file mode 100644
> index 0000000000..d25b1692b4
> --- /dev/null
> +++ b/support/testing/tests/package/test_dtbocfg.py
Great, a test case!
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dtbocfg: new package
2021-09-28 8:51 ` Thomas Petazzoni
@ 2021-09-28 15:40 ` Herve Codina
0 siblings, 0 replies; 3+ messages in thread
From: Herve Codina @ 2021-09-28 15:40 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
Hello Thomas,
On Tue, 28 Sep 2021 10:51:35 +0200
Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > --- /dev/null
> > +++ b/package/dtbocfg/Config.in
> > @@ -0,0 +1,9 @@
> > +config BR2_PACKAGE_DTBOCFG
> > + bool "dtbocfg"
> > + help
> > + dtbocfg, which stands for Device Tree Blob Overlay Configuration
> > + File System, was developed to serve as a userspace API of Device
> > + Tree Overlay.
>
> There is an indentation issue here. The continuation lines should also
> have a one tab + 2 spaces indentation. I guess this is probably
> reported by "make check-package".
Indeed, will be fixed in v2.
>
> > +DTBOCFG_VERSION = v0.0.9
> > +DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,$(DTBOCFG_VERSION))
>
> This should be:
>
> DTBOCFG_VERSION = 0.0.9
> DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,v$(DTBOCFG_VERSION))
>
> Indeed, we don't want the "v" prefix to appear in the version, so that
> the version can match with what release-monitoring.org reports.
>
Right, will be fixed in v2.
Thanks for the review,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-28 15:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 8:23 [Buildroot] [PATCH 1/1] package/dtbocfg: new package Herve Codina
2021-09-28 8:51 ` Thomas Petazzoni
2021-09-28 15:40 ` Herve Codina
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.