- i386-boot-add-an-elf-header-to-bzimage-fix.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     i386 boot: Add an ELF header to bzImage (fix)

has been removed from the -mm tree.  Its filename is

     i386-boot-add-an-elf-header-to-bzimage-fix.patch

This patch was dropped because it was folded into i386-implement-config_physical_align.patch

------------------------------------------------------
Subject: i386 boot: Add an ELF header to bzImage (fix)
From: Vivek Goyal <vgoyal@xxxxxxxxxx>

On Wed, Oct 04, 2006 at 01:08:56AM -0600, Eric W. Biederman wrote:
> Vivek Goyal <vgoyal@xxxxxxxxxx> writes:
>
> > Increasingly the cobbled together boot protocol that
> > is bzImage does not have the flexibility to deal
> > with booting in new situations.
> >
> > Now that we no longer support the bootsector loader
> > we have 512 bytes at the very start of a bzImage that
> > we can use for other things.
> >
> > Placing an ELF header there allows us to retain
> > a single binary for all of x86 while at the same
> > time describing things that bzImage does not allow
> > us to describe.
> >
> > The existing bugger off code for warning if we attempt to
> > boot from the bootsector is kept but the error message is
> > made more terse so we have a little more room to play with.
>
> Vivek for this first round can we please take out the ELF
> note processing.  Now that vmlinux has ELF notes of interest
> to the bootloader we really should be getting the ELF notes
> from there.
>
> So the generation of the ELF notes needs to move into the
> vmlinux and then we need to copy them to ELF header.
>
> If we just remove the ELF note munging code from this patch
> that should be a good first step in getting the ELF notes correct.

Please find attached the patch. I have got rid the ELF note code
from the patch.

Andrew, does this fix your boot issue with grub? What's the grub version
you are using?

Thanks
Vivek

Increasingly the cobbled together boot protocol that
is bzImage does not have the flexibility to deal
with booting in new situations.

Now that we no longer support the bootsector loader
we have 512 bytes at the very start of a bzImage that
we can use for other things.

Placing an ELF header there allows us to retain
a single binary for all of x86 while at the same
time describing things that bzImage does not allow
us to describe.

The existing bugger off code for warning if we attempt to
boot from the bootsector is kept but the error message is
made more terse so we have a little more room to play with.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/boot/bootsect.S |   42 +-----------------------------------
 1 files changed, 2 insertions(+), 40 deletions(-)

diff -puN arch/i386/boot/bootsect.S~i386-boot-add-an-elf-header-to-bzimage-fix arch/i386/boot/bootsect.S
--- a/arch/i386/boot/bootsect.S~i386-boot-add-an-elf-header-to-bzimage-fix
+++ a/arch/i386/boot/bootsect.S
@@ -17,7 +17,6 @@
 #include <linux/utsrelease.h>
 #include <linux/compile.h>
 #include <linux/elf.h>
-#include <linux/elf_boot.h>
 #include <asm/page.h>
 #include <asm/boot.h>
 
@@ -73,8 +72,8 @@ ehdr:
 	.int  0					# e_shoff
 	.int  0					# e_flags
 	.word e_ehdr - ehdr			# e_ehsize
-	.word e_phdr1 - phdr			# e_phentsize
-	.word (e_phdr - phdr)/(e_phdr1 - phdr)	# e_phnum
+	.word e_phdr - phdr			# e_phentsize
+	.word 1					# e_phnum
 	.word 40				# e_shentsize
 	.word 0					# e_shnum
 	.word 0					# e_shstrndx
@@ -95,45 +94,8 @@ phdr:
 	.int 0						# p_memsz
 	.int PF_R | PF_W | PF_X				# p_flags
 	.int CONFIG_PHYSICAL_ALIGN			# p_align
-e_phdr1:
-
-	.int PT_NOTE					# p_type
-	.int b_note - _start				# p_offset
-	.int 0						# p_vaddr
-	.int 0						# p_paddr
-	.int e_note - b_note				# p_filesz
-	.int 0						# p_memsz
-	.int 0						# p_flags
-	.int 0						# p_align
 e_phdr:
 
-.macro note name, type
-	.balign 4
-	.int	2f - 1f			# n_namesz
-	.int	4f - 3f			# n_descsz
-	.int	\type			# n_type
-	.balign 4
-1:	.asciz "\name"
-2:	.balign 4
-3:
-.endm
-.macro enote
-4:	.balign 4
-.endm
-
-	.balign 4
-b_note:
-	note ELF_NOTE_BOOT, EIN_PROGRAM_NAME
-		.asciz	"Linux"
-	enote
-	note ELF_NOTE_BOOT, EIN_PROGRAM_VERSION
-		.asciz	UTS_RELEASE
-	enote
-	note ELF_NOTE_BOOT, EIN_ARGUMENT_STYLE
-		.asciz	"Linux"
-	enote
-e_note:
-
 start2:
 	movw	%cs, %ax
 	movw	%ax, %ds
_

Patches currently in -mm which might be from vgoyal@xxxxxxxxxx are

x86_64-overlapping-program-headers-in-physical-addr-space-fix.patch
i386-distinguish-absolute-symbols.patch
i386-align-data-section-to-4k-boundary.patch
i386-define-__pa_symbol-2.patch
i386-setupc-reserve-kernel-memory-starting-from-_text.patch
i386-config_physical_start-cleanup.patch
make-linux-elfh-safe-to-be-included-in-assembly-files.patch
elf-add-elfosabi_standalone-to-elfh.patch
kallsyms-generate-relocatable-symbols.patch
i386-relocatable-kernel-support.patch
i386-implement-config_physical_align.patch
i386-boot-add-an-elf-header-to-bzimage-fix.patch
i386-boot-add-an-elf-header-to-bzimage-update-2.patch
i386-boot-add-an-elf-header-to-bzimage-fix-fix-fix.patch
i386-boot-add-an-elf-header-to-bzimage-fix-fix-fix-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux