[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [rtl] Embedding real time linux
On Sun, 3 May 1998, James Cassidy wrote:
>
>
> I'm trying to create a boot disk with RTLinux to embed in an instrument.
> But I'm having a problem that I'm hoping someone can help with.
>
> I've created a bash script that creates a minimum root file system
> and compresses it. I then build a boot disk with the kernel and this
> compressed root. I set the appropriate bits with rdev.
>
> The kernel boots, the ramdisk detects the compressed ram disk image and
> starts loading it. Part way through, error messages start popping up:
>
> end_request: I/O error, dev 01:00, sector XXXXXXX
>
> After lots of these messages, starting somewhere around sector 9XXX and
> continuing to sector 21310 (odd numbers only), everything stops.
>
> I'm assuming that 01:00 are the major, minor numbers. If so they match
> the ram device. But haven't a clue why this error is occuring.
>
> Would anyone have any wisdom for me on this problem?
>
> Thanks,
> Jim.
>
Jim,
If you put the kernel and root filesystem together on the same medium,
then you have to provide an offset for the rootfilesystem. This info is
patched into the kernel with rdev -r.
Suppose your Linux kernel is under 400kB. You could then conveniently place
your rootfilesystem at offset 400kB. You patch this information into the
kernel image with
rdev -r zImage 29072
before compressing it onto the medium. Btw, 29072 is 0x7190. The '7'
indicates a ramdisk, while '190' indicates an offset of 400kB.
I presume you've done the above steps correctly. Then, the first thing that
pops to mind is the size of your ramdisk. They are typically set at 4096kB
which is a constant defined in your kernel. I suspect your root image is
larger than that, judging from your error message. Sector 9xxx is about
4MB.
Good luck!
--- [rtl] ---
For more information on Real-Time Linux see:
http://rtlinux.cs.nmt.edu/