Skip to contentSkip to conversation

RAMDISK image in flash not getting mounted - Memec Powerpc405 board

U-Boot-Users Shamile Khan 2 participants 6 messages Nov 6, 2003 – Nov 12, 2003 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,

Yeah that was the problem. So now it boots all the way. I am not sure what this Simple Ramdisk-Image is composed of as I do not get to a promt. I get nothing on the terminal.

Shamile

Quoted 63 lines · --- Kyle Harris

Shamile,

Do you have the proper fs (e.g. ext2, minix, or whatever your ramdisk is)
support configured in the kernel? Looks like it finds the ramdisk but can't
decipher contents.

HTH, Kyle.

Quoted 3 lines · Shamile Khan

Hi,

I am trying to get Linux to boot with U-boot using a

flash

Quoted 1 line

based initrd image. I am using a Memec Virtex II Pro

board

Quoted 1 line

which has a Powerpc 405 processor embedded in an FPGA.

I

Quoted 1 line

have u-boot running. My flash is 8 Megs and is

organized as

Quoted 4 lines

follows:

0xFE000000 - U-boot
0xFE100000 - Linux u-boot kernel (vmlinux.PPCBoot)

created

Quoted 2 lines

using latest sources from ppckernel.org
0xFE200000 - Simple Ramdisk-Image

(simple-ramdisk.PPCBoot )

Quoted 6 lines

from DENX.de

The boot arguments I pass using u-boot are bootargs=console=ttyS0,115200 mem=32M root=/dev/ram rw

Some relevant kernel configuration parameters are

(using

Quoted 7 lines

xilinx_ml300 as base)

# Block devices
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y

Quoted 5 lines

# File systems
CONFIG_TMPFS=y
CONFIG_RAMFS=y

However when I use "bootm fe100000 fe200000" to boot

linux,

Quoted 1 line

I get all the way to the end of the boot process at

which

Quoted 7 lines

point I get this message:

RAMDISK: Compressed image found at block 0 Freeing initrd memory: 554k freed

Kernel panic: VFS: Unable to mount root fs on 01:00

Seems like it located the RAMDISK image but is not able

to

Quoted 2 lines

mount it. Any ideas on what is causing this to occur.

Quoted 11 lines
Quoted 1 line

I did a backtrace using gdb over abatron and heres

what I

Quoted 1 line

get (breakpoints don't seem to work for me though

although

Quoted 3 lines

I can get a stach trace)
#0 0xc000678c in __delay ()
#1 0xc0014734 in panic (fmt=0x1cfde0 <Address 0x1cfde0

out

Quoted 2 lines

of bounds>) at

/home/shamile/ecsi-linux/kernel/src-linuxppc_2_4_devel/include/asm/delay.h:

Quoted 18 lines
Quoted 6 lines

42 #2 0xc00fcac8 in mount_block_root (name=0xc00d5ea4 "/dev/root", flags=32768) at init/do_mounts.c:376 #3 0xc00fd4d4 in mount_root () at init/do_mounts.c:789 #4 0xc0002888 in prepare_namespace () at init/do_mounts.c:917
#5 0xc0002458 in init (unused=0xc2c1) at

init/main.c:556

Quoted 11 lines

#6 0xc0006f60 in arch_kernel_thread ()

Thanks,
Shamile

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

Quoted 12 lines
Quoted 2 lines

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback

Program.

Quoted 1 line

Does SourceForge.net help you be more productive? Does

it

Quoted 1 line

help you create better code? SHARE THE LOVE, and help

us help

Quoted 5 lines

YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/u-boot-users

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

#2 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

Yeah that was the problem. So now it boots all the way. I am not sure what this Simple Ramdisk-Image is composed of as I do not get to a promt. I get nothing on the terminal.

This old MPC8xx-only ramdisk image is really causing more harm than being helpful. I removed it from the FTP server now.

Please use instead an image that was build for a 4xx system.

