안녕하세요
이번에 보드위에 램디스크를 올릴려고 하는데 램디스크 인식을
제대로 하지 못하는 것 같아서 질문드립니다
커널설정은 Ramdisk support, Initial Ramdisk support 다 체크했고, 디스크 사이즈도 다 체크했습니다
제가 리눅스 초보라서 어디서부터 접근해야 할지 몰라 질문드립니다
U-Boot 1.1.5 (Nov 7 2006 - 11:07:41)
DRAM: 0 kB
Flash: 64 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
## Booting image at 00007fc0 ...
Image Name:
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1018768 Bytes = 994.9 kB
Load Address: 00007fc0
Entry Point: 00008000
XIP Kernel Image ... OK
## Loading Ramdisk Image at 412c0000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 3840014 Bytes = 3.7 MB
Load Address: 04000000
Entry Point: 04000040
Starting kernel ...
Uncompressing Linux.................................................................... done, booting the kernel.
Linux version 2.6.18.1 (
[email protected]) (gcc version 4.2.3 (Sourcery G++ Lite 2008q1-126)) #50 Thu Oct 9 16:31:49 KST 2008
CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177
Machine: ARM-RealView EB
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 32768
Kernel command line: root=/dev/ram0 rw ramdisk_size=16384 initrd=0x04000000,16M console=ttyAMA0 mem=128M
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 111232KB available (1680K code, 407K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like an initrd
Freeing initrd memory: 16384K
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (double precision)
Installing knfsd (copyright (C) 1996
[email protected]).
io scheduler noop registered
io scheduler deadline registered (default)
CLCD: RealView hardware, VGA display
Clock CLCDCLK: setting VCO reg params: S=1 R=99 V=98
Console: switching to colour frame buffer device 80x30
Serial: AMBA driver $Revision: 1.41 $
Serial: AMBA PL011 UART driver
dev:f1: ttyAMA0 at MMIO 0x10009000 (irq = 44) is a AMBA/PL011
dev:f2: ttyAMA1 at MMIO 0x1000a000 (irq = 45) is a AMBA/PL011
dev:f3: ttyAMA2 at MMIO 0x1000b000 (irq = 46) is a AMBA/PL011
fpga:09: ttyAMA3 at MMIO 0x1000c000 (irq = 47) is a AMBA/PL011
RAMDISK driver initialized: 2 RAM disks of 16384K size 1024 blocksize
eth0: LAN9118 (rev 1) at 0xc8816000 IRQ 60
eth0: Ethernet addr: 08:00:3e:26:0a:5b
block2mtd: version $Revision: 1.30 $
mice: PS/2 mouse device common for all mice
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Ramdisk execute command : /init
prepare_namespace() start
saved root name : /dev/ram0
root_device name : ram0
start initrd_load()
Reading /dev/ram0 -> /init/do_mounts_rd.c 파일에 out_fd = sys_open("/dev/ram0", O_RDWR,0); 바로 위에 출력시키도록 만든 것입니다
그리고 if(out_fd<0) goto out; 밑에 printk 문을 추가시켰었는데, 이 밑부분이 출력이 안된 것으로 보아서, sys_open이 제대로 되지 않은 것 같습니다
No filesystem could mount root, tried: ext2 cramfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
------
알고보니 제가 램디스크 이미지를 메모리에 복사를 안시켜 놓았었네요...
여태까지 했던 방식으로 하면 이미지가 메모리에 자동적으로 올라가는 줄 알고 커널 쪽 보다가 삽질을 많이 했네요..
ramdisk구성에 문제가 있는 듯 하네요.
ramdisk를 만들때는 ramdisk로 만들어진 rootfs를 nfs로 부팅해서
제대로 되는지 확인한 후에 ramdisk로 만들어서 부팅하시기바랍니다.
그럼...