mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 15:36:29 +00:00
Use origin device-tree
This commit is contained in:
parent
2bf10f8a5c
commit
96a5f891ba
@ -2,3 +2,4 @@
|
|||||||
|
|
||||||
global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3"
|
global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3"
|
||||||
global linux.bootargs.apparmor="apparmor=1 security=apparmor"
|
global linux.bootargs.apparmor="apparmor=1 security=apparmor"
|
||||||
|
global linux.bootargs.misc="rootwait"
|
||||||
|
4
buildroot-external/board/rpi2/barebox-env/init/rpi_dt
Normal file
4
buildroot-external/board/rpi2/barebox-env/init/rpi_dt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
memcpy -d /tmp/rpi.dtb 0x02008000 0 0x8000
|
||||||
|
oftree -f -l /tmp/rpi.dtb
|
Binary file not shown.
@ -27,6 +27,7 @@ cp -r ${BINARIES_DIR}/rpi-firmware/overlays ${BOOT_DATA}/
|
|||||||
# Update Boot options
|
# Update Boot options
|
||||||
(
|
(
|
||||||
echo "kernel=barebox.bin"
|
echo "kernel=barebox.bin"
|
||||||
|
echo "device_tree_address=0x02008000"
|
||||||
echo "disable_splash=1"
|
echo "disable_splash=1"
|
||||||
echo "dtparam=audio=on"
|
echo "dtparam=audio=on"
|
||||||
echo "enable_uart=1"
|
echo "enable_uart=1"
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
From cf05dfaa34d8502041aa2354f3b8c97ca4d250c9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
|
Date: Thu, 7 Jun 2018 17:36:00 +0000
|
||||||
|
Subject: [PATCH 1/1] drivers: of: bugfix partition fixups
|
||||||
|
|
||||||
|
If we load a new device tree for linux kernel with a diferent layout,
|
||||||
|
the fixup of partition going into endless loop. Exactly the of_find_property
|
||||||
|
function will never come back on a invalid device_node.
|
||||||
|
|
||||||
|
My patch check, if the device will exists on device tree before we run the
|
||||||
|
fixup.
|
||||||
|
|
||||||
|
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
|
||||||
|
---
|
||||||
|
drivers/of/partition.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
|
||||||
|
index aa6e601b7..17e420964 100644
|
||||||
|
--- a/drivers/of/partition.c
|
||||||
|
+++ b/drivers/of/partition.c
|
||||||
|
@@ -140,6 +140,9 @@ static int of_partition_fixup(struct device_node *root, void *ctx)
|
||||||
|
if (!cdev->device_node)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
+ if (!of_find_node_by_path(cdev->device_node->full_name))
|
||||||
|
+ return -EINVAL;
|
||||||
|
+
|
||||||
|
list_for_each_entry(partcdev, &cdev->partitions, partition_entry) {
|
||||||
|
if (partcdev->flags & DEVFS_PARTITION_FROM_TABLE)
|
||||||
|
continue;
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
Binary file not shown.
@ -5,13 +5,6 @@
|
|||||||
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
||||||
|
|
||||||
fragment@0 {
|
fragment@0 {
|
||||||
target = <&sdhci>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@1 {
|
|
||||||
target = <&sdhost>;
|
target = <&sdhost>;
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
@ -20,7 +13,7 @@
|
|||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
compatible = "fixed-partitions";
|
compatible = "fixed-partitions";
|
||||||
|
|
||||||
backend_state_sdhost: partition@22100000 {
|
backend_state: partition@22100000 {
|
||||||
label = "state";
|
label = "state";
|
||||||
reg = <0x22100000 0x800000>;
|
reg = <0x22100000 0x800000>;
|
||||||
};
|
};
|
||||||
@ -28,10 +21,64 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fragment@2 {
|
|
||||||
target = <&state>;
|
fragment@1 {
|
||||||
|
target-path = "/";
|
||||||
__overlay__ {
|
__overlay__ {
|
||||||
backend = <&backend_state_sdhost>;
|
state: state {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
magic = <0xef98423f>;
|
||||||
|
compatible = "barebox,state";
|
||||||
|
backend = <&backend_state>;
|
||||||
|
backend-type = "raw";
|
||||||
|
backend-stridesize = <4048>;
|
||||||
|
|
||||||
|
bootstate {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
system0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
remaining_attempts@0 {
|
||||||
|
reg = <0x0 0x4>;
|
||||||
|
type = "uint32";
|
||||||
|
default = <3>;
|
||||||
|
};
|
||||||
|
priority@4 {
|
||||||
|
reg = <0x4 0x4>;
|
||||||
|
type = "uint32";
|
||||||
|
default = <20>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
system1 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
remaining_attempts@8 {
|
||||||
|
reg = <0x8 0x4>;
|
||||||
|
type = "uint32";
|
||||||
|
default = <0>;
|
||||||
|
};
|
||||||
|
priority@c {
|
||||||
|
reg = <0xc 0x4>;
|
||||||
|
type = "uint32";
|
||||||
|
default = <10>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
last_chosen@10 {
|
||||||
|
reg = <0x10 0x4>;
|
||||||
|
type = "uint32";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fragment@3 {
|
||||||
|
target-path = "/aliases";
|
||||||
|
__overlay__ {
|
||||||
|
state = "/state";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
BIN
fdt/rpi-dwc.dtbo
BIN
fdt/rpi-dwc.dtbo
Binary file not shown.
@ -1,23 +0,0 @@
|
|||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2708";
|
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&usb>;
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
__overlay__ {
|
|
||||||
compatible = "brcm,bcm2835-usb";
|
|
||||||
reg = <0x7e980000 0x10000>;
|
|
||||||
interrupts = <1 9>;
|
|
||||||
dr_mode = "otg";
|
|
||||||
g-np-tx-fifo-size = <32>;
|
|
||||||
g-rx-fifo-size = <256>;
|
|
||||||
g-tx-fifo-size = <512 512 512 512 512 256 256>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
BIN
fdt/rpi-v3d.dtbo
BIN
fdt/rpi-v3d.dtbo
Binary file not shown.
108
fdt/rpi-v3d.dtso
108
fdt/rpi-v3d.dtso
@ -1,108 +0,0 @@
|
|||||||
/dts-v1/;
|
|
||||||
/plugin/;
|
|
||||||
|
|
||||||
/ {
|
|
||||||
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&i2c2>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@1 {
|
|
||||||
target = <&fb>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "disabled";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@2 {
|
|
||||||
target = <&pixelvalve0>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x2 0xd>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@3 {
|
|
||||||
target = <&pixelvalve1>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x2 0xe>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@4 {
|
|
||||||
target = <&pixelvalve2>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x2 0xa>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@5 {
|
|
||||||
target = <&hvs>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x2 0x1>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@6 {
|
|
||||||
target = <&hdmi>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x2 0x8 0x2 0x9>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@7 {
|
|
||||||
target = <&v3d>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
interrupts = <0x1 0xa>;
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@8 {
|
|
||||||
target = <&vc4>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@9 {
|
|
||||||
target-path = "/soc/dma";
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
brcm,dma-channel-mask = <0x7f35>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@10 {
|
|
||||||
target = <&clocks>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
claim-clocks = <0x22 0x23 0xf 0x10>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
fragment@11 {
|
|
||||||
target = <&vec>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -8,9 +8,3 @@ cp -f fdt/barebox-state-efi.dtb buildroot-external/board/ova/
|
|||||||
dtc -@ -I dts -O dtb -o fdt/barebox-state-rpi.dtbo fdt/barebox-state-rpi.dtso
|
dtc -@ -I dts -O dtb -o fdt/barebox-state-rpi.dtbo fdt/barebox-state-rpi.dtso
|
||||||
cp -f fdt/barebox-state-rpi.dtbo buildroot-external/board/rpi2/barebox-env/overlay/
|
cp -f fdt/barebox-state-rpi.dtbo buildroot-external/board/rpi2/barebox-env/overlay/
|
||||||
|
|
||||||
dtc -@ -I dts -O dtb -o fdt/rpi-v3d.dtbo fdt/rpi-v3d.dtso
|
|
||||||
#cp -f fdt/rpi-v3d.dtbo buildroot-external/board/rpi2/barebox-env/overlay/
|
|
||||||
|
|
||||||
dtc -@ -I dts -O dtb -o fdt/rpi-dwc.dtbo fdt/rpi-dwc.dtso
|
|
||||||
#cp -f fdt/rpi-dwc.dtbo buildroot-external/board/rpi2/barebox-env/overlay/
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user