package/dtbocfg: new package

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>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Herve Codina 2021-09-28 17:42:18 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 20de0f5bf6
commit 9fc7b49ab1
6 changed files with 71 additions and 0 deletions

View File

@ -1149,6 +1149,10 @@ F: package/sysrepo/
N: Henrique Camargo <henrique@henriquecamargo.com>
F: package/json-glib/
N: Hervé Codina <herve.codina@bootlin.com>
F: package/dtbocfg/
F: support/testing/tests/package/test_dtbocfg.py
N: Hiroshi Kawashima <kei-k@ca2.so-net.ne.jp>
F: package/gauche/
F: package/gmrender-resurrect/

View File

@ -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"

View File

@ -0,0 +1,8 @@
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

View File

@ -0,0 +1,3 @@
# Locally computed:
sha256 faa53aefd7f7636c65e2b56bec223d2bc7676354e3ad9b5c1691aca349b9bbb8 dtbocfg-0.0.9.tar.gz
sha256 e57cb9f2ed607cd95bf1b64371325c505c1ac8fe640a8c9933e7fe7637a38567 LICENSE

View File

@ -0,0 +1,18 @@
################################################################################
#
# dtbocfg
#
################################################################################
DTBOCFG_VERSION = 0.0.9
DTBOCFG_SITE = $(call github,ikwzm,dtbocfg,v$(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))

View File

@ -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/")