如何为nand flash创建裸盒状态

问题描述 投票:0回答:1

我在裸机状态下遇到问题。当第一阶段引导加载程序运行时发生错误

"state: state failed to parse path to backend: No such device"

在内核中,当我运行裸机状态时,它会给出错误

"Neither /aliases/state nor /state found".

我正在裸机设备树中添加一个状态节点。

state: state {
            #address-cells = <1>;
                #size-cells = <1>;
        compatible = "barebox,state";
        magic = <0xab67421f>;
        backend-type = "raw";
        backend = <&state_part>;
        backend-storage-type = "circular";

        bootstate {
        system0 {
            remaining_attempts@0 {
            reg = <0x0 0x4>;
            type = "uint32";
            default = <3>;
            };
            priority@4 {
            reg = <0x4 0x4>;
            type = "uint32";
            default = <20>;
            };
        };

        system1 {
            remaining_attempts@8 {
            reg = <0x8 0x4>;
            type = "uint32";
            default = <3>;
            };
            priority@c {
            reg = <0xC 0x4>;
            type = "uint32";
            default = <20>;
            };
        };

        last_chosen@10 {
            reg = <0x10 0x4>;
            type = "uint32";
        };
        };
    };

nand 分区看起来像这样

&gpmc {

  /* ... */

  nand: nand@0,0 {

    /* ... */

    state_part: partition@1c0000 {
      label = "barebox_state";
      reg = <0x1c0000 0x320000>;
    };

    /* ... */

  };

当我为 eeprom 添加此状态时,它工作正常。我不知道是什么问题。我的裸机版本是“”2018.11.0-phy3”,dt-utils版本是“2021.03.0”,内核版本是“linux-mainline_4.14.78-phy4”。

如果有人知道请指导我。预先感谢。

我尝试在 eeprom 中添加状态,它工作正常,但在 nand 的情况下会产生问题。

linux-kernel kernel embedded-linux bootloader barebox
1个回答
0
投票

您没有提到您拥有什么 Phytec 板,但如果它是带有 NAND 的 imx6q-phytec-pbab01.dts,则裸箱中的 state 示例最近已更新,以与该板设备树的较新版本兼容。我建议您从上游存储库构建一个裸机并报告您在使用它时遇到的问题。

© www.soinside.com 2019 - 2024. All rights reserved.