![](/img/trans.png)
[英]Linux kernel fails to detect rootfs from SD card while booting
[英]Kernel and Rootfs booting through tftp
任務:加載內核和rootfs映像並執行到ram中,而不存儲到spi閃存中
我加載了可刷新圖像(zimage位於0x200000)和可刷新rootfs(jffs2位於0x200000 + offset)
tftp zimage 0x200000
tftp jffs2 0x200000+offset
bootm 0x200000 0x200000+offset
它給了我這個錯誤:
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "ram0" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 256 mtdblock0 (driver?)
1f01 256 mtdblock1 (driver?)
1f02 2048 mtdblock2 (driver?)
1f03 13824 mtdblock3 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
有時:錯誤的魔術數
任何幫助將不勝感激
@鋸末,你是對的。 jffs2不能像initrd或initramfs一樣在RAM中使用。
我成功地將兩個圖像都加載到ram上,並基於EXT2文件系統執行到ram本身上。
Bootargs: setenv bootargs root=/dev/ram0 console=ttyMCS mem=64M@0x0 init=/bin/sh
根據您在評論使用中提供的bootargs
root=/dev/ram0 rootfstype=jffs2 rw initrd=0x200000+offset,16M console=ttyMCS mem=64M@0x0
這里的XM是initrd的大小,如果是8 MB,則給出8M
您尚未在啟動命令中提供initrd的偏移量,因為該內核找不到ramdisk映像,並且not syncing: VFS:
只需添加initrd=0x200000+offset,16M
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.