LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <ijc@hellion.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: PATCH/RFC: bzImage payload as compressed ELF file.
Date: Tue, 29 Jan 2008 09:54:13 -0800 [thread overview]
Message-ID: <479F6845.1070902@goop.org> (raw)
In-Reply-To: <1201599251.5301.26.camel@localhost.localdomain>
Ian Campbell wrote:
> If you strip of setup_sects (+1?) from a bzImage, which I think is what
> you are referring above, then you end up with essentially
> arch/x86/boot/compressed/vmlinux (at address 0x100000 from one of the
> bzImage header fields) which can still be jumped to by a 32 bit
> bootloader. It will decompress and process the ELF bits correctly. I
> think this is where my patch differs from your previous version, you
> made the actual compressor portion an ELF file within the bzImage.
>
Yes, that's right. The changes to make it work were a fair bit more
complex than your's.
> The thing which no longer works here is scanning the whole image looking
> for a gzip header just past setup_sects and extracting that expecting to
> find a raw binary because you will actually find an ELF file. I'm not
> sure that's an "interface" which could be expected to continue to work
> for all time anyway.
>
Who does that?
> That's what I figured. There will be some build system pain to extract
> those offsets from boot/compressed/vmlinux and incorporate them into
> boot/bzImage but I'll figure something out.
>
I solved that with some linker magic. One of the things I did was get
rid of tools/build and did everything in the linker. And I worked out a
trick where you can get the setup code to refer to vmlinux's symbols
without actually linking it in (no, wait, was that to solve something
else?).
In the xenbits repo, you can see a series of patches guarded with
+pvboot, which was my patchset when I last worked on it.
i386-cleanup-image-generation.patch is particularly interesting (though
it could definitely do with being broken into smaller patches).
(xen-paravirt-boot.patch was fun to get going too, though I don't think
it will be useful overall.)
J
next prev parent reply other threads:[~2008-01-29 17:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 22:42 Ian Campbell
2008-01-28 22:54 ` Jeremy Fitzhardinge
2008-01-29 9:34 ` Ian Campbell
2008-01-29 17:54 ` Jeremy Fitzhardinge [this message]
2008-01-29 18:05 ` H. Peter Anvin
2008-01-29 18:31 ` Jeremy Fitzhardinge
2008-01-29 18:34 ` H. Peter Anvin
2008-01-29 20:38 ` Ian Campbell
2008-01-29 21:50 ` H. Peter Anvin
2008-01-29 21:55 ` Ian Campbell
2008-01-29 22:09 ` H. Peter Anvin
2008-01-28 23:20 ` H. Peter Anvin
2008-01-29 9:31 ` Ian Campbell
2008-02-01 13:10 ` Ingo Molnar
2008-02-01 18:05 ` H. Peter Anvin
2008-02-01 18:15 ` H. Peter Anvin
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=479F6845.1070902@goop.org \
--to=jeremy@goop.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=ijc@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: PATCH/RFC: bzImage payload as compressed ELF file.' \
/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
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).