Re: State Framework and dtb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-03-31 10:02 GMT+03:00 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>:
> On Fri, Mar 31, 2017 at 09:54:56AM +0300, Çağlar Kilimci wrote:
>> Hello,
>>
>> > I should have never implemented this freeing of the stored device tree.
>> > There are too many pointers in the code to nodes of this tree. Please
>> > do not use this free/load device tree feature for state.
>>
>> Sure, I usually avoid using it. Here I use to test it if it is able to
>> read the dtb or not? Apparently, it "can" read and parse it but at the
>> boot stage, it does not care.
>>
>> > So you edited
>> > the devicetree in the barebox source code, built a new binary with it
>> > and started it. Now when you enter "of_dump /state@0" you should
>> > see the state node you created. Is that what happens?
>>
>> No, not at all. I could not any sign of state (or state@0).
>> barebox@Phytec phyCORE AM335x:/ of_dump /state@0
>> Cannot find nodepath /state@0
>> of_dump: No such file or directory
>
> Ok, here's your problem. I assume you edited
> arch/arm/dts/am335x-phytec-phycore-som.dts, right? Could you send the
> diff to that file (or to the one you edited)? There must be something
> wrong here.

Actually, I was using arch/arm/boot/dts/am335x-phycore-som.dtsi in the
linux-ti kernel and the diff is:
diff --git a/arch/arm/boot/dts/am335x-phycore-som.dtsi
b/arch/arm/boot/dts/am335x-phycore-som.dtsi
index 58e69f1..d8ae841 100644
--- a/arch/arm/boot/dts/am335x-phycore-som.dtsi
+++ b/arch/arm/boot/dts/am335x-phycore-som.dtsi
@@ -43,6 +43,27 @@
                        regulator-always-on;
                };
        };
+
+       state: state@0 {
+               magic = <0x27031993>;
+               compatible = "barebox,state";
+               backend-type = "dtb";
+               backend = <&state_partition>;
+
+               foo {
+                       reg = <0x00 0x4>;
+                       type = "uint32";
+                       default = <0x0>;
+               };
+
+               bar {
+                       reg = <0x10 0x4>;
+                       type = "enum32";
+                       names = "baz", "qux";
+                       default = <1>;
+               };
+       };
+
 };

 /* Crypto Module */
@@ -131,6 +152,9 @@
                pagesize = <32>;
                reg = <0x52>;
                status = "disabled";
+               state_partition: partition@1000 {
+                       reg = <0x1000 0x2000>;
+               };
        };

        i2c_rtc: rtc@68 {

Let me edit "arch/arm/dts/am335x-phytec-phycore-som.dts" and try it.

-- 
Çağlar Kilimci

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux