ipxe-1.0.0_p20130624-r1 from funtoo overlay added.
This commit is contained in:
parent
b3434897ef
commit
bd7042764d
|
@ -132,6 +132,7 @@ sys-boot/os-prober ~amd64
|
||||||
sys-devel/crossdev ~amd64
|
sys-devel/crossdev ~amd64
|
||||||
<sys-devel/gcc-4.9 ~amd64
|
<sys-devel/gcc-4.9 ~amd64
|
||||||
sys-firmware/amd-ucode ~amd64
|
sys-firmware/amd-ucode ~amd64
|
||||||
|
=sys-firmware/ipxe-1.0.0_p20130624-r1 ~amd64
|
||||||
sys-kernel/dracut ~amd64
|
sys-kernel/dracut ~amd64
|
||||||
<sys-kernel/hardened-sources-3.12 ~amd64
|
<sys-kernel/hardened-sources-3.12 ~amd64
|
||||||
sys-libs/core-functions ~amd64
|
sys-libs/core-functions ~amd64
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
DIST ipxe-1.0.0_p20130624-936134e.tar.bz2 2230605 SHA256 bbf9435515a481ab4e5bfc4e49d5eeb005b60169bad3db269e31228fafbb7bbc SHA512 8a1332794acd0db7bf485bfc2c1c52b4e7e5545e5cc1e4e39bbe6f190a684682613b063cc5c31c94d7715fa07555a851f04abb45e604325c0bb4ab73526df0c9 WHIRLPOOL 1338fc4f8bf69a98713d72ad0a8749bc53e42d99c8088e5536b78001d0f738dcc8aaa537cce7dcb5f4f66818880b936c964fc6bed8ff00e674cf400da9521f5b
|
|
@ -0,0 +1,196 @@
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/drivers/net/undiload.c ipxe-936134e-funtoo/src/arch/i386/drivers/net/undiload.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/drivers/net/undiload.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/drivers/net/undiload.c 2013-10-10 17:12:58.931054861 +0200
|
||||||
|
@@ -103,13 +103,16 @@
|
||||||
|
|
||||||
|
/* Call loader */
|
||||||
|
undi_loader_entry = undirom->loader_entry;
|
||||||
|
- __asm__ __volatile__ ( REAL_CODE ( "pushw %%ds\n\t"
|
||||||
|
+ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "pushw %%ds\n\t"
|
||||||
|
"pushw %%ax\n\t"
|
||||||
|
"lcall *undi_loader_entry\n\t"
|
||||||
|
- "addw $4, %%sp\n\t" )
|
||||||
|
+ "addw $4, %%sp\n\t"
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=a" ( exit )
|
||||||
|
: "a" ( __from_data16 ( &undi_loader ) )
|
||||||
|
- : "ebx", "ecx", "edx", "esi", "edi", "ebp" );
|
||||||
|
+ : "ebx", "ecx", "edx", "esi", "edi" );
|
||||||
|
|
||||||
|
if ( exit != PXENV_EXIT_SUCCESS ) {
|
||||||
|
/* Clear entry point */
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/firmware/pcbios/bios_console.c ipxe-936134e-funtoo/src/arch/i386/firmware/pcbios/bios_console.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/firmware/pcbios/bios_console.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/firmware/pcbios/bios_console.c 2013-10-10 17:12:58.931054861 +0200
|
||||||
|
@@ -167,7 +167,8 @@
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Print character with attribute */
|
||||||
|
- __asm__ __volatile__ ( REAL_CODE ( "sti\n\t"
|
||||||
|
+ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "sti\n\t"
|
||||||
|
/* Skip non-printable characters */
|
||||||
|
"cmpb $0x20, %%al\n\t"
|
||||||
|
"jb 1f\n\t"
|
||||||
|
@@ -188,11 +189,13 @@
|
||||||
|
"xorw %%bx, %%bx\n\t"
|
||||||
|
"movb $0x0e, %%ah\n\t"
|
||||||
|
"int $0x10\n\t"
|
||||||
|
- "cli\n\t" )
|
||||||
|
+ "cli\n\t"
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=a" ( discard_a ), "=b" ( discard_b ),
|
||||||
|
"=c" ( discard_c )
|
||||||
|
: "a" ( character ), "b" ( bios_attr )
|
||||||
|
- : "ebp" );
|
||||||
|
+ : );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/image/bootsector.c ipxe-936134e-funtoo/src/arch/i386/image/bootsector.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/image/bootsector.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/image/bootsector.c 2013-10-10 17:15:33.471801049 +0200
|
||||||
|
@@ -74,7 +74,8 @@
|
||||||
|
* real-mode stack, so we preserve everything we need in
|
||||||
|
* static storage.
|
||||||
|
*/
|
||||||
|
- __asm__ __volatile__ ( REAL_CODE ( /* Save return address off-stack */
|
||||||
|
+ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ /* Save return address off-stack */
|
||||||
|
"popw %%cs:saved_retaddr\n\t"
|
||||||
|
/* Save stack pointer */
|
||||||
|
"movw %%ss, %%ax\n\t"
|
||||||
|
@@ -99,22 +100,27 @@
|
||||||
|
"sti\n\t"
|
||||||
|
"lret\n\t"
|
||||||
|
/* Preserved variables */
|
||||||
|
+ "\nsaved_ebp: .long 0\n\t"
|
||||||
|
"\nsaved_ss: .word 0\n\t"
|
||||||
|
"\nsaved_sp: .word 0\n\t"
|
||||||
|
"\nsaved_retaddr: .word 0\n\t"
|
||||||
|
/* Boot failure return point */
|
||||||
|
"\nbootsector_exec_fail:\n\t"
|
||||||
|
+ /* Restore frame pointer (gcc bug) */
|
||||||
|
+ "\nmovl %%cs:saved_ebp, %%ebp\n\t"
|
||||||
|
/* Restore stack pointer */
|
||||||
|
"movw %%cs:saved_ss, %%ax\n\t"
|
||||||
|
"movw %%ax, %%ss\n\t"
|
||||||
|
"movw %%cs:saved_sp, %%sp\n\t"
|
||||||
|
/* Return via saved address */
|
||||||
|
- "jmp *%%cs:saved_retaddr\n\t" )
|
||||||
|
+ "jmp *%%cs:saved_retaddr\n\t"
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=b" ( discard_b ), "=D" ( discard_D ),
|
||||||
|
"=d" ( discard_d )
|
||||||
|
: "b" ( segment ), "D" ( offset ),
|
||||||
|
"d" ( drive )
|
||||||
|
- : "eax", "ecx", "esi", "ebp" );
|
||||||
|
+ : "eax", "ecx", "esi" );
|
||||||
|
|
||||||
|
DBG ( "Booted disk returned via INT 18 or 19\n" );
|
||||||
|
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/image/elfboot.c ipxe-936134e-funtoo/src/arch/i386/image/elfboot.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/image/elfboot.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/image/elfboot.c 2013-10-10 17:12:58.931054861 +0200
|
||||||
|
@@ -60,9 +60,12 @@
|
||||||
|
|
||||||
|
/* Jump to OS with flat physical addressing */
|
||||||
|
DBGC ( image, "ELF %p starting execution at %lx\n", image, entry );
|
||||||
|
- __asm__ __volatile__ ( PHYS_CODE ( "call *%%edi\n\t" )
|
||||||
|
+ __asm__ __volatile__ ( PHYS_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "call *%%edi\n\t"
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */)
|
||||||
|
: : "D" ( entry )
|
||||||
|
- : "eax", "ebx", "ecx", "edx", "esi", "ebp",
|
||||||
|
+ : "eax", "ebx", "ecx", "edx", "esi",
|
||||||
|
"memory" );
|
||||||
|
|
||||||
|
DBGC ( image, "ELF %p returned\n", image );
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/image/nbi.c ipxe-936134e-funtoo/src/arch/i386/image/nbi.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/image/nbi.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/image/nbi.c 2013-10-10 17:12:58.931054861 +0200
|
||||||
|
@@ -248,7 +248,8 @@
|
||||||
|
imgheader->execaddr.segoff.offset );
|
||||||
|
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
- REAL_CODE ( "pushw %%ds\n\t" /* far pointer to bootp data */
|
||||||
|
+ REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "pushw %%ds\n\t" /* far pointer to bootp data */
|
||||||
|
"pushw %%bx\n\t"
|
||||||
|
"pushl %%esi\n\t" /* location */
|
||||||
|
"pushw %%cs\n\t" /* lcall execaddr */
|
||||||
|
@@ -258,13 +259,15 @@
|
||||||
|
"pushl %%edi\n\t"
|
||||||
|
"lret\n\t"
|
||||||
|
"\n2:\n\t"
|
||||||
|
- "addw $8,%%sp\n\t" /* clean up stack */ )
|
||||||
|
+ "addw $8,%%sp\n\t" /* clean up stack */
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=a" ( rc ), "=D" ( discard_D ), "=S" ( discard_S ),
|
||||||
|
"=b" ( discard_b )
|
||||||
|
: "D" ( imgheader->execaddr.segoff ),
|
||||||
|
"S" ( imgheader->location ),
|
||||||
|
"b" ( __from_data16 ( basemem_packet ) )
|
||||||
|
- : "ecx", "edx", "ebp" );
|
||||||
|
+ : "ecx", "edx" );
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
@@ -288,11 +291,14 @@
|
||||||
|
|
||||||
|
/* Jump to OS with flat physical addressing */
|
||||||
|
__asm__ __volatile__ (
|
||||||
|
- PHYS_CODE ( "pushl %%ebx\n\t" /* bootp data */
|
||||||
|
+ PHYS_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "pushl %%ebx\n\t" /* bootp data */
|
||||||
|
"pushl %%esi\n\t" /* imgheader */
|
||||||
|
"pushl %%eax\n\t" /* loaderinfo */
|
||||||
|
"call *%%edi\n\t"
|
||||||
|
- "addl $12, %%esp\n\t" /* clean up stack */ )
|
||||||
|
+ "addl $12, %%esp\n\t" /* clean up stack */
|
||||||
|
+ "popl %%ebp\n\t" /* discard */
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=a" ( rc ), "=D" ( discard_D ), "=S" ( discard_S ),
|
||||||
|
"=b" ( discard_b )
|
||||||
|
: "D" ( imgheader->execaddr.linear ),
|
||||||
|
@@ -300,7 +306,7 @@
|
||||||
|
imgheader->location.offset ),
|
||||||
|
"b" ( virt_to_phys ( basemem_packet ) ),
|
||||||
|
"a" ( virt_to_phys ( &loaderinfo ) )
|
||||||
|
- : "ecx", "edx", "ebp", "memory" );
|
||||||
|
+ : "ecx", "edx", "memory" );
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
diff -uNr ipxe-936134e/src/arch/i386/interface/pxeparent/pxeparent.c ipxe-936134e-funtoo/src/arch/i386/interface/pxeparent/pxeparent.c
|
||||||
|
--- ipxe-936134e/src/arch/i386/interface/pxeparent/pxeparent.c 2013-06-24 17:14:36.000000000 +0200
|
||||||
|
+++ ipxe-936134e-funtoo/src/arch/i386/interface/pxeparent/pxeparent.c 2013-10-10 17:12:58.931054861 +0200
|
||||||
|
@@ -143,16 +143,19 @@
|
||||||
|
/* Call real-mode entry point. This calling convention will
|
||||||
|
* work with both the !PXE and the PXENV+ entry points.
|
||||||
|
*/
|
||||||
|
- __asm__ __volatile__ ( REAL_CODE ( "pushw %%es\n\t"
|
||||||
|
+ __asm__ __volatile__ ( REAL_CODE ( "pushl %%ebp\n\t" /* gcc bug */
|
||||||
|
+ "pushw %%es\n\t"
|
||||||
|
"pushw %%di\n\t"
|
||||||
|
"pushw %%bx\n\t"
|
||||||
|
"lcall *pxeparent_entry_point\n\t"
|
||||||
|
- "addw $6, %%sp\n\t" )
|
||||||
|
+ "addw $6, %%sp\n\t"
|
||||||
|
+ "popl %%ebp\n\t"
|
||||||
|
+ "popl %%ebp\n\t" /* gcc bug */ )
|
||||||
|
: "=a" ( exit ), "=b" ( discard_b ),
|
||||||
|
"=D" ( discard_D )
|
||||||
|
: "b" ( function ),
|
||||||
|
"D" ( __from_data16 ( &pxeparent_params ) )
|
||||||
|
- : "ecx", "edx", "esi", "ebp" );
|
||||||
|
+ : "ecx", "edx", "esi" );
|
||||||
|
|
||||||
|
/* Determine return status code based on PXENV_EXIT and
|
||||||
|
* PXENV_STATUS
|
|
@ -0,0 +1,103 @@
|
||||||
|
# Copyright 1999-2013 Gentoo Foundation
|
||||||
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
# $Header: /var/cvsroot/gentoo-x86/sys-firmware/ipxe/ipxe-1.0.0_p20130624.ebuild,v 1.7 2013/09/06 16:11:44 ago Exp $
|
||||||
|
|
||||||
|
EAPI=5
|
||||||
|
|
||||||
|
inherit toolchain-funcs eutils
|
||||||
|
|
||||||
|
GIT_REV="936134ed460618e18cc05d677a442d43d5e739a1"
|
||||||
|
GIT_SHORT="936134e"
|
||||||
|
|
||||||
|
DESCRIPTION="Open source network boot (PXE) firmware"
|
||||||
|
HOMEPAGE="http://ipxe.org"
|
||||||
|
SRC_URI="https://git.ipxe.org/ipxe.git/snapshot/${GIT_REV}.tar.bz2 -> ${P}-${GIT_SHORT}.tar.bz2"
|
||||||
|
|
||||||
|
LICENSE="GPL-2"
|
||||||
|
SLOT="0"
|
||||||
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
IUSE="iso +qemu undi usb vmware"
|
||||||
|
|
||||||
|
DEPEND="sys-devel/make
|
||||||
|
dev-lang/perl
|
||||||
|
sys-libs/zlib
|
||||||
|
iso? (
|
||||||
|
sys-boot/syslinux
|
||||||
|
virtual/cdrtools
|
||||||
|
)"
|
||||||
|
RDEPEND=""
|
||||||
|
|
||||||
|
S="${WORKDIR}/ipxe-${GIT_SHORT}/src"
|
||||||
|
|
||||||
|
pkg_setup() {
|
||||||
|
local myld=$(tc-getLD)
|
||||||
|
|
||||||
|
${myld} -v | grep -q "GNU gold" && \
|
||||||
|
ewarn "gold linker unable to handle 16-bit code using ld.bfd. bug #438058"
|
||||||
|
}
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
# Fixes FL-745
|
||||||
|
epatch ${FILESDIR}/ipxe-1.0.0_p20130624-remove-ebp-from-clobber.patch
|
||||||
|
|
||||||
|
cat <<-EOF > "${S}"/config/local/general.h
|
||||||
|
#undef BANNER_TIMEOUT
|
||||||
|
#define BANNER_TIMEOUT 0
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if use vmware; then
|
||||||
|
cat <<-EOF >> "${S}"/config/local/general.h
|
||||||
|
#define VMWARE_SETTINGS
|
||||||
|
#define CONSOLE_VMWARE
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
src_compile() {
|
||||||
|
ipxemake() {
|
||||||
|
# Q='' makes the build verbose since that's what everyone loves now
|
||||||
|
emake Q='' \
|
||||||
|
CC=$(tc-getCC) \
|
||||||
|
LD="$(tc-getLD).bfd" \
|
||||||
|
AR=$(tc-getAR) \
|
||||||
|
OBJCOPY=$(tc-getOBJCOPY) \
|
||||||
|
RANLIB=$(tc-getRANLIB) \
|
||||||
|
OBJDUMP=$(tc-getPROG OBJDUMP objdump) \
|
||||||
|
HOST_CC=$(tc-getBUILD_CC) \
|
||||||
|
${*}
|
||||||
|
}
|
||||||
|
|
||||||
|
export NO_WERROR=1
|
||||||
|
if use qemu; then
|
||||||
|
ipxemake bin/808610de.rom # pxe-e1000.rom (old)
|
||||||
|
ipxemake bin/8086100e.rom # pxe-e1000.rom
|
||||||
|
ipxemake bin/80861209.rom # pxe-eepro100.rom
|
||||||
|
ipxemake bin/10500940.rom # pxe-ne2k_pci.rom
|
||||||
|
ipxemake bin/10222000.rom # pxe-pcnet.rom
|
||||||
|
ipxemake bin/10ec8139.rom # pxe-rtl8139.rom
|
||||||
|
ipxemake bin/1af41000.rom # pxe-virtio.rom
|
||||||
|
fi
|
||||||
|
|
||||||
|
if use vmware; then
|
||||||
|
ipxemake bin/8086100f.mrom # e1000
|
||||||
|
ipxemake bin/808610d3.mrom # e1000e
|
||||||
|
ipxemake bin/10222000.mrom # vlance
|
||||||
|
ipxemake bin/15ad07b0.rom # vmxnet3
|
||||||
|
fi
|
||||||
|
|
||||||
|
use iso && ipxemake bin/ipxe.iso
|
||||||
|
use undi && ipxemake bin/undionly.kpxe
|
||||||
|
use usb && ipxemake bin/ipxe.usb
|
||||||
|
}
|
||||||
|
|
||||||
|
src_install() {
|
||||||
|
insinto /usr/share/ipxe/
|
||||||
|
|
||||||
|
if use qemu || use vmware; then
|
||||||
|
doins bin/*.rom
|
||||||
|
fi
|
||||||
|
use vmware && doins bin/*.mrom
|
||||||
|
use iso && doins bin/*.iso
|
||||||
|
use undi && doins bin/*.kpxe
|
||||||
|
use usb && doins bin/*.usb
|
||||||
|
}
|
Loading…
Reference in New Issue