linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ramdisk initrd
@ 2001-10-18 21:14 PAULO SELEME CORREA PAULO
  2001-10-18 22:13 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: PAULO SELEME CORREA PAULO @ 2001-10-18 21:14 UTC (permalink / raw)
  To: linuxppc-embedded


Hello All,

     I am sorry if I sound a bit repetitive but can anyone tell me what are the steps to be followed to load a ramdisk image into the target board RAM . What am I supposed to set for initrd to work?
     I was able to create the RAMDISK image with the scripts posted in this forum but I got a bit lost about the settings to be made to load the correct ramdisk image file into memory. I am using PPcboot1.0.5 and a RPXClassic board .

    Thank you in advance,




Paulo Seleme Correa / ICN EN DEA
Telefone: +55 (41) 341-6311; Fax: +55 (41) 341-5594
paulo.correa@siemens.com.br (GroupWise: OP7648)
Siemens Ltda.
Rua Pedro Gusso, 2635 - CIC
81310-900 Curitiba - PR - Brasil


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

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

* Re: ramdisk initrd
  2001-10-18 21:14 ramdisk initrd PAULO SELEME CORREA PAULO
@ 2001-10-18 22:13 ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2001-10-18 22:13 UTC (permalink / raw)
  To: PAULO SELEME CORREA PAULO; +Cc: linuxppc-embedded


In message <sbcf1c29.035@siemens.com.br> you wrote:
>
> I am sorry if I sound a bit repetitive but can anyone tell me what
> are the steps to be followed to load a ramdisk image into the target
> board RAM . What am I supposed to set for initrd to work?

Did you RTFM? Really?

> I was able to create the RAMDISK image with the scripts posted in
> this forum but I got a bit lost about the settings to be made to load
> the correct ramdisk image file into memory. I am using PPcboot1.0.5
> and a RPXClassic board .

The PPCBoot "README" says:

...
Similar you can build PPCBoot images from a 'ramdisk.image.gz' file
when your kernel is intended to use an initial ramdisk:

        -> tools/mkimage -n 'Simple Ramdisk Image' \
        > -A ppc -O linux -T ramdisk -C gzip \
        > -d /LinuxPPC/images/SIMPLE-ramdisk.image.gz examples/simple-initrd
        Image Name:   Simple Ramdisk Image
        Created:      Wed Jan 12 14:01:50 2000
        Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
        Data Size:    566530 Bytes = 553.25 kB = 0.54 MB
        Load Address: 0x00000000
        Entry Point:  0x00000000
...
If you want to boot a Linux kernel with initial ram disk, you pass
the memory addreses of both the kernel and the initrd image (PPBCOOT
format!) to the "bootm" command:
...
        => bootm 40100000 40200000
        ## Booting Linux kernel at 40100000 ...
           Image Name:   2.2.13 for initrd on TQM850L
           Image Type:   PowerPC Linux Kernel Image (gzip compressed)
           Data Size:    335725 Bytes = 327 kB = 0 MB
           Load Address: 00000000
           Entry Point:  0000000c
           Verifying Checksum ... OK
           Uncompressing Kernel Image ... OK
        ## Loading RAMDisk Image at 40200000 ...
           Image Name:   Simple Ramdisk Image
           Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
           Data Size:    566530 Bytes = 553 kB = 0 MB
           Load Address: 00000000
           Entry Point:  00000000
           Verifying Checksum ... OK
           Loading Ramdisk ... OK
        Linux version 2.2.13 (wd@denx.local.net) (gcc version 2.95.2 19991024 (release)) #1 Wed Jul 19 02:32:08 MEST 2000
...




Can you please explain which parts  of  this  description  you  don't
understand?

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Nothing is easier than to denounce  the  evildoer;  nothing  is  more
difficult than to understand him.                 - Fyodor Dostoevski

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

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

* Re: ramdisk initrd
  2001-10-19 13:15 initrd PAULO SELEME CORREA PAULO
@ 2001-10-19 13:52 ` Wolfgang Denk
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2001-10-19 13:52 UTC (permalink / raw)
  To: PAULO SELEME CORREA PAULO; +Cc: linuxppc-embedded


Dear Paulo,

in message <sbcfef39.080@siemens.com.br> you wrote:
>
>       I made the ram disk image with the following script :
>
>      dd if=/dev/zero of=/dev/ram bs=1k count=4096
>      mke2fs -vm0 /dev/ram 4096
>      mkdir -p /mnt/ram
>      (cd file_system; cp -a * /mnt/ram)

It would have been a  good  idea  to  veryfy  the  contents  of  your
/mnt/ram  directory  now.  You  could have seen that "cp -a" does not
copy special files.

Use something like this instead:

	( cd file_system; find . -depth -print | cpio -pdum /mnt/ram )

>      umount /mnt/ram
>      rmdir /mnt/ram
>      dd if=/dev/ram of=fs_images/ramdiskimage bs=1k count=4096
>      gzip -v9f ramdisk.image
>
>      I copied the ramdisk.image.gz to /opt/hardhat/devkit/ppc/8xx/target/boot
>      and
>      executed ./mkimage -n "ramdiskimage"-d  ramdisk.image.gz ramdiskimage

It is really important that you list the PRECISE commands  you  used;
it  is  obvious  that  this is not the case here; there is not only a
space missing, you are also missing some other options (-T).

>      I set the boot parameters to download the kernel via tftp to the target board so when I reset the board it runs ppcboot download the kernel uncompress it and then try to mout the root file system.

It probably _did_ mount the root filesystem, but then it died because
there was no /dev/console in your root filesystem.

>       What I didn't understand is how can I download the RAMDISK image to a specific memory area during the boot so when mounting the root filesystem it can find the ramdisk image in memory.

You are worrying about the wrong things.  Everything  is  fine,  it's
just that your ramdisk image is incomplete.

>       And I don't know how to download the RAMDISK image to the memory to execute the bootm command as explained in PPcboot README  :

How do you download other images? There  is  the  "tftp"  command  to
download  over  ethernet,  and  there  are  the  "loads"  and "loadb"
commands to download over serial line.

Where exactly is the problem?

>        I tried the loads command but had no success

I really hate this sort of problem descriptions.

Which EXACT command did you use? Why didn't it work? Were  there  any
error messages? Which?

And why did you use "loads"? Download over  ethernet  is  simple  and
fast - why don't you use it?

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
"The number  of  Unix  installations  has  grown  to  10,  with  more
expected."    - The Unix Programmer's Manual, 2nd Edition, June, 1972

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

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

end of thread, other threads:[~2001-10-19 13:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-18 21:14 ramdisk initrd PAULO SELEME CORREA PAULO
2001-10-18 22:13 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2001-10-19 13:15 initrd PAULO SELEME CORREA PAULO
2001-10-19 13:52 ` ramdisk initrd Wolfgang Denk

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).