前段时间的几个bug
进入四月后,忙的晕头转向。刚好今天方便,就把前段时间调试中遇到的几个bug记下来。
其实,事后会觉得都没啥技术含量,但逐个解决的过程对我这种菜鸟来说很有意义。
一、开发板无法加载Kernel
现象:
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Error: unrecognized/unsupported machine ID (r1 = 0x00000000).
Available machine support:
ID (hex) NAME
ffffffff Generic DT based system
ffffffff Freescale i.MX6 Quad/DualLite (Device Tree)
ffffffff Freescale i.MX6 SoloLite (Device Tree)
ffffffff Freescale i.MX6 SoloX (Device Tree)
ffffffff Freescale i.MX6 Ultralite (Device Tree)
ffffffff Freescale i.MX7 Dual (Device Tree)
ffffffff Freescale i.MX50 (Device Tree Support)
ffffffff Freescale i.MX53 (Device Tree Support)
ffffffff Freescale Vybrid VF5xx/VF6xx (Device Tree)
Please check your kernel config and/or bootloader.
原因:
bootz命令会用到三个地址参数,格式: bootz kernel_address initrd_address dtb_address
对用不到的地址,使用“-”来替代。在我的命令中,我把initrd_address改成了“-”,但是“-”前后其实是有个空格“ ”来进行分隔,但却漏掉了,才导致了上述报错。
二、无法加载rootfs
现象:
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100 65536 ram0 (driver?)
......
1f00 524288 mtdblock0 (driver?)
b300 7761920 mmcblk0 driver: mmcblk
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
原因:
这个虽然解决了,但并不知道详细原因。
我使用的是正点原子的Mini Linux开发板,只有一个网口。在uboot下print,其中ethact和ethprime两个值分别是FEC和FEC1,所以对应的bootargs中<device>的配置我就填写了FEC,但此设置不能启动。后来按照开发指南中改成eth0,问题解决。搞不清楚。
三、Uboot加载卡顿
现象:
Loading: #################################################################
........
#################################################################
##T T T T T T T T T
done
Bytes transferred = 5667168 (567960 hex)
原因:
最初加载速度一直是正常的,但不知道怎么回事儿,就出现了上述的现象。在加载的后半段,会很慢。
后来参考网友的方案(https://blog.csdn.net/rookie_wei/article/details/40393921),修改虚拟机hosts文件就解决了。Linux果然很神奇。
浙公网安备 33010602011771号