This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM625:can't boot with ubi filesystem

Guru**** 2539500 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1239703/am625-can-t-boot-with-ubi-filesystem

器件型号:AM625

我们将   在 AM62x 客户电路板上测试从 NOR 闪存启动。 我们将映像、dtb、ubifs 烧录 到闪存、配置的 uboot 参数和 Linux 器件树。 但启动后报告了以下错误。

我发现当内核启动时、闪存不会根据指定的分区进行偏离。  它 只有两个分区(data0和 data1), 这不是我们想要的。

我们在 Linux 器件树中的配置如下所示:

&ospi0 {
	spi_nor_flash: flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0x0>;
		spi-tx-bus-width = <4>;
		spi-rx-bus-width = <4>;
		spi-max-frequency = <25000000>;
		cdns,tshsl-ns = <60>;
		cdns,tsd2d-ns = <60>;
		cdns,tchsh-ns = <60>;
		cdns,tslch-ns = <60>;
		cdns,read-delay = <4>;
		cdns,phy-mode;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "tiboot3";
				reg = <0x0 0x80000>;
			};

			partition@80000 {
				label = "tispl";
				reg = <0x80000 0x200000>;
			};

			partition@280000 {
				label = "u-boot";
				reg = <0x280000 0x400000>;
			};

			partition@680000 {
				label = "env";
				reg = <0x680000 0x40000>;
			};

			partition@6c0000 {
				label = "env.backup";
				reg = <0x6c0000 0x40000>;
			};

			partition@700000 {
				label = "fdt";
				reg = <0x700000 0x20000>;
			};

			partition@720000 {
				label = "kernel";
				reg = <0x720000 0x1400000>;
			};

			partition@1b20000 {
				label = "system";
				reg = <0x1b20000 0x5ea0000>;
			};

			partition@79c0000 {
				label = "app";
				reg = <0x79c0000 0x5000000>;
			};

			partition@c9c0000 {
				label = "datalog";
				reg = <0xc9c0000 0x2b00000>;
			};

			partition@f4c0000 {
				label = "syslog";
				reg = <0xf4c0000 0xb00000>;
			};

			partition@ffc0000 {
				label = "phypattern";
				reg = <0xffc0000 0x40000>;
			};
		};
	};
};

uboot 参数 如下所示

请帮助查看此配置是否正常,以及如何装入此子集?

此致、  

斯蒂芬

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Stephen:

    该项目基于哪个 SDK 版本?

    您的"台式部件"ENV 变量在 U-Boot 中是什么样子的?

    此致、Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

    SDK 是  ti-processor-sdk-linux-am62xx-evm-08.06.00.42

    linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538 u-boot-2021.01+gitAUTOINC+1c0d06c606-g1c0d06c606  

    mtdparts env 是"env set mtdparts nor0:512k (tiboot3)、2M (tispl)、4M (u-boot)、256K (env)、256K (env.backup)、128K (Fdt)、20M (内核)、0x5ea0000 (system)、80M (app)、43M (datalogn (syslog)、11K (phatr)"

    我们还在配置中添加了 ubi 支持、

    Uboot config
    CONFIG_CMD_UBI
    CONFIG_CMD_UBIFS
    CONFIG_MTD_UBI=y
    CONFIG_MTD_UBI_WL_THRESHOLD=4096
    CONFIG_MTD_UBI_BEB_LIMIT=20
    
    Kernel config
    CONFIG_MTD_UBI=y
    CONFIG_MTD_UBI_WL_THRESHOLD=4096
    CONFIG_MTD_UBI_BEB_LIMIT=20
    CONFIG_UBIFS_FS=y
    # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set
    CONFIG_UBIFS_FS_LZO=y
    CONFIG_UBIFS_FS_ZLIB=y
    CONFIG_UBIFS_FS_ZSTD=y
    CONFIG_UBIFS_FS_XATTR=y
    CONFIG_UBIFS_FS_SECURITY=y
    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您确认详细信息。 我不知道"data0"和"data1"分区是如何创建的/它们来自何处、而不是您真正想要的分区。 您是否还可以运行以下3条命令并报告返回输出(电路板的输出仅作为参考-请忽略)。

    # cat /proc/cmdline
    console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 mtdparts=fc40000.spi.0:1m(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);omap2-nand.0:2m(NAND.tiboot3),2m(NAND.tispl),2m(NAND.tiboot3.backup),4m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup),-(NAND.file-system) root=PARTUUID=00000000-02 rw rootfstype=ext4 rootwait
    # zcat /proc/config.gz | grep CONFIG_MTD_CMDLINE_PARTS
    CONFIG_MTD_CMDLINE_PARTS=y
    # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00100000 00040000 "ospi.tiboot3"
    mtd1: 00200000 00040000 "ospi.tispl"
    mtd2: 00400000 00040000 "ospi.u-boot"
    mtd3: 00040000 00040000 "ospi.env"
    mtd4: 00040000 00040000 "ospi.env.backup"
    mtd5: 037c0000 00040000 "ospi.rootfs"
    mtd6: 00040000 00040000 "ospi.phypattern"

    此致、Andreas

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Andreas:

    很抱歉回复延迟。 几天前我们有一个假期。

    在我将 mtdparts 中的"nor0"更改为"fc4000.spi.0"后、MTD 分区是正常的。

    NO0只能用于 uboot、fc4000.spi.0用于 Linux。

    此致、

    斯蒂芬