您尚未登录。

楼主 #1 2020-08-22 16:31:59

听风识雨
会员
注册时间: 2020-08-15
已发帖子: 72
积分: 70

A33 主线 Linux4.20, u-boot传入spi flash分区参数, 请教各位网友.

u-boot设置的bootargs:

[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk panic=5 rootwait mtdparts=spi32766.0:320k(uboot),320k(logob),320k(logoa),64k(dtb),5M(kernel),-(rootfs) root=31:5 rw rootfstype=jffs2 init=/linuxrc fbcon=map:1 vt.global_cursor_default=0

没有生成mtd分区:

[    0.953109] printk: console [ttyS0] enabled
[    0.971805] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.980261] libphy: Fixed MDIO Bus: probed
[    0.984377] CAN device driver interface

打开 drivers/mtd/cmdlinepart.c 开启调试信息:

/* debug macro */
#if 1
#define dbg(x) do { printk("DEBUG-CMDLINE-PART: "); printk x; } while(0)
#else
#define dbg(x)
#endif

以下是带调试信息的log, 但是仍然没有生成mtd分区:

[    0.985974] m25p80 spi0.0: mx25l25635e (32768 Kbytes)
[    0.991106] DEBUG-CMDLINE-PART: 
[    0.991115] parsing <320k(uboot),320k(logob),320k(logoa),64k(dtb),5M(kernel),-(rootfs)>
[    1.002381] DEBUG-CMDLINE-PART: 
[    1.002395] partition 5: name <rootfs>, offset ffffffffffffffff, size ffffffffffffffff, mask flags 0
[    1.014769] DEBUG-CMDLINE-PART: 
[    1.014781] partition 4: name <kernel>, offset ffffffffffffffff, size 500000, mask flags 0
[    1.026284] DEBUG-CMDLINE-PART: 
[    1.026296] partition 3: name <dtb>, offset ffffffffffffffff, size 10000, mask flags 0
[    1.037451] DEBUG-CMDLINE-PART: 
[    1.037463] partition 2: name <logoa>, offset ffffffffffffffff, size 50000, mask flags 0
[    1.048809] DEBUG-CMDLINE-PART: 
[    1.048822] partition 1: name <logob>, offset ffffffffffffffff, size 50000, mask flags 0
[    1.060150] DEBUG-CMDLINE-PART: 
[    1.060162] partition 0: name <uboot>, offset ffffffffffffffff, size 50000, mask flags 0
[    1.071490] DEBUG-CMDLINE-PART: 
[    1.071497] mtdid=<spi32766.0> num_parts=<6>
[    1.082344] libphy: Fixed MDIO Bus: probed

离线

#2 2020-08-22 17:25:54

流氓兔
会员
注册时间: 2020-02-01
已发帖子: 121
积分: 109.5

Re: A33 主线 Linux4.20, u-boot传入spi flash分区参数, 请教各位网友.

离线

楼主 #3 2020-08-23 11:57:28

听风识雨
会员
注册时间: 2020-08-15
已发帖子: 72
积分: 70

Re: A33 主线 Linux4.20, u-boot传入spi flash分区参数, 请教各位网友.

感谢楼上的大哥, 从 u-boot bootargs 传入mtdparts 参数, 死活没搞定分区生成.

然后今天修改dts就终于可以生成分区了。

一直纳闷,为什么以前V3s用得好好得bootargs传入mtd现在不行了呢?

离线

#4 2020-08-24 09:41:52

shaoxi2010
会员
注册时间: 2019-06-13
已发帖子: 367
积分: 316

Re: A33 主线 Linux4.20, u-boot传入spi flash分区参数, 请教各位网友.

你看看调试信息麻,写的很清楚,这个肯定找不到阿,要仔细点。
m25p80 spi0.0: mx25l25635e (32768 Kbytes)
mtdid=<spi32766.0> num_parts=<6>

离线

楼主 #5 2020-08-24 10:51:01

听风识雨
会员
注册时间: 2020-08-15
已发帖子: 72
积分: 70

Re: A33 主线 Linux4.20, u-boot传入spi flash分区参数, 请教各位网友.

shaoxi2010 说:

你看看调试信息麻,写的很清楚,这个肯定找不到阿,要仔细点。
m25p80 spi0.0: mx25l25635e (32768 Kbytes)
mtdid=<spi32766.0> num_parts=<6>

听君一席话, 胜读十年书。

等晕哥打赏功能完成给您在线打赏5元, 先把帐记上。

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn