繁体   English   中英

内核和Rootfs通过tftp引导

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM