|
设备树修改Nand和分区
要点1,要适配内核,5.0的内核,需要修改nand控制器的兼容属性为
- compatible = "altr,socfpga-denali-nand";
复制代码
要点2,添加分区信息
- partition@reserved {
- label = "reserved";
- reg = <0x0 0x300000>;
- };
-
- partition@dtb {
- label = "dtb";
- reg = <0x300000 0x100000>;
- };
-
- partition@kernel {
- label = "kernel";
- reg = <0x400000 0x600000>;
- };
-
- partition@rbf {
- label = "rbf";
- reg = <0xA00000 0x600000>;
- };
-
- partition@rootfs {
- label = "rootfs";
- reg = <0x1000000 0x1F000000>;
- };
复制代码
修改好的设备树为:
- hps_0_nand0: flash@0xff900000{
- compatible = "altr,socfpga-denali-nand";
- reg = <0xff900000 0x00010000>,
- <0xffb80000 0x00010000>;
- reg-names = "nand_data", "denali_reg"; /* embeddedsw.dts.params.reg-names type STRING */
- interrupt-parent = <&hps_0_arm_gic_0>;
- interrupts = <0 144 4>;
- clocks = <&nand_clk>;
- #address-cells = <1>; /* embeddedsw.dts.params.#address-cells type NUMBER */
- #size-cells = <1>; /* embeddedsw.dts.params.#size-cells type NUMBER */
- status = "okay"; /* embeddedsw.dts.params.status type STRING */
- bank-width = <2>;
- device-width = <1>;
-
- partition@reserved {
- label = "reserved";
- reg = <0x0 0x300000>;
- };
-
- partition@dtb {
- label = "dtb";
- reg = <0x300000 0x100000>;
- };
-
- partition@kernel {
- label = "kernel";
- reg = <0x400000 0x600000>;
- };
-
- partition@rbf {
- label = "rbf";
- reg = <0xA00000 0x600000>;
- };
-
- partition@rootfs {
- label = "rootfs";
- reg = <0x1000000 0x1F000000>;
- };
- }; //end flash@0xff900000 (hps_0_nand0)
复制代码
如果不修改,报错信息大概如下,意思是说挂不上文件系统,原因是因为nand挂不上。
|
|