麻花油条 发表于 2023-1-20 11:26

【MA35D1】如何修改配置让MT29F8G08ABACA NAND可以正常启动

nand flash 8G, page size 4K , 64pages/block, block size 256Kbytes



1、NuWriter:

header-nand.json:

{

    "header":

    {

      "version": "0x20210119",

      "spiinfo":

      {

            "pagesize": "4096",

            "sparearea": "224",

            "pageperblk": "64",

            "quadread": "0x6B",

            "readsts": "0x05",

            "writests": "0x01",

            "stsvalue": "0x02",

            "dummy1": "0",

            "dummy2": "1",

            "suspintvl": "1"

      },

      "secureboot": "no",

      "entrypoint": "0x28000000",

      "aeskey" : "5E76953BF598581F925B7995157844747FABE669ABF000345E0EE21B63624D59",

      "ecdsakey": "5E76953BF598581F925B7995157844747FABE669ABF000345E0EE21B63624D59",

      "image":

      [

            {

            "offset": "0x300000",

            "loadaddr": "0x28023000",

            "type": "3",

            "file": "bl2.dtb"

            },

            {

            "offset": "0x380000",

            "loadaddr": "0x28000000",

            "type": "4",

            "file": "bl2.bin"

            }

      ]

    }

}



pack-nand.json:

{

    "image":

    [

      {

          "offset": "0x000000",

          "file": "header.bin",

          "type": 1

      },

      {

          "offset": "0x300000",

          "file": "bl2.dtb",

          "type": 0

      },

      {

          "offset": "0x380000",

          "file": "bl2.bin",

          "type": 0

      },

      {

          "offset": "0x400000",

          "file": "fip.bin-nand",

          "type": 1

      },

      {

          "offset": "0x600000",

          "file": "uboot-env.bin-nand",

          "type": 1

      },

      {

          "offset": "0x700000",

          "file": "Image.dtb",

          "type": 1

      },

      {

          "offset": "0x800000",

          "file": "Image",

          "type": 1

        },

      {

          "offset": "0x1C00000",

          "file": "rootfs.ubi",

          "type": 1

      }

    ]

}







2、TFA:

ma35d1.dtsi:

        nand: nand@401A0000 {

                compatible = "nuvoton,ma35d1-nand";



                nand-on-flash-bbt;

                /* nand information */

                nand-ecc-strength = <8>;

                nand-ecc-step-size = <512>;

                nand-page-size = <4096>;

                nand-oob-size = <224>;

                nand-page-count = <64>;

                nand-block-count = <4096>;

                nand-image-offset = <0x400000>;

        };



3、uboot:

CONFIG_NAND_BOOT=y

CONFIG_ENV_SIZE=0x100000

CONFIG_ENV_OFFSET=0x600000

CONFIG_MTDPARTS_DEFAULT="mtdparts=nand0:6m(uboot),1m(uboot-env),1m(device-tree),20m(kernel),100m(rootfs)"



4、Linux:

ma35d1.dtsi:



                nand-ecc-strength = <8>;

                nand-ecc-step-size = <512>;

                nand-on-flash-bbt;





                partitions {

                        compatible = "fixed-partitions";

                        #address-cells = <1>;

                        #size-cells = <1>;



                        uboot@0 {

                                label = "nand-uboot";

                                reg = <0x0000000 0x600000>;

                                read-only;

                        };

                        uboot-env@600000 {

                                label = "nand-uboot-env";

                                reg = <0x600000 0x100000>;

                        };

                        device-tree@700000 {

                                label = "nand-device-tree";

                                reg = <0x700000 0x100000>;

                        };

                        kernel@800000 {

                                label = "nand-kernel";

                                reg = <0x800000 0x1400000>;

                        };

                        rootfs@1C00000 {

                                label = "nand-rootfs";

                                reg = <0x1C00000 0x6400000>;

                        };

                };

        };



5、Rootfs:



BR2_TARGET_ROOTFS_UBI_PEBSIZE=0x40000

BR2_TARGET_ROOTFS_UBI_SUBSIZE=4096

BR2_TARGET_ROOTFS_UBIFS_LEBSIZE=0x3E000

BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE=0x1000

BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT=400

Candic12e 发表于 2023-5-19 14:06

确定固件程序配置

Charlene沙 发表于 2023-5-19 15:10

在升级固件程序之前备份代码

Estelle1999 发表于 2023-5-19 16:15

肯定得兼容才能让其正常启动

Emily999 发表于 2023-5-19 17:18

你是换nand的芯片型号了?

Carina卡 发表于 2023-5-19 18:20

估计你需要修改底层的函数才能实现了吧

Charlotte夏 发表于 2023-5-19 19:27

话说MA35D1是啥芯片啊?能驱动MT29F8G08ABACA NAND?

Betty1299 发表于 2023-5-20 07:09

你找个技术支持吧,能快速点的帮你解决

Alina艾 发表于 2023-5-20 08:15

启动不了提示什么啊?

Betty996 发表于 2023-5-20 10:18

你用逻辑分析仪,抓一下时序试试吧

alxd 发表于 2023-5-20 12:40

这个不好查,你看原来用的是那款nand芯片,你换成这个试试
页: [1]
查看完整版本: 【MA35D1】如何修改配置让MT29F8G08ABACA NAND可以正常启动