From: Mark McLoughlin <markmc@redhat.com>
To: Ian Campbell <ijc@hellion.org.uk>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCHv3 1/3] x86: use ELF format in compressed images.
Date: Thu, 14 Feb 2008 11:34:04 +0000 [thread overview]
Message-ID: <1202988844.26435.4.camel@muff> (raw)
In-Reply-To: <9d3a007a2bfe774201b6deed5115a0cc8182bbb4.1202935389.git.ijc@hellion.org.uk>
On Wed, 2008-02-13 at 20:54 +0000, Ian Campbell wrote:
> This allows other boot loaders such as the Xen domain builder the
> opportunity to extract the ELF file.
Right, Xen currently can't boot bzImage (it needs the ELF image) so you
still can't use the same kernel image on Xen as bare-metal.
> +Field name: compressed_payload_offset
> +Type: read
> +Offset/size: 0x248/4
> +Protocol: 2.08+
> +
> + If non-zero then this field contains the offset from the end of the
> + real-mode code to the compressed payload. The compression format
> + should be determined using the standard magic number, currently only
> + gzip is used.
Should probably mention that the payload format is expected to be ELF.
> diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
> index f88458e..9695aff 100644
> --- a/arch/x86/boot/Makefile
> +++ b/arch/x86/boot/Makefile
> @@ -94,6 +94,20 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
>
> SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
>
> +sed-offsets := -e 's/^00*/0/' \
> + -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
> +
> +quiet_cmd_offsets = OFFSETS $@
> + cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@
> +
> +$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE
> + $(call if_changed,offsets)
> +
> +targets += offsets.h
> +
> +AFLAGS_header.o += -I$(obj)
> +$(obj)/header.o: $(obj)/offsets.h
How about this?
+sed-offsets := -e 's/^00*/0/' \
+ -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/-D\2=0x\1 /p'
+
+$(obj)/header.o: AFLAGS_header.o += $(shell $(NM) $(obj)/compressed/vmlinux | sed -n $(sed-offsets))
+$(obj)/header.o: $(obj)/compressed/vmlinux FORCE
Cheers,
Mark.
next prev parent reply other threads:[~2008-02-14 11:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-13 20:54 [PATCHv3 0/3] x86: boot protocol updates Ian Campbell
2008-02-13 20:54 ` [PATCHv3 1/3] x86: use ELF format in compressed images Ian Campbell
2008-02-13 20:54 ` [PATCHv3 2/3] x86: add a crc32 checksum to the kernel image Ian Campbell
2008-02-13 20:55 ` [PATCHv3 3/3] x86: bump image header to version 2.08 Ian Campbell
2008-02-14 11:34 ` Mark McLoughlin [this message]
2008-02-14 17:01 ` [PATCHv3 1/3] x86: use ELF format in compressed images Ian Campbell
2008-02-14 17:37 ` Mark McLoughlin
2008-02-14 17:51 ` Ian Campbell
2008-02-14 17:57 ` Ian Campbell
2008-02-14 21:10 ` Jeremy Fitzhardinge
2008-02-14 21:14 ` H. Peter Anvin
2008-02-15 6:37 ` Jeremy Fitzhardinge
2008-02-14 18:29 ` Ian Campbell
2008-02-14 18:30 ` H. Peter Anvin
2008-04-06 7:03 ` Yinghai Lu
2008-04-06 10:22 ` Ian Campbell
2008-04-06 16:38 ` H. Peter Anvin
2008-04-06 17:19 ` Yinghai Lu
2008-04-06 17:25 ` H. Peter Anvin
2008-04-06 17:34 ` Yinghai Lu
2008-02-17 14:04 ` [PATCHv3 0/3] x86: boot protocol updates Thomas Gleixner
2008-02-19 8:16 ` Ian Campbell
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=1202988844.26435.4.camel@muff \
--to=markmc@redhat.com \
--cc=hpa@zytor.com \
--cc=ijc@hellion.org.uk \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox