AT91SAM9XEK ramdisk 启动笔记

1. 启动下面信息之后系统就挂掉了,没有继续输出信息

Switching to clocksource tcb_clksrc
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd

解决办法:

好吧,是我粗心,不ramdisk的大小设置得太大了,我在 u-boot 这样配置 bootargs 导致了上面的问题

set bootargs root=/dev/ram0 rw ramdisk_size=17912 initrd=0x21100000,64M console=ttyS0,115200n8

把 64M 改为 16M 就好了

2. Ramdisk 挂载失败

Ramdisk 挂载失败,并有类似的下面信息输出:

RAMDISK: gzip image found at block 0
RAMDISK: incomplete write (4485 != 32768)
write error
VFS: Mounted root (ext2 filesystem) on device 1:0.
attempt to access beyond end of device
ram0: rw=0, want=112684, limit=35824
EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=230, block=56341
EXT2-fs (ram0): error: remounting filesystem read-only
devtmpfs: error mounting -5
Freeing init memory: 136K
attempt to access beyond end of device
ram0: rw=0, want=48300, limit=35824
EXT2-fs (ram0): error: ext2_get_inode: unable to read inode block - inode=97, block=24149
EXT2-fs (ram0): error: remounting filesystem read-only
attempt to access beyond end of device

一般是制作 ramdisk 的时候指定的大小太大了,比如用下面的命令制作 ramdisk

genext2fs -b 102400 -d rootfs ramdisk.image

把102400改小一点试试,我是改小之后就解决这个问题了

 

你可能感兴趣的:(amd)