
Hi Wolfgang,
You are correct, U-Boot does not load the RAMdisk image since the image is already stored in NOR flash memory. Sorry for my carelessness... Below is the kernel start log, Could you please take a look into it and give my any suggestions? I have the below kernel options enabled, and tried ramdisk in ext2 or cramfs format, CONFIG_RAMFS=y CONFIG_CRAMFS=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_INITRD=y CONFIG_EXT2_FS=y
=> setenv bootargs console=ttyS0,115200 root=/dev/ram0 ro mem=100M => bootm a0800000 a0a00000 ## Booting image at a0800000 ... Image Name: MIPS OpenWrt Linux-2.6.21.7 Created: 2008-12-18 12:32:02 UTC Image Type: MIPS Linux Kernel Image (gzip compressed) Data Size: 1191161 Bytes = 1.1 MB Load Address: 80010000 Entry Point: 8026c000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Loading Ramdisk Image at a0a00000 ... Image Name: Test Ramdisk Image Created: 2008-12-18 16:14:42 UTC Image Type: MIPS Linux RAMDisk Image (gzip compressed) Data Size: 4335780 Bytes = 4.1 MB Load Address: 82010000 Entry Point: 82010000 Verifying Checksum ... OK Starting kernel ...
LINUX started... bl234x_cpu_clock_rate: CPU Clock 383 MHZ OCP 2 perclock 4 bl234x_cpu_clock_rate: CPU Clock 383 MHZ bus clock 47 MHz Get board type: BL2348 evaluation board (Jasmine) CPU clock 383MHz SYSTEM clock 47MHz Linux version 2.6.21.719-g3c500d65-dirty (mikexu@localhost.localdomain) (gcc version 4.1.2) #29 Thu Dec 18 20:31:13 CST 2008 CPU revision is: 0001937cK=|hE ~PugBj(~| |xR~!Linux version 2.6.21.719-g3c500d65-dirty (mikexu@localhost.localdomain) (gcc version 4.1.2) #29 Thu Dec 18 20:31:13 CST 2008 CPU revision is: 0001937c BL2348 Evaluation board (Jasmine) setup Determined physical RAM map: memory: 08000000 @ 00000000 (usable) User-defined physical RAM map: memory: 06400000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Built 1 zonelists. Total pages: 25400 Kernel command line: console=ttyS0,115200 root=/dev/ram0 ro mem=100M Primary instruction cache 16kB, physically tagged, 4-way, linesize 32 bytes. Primary data cache 16kB, 4-way, linesize 32 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). Cache parity protection disabled PID hash table entries: 512 (order: 9, 2048 bytes) Using 191.667 MHz high precision timer. Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 98516k/102400k available (1897k kernel code, 3740k reserved, 514k data, 152k init, 0k highmem) Mount-cache hash table entries: 512 NET: Registered protocol family 16
BLPCI driver initialized : vendor_id=0x5555 device_id=0x1556 version=0x380 type=0x2 revision_id=0x0 class_id=0x400000 registering PCI controller with io_map_base unset Generic PHY: Registered new driver Time: MIPS clocksource has been installed. 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 squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (C) 2001-2006 Red Hat, Inc. io scheduler noop registered (default) Generic RTC Driver v1.07 Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled ttyS0: autoconf (0x0000, 0xaff01000): )J=#eAu2** U$x.Y.ZX6250: ttyS0 at MMIO 0xaff01000 (irq = 116) is a 16550A RAMDISK driver initialized: 16 RAM disks of 12000K size 4096 blocksize loop: loaded (max 8 devices) BL2348 load microcode ver. 6 Runner driver ver. 9 Created eth0 PHY 2 on MAC 0 : link state = 1Gb Full physmap platform flash device: 01000000 at bf000000 physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank Intel/Sharp Extended Query Table at 0x0031 Using buffer write method cfi_cmdset_0001: Erase suspend on write enabled edBoot partition parsing not available IPv4 over IPv4 tunneling driver TCP cubic registered NET: Registered protocol family 1 NET: Registered protocol family 17 No filesystem could mount root, tried: ext2 cramfs squashfs romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Thanks & best regards, Mike
On Wed, Dec 17, 2008 at 11:35 PM, Wolfgang Denk wd@denx.de wrote:
Dear "mike xu",
In message 7103aeea0812170706p3e1fa7cby7093a87d4d01eb6f@mail.gmail.com you wrote:
I am using u-boot 1.2.0 and tried to boot kernel with one ramdisk, but it seems the u-boot doesn't load my ramdisk image at all. Please view
This is correct. U-Boot does not load the RAMdisk image - why should it? If the image is stored in NOR flash memory, the kernel can read it there as well, so copying it to RAM before starting Linux would be just a waste of boot time.
U-Boot just passes tha ramdisk address to the Linux kernel - assuming your ports of U-Boot and Linux for your MIPS board support this correctly.
Are there any special requirement of the ramdisk format for u-boot? I used mips mkimage command as below and both of the ramdisk.gz in ext2 or cramfs format are all failed. mkimage -O linux -A mips -T ramdisk -C gzip -n 'Test Ramdisk Image' -d ramdisk.gz uRamdisk
This is OK. Maybe you are using a kernel version that cannot use a ramdisk image from flash (i. e. it finds it only in RAM, like the vanilla ARM kernel does, too).
Patche sto fix that (for ARM) have been posted several timers before, search the archives if needed.
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de "Data is a lot like humans: It is born. Matures. Gets married to other data, divorced. Gets old. One thing that it doesn't do is die. It has to be killed." - Arthur Miller