You can find SELF based images in ftp://ftp.denx.de/pub/LinuxPPC/usr/src/SELF/images/

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Life would be so much easier if we could  just  look  at  the  source
code.                                                   -- Dave Olson
#3 lore raw

Hi

I tried pRamdisk for ppc_4xxFP and ppc_4xx. I am not sure of the difference between ppc_4xxFP and ppc_4xx. But just a heads up. With ppc_4xxFP, I get the same results as for the

Simple Ramdisk-Image I used before i.e. after the boot process I get no prompt on the screen.
VFS: Mounted root (ext2 filesystem).

With ppc_4xx, I get these messages

Freeing unused kernel memory: 52k init
serial console detected. Disabling virtual terminals.

Oops: kernel access of bad area, sig: 11
NIP: C00112C8 XER: 00000000 LR: C00112AC SP: C19CFF10 REGS:

c19cfe60 TRAP: 0800 Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 39600410, ESR: 00000000
TASK = c19ce000[12] 'xinetd' Last syscall: 3 last math 00000000 last altivec 00000000
GPR00: ED0001FE C19CFF10 C19CE000 00009030 00001030 C0101AE8 C1E44260 00000000
GPR08: C0101AE8 09B003ED C00F8030 396003F0 00000001 10043878 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00001032 019CFF40 00000000 C00049E0
GPR24: C000608C 10024CB0 30025ACC 10025A48 C1E86000 C0104C80 00000000 C19CFF10
Call backtrace:
0EC82E3A C0004A04 10007570 10007614 10009714 1000C134 0FD74D14
00000000

I also have a question concerning Linux debugging with abatron. I can set an instruction breakpoint (e.g at start_here in the kernel) when I use a zImage.elf image but the same breakpoint doesnt work when I use u-boot to boot vmlinux.PPCBoot image.

Thanks,
Shamile

Quoted 18 lines · --- Wolfgang Denk

In message <[email protected]> you

Quoted 2 lines · wrote:

Yeah that was the problem. So now it boots all the way.

I

Quoted 1 line

am not sure what this Simple Ramdisk-Image is composed

of

Quoted 1 line

as I do not get to a promt. I get nothing on the

terminal.

This old MPC8xx-only ramdisk image is really causing more
harm than
being helpful. I removed it from the FTP server now.

Please use instead an image that was build for a 4xx system.

Quoted 17 lines

You can find SELF based images in ftp://ftp.denx.de/pub/LinuxPPC/usr/src/SELF/images/

Best regards,

Wolfgang Denk

Signature · 8 lines
Software Engineering:  Embedded and Realtime Systems, 
Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88 
Email: wd at denx.de
Life would be so much easier if we could  just  look  at 
the  source
code.                                                  
-- Dave Olson

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

#4 lore raw

Hello,

Quoted 4 lines · in message <[email protected]> you wrote:

I tried pRamdisk for ppc_4xxFP and ppc_4xx. I am not sure of the difference between ppc_4xxFP and ppc_4xx. But just a heads up. With ppc_4xxFP, I get the same results as for the

ppc_4xxFP is for PPC 4xx processors with floating point unit; your processor belongs not to this group.

