Subject: Arch specific initramdisk?

From: Alex deVries <[email-masked]>
Date: Thu, 9 Oct 1997 18:57:29 -0400 (EDT)

I'm trying to do kernel modifications so that initrd is supported, which
will make installations easier.

I was a bit surprised that these weren't architecture neutral to begin
with.  Why is this dependant on the arch? The code I've found for other
archs is in arch/*/kernel/setup.c.

How safe is it for me to replicate the code from, say, the sparc port?  Is
there anything I should be aware of?

- Alex

      Alex deVries              Success is realizing 
  System Administrator          attainable dreams.
   The EngSoc Project

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 9 Oct 1997 18:27:02 -0700 (PDT)

Hi,

> there anything I should be aware of?

The only difference between the architectures is where in memory the
initrd is being stored.  I haven't check how things work on a Sparc but
basically what we need should be at least very similar to for example
the i386 code - as far as setup.c is affected.

  Ralf

---

From: Alex deVries <[email-masked]>
Date: Fri, 10 Oct 1997 19:41:19 -0400 (EDT)

I'm working on adding the ramdisk and initrd features to the kernel.  It
compiles, which is pretty good for my first kernel patch.

But, I have no way to actually test it.  The kernel needs to find the
offset of the ramdisk in the first 11 bits of one of the boot headers, so
the kernel needs to be less than 2047k.

This wouldn't normally be a problem, but doing a 'make zImage' tells me
that:
./mkboot zImage.tmp zImage
Input file isn't a little endian ELF file
make[1]: *** [zImage] Error 1

What would be required to make mkboot handle zImage, or bzImage?

In the meantime, I will try to strip down a kernel to below 2047k.  My
current one is 2347.

Any other ideas?

- Alex

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 10 Oct 1997 17:58:48 -0700 (PDT)

> the kernel needs to be less than 2047k.

Dunno what you're trying to do, but it sounds extremly weired ...

> What would be required to make mkboot handle zImage, or bzImage?

Don't do it.  mkboot is used for the boxes that use Milo for booting to
convert the ELF executable into an a.out file that Milo accepts.  Milo
again is necessary because the ARC firmware is so incredibly buggy and I
don't want to have more ARC stuff in the kernel than absolutly necessary.

What I suggest instead is to load the ramdisk file using the ARCS
Open, Read, Write, Close and Seek functions from any ARC supported media.
That includes tapes, CDROM, EFS, XFS and even tftp.  Take the information
what file to read from the ARC command line.

> In the meantime, I will try to strip down a kernel to below 2047k.  My

Why limiting the kernel size?  640kb are enough for everybody?

> Any other ideas?

Yes, time to leave for Sushi with Miguel :-)

  Ralf

---

From: Warner Losh <[email-masked]>
Date: Sat, 11 Oct 1997 00:11:55 -0600

In message <[email-masked]> Ralf Baechle writes:
: What I suggest instead is to load the ramdisk file using the ARCS
: Open, Read, Write, Close and Seek functions from any ARC supported media.
: That includes tapes, CDROM, EFS, XFS and even tftp.  Take the information
: what file to read from the ARC command line.

These can include ...  Not all ARC machines support all these types of
file systems...

Warner