mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:39:02 +02:00
oe-selftest: add new ext dtb recipe
There is no test coverage for the devicetree.bbclass class. Add a minimalist recipe that uses this class. This recipe compiles a devicetree overlay that does not include any sources from the kernel build folder to keep it simple and also usable for testing a kernel from the sstate-cache. (From OE-Core rev: 44b6eaf9fb408f2a7941e7ba8f2156cf2c7d4bae) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
437043d9f3
commit
c6a51f8c99
29
meta-selftest/recipes-test/ext-dtb/bbb-dtbs-as-ext.bb
Normal file
29
meta-selftest/recipes-test/ext-dtb/bbb-dtbs-as-ext.bb
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
SUMMARY = "Boeaglebone Devicetrees"
|
||||||
|
DESCRIPTION = "Handle the dtc files of the beaglebone-yocto via devicetree.bbclass just for testing purpose"
|
||||||
|
SECTION = "kernel"
|
||||||
|
LICENSE = "MIT"
|
||||||
|
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
|
||||||
|
|
||||||
|
inherit devicetree
|
||||||
|
|
||||||
|
COMPATIBLE_MACHINE = "^(beaglebone-yocto)$"
|
||||||
|
|
||||||
|
# Take a copy of a small devicetree from the kernel's source directory for handling it externally
|
||||||
|
# Borrowed an example DTB overlay from
|
||||||
|
# https://raw.githubusercontent.com/beagleboard/linux/refs/heads/5.10/arch/arm/boot/dts/overlays/BBORG_RELAY-00A2.dts
|
||||||
|
SRC_URI = "\
|
||||||
|
file://am335x-bonegreen-ext.dts \
|
||||||
|
file://BBORG_RELAY-00A2.dts \
|
||||||
|
"
|
||||||
|
|
||||||
|
# The am335x-bonegreen-ext.dts needs also the ti directories
|
||||||
|
DT_INCLUDE:append = " ${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/ti/omap"
|
||||||
|
|
||||||
|
# Sym-links are handled as extra configuration nodes in FIT images.
|
||||||
|
do_install:append() {
|
||||||
|
ln -sf am335x-bonegreen-ext.dtb "${D}/boot/devicetree/am335x-bonegreen-ext-alias.dtb"
|
||||||
|
}
|
||||||
|
|
||||||
|
do_deploy:append() {
|
||||||
|
ln -sf am335x-bonegreen-ext.dtb "${DEPLOYDIR}/devicetree/am335x-bonegreen-ext-alias.dtb"
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 Robert Nelson <robertcnelson@gmail.com>
|
||||||
|
* Copyright (C) 2019 Amilcar Lucas <amilcar.lucas@iav.de>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
/plugin/;
|
||||||
|
|
||||||
|
&{/chosen} {
|
||||||
|
overlays {
|
||||||
|
BBORG_RELAY-00A2.kernel = __TIMESTAMP__;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&ocp {
|
||||||
|
P9_41_pinmux { pinctrl-0 = <&P9_41_gpio_pin>;};
|
||||||
|
P9_42_pinmux { pinctrl-0 = <&P9_42_gpio_pin>;};
|
||||||
|
P9_30_pinmux { pinctrl-0 = <&P9_30_gpio_pin>;};
|
||||||
|
P9_27_pinmux { pinctrl-0 = <&P9_27_gpio_pin>;};
|
||||||
|
};
|
||||||
|
|
||||||
|
// relay1
|
||||||
|
&bone_led_P9_41 {
|
||||||
|
status = "okay";
|
||||||
|
label = "relay1";
|
||||||
|
default-state = "keep";
|
||||||
|
};
|
||||||
|
|
||||||
|
// relay2
|
||||||
|
&bone_led_P9_42 {
|
||||||
|
status = "okay";
|
||||||
|
label = "relay2";
|
||||||
|
default-state = "keep";
|
||||||
|
};
|
||||||
|
|
||||||
|
// realy3
|
||||||
|
&bone_led_P9_30 {
|
||||||
|
status = "okay";
|
||||||
|
label = "relay3";
|
||||||
|
default-state = "keep";
|
||||||
|
};
|
||||||
|
|
||||||
|
// realy4
|
||||||
|
&bone_led_P9_27 {
|
||||||
|
status = "okay";
|
||||||
|
label = "relay4";
|
||||||
|
default-state = "keep";
|
||||||
|
};
|
|
@ -0,0 +1,14 @@
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
|
||||||
|
*/
|
||||||
|
/dts-v1/;
|
||||||
|
|
||||||
|
#include "am33xx.dtsi"
|
||||||
|
#include "am335x-bone-common.dtsi"
|
||||||
|
#include "am335x-bonegreen-common.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "TI AM335x BeagleBone Green External";
|
||||||
|
compatible = "ti,am335x-bone-green", "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user