All this is documented - please see the DULG (to be more precise, see the table at end of section 3.5 at
http://www.denx.de/twiki/bin/view/DULG/ELDKUsage

Quoted 15 lines

With ppc_4xx, I get these messages

Freeing unused kernel memory: 52k init
serial console detected. Disabling virtual terminals.

Oops: kernel access of bad area, sig: 11
NIP: C00112C8 XER: 00000000 LR: C00112AC SP: C19CFF10 REGS:

c19cfe60 TRAP: 0800 Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 39600410, ESR: 00000000
TASK = c19ce000[12] 'xinetd' Last syscall: 3 last math 00000000 last altivec 00000000
GPR00: ED0001FE C19CFF10 C19CE000 00009030 00001030 C0101AE8 C1E44260 00000000
GPR08: C0101AE8 09B003ED C00F8030 396003F0 00000001 10043878 00000000 00000000

Quoted 8 lines

GPR16: 00000000 00000000 00000000 00000000 00001032 019CFF40 00000000 C00049E0
GPR24: C000608C 10024CB0 30025ACC 10025A48 C1E86000 C0104C80 00000000 C19CFF10
Call backtrace:
0EC82E3A C0004A04 10007570 10007614 10009714 1000C134 0FD74D14
00000000

Well, and which results did you get when decoding this call backtrace?

Quoted 3 lines

I also have a question concerning Linux debugging with abatron. I can set an instruction breakpoint (e.g at start_here in the kernel) when I use a zImage.elf image but

zImage.elf is definitely not what you want to use. You have to use the vmlinux file in the kernel's top level directory.

Quoted 2 lines

the same breakpoint doesnt work when I use u-boot to boot vmlinux.PPCBoot image.

See http://www.denx.de/twiki/bin/view/DULG/DebuggingLinuxKernel

Best regards,

Wolfgang Denk

Signature · 7 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
You speak of courage. Obviously you do not know the  difference  bet-
ween  courage and foolhardiness. Always it is the brave ones who die,
the soldiers.
	-- Kor, the Klingon Commander, "Errand of Mercy",
	   stardate 3201.7
#5 lore raw

Hi,

There is some progress. My kernel configuration was bad. I had ONFIG_EXPERIMENTAL which is needed for CONFIG_DEVFS_FS and CONFIG_DEVFS_MOUNT.

Now I can get a really simple ramdisk image (obtained from Xilinx) which only prints Hello world and echoes everything
I type.

So I decided to try the ppc4xx ramdisk from DENX and I am getting this error

EXT2-fs error (device ramdisk(1,0)): ext2_check_page: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0

Does this imply that some entry in the filesystem is corrupted?

My kernel boot log and a gdb backtrace (via abatron) is below:

kernel boot log
---------------
=> bootm fe300000 fe500000
## Booting image at fe300000 ...
Image Name: Linux-2.4.23-pre6
Image Type: PowerPC Linux Kernel Image (gzip
compressed)
Data Size: 500501 Bytes = 488.8 kB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## cmdline at 0x007FFC00 ... 0x007FFC2D

memstart    = 0x00000000
memsize     = 0x02000000
flashstart  = 0xFE020000
flashsize   = 0x00800000
flashoffset = 0x0001F900
sramstart   = 0x00000000
sramsize    = 0x00000000
bootflags   = 0x0000C2C1
intfreq     =    100 MHz
busfreq     =    100 MHz
ethaddr     = 00:00:00:00:00:00
IP addr     = 0.0.0.0
baudrate    = 115200 bps

## Loading RAMDisk Image at fe500000 ...
Image Name: Simple Embedded Linux Framework
Image Type: PowerPC Linux RAMDisk Image (gzip
compressed)
Data Size: 1476478 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000Verifying Checksum ... OK Loading Ramdisk to 01e43000, end 01fab77e ... OK
Linux version 2.4.23-pre6 (shamile at ws022.ecsi.ca) (gcc version 2.95.4 20010319 (prerelease/franzo/20011204)) #4 Tue Nov 11 15:37:30 EST 2003
Xilinx Virtex-II Pro port (C) 2002 MontaVista Software, Inc. (source at mvista.com)On node 0 totalpages: 8192 zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: console=ttyS0,115200 mem=32M root=/dev/ram rw
Xilinx INTC #0 at 0xFEFE2FC0 mapped to 0xFDFFEFC0 Calibrating delay loop... 99.73 BogoMIPS
Memory: 29664k available (912k kernel code, 304k data, 52k init, 0k highmem)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes) POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket

Starting kswapd
devfs: v1.12c (20020818) Richard Gooch
(rgooch at atnf.csiro.au)
devfs: boot_options: 0x1
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with no serial options enabled
ttyS00 at 0xfdfff003 (irq = 31) is a 16450
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1441k freed
VFS: Mounted root (ext2 filesystem).
Mounted devfs on /dev
Freeing unused kernel memory: 52k init
serial console detected. Disabling virtual terminals.

