linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* mount RAMDISK directly on rom
@ 2000-09-29 12:05 Jari
  2000-09-30 13:34 ` Daris A Nevil
  2000-10-04  5:03 ` Scott Anderson
  0 siblings, 2 replies; 4+ messages in thread
From: Jari @ 2000-09-29 12:05 UTC (permalink / raw)
  To: linuxppc-embedded


Hi all,

Is there anyone know how to let the uncompressed ramdisk image in the
rom,
and mount root system directly from it (read only)?

I think that I have to modify  mount_root() function,
reinitialize  super_block *sb directly by reading ramdisk image from the
rom,
before calling add_vsfmnt(sb,"/dev/root","/"),
is that right? of course, I have to build  a kernel image with
uncompress image,
modify the code which copy ramdisk image to ram_device.

If you have done it, and see my way is incorrect,
or know where to look for information about it, teach me please.

Thanks in advance,
Jari


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount RAMDISK directly on rom
  2000-09-29 12:05 mount RAMDISK directly on rom Jari
@ 2000-09-30 13:34 ` Daris A Nevil
  2000-10-04  5:03 ` Scott Anderson
  1 sibling, 0 replies; 4+ messages in thread
From: Daris A Nevil @ 2000-09-30 13:34 UTC (permalink / raw)
  To: jari.nguyen


Hello Jari,

The QSLinux kernel supports reading from a Flash'ed filesystem.  The
kernel does not make use of the initrd image.  It stores the kernel as a
compressed image in one area of FLASH, and the remainder of FLASH is
organized as an ext2fs filesystem (using the compression patch).  You
initially boot using only the kernel and rely on an NFS mount for the
filesystem.  You then format the FLASH disk, and copy whatever files you
need, along with creating the special dev files.  Then when you reboot
you use the "init=/dev/ftla" command line option to tell the kernel to
boot using the on-board FLASH filesystem.

The QSLinux kernel contains all of the code plus scripts for
implementing this mechanism.  You can download the kernel from
ftp://qslinux.org/pub/qslinux.  On-line documentation is available at
http://qslinux.org.

Regards,

Daris Nevil


Jari wrote:
>
> Hi all,
>
> Is there anyone know how to let the uncompressed ramdisk image in the
> rom,
> and mount root system directly from it (read only)?
>
> I think that I have to modify  mount_root() function,
> reinitialize  super_block *sb directly by reading ramdisk image from the
> rom,
> before calling add_vsfmnt(sb,"/dev/root","/"),
> is that right? of course, I have to build  a kernel image with
> uncompress image,
> modify the code which copy ramdisk image to ram_device.
>
> If you have done it, and see my way is incorrect,
> or know where to look for information about it, teach me please.
>
> Thanks in advance,
> Jari
>

--
Daris A Nevil
Simple Network Magic Corporation
401 Kentucky Lane
McKinney, TX 75069
214-793-7757
dnevil@snmc.com
www.snmc.com
quickstack.com
qslinux.org

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount RAMDISK directly on rom
  2000-09-29 12:05 mount RAMDISK directly on rom Jari
  2000-09-30 13:34 ` Daris A Nevil
@ 2000-10-04  5:03 ` Scott Anderson
  2000-10-04  9:05   ` Jari
  1 sibling, 1 reply; 4+ messages in thread
From: Scott Anderson @ 2000-10-04  5:03 UTC (permalink / raw)
  To: jari.nguyen; +Cc: linuxppc-embedded


Jari wrote:
> Is there anyone know how to let the uncompressed ramdisk image in the
> rom,
> and mount root system directly from it (read only)?

In general, I would add a driver that exposed your rom as a device and
then just tell your kernel that root is on your device.  I have
successfully used the MTD drivers to do exactly this in the past.  I'd
suggest poking around:
  http://www.linux-mtd.infradead.org/

    Scott Anderson
    scott_anderson@mvista.com	MontaVista Software Inc.
    (408)328-9214		490 Potrero Ave.
    http://www.mvista.com	Sunnyvale, CA  94086

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount RAMDISK directly on rom
  2000-10-04  5:03 ` Scott Anderson
@ 2000-10-04  9:05   ` Jari
  0 siblings, 0 replies; 4+ messages in thread
From: Jari @ 2000-10-04  9:05 UTC (permalink / raw)
  To: Scott Anderson; +Cc: jari.nguyen, linuxppc-embedded


Hello,
there is something I need to ask for more information about memory accessing.

Scott Anderson wrote:

> In general, I would add a driver that exposed your rom as a device and
> then just tell your kernel that root is on your device.

I think so, but when I modify rd.c,
I can not access the memory address on ROM.
for example:
I can turn on the led of CDK by using
the address 0xFF400000.
but when I need to read from the address on the ROM,

--------------------
0xFF5C6E11, for example:
    int b;
     b = *((char *)0xFF5C6E11);
--------------------

I'll see kernel panic like below:

--------------------------------------------------------------
NIP: C00AFB8C XER: E000107F LR: C00AFB84 REGS: c0ea1da0 TRAP: 0300
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0ea0000[16] 'a.out' mm->pgd c0fe1000 Last syscall: 3
last math 00000000
GPR00: 00000000 C0EA1E50 C0EA0000 00000200 00000000 00000000 7FFFFDA4 00000080

GPR08: FF5C6A11 FF5C6E11 C0110000 00000000 30026438 100187EC 100B0490 00000000

GPR16: 100B04F0 90100B0C 00000044 00000000 00009032 00EA1E80 00000000 C000253C

GPR24: C000227C 100B04F0 100006CC 00000001 7FFFFBA8 00000200 C0117778 00000200

Call backtrace:
00000284 C0027AA0 C00022D0 30025DC0 0FF094F8 00000000
Kernel panic: kernel access of bad area pc c00afb8c lr c00afb84 address
FF5C6E11 tsk a.out/16
--------------------------------------------------------------

Is there anybody tell me what happened?
I think that when I working in kernel space,
the address is not changed..?
and I can access the ROM
by using its address, is that right?


> I have
> successfully used the MTD drivers to do exactly this in the past.  I'd
> suggest poking around:
>   http://www.linux-mtd.infradead.org/
>

Thanks for your link, I'll try it right away,
but I think that I can not use it. ;-(
and I must concentrate into creating a driver to manage my task.
Is there anything to help me?

best regards,
Jari


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-10-04  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-09-29 12:05 mount RAMDISK directly on rom Jari
2000-09-30 13:34 ` Daris A Nevil
2000-10-04  5:03 ` Scott Anderson
2000-10-04  9:05   ` Jari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).