All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Ostrowski <mostrows@watson.ibm.com>
To: Tim Deegan <Tim.Deegan@cl.cam.ac.uk>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	Keir Fraser <Keir.Fraser@cl.cam.ac.uk>,
	xen-devel@lists.sourceforge.net, ian.pratt@cl.cam.ac.uk
Subject: Re: RFC/Patch: Support for other bootloaders
Date: Wed, 23 Mar 2005 11:44:54 -0500	[thread overview]
Message-ID: <1111596294.4293.265.camel@brick.watson.ibm.com> (raw)
In-Reply-To: <20050323162357.GC16918@cray.cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]

On Wed, 2005-03-23 at 16:23 +0000, Tim Deegan wrote:
> On Wed, Mar 23, 2005 at 03:52:32PM -0000, Ian Pratt wrote:
> > [*] would it possible to do something whereby the vmlinuz and initrd
> > image were simply cat'ed together? This might swing the balance the
> > other way from a userbility POV, not sure.
> 
> It should be.  xen-vmlinux is an ELF, so if we can be *sure* that the
> largest file offset in an ELF header is the same as the size of the
> file, then it would be possible to just do
> 
>  $ cat vmlinux-xen0 initrd-xen0 >pseudo-initrd
> 
>  boot: xen pseudo-initrd.
> 
> and then have Xen root around in the ELF headers to see where the break
> is.
> 

Sure, you could do that.  You could also define, in Linux, two symbols
"initrd_start", "initrd_end".

Then, use objcopy to insert a ramdisk in between the two.  It's not
"cat", but you can just create a wrapper shell script around the
objcopy.

Linux then checks to see if the two symbols point to the same spot; if
they don't it's got a ramdisk embedded in it.

What you can actually do is this:

1.  Take a vmlinux and "load" it into a file (use objcopy to output
binary format).  Remember the entry point address!! (Entry point
instructions should be at the start of the file.)

2.  With a magic linker script, take the vmlinux.bin and initrd and
create a single ELF file, which contains two "LOAD" segments.

3.  A proper ELF loader will then load those two segments into memory.

Essentially, what I'm saying is that you can use ELF as the format for
the "meta-ramdisk".


> Suporting gzipped vmlinux should be possible too; Xen needs to unzip the
> kernel and then knows that the next byte after the gzipped input will be
> ramdisk.  (As long as the bootloader doesn't helfully unzip the
> 'ramdisk' for us.)
> 

Linux should be able to unzip the ramdisk itself.  I thought it could
already do that.

> Michal, what do you think?  It sounds like this could be added to your
> code without too much horror.

Sure,  but I thought the direction we're going in is to use you wrapper
around the Xen binary.  If that's the case then I don't see much further
use for my code.  


-- 
Michal Ostrowski <mostrows@watson.ibm.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-03-23 16:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 15:52 RFC/Patch: Support for other bootloaders Ian Pratt
2005-03-23 16:10 ` Michal Ostrowski
2005-03-23 16:23 ` Tim Deegan
2005-03-23 16:44   ` Michal Ostrowski [this message]
2005-03-23 16:57   ` Anthony Liguori
2005-03-23 16:56 ` Jeremy Katz
2005-03-23 23:39   ` Michal Ostrowski
  -- strict thread matches above, loose matches on Subject: below --
2005-03-23 17:30 Ian Pratt
2005-03-24 14:27 ` Michal Ostrowski
2005-03-22  9:29 Ian Pratt
2005-03-22 14:18 ` Michal Ostrowski
2005-03-22 14:42   ` Tim Deegan
2005-03-22 15:05     ` Michal Ostrowski
2005-03-23 11:20     ` Tim Deegan
2005-03-23 13:00       ` Michal Ostrowski
2005-03-23 16:09       ` Anthony Liguori
2005-03-21 21:57 Ian Pratt
2005-03-21 23:01 ` Tim Deegan
2005-03-21 23:35   ` Michal Ostrowski
2005-03-22  9:17     ` Keir Fraser
2005-03-22  0:08   ` Michal Ostrowski
2005-03-21 15:46 Michal Ostrowski
2005-03-21 16:26 ` Tim Deegan
2005-03-21 21:04   ` Michal Ostrowski
2005-03-23 20:40 ` Christian Limpach
2005-03-23 23:15   ` Michal Ostrowski
2005-03-21 12:15 Michal Ostrowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1111596294.4293.265.camel@brick.watson.ibm.com \
    --to=mostrows@watson.ibm.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=Tim.Deegan@cl.cam.ac.uk \
    --cc=ian.pratt@cl.cam.ac.uk \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.