Oops: kernel access of bad area, sig: 11
NIP: C00297FC XER: 20000000 LR: C0029924 SP: C19BFB30 REGS:

c19bfa80 TRAP: 0800
Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 00000608, ESR: 00000000
TASK = c19be000[12] 'xinetd' Last syscall: 12 last math 00000000 last altivec 00000000
GPR00: C0029924 C19BFB30 C19BE000 C1FE2500 0000035D 00000600 C19B6BFC 00000000
GPR08: 00000400 C0120000 0000307F 00001FFF 84000008 10043878 00000000 00000000
GPR16: 00000000 00000000 00000000 C01239B4 C0067970 00000000 C01239B4 C1FE2500
GPR24: 00000000 C01B9410 0000035D C01B8000 00000600 C1FE2500 0000035D 00000600
Call backtrace:
C1FE2500 C0029924 C008B1FC C008B36C C0089650 C0089720 C003E294
C0067E04 C002929C C002930C C002B0D0 C0026420 C00265F8 C000EF4C
C0004A28 C0046454 C0047BEC C0039444 C00047DC 10009390 100096C8
1000C130 0FD74D14 00000000
EXT2-fs error (device ramdisk(1,0)): ext2_check_page: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0

Oops: kernel access of bad area, sig: 11
NIP: C001EC20 XER: 00000000 LR: C001ECB0 SP: C0100E00 REGS:

c0100d50 TRAP: 0800
Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 00000000, ESR: 00000000
TASK = c00ff030[0] 'swapper' Last syscall: 120 last math 00000000 last altivec 00000000
GPR00: 00000000 C0100E00 C00FF030 00000800 00001030 00000001 C0120000 C011A1E0
GPR08: 00000000 00000000 C011A1E0 C00FF030 42000000 10043878 01FFA600 00000000
GPR16: 007FFC2D 007FFC00 01FF581C 00000000 00001032 00100EF0 00000000 C0004A20
GPR24: C00060C4 00800000 C010C220 00000000 C0120000 00000001 00000000 00000001
Call backtrace:
C001EC88 C001A7C4 C001A688 C001A2C0 C00062E8 C0004A20 C0024B90
C0006088 C00060B0 C000243C C010D5A4 C0002328

Kernel panic: Aiee, killing interrupt handler!

In interrupt handler - not syncing
<0>Rebooting in 180 seconds..

abatron trace
-------------
#0 0xc00067cc in __delay ()
#1 0xc0014774 in panic (fmt=0x1cfde0 <Address 0x1cfde0 out
of bounds>) at /home/shamile/ecsi-linux/kernel/src-linuxppc_2_4_devel/include/asm/delay.h:42 #2 0xc001897c in do_exit (code=11) at exit.c:430
#3 0xc0004bc4 in die (str=0xc00e60bc "kernel access of bad area", fp=0xc0100d50, err=11) at traps.c:109
#4 0xc000f1ac in bad_page_fault (regs=0xb, address=4144, sig=-1072799556) at fault.c:341
#5 0xc000f058 in do_page_fault (regs=0xc0100d50,
address=0, error_code=0) at fault.c:288

#6  0xc0004a28 in ret_from_intercept ()
#7  0xc001ec88 in timer_bh () at timer.c:686
#8  0xc001a7c4 in bh_action (nr=49857) at softirq.c:299
#9  0xc001a688 in tasklet_hi_action (a=0xc2c1) at

softirq.c:229
#10 0xc001a2c0 in do_softirq () at softirq.c:90 #11 0xc00062e8 in timer_interrupt (regs=0xc0100f00) at time.c:209
#12 0xc0004a20 in ret_from_fork ()
#13 0xc0024b90 in check_pgt_cache () at memory.c:138 #14 0xc0006088 in idled () at idle.c:68
#15 0xc00060b0 in cpu_idle () at idle.c:84 #16 0xc000243c in rest_init () at init/main.c:346 #17 0xc010d5a4 in start_kernel () at init/main.c:440 #18 0xc0002328 in start_here ()

