Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=5a696db888086cda94c0b38a3d6421e78cb8feaf

commit 5a696db888086cda94c0b38a3d6421e78cb8feaf
Author: James Buren <[email protected]>
Date:   Sat Nov 9 07:28:47 2013 -0600

syslinux-6.02-3-x86_64
* version bump
* enable i686 efi
* do not install dos/win binaries for bios

diff --git a/source/base-extra/syslinux/FrugalBuild 
b/source/base-extra/syslinux/FrugalBuild
index bd5cf20..9f16b6b 100644
--- a/source/base-extra/syslinux/FrugalBuild
+++ b/source/base-extra/syslinux/FrugalBuild
@@ -3,11 +3,11 @@

pkgname=syslinux
pkgver=6.02
-pkgrel=2
+pkgrel=3
pkgdesc="Bootloaders for FAT, EXT2/3/4, and ISO file systems."
url="http://syslinux.zytor.com";
depends=('coreutils' 'libuuid')
-makedepends=('nasm')
+makedepends=('nasm' 'gnu-efi>=3.0u-3')
conflicts=('extlinux' 'mbrsyslinux')
provides=('extlinux' 'mbrsyslinux')
replaces=('extlinux' 'mbrsyslinux')
@@ -16,18 +16,21 @@ archs=('i686' 'x86_64')
up2date="Flasttar www.kernel.org/pub/linux/utils/boot/$pkgname/"
source=(http://www.kernel.org/pub/linux/utils/boot/$pkgname/$pkgname-$pkgver.tar.xz
 \
README.Frugalware \
-       syslinux-module-config)
-signatures=(${source[0]/.tar.xz/.tar.sign} '' '')
+       syslinux-module-config \
+       remove-dos-win.patch \
+       efi.patch \
+       chainload.patch)
+signatures=(${source[0]/.tar.xz/.tar.sign} '' '' '' '' '')

+unset MAKEFLAGS
unset LDFLAGS

case $CARCH in
i686)
-               MODULES='bios'
+               MODULES='bios efi32'
;;
x86_64)
MODULES='bios efi64'
-               makedepends+=('gnu-efi')
;;
*)
Fmessage "Unsupported CARCH."
@@ -46,10 +49,22 @@ copy_include()

