[uClinux-dev] Populating blkmem

John Williams jwilliams at itee.uq.edu.au
Sun Mar 30 17:40:37 EST 2003


Hi,

Based on the v850 port, my current microblaze setup is to have a single 
blkmem image tacked on to the end of the kernel image (CAT_ROMARRAY is 
#defined).  The following snippet is at the end of my link script:

        .blkmem ALIGN (4096) : {
                __blkmem_0_start = . ;
                *(.blkmem0)
                __blkmem_0_end = . ;
        } > RAM

How do I populate the blkmem device or memory region to start with?  Do 
I create a romfs image (with genromfs?) and cat it on the end of the 
kernel image?  If so, how do the symbols blkmem_0_start and blkmem_0_end 
get set after the fact?

Currently I make the kernel and download it to the board, at the end of 
kernel startup I receive these messages from the blkmem driver:

(initally from the blkmem initcall)

Blkmem copyright 1998,1999 D. Jeff Dionne
Blkmem copyright 1998 Kenneth Albanowski
Blkmem 1 disk images:
0: FFEA1000-FFEA0FFF [VIRTUAL FFEA1000-FFEA0FFF] (RO)
blk: queue ffe76bec, I/O limit 0Mb (mask 0x0)

(then later)
Blkmem: bad access: block=0, count=2 (pos=400, len=0)
end_request: I/O error, dev 1f:00 (Blkmem), sector 0
romfs: unable to read superblock
Kernel panic: VFS: Unable to mount root fs on 1f:00

Clearly there's nothing in the blkmem region (size is 0), so it's not 
going to work.

I'm not quite ready to delve into compiling uClibC just yet, I'm hoping 
to make a simple filesys and get blkmem to see it.  Libs and user 
programs are next.

Couldn't find much at all with google about blkmem.

Thanks,

John




More information about the uClinux-dev mailing list