mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-29 16:10:58 +00:00
f2a9942fbc
This adds a bunch of unit tests for the "fdt apply" command. They've all been run successfully in the sandbox. However, as you still require an out-of-tree dtc with overlay support, this is disabled by default. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
96 lines
1.3 KiB
Text
96 lines
1.3 KiB
Text
/*
|
|
* Copyright (c) 2016 NextThing Co
|
|
* Copyright (c) 2016 Free Electrons
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
/dts-v1/;
|
|
/plugin/;
|
|
|
|
/ {
|
|
/* Test that we can change an int by another */
|
|
fragment@0 {
|
|
target = <&test>;
|
|
|
|
__overlay__ {
|
|
test-int-property = <43>;
|
|
};
|
|
};
|
|
|
|
/* Test that we can replace a string by a longer one */
|
|
fragment@1 {
|
|
target = <&test>;
|
|
|
|
__overlay__ {
|
|
test-str-property = "foobar";
|
|
};
|
|
};
|
|
|
|
/* Test that we add a new property */
|
|
fragment@2 {
|
|
target = <&test>;
|
|
|
|
__overlay__ {
|
|
test-str-property-2 = "foobar2";
|
|
};
|
|
};
|
|
|
|
/* Test that we add a new node (by phandle) */
|
|
fragment@3 {
|
|
target = <&test>;
|
|
|
|
__overlay__ {
|
|
new-node {
|
|
new-property;
|
|
};
|
|
};
|
|
};
|
|
|
|
/* Test that we add a new node (by path) */
|
|
fragment@4 {
|
|
target-path = "/";
|
|
|
|
__overlay__ {
|
|
new-node {
|
|
new-property;
|
|
};
|
|
};
|
|
};
|
|
|
|
fragment@5 {
|
|
target-path = "/";
|
|
|
|
__overlay__ {
|
|
local: new-local-node {
|
|
new-property;
|
|
};
|
|
};
|
|
};
|
|
|
|
fragment@6 {
|
|
target-path = "/";
|
|
|
|
__overlay__ {
|
|
test-phandle = <&test>, <&local>;
|
|
};
|
|
};
|
|
|
|
fragment@7 {
|
|
target-path = "/";
|
|
|
|
__overlay__ {
|
|
test-several-phandle = <&local>, <&local>;
|
|
};
|
|
};
|
|
|
|
fragment@8 {
|
|
target = <&test>;
|
|
|
|
__overlay__ {
|
|
sub-test-node {
|
|
new-sub-test-property;
|
|
};
|
|
};
|
|
};
|
|
};
|