mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
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:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
20de0f5bf6
commit
9fc7b49ab1
37
support/testing/tests/package/test_dtbocfg.py
Normal file
37
support/testing/tests/package/test_dtbocfg.py
Normal 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/")
|
||||
Reference in New Issue
Block a user