State Framework and dtb

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

 



Hi all,

Previously, I ask for a help [1] and thankfully Sascha replied with
helpful comments then I have tried many dts configurations but I still
could not run state framework.

My main goal is to update a system using RAUC [2] so I need state
framework of barebox. I would like to use EEPROM as a storage device
for barebox state. Here is an example dts that I think, it should have
work:
state: state@0 {
  magic = <0x27031977>;
  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>;
  };
};
i2c_eeprom: eeprom@52 {
  compatible = "atmel,24c32";
  pagesize = <32>;
  reg = <0x52>;
  state_partition: partition@1000 {
    reg = <0x1000 0x2000>;
  };
};

If I try to load manually, I can observe in the of_dump:
        state@0 {
                magic = <0x27031977>;
                compatible = "barebox,state";
                backend-type = "dtb";
                backend = "/ocp/i2c@44e0b000/eeprom@52/partition@1000";
                foo {
                        reg = <0x0 0x4>;
                        type = "uint32";
                        default = <0x0>;
                };
                bar {
                        reg = <0x10 0x4>;
                        type = "enum32";
                        names = "baz", "qux";
                        default = <0x1>;
                };
        };

But, if I try to probe, device reboots:
barebox@Phytec phyCORE AM335x:/ oftree -p
register_device: already registered 40300000.ocmcram
unable to handle paging request at address 0x70636f2f
pc : [<8ff35694>]    lr : [<8ff2c875>]
sp : 8ffef800  ip : 00000000  fp : 8ff67bdb
r10: 00000000  r9 : 00000002  r8 : 00000000
r7 : 880ec4e0  r6 : 880ec528  r5 : 8ff85268  r4 : 87ff0630
r3 : 0000002f  r2 : 880ec528  r1 : 70636f2f  r0 : 880ec528
Flags: NzCv  IRQs off  FIQs on  Mode SVC_32
[<8ff35694>] (strcmp+0xe/0x16) from [<8ff2c875>]
(of_find_device_by_node_path+0x29/0x34)
[<8ff2c875>] (of_find_device_by_node_path+0x29/0x34) from [<8ff2c893>]
(__of_find_path+0x13/0x88)
[<8ff2c893>] (__of_find_path+0x13/0x88) from [<8ff2c96f>]
(of_find_path+0x5b/0x80)
[<8ff2c96f>] (of_find_path+0x5b/0x80) from [<8ff2a1b7>] (state_probe+0x63/0x128)
[<8ff2a1b7>] (state_probe+0x63/0x128) from [<8ff09d61>] (device_probe+0x21/0x68)
[<8ff09d61>] (device_probe+0x21/0x68) from [<8ff09dcb>] (match.part.0+0x23/0x28)
[<8ff09dcb>] (match.part.0+0x23/0x28) from [<8ff0a1ad>]
(register_device+0xa9/0xcc)
[<8ff0a1ad>] (register_device+0xa9/0xcc) from [<8ff2c6d5>]
(of_platform_device_create+0xd5/0x1ac)
[<8ff2c6d5>] (of_platform_device_create+0xd5/0x1ac) from [<8ff2c7d3>]
(of_platform_bus_create+0x27/0x60)
[<8ff2c7d3>] (of_platform_bus_create+0x27/0x60) from [<8ff2c83b>]
(of_platform_populate+0x2f/0x40)
[<8ff2c83b>] (of_platform_populate+0x2f/0x40) from [<8ff2bd6b>]
(of_probe+0x3f/0x64)
[<8ff2bd6b>] (of_probe+0x3f/0x64) from [<8ff32b91>] (do_oftree+0xf5/0x114)
[<8ff32b91>] (do_oftree+0xf5/0x114) from [<8ff03095>]
(execute_command+0x21/0x48)
[<8ff03095>] (execute_command+0x21/0x48) from [<8ff0712b>]
(run_list_real+0x5a3/0x604)
[<8ff0712b>] (run_list_real+0x5a3/0x604) from [<8ff06a8d>]
(parse_stream_outer+0x105/0x15c)
[<8ff06a8d>] (parse_stream_outer+0x105/0x15c) from [<8ff0734f>]
(run_shell+0x33/0x60)
[<8ff0734f>] (run_shell+0x33/0x60) from [<8ff03095>] (execute_command+0x21/0x48)
[<8ff03095>] (execute_command+0x21/0x48) from [<8ff0712b>]
(run_list_real+0x5a3/0x604)
[<8ff0712b>] (run_list_real+0x5a3/0x604) from [<8ff06e1f>]
(run_list_real+0x297/0x604)

[<8ff53ca1>] (unwind_backtrace+0x1/0x58) from [<8ff00ba9>] (panic+0x1d/0x34)
[<8ff00ba9>] (panic+0x1d/0x34) from [<8ff5412d>] (do_exception+0xd/0x10)
[<8ff5412d>] (do_exception+0xd/0x10) from [<8ff5418d>] (do_data_abort+0x21/0x2c)
[<8ff5418d>] (do_data_abort+0x21/0x2c) from [<8ff53e94>] (do_abort_6+0x48/0x54)

Even if I change backend type as raw, I get the same result. I do not
know what else I can do.

Thank you for your time.

[1] http://lists.infradead.org/pipermail/barebox/2017-March/029590.html
[2] https://rauc.readthedocs.io/en/latest/index.html

-- 
Ç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