Kernel 2.6 and INITRAMFS in one file booting problem on ml403
Dear All,
I am dealing with kernel 2.6.23 (by Grant) on virtex-4 (ml403 like evaluation board with ppc405 built-in processor). The kernel boots fine by means of u-boot 1.2.0 when using nfs mounted root files system.
My Board has 32MB of RAM memory (0x00000000 - 0x1ffffff)
Right now I wanted to combine the linux kernel and the root file system in one file in order to store it in the Flash memory.
I was able to build sucessfuly the kernel image which conatins the rootfile system. Unfortunately during booting the rootfile system is not recognized.
My linux image with built-in the root fs has 6.7 MB. The uncompressed rootfile system has 17 MB.
Steps which I have done are as following:
On my embedded system I use u-boot 1.2.0
1. I load via tftp the the uImageWithRamFs
tftp 0x1500000 uImageWithRamFs
2. Next I execute the image
bootm 0x1500000
The output is as following:
## Booting image at 01500000 ...
Image Name: Linux-2.6.23-rc2 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6983377 Bytes = 6.7 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK [ 0.000000] Linux version 2.6.23-rc2 (root@pc5215) (gcc version 4.0.2) #13 Thu Sep 20 13:49:26 CEST 2007 [ 0.000000] Xilinx ML403 Reference System (Virtex-4 FX) [ 0.000000] Zone PFN ranges: [ 0.000000] DMA 0 -> 8192 [ 0.000000] Normal 8192 -> 8192 [ 0.000000] Movable zone start PFN for each node [ 0.000000] early_node_map[1] active PFN ranges [ 0.000000] 0: 0 -> 8192 [ 0.000000] Built 1 zonelists in Zone order. Total pages: 8128 [ 0.000000] Kernel command line: console=ttyUL0 root=/dev/ram rw ip=129.118.144.82:129.118.144.113:129.118.144.1:255.255.255.0:virtex4-mirek:eth0:off panic=1 [ 0.000000] Xilinx INTC #0 at 0x41200000 mapped to 0xFDFFF000 [ 0.000000] PID hash table entries: 128 (order: 7, 512 bytes) [ 0.000289] Console: colour dummy device 80x25 [ 0.000615] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.001181] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.009923] Memory: 24304k available (1656k kernel code, 544k data, 5968k init, 0k highmem) [ 0.097097] Mount-cache hash table entries: 512 [ 0.103761] NET: Registered protocol family 16 [ 0.144382] NET: Registered protocol family 2 [ 0.180548] IP route cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.181582] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.181903] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.182122] TCP: Hash tables configured (established 1024 bind 1024) [ 0.182200] TCP reno registered [ 7.835360] io scheduler noop registered [ 7.835446] io scheduler anticipatory registered (default) [ 7.835524] io scheduler deadline registered [ 7.835801] io scheduler cfq registered [ 8.529280] uartlite.0: ttyUL0 at MMIO 0x40600000 (irq = 2) is a uartlite [ 8.530949] console [ttyUL0] enabled [ 10.549186] RAMDISK driver initialized: 2 RAM disks of 16384K size 1024 blocksize [ 10.648123] loop: module loaded [ 10.688195] tun: Universal TUN/TAP device driver, 1.6 [ 10.749201] tun: (C) 1999-2004 Max Krasnyansky <[email protected]> [ 10.825474] XTemac: using FIFO direct interrupt driven mode. [ 10.893905] eth%d: XTemac: PHY detected at address 3. [ 10.956872] eth0: Xilinx TEMAC #0 at 0x81200000 mapped to 0xC3020000, irq=0 [ 11.040788] eth0: XTemac id 1.0f, block id 5, type 8 [ 11.101628] mice: PS/2 mouse device common for all mice [ 11.164837] TCP cubic registered [ 11.203869] NET: Registered protocol family 1 [ 11.256350] NET: Registered protocol family 17 [ 11.813548] eth0: XTemac: Options: 0xb8f2 [ 15.835154] eth0: XTemac: We renegotiated the speed to: 100 [ 15.901906] eth0: XTemac: speed set to 100Mb/s [ 16.985905] IP-Config: Complete: [ 17.022598] device=eth0, addr=129.118.144.82, mask=255.255.255.0, gw=129.118.144.1, [ 17.119958] host=virtex4-mirek, domain=, nis-domain=(none), [ 17.192276] bootserver=129.118.144.113, rootserver=129.118.144.113, rootpath= [ 17.292444] List of all partitions: [ 17.334388] No filesystem could mount root, tried: ext2 msdos vfat [ 17.409805] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) [ 17.509374] Rebooting in 1 seconds..<NULL> [ 18.563180] Oops: Exception in kernel mode, sig: 4 [#1] [ 18.625695] NIP: c07e0000 LR: c085fe70 CTR: c085fee0 [ 18.685072] REGS: c085fdb0 TRAP: 2000000 Not tainted (2.6.23-rc2) [ 18.761190] MSR: 00000f13 <DR> CR: c01ca858 XER: c00e8c80 [ 18.827869] TASK = c085cba0[1] 'swapper' THREAD: c085e000 [ 18.890350] GPR00: c085fdd0 c000437c 00000000 00008000 c01c37e0 000003e5
c01c3858 00008000
My .config file which is used to build the linux kernel has following settings which refer to the initramfs:
CONFIG_GENERIC_NVRAM=yCONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=yCONFIG_INITRAMFS_SOURCE="smallRootFs.cpio"CONFIG_INITRAMFS_ROOT_UID=0CONFIG_INITRAMFS_ROOT_GID=0CONFIG_BLK_DEV_RAM=yCONFIG_BLK_DEV_RAM_COUNT=2CONFIG_BLK_DEV_RAM_SIZE=16384CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
# CONFIG_NVRAM is not setCONFIG_RAMFS=y
I appreciate any hint on that why the root fs is not recognized
Best Regards
Mirek
Signature · 2 lines
View this message in context: http://www.nabble.com/Kernel-2.6-and-INITRAMFS-in-one-file-booting-problem-on-ml403-tf4487411.html#a12796771 Sent from the linuxppc-embedded mailing list archive at Nabble.com.
I have sorted out partially my problem. The thing was that in the command line which was passed from
u-boot to the kernel I have put root=/dev/ram what refers to the old approach for the ramfs. In my case I use a new approach which does not need the ram disk? (I guess and I have reduced it to 4 MB) and in the command line I put somthing like: rdinit=/sbin/init.
When I have changed that all started somehow to work but unfortunately it does not always work.
My observation is that I am able to boot linux kernel which contains initramfs let say once per 2-3 tries.
I do not understand this behavior. I have tried many various things but I came to the point that some times linux kernel boots properly or it does not boot at all.
Below I enclose the output from the console:
U-Boot 1.2.0 (Sep 21 2007 - 14:26:11)
### No HW ID - assuming Avnet Virtex-4
DRAM: 32 MB
Top of RAM usable for U-Boot at: 02000000
Reserving 152k for U-Boot at: 01fd9000
Reserving 256k for malloc() at: 01f99000
Reserving 120 Bytes for Board Info at: 01f98f88
Reserving 48 Bytes for Global Data at: 01f98f58
Stack Pointer at: 01f98f38
New Stack Pointer is: 01f98f38
Now running in RAM - U-Boot at: 01fd9000
FLASH: flash detect cfi
## Booting image at 01300000 ...
Image Name: Linux-2.6.23-rc2 Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 6983268 Bytes = 6.7 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Current stack ends at 0x01F986B8 => set upper limit to 0x00800000 ## cmdline at 0x007FFF00 ... 0x007FFF7D
bd address = 0x01F98F88 memstart = 0x00000000 memsize = 0x02000000 flashstart = 0xFF000000 flashsize = 0x00800000 flashoffset = 0x00000000 sramstart = 0x00000000 sramsize = 0x00000000 bootflags = 0x00000031 procfreq = 100 MHz plb_busfreq = 100 MHz ethaddr = 00:50:C2:46:D8:01 IP addr = 129.129.144.82 baudrate = 9600 bps
No initrd
## Transferring control to Linux (at address 00000000) ...
After that it hangs.
I have tried to see what is in the memory location under __log_buf but it was not more than: kernel panic .. not syncing .. signal 4 ...
Does somody has a clue what could be wrong?
Best Regards
Mirek
Signature · 2 lines
View this message in context: http://www.nabble.com/Kernel-2.6-and-INITRAMFS-in-one-file-booting-problem-on-ml403-tf4487411.html#a12820276 Sent from the linuxppc-embedded mailing list archive at Nabble.com.