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
离线
离线
感谢楼上的大哥, 从 u-boot bootargs 传入mtdparts 参数, 死活没搞定分区生成.
然后今天修改dts就终于可以生成分区了。
一直纳闷,为什么以前V3s用得好好得bootargs传入mtd现在不行了呢?
离线
你看看调试信息麻,写的很清楚,这个肯定找不到阿,要仔细点。
m25p80 spi0.0: mx25l25635e (32768 Kbytes)
mtdid=<spi32766.0> num_parts=<6>
离线
你看看调试信息麻,写的很清楚,这个肯定找不到阿,要仔细点。
m25p80 spi0.0: mx25l25635e (32768 Kbytes)
mtdid=<spi32766.0> num_parts=<6>
听君一席话, 胜读十年书。
等晕哥打赏功能完成给您在线打赏5元, 先把帐记上。
离线