Thanks,
Shamile

Quoted 61 lines · --- Wolfgang Denk

Hello,

in message <[email protected]> you

Quoted 2 lines · wrote:

I tried pRamdisk for ppc_4xxFP and ppc_4xx. I am not

sure

Quoted 1 line

of the difference between ppc_4xxFP and ppc_4xx. But

just a

Quoted 1 line

heads up. With ppc_4xxFP, I get the same results as for

the

ppc_4xxFP is for PPC 4xx processors with floating point unit; your
processor belongs not to this group.

All this is documented - please see the DULG (to be more precise, see
the table at end of section 3.5 at
http://www.denx.de/twiki/bin/view/DULG/ELDKUsage

Quoted 6 lines

With ppc_4xx, I get these messages

Freeing unused kernel memory: 52k init
serial console detected. Disabling virtual terminals.

Oops: kernel access of bad area, sig: 11
NIP: C00112C8 XER: 00000000 LR: C00112AC SP: C19CFF10

REGS:

Quoted 9 lines

c19cfe60 TRAP: 0800 Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: 39600410, ESR: 00000000
TASK = c19ce000[12] 'xinetd' Last syscall: 3 last math 00000000 last altivec 00000000
GPR00: ED0001FE C19CFF10 C19CE000 00009030 00001030 C0101AE8 C1E44260 00000000
GPR08: C0101AE8 09B003ED C00F8030 396003F0 00000001 10043878 00000000 00000000

Quoted 8 lines

GPR16: 00000000 00000000 00000000 00000000 00001032 019CFF40 00000000 C00049E0
GPR24: C000608C 10024CB0 30025ACC 10025A48 C1E86000 C0104C80 00000000 C19CFF10
Call backtrace:
0EC82E3A C0004A04 10007570 10007614 10009714 1000C134 0FD74D14
00000000

Well, and which results did you get when decoding
this call
backtrace?

Quoted 3 lines

I also have a question concerning Linux debugging with abatron. I can set an instruction breakpoint (e.g at start_here in the kernel) when I use a zImage.elf image

but

zImage.elf is definitely not what you want to use. You have to use
the vmlinux file in the kernel's top level directory.

Quoted 6 lines
Quoted 1 line

the same breakpoint doesnt work when I use u-boot to

boot

Quoted 1 line

vmlinux.PPCBoot image.

See

http://www.denx.de/twiki/bin/view/DULG/DebuggingLinuxKernel

Quoted 17 lines

Best regards,

Wolfgang Denk

Signature · 11 lines
Software Engineering:  Embedded and Realtime Systems, 
Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88 
Email: wd at denx.de
You speak of courage. Obviously you do not know the 
difference  bet-
ween  courage and foolhardiness. Always it is the brave
ones who die,
the soldiers.
	-- Kor, the Klingon Commander, "Errand of Mercy",
	   stardate 3201.7

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

#6 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

There is some progress. My kernel configuration was bad. I had ONFIG_EXPERIMENTAL which is needed for CONFIG_DEVFS_FS and CONFIG_DEVFS_MOUNT.

You should DISABLE the devfs support for testing. If you think you really needit you can add it later. First get the system running.

Quoted 2 lines

So I decided to try the ppc4xx ramdisk from DENX and I am getting this error

One reason might be that this ramdisk is using the conventional /dev system, not devfs.

Quoted 6 lines

EXT2-fs error (device ramdisk(1,0)): ext2_check_page: bad entry in directory #2: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, name_len=0

Does this imply that some entry in the filesystem is corrupted?

No. All in all I think chances are 99% that your RAM is not working correctly. Check your SDRAM init sequence.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
It is a human characteristic to love little  animals,  especially  if
they're attractive in some way.
	-- McCoy, "The Trouble with Tribbles", stardate 4525.6