看过本站nakanoyip关于使用bsp的dtb和zimage替换荔枝派主线sd卡启动成功,由于信息不全仍旧没能走通;
然后我直接采用了全志官方的一套配置了sd驱动,制作出.img包用PhoenixCard软件制作卡启动包发现能够成功跑到kernel的末尾段,对比应该就在挂载文件系统前后崩掉,已经成功识别sd卡,路过大神可有方案
部分打印如下
[ 1.763009] sunxi-mmc 1c0f000.sdmmc: SD/MMC/SDIO Host Controller Driver(v0.30 2015-10-10 10:03) C9
[ 1.776484] sunxi-mmc 1c0f000.sdmmc: Can't get vmmc regulator string
[ 1.783543] sunxi-mmc 1c0f000.sdmmc: Can't get vqmmc regulator string
[ 1.790772] sunxi-mmc 1c0f000.sdmmc: Can't get vdmmc regulator string
[ 1.797971] sunxi-mmc 1c0f000.sdmmc: Failed getting OCR mask: 0
[ 1.805228] sunxi-mmc 1c0f000.sdmmc: *******************set host ocr**************************
[ 1.815323] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACB
[ 1.844334] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing B
[ 1.874419] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0000
[ 1.880606] hub 1-0:1.0: hub_suspend
[ 1.884888] sunxi-mmc 1c0f000.sdmmc: base:0xf1c0f000 irq:106
[ 1.891200] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 52, RTO !!
[ 1.898138] usb usb1: bus auto-suspend, wakeup 1
[ 1.903299] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 52, RTO !!
[ 1.910197] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing B
[ 1.922668] usbcore: registered new interface driver usbhid
[ 1.928944] usbhid: USB HID core driver
[ 1.936110] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 21 width 1 timing B
[ 1.948146] TCP: cubic registered
[ 1.951830] Initializing XFRM netlink socket
[ 1.956706] NET: Registered protocol family 17
[ 1.961941] VFP support v0.3: not present
[ 1.968901] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 5, RTO !!
[ 1.976227] [LCD]
[ 1.978337] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 5, RTO !!
[ 1.985305] lcd_module_init
[ 1.989586] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 5, RTO !!
[ 2.008727] sunxi-mmc 1c0f000.sdmmc: smc 0 p0 err, cmd 5, RTO !!
[ 2.018623] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing B
[ 2.033918] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing B
[ 2.048174] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing B
[ 2.081852] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 2.092831] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 400000Hz bm PP pm ON vdd 16 width 1 timing B
[ 2.104495] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 16 width 1 timinB
[ 2.116441] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 16 width 4 timinB
[ 2.128258] mmc0: new high speed SDHC card at address 0001
[ 2.135393] mmcblk0: mmc0:0001 SD8GB 7.27 GiB
[ 2.142617] mmcblk0: p1 p2 p3 < p5 p6 p7 >
[ 2.586863] BSP_disp_layer_set_para: fb_format=0x0, yuv_ch=0
[ 2.635653] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 2.643067] async_waiting @ 1
[ 2.646498] async_continuing @ 1 after 2 usec
[ 2.651832] Freeing unused kernel memory: 124K (c04a3000 - c04c2000)
[ 2.689194] Unable to handle kernel paging request at virtual address 001f001b
[ 2.697336] pgd = c1494000
[ 2.700340] [001f001b] *pgd=81484831, *pte=00000000, *ppte=00000000
[ 2.707374] Internal error: Oops: 1 [#1] ARM
[ 2.712096] Modules linked in:
[ 2.715495] CPU: 0 PID: 38 Comm: mount Not tainted 3.10.65 #28
[ 2.721957] task: c16b22a0 ti: c1486000 task.ti: c1486000
[ 2.727959] PC is at __d_lookup_rcu+0x58/0x11c
[ 2.732897] LR is at lookup_fast+0x44/0x26c
[ 2.737536] pc : [<c00a45a0>] lr : [<c009ad88>] psr: 20000013
[ 2.737536] sp : c1487da0 ip : c1487de8 fp : c1487de4
[ 2.750242] r10: c1487dec r9 : 00000003 r8 : 002968b1
[ 2.756025] r7 : c1487eb8 r6 : c1401088 r5 : 001f001f r4 : 001f0017
[ 2.763248] r3 : 001f001f r2 : 001f001f r1 : 00000014 r0 : c1401088
[ 2.770475] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 2.778371] Control: 0005317f Table: 81494000 DAC: 00000015
[ 2.784728]
[ 2.784728] PC: 0xc00a4520:
[ 2.789451] 4520 e1a01000 e50b0020 e1a00005 ebffd556 e24b1014 e5210010 e1a00004 ebffffda
[ 2.798547] 4540 e24bd014 e89da830 e1a0c00d e92ddff0 e24cb004 e24dd01c e50b3038 e5913008
[ 2.807642] 4560 e1c180d0 e1a07001 e59f10ec e1a0a002 e50b3030 e08822a0 e59f30e0 e0020291
[ 2.816738] 4580 e5931004 e5933000 e2611020 e1a02132 e1a06000 e7935102 e50b9034 ea000027
[ 2.825829] 45a0 e5943004 e5942010 e1520006 1a000022 e594200c e3520000 0a00001f e3c33001
[ 2.834922] 45c0 e58a3000 e5962000 e3120002 0a00000c e5942018 e1520008 1a000017 e1a00006
[ 2.844013] 45e0 e51b1038 e1a02004 e58d7000 ebfff982 e3500000 0a000015 e3500001 1affffe7
[ 2.853101] 4600 ea00000d e1c421d8 e1530009 01520008 1a000009 e5941020 e51b2030 e51b3034
[ 2.862199]
[ 2.862199] LR: 0xc009ad08:
[ 2.866920] ad08 e24bd018 e89da870 e1a0c00d e92dd830 e24cb004 e1a04000 e1a05001 e5900004
[ 2.876006] ad28 eb0023e3 e5940000 e5953000 e1500003 089da830 eb003cdf e89da830 e1a0c00d
[ 2.885100] ad48 e92ddff0 e24cb004 e24dd00c e5903024 e1a05001 e3130040 e1a04000 e1a07002
[ 2.894186] ad68 e590a000 e5906004 e2801008 0a000051 e1a00006 e24b2030 e5943020 eb0025ef
[ 2.903276] ad88 e2508000 0a000041 e5983028 e5873000 e51b3030 e5982004 e1520003 1a000075
[ 2.912368] ada8 e5962004 e5943028 e1520003 1a000071 e51b3030 e5843028 e5983000 e3130004
[ 2.921456] adc8 03a06001 0a000009 e5983058 e5941024 e5933000 e12fff33 e2506000 ca000003
[ 2.930549] ade8 e376000a 13a09000 03a09001 ea00002b e585a000 e5858004 e5950004 e5903000
[ 2.939638]
[ 2.939638] SP: 0xc1487d20:
[ 2.944360] 7d20 000200da c05614f0 c1487d9c c1487d38 c1487d5c c00a45a0 20000013 ffffffff
[ 2.953449] 7d40 c1487d8c 002968b1 c1487de4 c1487d58 c000f538 c000a1a0 c1401088 00000014
[ 2.962540] 7d60 001f001f 001f001f 001f0017 001f001f c1401088 c1487eb8 002968b1 00000003
[ 2.971628] 7d80 c1487dec c1487de4 c1487de8 c1487da0 c009ad88 c00a45a0 20000013 ffffffff
[ 2.980717] 7da0 c1487dbc c1487db0 c009b210 c1400128 00000003 c181b011 c009b270 c1487eb0
[ 2.989807] 7dc0 c1487e30 c1401088 c1487e38 c16ddca0 00000000 c18200b0 c1487e1c c1487de8
[ 2.998899] 7de0 c009ad88 c00a4558 c009bb80 c003f974 c148c264 c1487eb0 00000041 c181b010
[ 3.007987] 7e00 00000051 c16ddca0 00000000 00000000 c1487e5c c1487e20 c009be90 c009ad54
离线
[ 2.081852] mmc0: host does not support reading read-only switch. assuming write-enable.这个我在内核配置始终没找到相关能配读写的地方,把ext系列文件系统支持添上也没用
离线
│ │ [-] Initial RAM filesystem and RAM disk (initramfs/initrd) support │ │
│ │ (/home/mengh/work-sdk/allwinner/c600/linux-3.10/rootfs_32bit.cpio.gz) Initramfs source file(s) │ │
│ │ (0) User ID to map to 0 (user root) │ │
│ │ (0) Group ID to map to 0 (group root) │ │
│ │ [-] Support initial ramdisks compressed using gzip │ │
│ │ [ ] Support initial ramdisks compressed using bzip2 │ │
│ │ [ ] Support initial ramdisks compressed using LZMA │ │
│ │ [ ] Support initial ramdisks compressed using XZ │ │
│ │ [ ] Support initial ramdisks compressed using LZO │ │
│ │ Built-in initramfs compression mode (Gzip) ---> │ │
│ │ [-] Optimize for size
我像这样配置的,啥反应都没了~~
之前用的naka的配置:bootargs=earlyprintk console=tty0 console=ttyS0,115200 panic=5 rootwait rootfstype=ext4 root=/dev/mmcblk0p2 rw rootflags=noload init=/linuxrc
这个在spi上是可以直接跑到shell的,一样的文件系统
把根文件系统放 spi flash上, 或者用 initramfs, 启动后看能否能挂载 TF 卡的根文件系统:
mount /dev/mmcXXX /mnt/YYY
离线
@晕哥 我的spi和sd在两个板子上焊坏了没办法,不过我把initramfs配置取消后反而离成功更近了感觉
[ 1.345576] sunxi-mmc 1c0f000.sdmmc: sdc set ios: clk 50000000Hz bm PP pm ON vdd 16 width 4 timing SD-HS(SDR25) dt B
[ 1.357506] mmc0: new high speed SDHC card at address 0001
[ 1.364701] mmcblk0: mmc0:0001 SD8GB 7.27 GiB
[ 1.372059] mmcblk0: p1 p2 p3 < p5 p6 p7 >
[ 1.815649] BSP_disp_layer_set_para: fb_format=0x0, yuv_ch=0
[ 1.864539] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 1.875270] List of all partitions:
[ 1.879260] b300 7632384 mmcblk0 driver: mmcblk
[ 1.885349] b301 6955519 mmcblk0p1 00000000-01
[ 1.891315] b302 32768 mmcblk0p2 00000000-02
[ 1.897356] b303 1 mmcblk0p3
[ 1.902234] b305 16384 mmcblk0p5 00000000-05
[ 1.908233] b306 65536 mmcblk0p6 00000000-06
[ 1.914223] b307 524288 mmcblk0p7 00000000-07
[ 1.920149] No filesystem could mount root, tried: ext4
[ 1.926151] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,7)
[ 1.935543] Rebooting in 5 seconds..
我看bsp这边虽然可以通过那个out下的target来替换文件系统,但最后都通过工具做成了.fex在downloaod到板子,这里的文件系统格式什么的是不是不匹配呢
离线
这问题昨天已经结了,记录下给路过的朋友填下坑,问题其实也就出在文件系统的正确性和存在性上,第一之前我配的ramfs并没有对,导致内核崩溃,之后直接取消了反而发现能挂了只是像7楼上的没找到文件系统,只认到了分区;基于这个问题跑去折腾全志的pack一通,基本确定就是pack出来的.img里面其实根本就没有对应的rootfs,所以在制作sd启动卡的时候自然对应位置就没有了,所以会找不到,中途冒了一些分区的离奇问题,最后通过做sd卡启动包后再自己制作个ext4的文件系统直接dd进sd卡的对应分区,成功挂载
离线
制作的sd卡img不带rootfs要自己再dd,目前还有个问题,挂载的文件系统是readonly的,按照提示打开内核LBDAF配置无效,我在env加rw又会识别不了文件系统,路过大神支个招
离线
@ippen,传了几次不成功,我发你邮箱吧
离线
玩不转,文件上传不了,邮箱只能发字,:(
离线
已发!
asdf 说:@ippen,传了几次不成功,我发你邮箱吧
邮箱: 85572144@qq.com ,谢谢
离线
已发!
mount查看/是ro状态
# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (ro,relatime,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=28548k,nr_inodes=7137,mode=755)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
sysfs on /sys type sysfs (rw,relatime)
asdf 说:玩不转,文件上传不了,邮箱只能发字,:(
发我邮箱吧,我传上来. 516333132@qq.com
离线
注意我把内核debug串口调到PE0,PE1的
离线
对,要用全志的phoenixcard工具烧录的,
asdf 说:注意我把内核debug串口调到PE0,PE1的
上面这个是烧到 TF 卡的 固件?
离线
这个是windows的工具,直接用读卡器就可以了,选卡启动,先恢复再烧录即可
asdf 说:对,要用全志的phoenixcard工具烧录的,
晕哥 说:上面这个是烧到 TF 卡的 固件?
请教如何配置,才会烧到TF卡,默认是烧到 spi flash 吧?
离线
文件系统只读的解决办法找到,首先要在内核配置block layer那儿打开2TB+那个选项,然后再进入shell后最开始还是只读的,需要从新挂载下就可以了,mount -o remount,rw /dev/root / 但是我fstab明明指定的rw为何不生效呢
离线
对的,spi 和sd都是可以烧录的,我是分别各用的一个烧录软件,都是全志官方的,ext4文件系统是缺失的,要自己dd
ippen 说:晕哥 说:接上串口,可以看到log的, 通过usb把 u-boot下载到 dram里面跑,然后通过u-boot烧写的。
家里的电脑上的phoenixsuit可以烧,可以明确的是,如果没有spiflash,会烧到sd卡上
那打包的img文件里面有至少两个根文件系统 squadfs和ext4?
发现是哪种介质就用哪个文件系统?
离线
PhoenixCard_V310_20130618 这个软件你们没用过?专门烧sd的,不是用phoenixsuit哦
离线
应该是的吧,全志那一套pack 机制多繁杂的,反正我看nor和常规linux mmc分区都有使用到的,nor的roofs是在里面的,mmc的应该是没有但框架建好了的
PhoenixCard_V310_20130618 这个我有,原理是藏了多个 rootfs 到 img 文件吗?
离线
刚周末浪回来,不知各位sd验证得如何咯,你们有没有尝试在烧录img之后不再额外dd文件系统地方法,就是pack的时候直接把自己做的ext4文件系统打进img烧录包的,这样会方便很多,这个估计得琢磨下bsp的那一套逻辑
离线
pack会刷新 c600/tools/pack/out 下的一堆文件,其中文件系统相关的这两个链接:
rootfs.fex -> /home/xxx/c600/out/sunivw1p1/linux/common/rootfs.ext4
rootfs_squashfs.fex -> /home/xxx/c600/out/sunivw1p1/linux/common/rootfs.squashfs
我尝试替换过rootfs.squashfs,登录之后验证是可行地,但替换rootfs.ext4则不生效,在tools/pack/下的pack脚本没有直接看到相关地文件操作,只有上面这两句链接,但是我猜想全志应该是把这套实现好了地,有可能在他哪个闭源地工具里面,有兴趣地朋友一起来研究研究
离线
实际操作函数如下
function do_pack_linux()
{
printf "packing for linux\n"
ln -s ${LICHEE_OUT}/vmlinux.tar.bz2 vmlinux.fex
ln -s ${LICHEE_OUT}/boot.img boot.fex
ln -s ${LICHEE_OUT}/rootfs.ext4 rootfs.fex
# Those files is ready for SPINor.
ln -s ${LICHEE_OUT}/uImage kernel.fex
ln -s ${LICHEE_OUT}/rootfs.squashfs rootfs_squashfs.fex
if [ "x${PACK_SIG}" = "xsecure" ] ; then
do_signature
else
echo "normal"
fi
}
离线
我也是再看,刚刚对比了打包时候地终端打印信息,文件系统操作看来跟这个没关系,在do_finish的那个函数,并且我看在配置dragonboard 平台时他直接只链接了roofs.ext4,说不定是可以打进去的,我没试的还
asdf 说:实际操作函数如下
function do_pack_linux()
{
printf "packing for linux\n"ln -s ${LICHEE_OUT}/vmlinux.tar.bz2 vmlinux.fex
ln -s ${LICHEE_OUT}/boot.img boot.fex
ln -s ${LICHEE_OUT}/rootfs.ext4 rootfs.fex# Those files is ready for SPINor.
ln -s ${LICHEE_OUT}/uImage kernel.fex
ln -s ${LICHEE_OUT}/rootfs.squashfs rootfs_squashfs.fexif [ "x${PACK_SIG}" = "xsecure" ] ; then
do_signature
else
echo "normal"
fi
}这个是pack 命令后面跟的参数不同吧?
离线
你们用这种方法烧到卡上能启动不?需要怎样地额外配置才行呢
晕哥 说:ippen 说:我记得好像用phoenixsuit ,如果没有spiflash,会选择mmc卡,不过不知道为啥今天phoenixsuit用不了,一直超时
接上串口,可以看到log的, 通过usb把 u-boot下载到 dram里面跑,然后通过u-boot烧写的。
家里的电脑上的phoenixsuit可以烧,可以明确的是,如果没有spiflash,会烧到sd卡上
离线