build() {
Fcd
-       Fsed "^firmware = .*$" "firmware = $MODULES" Makefile
-       Fexec make || Fdie
-       Fexec make INSTALLROOT=$Fdestdir MANDIR=/usr/share/man 
AUXDIR=/usr/lib/syslinux install || Fdie
-       Frm /usr/lib/syslinux/com32
+       Fpatchall
+       for i in $MODULES; do
+               Fexec make $i || Fdie
+               Fexec make $i installer || Fdie
+               if [ "$i" = "bios" ]; then
+                       AUXDIR="/usr/lib/syslinux/bios"
+                       Fmkdir $AUXDIR
+                       Fcprel com32/lib/i386/elf.ld $AUXDIR/elf.ld
+               else
+                       AUXDIR="/usr/lib/syslinux"
+                       Fmkdir $AUXDIR/$i
+                       Fcprel com32/lib/${CARCH/i?86/i386}/elf.ld 
$AUXDIR/$i/elf.ld
+               fi
+               Fexec make INSTALLROOT="$Fdestdir" MANDIR="/usr/share/man" 
AUXDIR="$AUXDIR" $i install || Fdie
+       done
+       Frm /usr/lib/syslinux/bios/com32
Fmkdir /usr/include/syslinux /usr/lib/syslinux
copy_include com32/include            com32 n
copy_include core/include             core  n
@@ -57,11 +72,6 @@ build() {
copy_include com32/gplinclude         gpl   n
copy_include bios/version.h           misc  y
copy_include com32/cmenu/libmenu/\*.h menu  y
-       Fcprel com32/lib/i386/elf.ld /usr/lib/syslinux/elf.ld
-       if [ "$CARCH" = "x86_64" ]; then
-               Fmkdir /usr/lib/syslinux/efi64
-               Fcprel com32/lib/x86_64/elf.ld /usr/lib/syslinux/efi64/elf.ld
-       fi
Ffileschmod /usr/include/syslinux 0644
Fdirschmod /usr/include/syslinux 0755
Ffileschmod /usr/lib/syslinux 0644
diff --git a/source/base-extra/syslinux/chainload.patch 
b/source/base-extra/syslinux/chainload.patch
new file mode 100644
index 0000000..6fd7ef4
--- /dev/null
+++ b/source/base-extra/syslinux/chainload.patch
@@ -0,0 +1,47 @@
+Reported-by: Dark Raven <drdarkraven at gmail.com>
+Signed-off-by: Raphael S. Carvalho <raphael.scarv at gmail.com>
+---
+ com32/lib/syslinux/disk.c |   22 ++++++++++++++--------
+ 1 files changed, 14 insertions(+), 8 deletions(-)
+
+diff --git a/com32/lib/syslinux/disk.c b/com32/lib/syslinux/disk.c
+index 0b0c737..47ecb52 100644
+--- a/com32/lib/syslinux/disk.c
++++ b/com32/lib/syslinux/disk.c
+@@ -171,22 +171,28 @@ out:
+ static void *ebios_setup(const struct disk_info *const diskinfo, com32sys_t 
*inreg,
+                        uint64_t lba, uint8_t count, uint8_t op_code)
+ {
+-    static __lowmem struct disk_ebios_dapa dapa;
++    static struct disk_ebios_dapa *dapa = NULL;
+     void *buf;
+
++    if (!dapa) {
++      dapa = lmalloc(sizeof *dapa);
++      if (!dapa)
++          return NULL;
++    }
++
+     buf = lmalloc(count * diskinfo->bps);
+     if (!buf)
+       return NULL;
+
+-    dapa.len = sizeof(dapa);
+-    dapa.count = count;
+-    dapa.off = OFFS(buf);
+-    dapa.seg = SEG(buf);
+-    dapa.lba = lba;
++    dapa->len = sizeof(*dapa);
++    dapa->count = count;
++    dapa->off = OFFS(buf);
++    dapa->seg = SEG(buf);
++    dapa->lba = lba;
+
+     inreg->eax.b[1] = op_code;
+-    inreg->esi.w[0] = OFFS(&dapa);
+-    inreg->ds = SEG(&dapa);
++    inreg->esi.w[0] = OFFS(dapa);
++    inreg->ds = SEG(dapa);
+     inreg->edx.b[0] = diskinfo->disk;
+
+     return buf;
diff --git a/source/base-extra/syslinux/efi.patch 
b/source/base-extra/syslinux/efi.patch
new file mode 100644
index 0000000..94c0cb3
--- /dev/null
+++ b/source/base-extra/syslinux/efi.patch
@@ -0,0 +1,28 @@
+diff -ur a/mk/efi.mk b/mk/efi.mk
+--- a/mk/efi.mk        2013-10-13 12:59:03.000000000 -0500
++++ b/mk/efi.mk        2013-11-09 06:40:33.578925260 -0600
+@@ -23,11 +23,11 @@
+       EFI_SUBARCH = $(ARCH)
+ endif
+
+-EFIINC = $(shell $(topdir)/efi//find-gnu-efi.sh include $(EFI_SUBARCH))
++EFIINC = /usr/include/efi
+ $(if $(EFIINC),, \
+       $(error Missing $(EFI_SUBARCH) gnu-efi header files))
+
+-LIBDIR = $(shell $(topdir)/efi/find-gnu-efi.sh lib $(EFI_SUBARCH))
++LIBDIR = /usr/lib
+ $(if $(LIBDIR),, \
+       $(error Missing $(EFI_SUBARCH) gnu-efi libraries))
+
+@@ -45,8 +45,8 @@
+               -Wno-unused-parameter
+
+ # gnuefi sometimes installs these under a gnuefi/ directory, and sometimes not
+-CRT0 := $(shell find $(LIBDIR) -name crt0-efi-$(EFI_SUBARCH).o 2>/dev/null | 
tail -n1)
+-LDSCRIPT := $(shell find $(LIBDIR) -name elf_$(EFI_SUBARCH)_efi.lds 
2>/dev/null | tail -n1)
++CRT0 := $(LIBDIR)/crt0-efi-$(EFI_SUBARCH).o
++LDSCRIPT := $(LIBDIR)/elf_$(EFI_SUBARCH)_efi.lds
+
+ LDFLAGS = -T $(SRC)/$(ARCH)/syslinux.ld -Bsymbolic -pie -nostdlib 
-znocombreloc \
+               -L$(LIBDIR) --hash-style=gnu -m elf_$(ARCH) $(CRT0) -E
diff --git a/source/base-extra/syslinux/remove-dos-win.patch 
b/source/base-extra/syslinux/remove-dos-win.patch
new file mode 100644
index 0000000..3e722a0
--- /dev/null
+++ b/source/base-extra/syslinux/remove-dos-win.patch
@@ -0,0 +1,70 @@
+diff -ur a/Makefile b/Makefile
+--- a/Makefile 2013-07-04 08:20:20.000000000 -0500
++++ b/Makefile 2013-11-09 07:02:42.763875841 -0600
+@@ -123,7 +123,7 @@
+ #
+
+ ifndef EFI_BUILD
+-MODULES = memdisk/memdisk memdump/memdump.com \
++MODULES = memdisk/memdisk \
+       com32/menu/*.c32 com32/modules/*.c32 com32/mboot/*.c32 \
+       com32/hdt/*.c32 com32/rosh/*.c32 com32/gfxboot/*.c32 \
+       com32/sysdump/*.c32 com32/lua/src/*.c32 com32/chain/*.c32 \
+@@ -149,9 +149,7 @@
+       mbr/*.bin \
+       core/pxelinux.0 core/lpxelinux.0 \
+       core/isolinux.bin core/isolinux-debug.bin \
+-      gpxe/gpxelinux.0 dos/syslinux.com \
+-      win32/syslinux.exe win64/syslinux64.exe \
+-      dosutil/*.com dosutil/*.sys \
++      gpxe/gpxelinux.0 \
+       $(MODULES)
+
+ # BSUBDIRs build the on-target binary components.
+@@ -170,8 +168,8 @@
+
+ else
+
+-BSUBDIRS = codepage com32 lzo core memdisk mbr memdump gpxe sample \
+-         diag libinstaller dos win32 win64 dosutil txt
++BSUBDIRS = codepage com32 lzo core memdisk mbr gpxe sample \
++         libinstaller txt
+
+ ITARGET  =
+ IOBJECTS = $(ITARGET) \
+@@ -186,14 +184,11 @@
+ # Things to install in /usr/lib/syslinux
+ INSTALL_AUX   =       core/pxelinux.0 gpxe/gpxelinux.0 gpxe/gpxelinuxk.0 \
+               core/isolinux.bin core/isolinux-debug.bin \
+-              dos/syslinux.com core/lpxelinux.0 \
++              core/lpxelinux.0 \
+               mbr/*.bin $(INSTALLABLE_MODULES)
+-INSTALL_AUX_OPT = win32/syslinux.exe win64/syslinux64.exe
+-INSTALL_DIAG  =       diag/mbr/handoff.bin \
+-              diag/geodsp/geodsp1s.img.xz diag/geodsp/geodspms.img.xz
+
+ # These directories manage their own installables
+-INSTALLSUBDIRS = com32 utils dosutil
++INSTALLSUBDIRS = com32 utils
+
+ # Things to install in /boot/extlinux
+ EXTBOOTINSTALL = $(INSTALLABLE_MODULES)
+@@ -280,7 +275,7 @@
+
+ #
+ # List the dependencies to help out parallel builds.
+-dos extlinux linux mtools win32 win64: libinstaller
++extlinux linux mtools: libinstaller
+ libinstaller: core
+ utils: mbr
+ core: com32
+@@ -315,9 +310,6 @@
+       install -m 755 -c $(INSTALL_SBIN) $(INSTALLROOT)$(SBINDIR)
+       mkdir -m 755 -p $(INSTALLROOT)$(AUXDIR)
+       install -m 644 -c $(INSTALL_AUX) $(INSTALLROOT)$(AUXDIR)
+-      -install -m 644 -c $(INSTALL_AUX_OPT) $(INSTALLROOT)$(AUXDIR)
+-      mkdir -m 755 -p $(INSTALLROOT)$(DIAGDIR)
+-      install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)
+       mkdir -m 755 -p $(INSTALLROOT)$(MANDIR)/man1
+       install -m 644 -c $(topdir)/man/*.1 $(INSTALLROOT)$(MANDIR)/man1
+       : mkdir -m 755 -p $(INSTALLROOT)$(MANDIR)/man8
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to