diff options
-rw-r--r-- | libre/syslinux/PKGBUILD | 172 | ||||
-rw-r--r-- | libre/syslinux/syslinux-6.00-efi-export-kbdmap.patch | 38 | ||||
-rw-r--r-- | libre/syslinux/syslinux-6.00-efi-fix-libcom32.patch | 45 | ||||
-rw-r--r-- | libre/syslinux/syslinux-dont-build-dos-windows-targets.patch | 12 |
4 files changed, 123 insertions, 144 deletions
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD index 05c761fe1..5d6634ee1 100644 --- a/libre/syslinux/PKGBUILD +++ b/libre/syslinux/PKGBUILD @@ -1,11 +1,17 @@ # Maintainer (Arch): Tobias Powalowski <tpowa@archlinux.org> # Maintainer (Arch): Thomas Bächler <thomas@archlinux.org> -# Contributor (Arch): Keshav Padram Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)> +# Contributor (Arch): Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)> # Maintainer: André Silva <emulatorman@parabola.nu> +## "1" to enable IA32-EFI build in Arch x86_64, "0" to disable +_IA32_EFI_IN_ARCH_X64="1" + +_VER="6.03-pre12" +_GIT_TAG="syslinux-${_VER}" + pkgname="syslinux" -pkgver="6.02" -pkgrel="8.1" +pkgver="${_VER/-/}" +pkgrel="3" arch=('x86_64' 'i686') pkgdesc="Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)" url="http://syslinux.zytor.com/" @@ -13,7 +19,7 @@ license=('GPL2') options=('!makeflags' '!emptydirs') backup=('boot/syslinux/syslinux.cfg' 'boot/syslinux/splash.png') -makedepends=('python2' 'nasm' 'gnu-efi-libs') +makedepends=('git' 'python2' 'nasm' 'ncurses' 'lib32-glibc') depends=('perl' 'glibc') optdepends=('perl-passwd-md5: For md5pass' 'perl-digest-sha1: For sha1pass' @@ -23,47 +29,54 @@ optdepends=('perl-passwd-md5: For md5pass' 'efibootmgr: For EFI support' 'dosfstools: For EFI support') install="${pkgname}.install" -source=("https://www.kernel.org/pub/linux/utils/boot/syslinux/${pkgname}-${pkgver}.tar.xz" +source=("${pkgname}::git+http://git.zytor.com/syslinux/syslinux.git#tag=${_GIT_TAG}" + "gnu-efi::git+http://git.code.sf.net/p/gnu-efi/code#commit=3c62e78556aea01e9798380cd46794c6ca09d4bd" 'syslinux.cfg' 'syslinux-install_update' - 'syslinux-6.02-fix-chainloading.patch' - 'syslinux-6.02-fix-bios-isolinux.patch' - 'syslinux-6.02-fix-efi-ovmf.patch' 'splash.png') -md5sums=('6f275813a1b08cf852e55c0a3f8fbc78' +md5sums=('SKIP' + 'SKIP' 'f048880b57e2c5a7017ff8804bfda327' '9376f18fa3e42fc36cffa4cff0a84c09' - '9dbede6b71a4de9e46aac4aad65334d7' - 'adf71eceb4fccecd9a7efe1ab3d54918' - '62d22b101ef2ef53e25b4f86d9f41cb5' 'cb46ca47c6b6323127d908440057d98f') + +_pkgver() { + cd "${srcdir}/${pkgname}/" + echo "$(git describe --tags)" | sed -e 's|syslinux-||g' -e 's|-pre|pre|g' -e 's|-|.|g' +} + prepare() { + mv "${srcdir}/${pkgname}" "${srcdir}/${pkgname}-${pkgver}/" cd "${srcdir}/${pkgname}-${pkgver}/" - ## Do not try to build the Windows or DOS installers and DIAG files + msg "Run git clean" + git clean -x -d -f + + msg "Do not try to build the Windows or DOS installers and DIAG files" sed 's|diag libinstaller dos win32 win64 dosutil txt|libinstaller txt|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true sed 's|win32/syslinux.exe win64/syslinux64.exe||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true sed 's|dosutil/*.com dosutil/*.sys||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true sed 's|dos/syslinux.com||g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true sed 's|INSTALLSUBDIRS = com32 utils dosutil|INSTALLSUBDIRS = com32 utils|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true sed 's|install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|# install -m 644 -c $(INSTALL_DIAG) $(INSTALLROOT)$(DIAGDIR)|g' -i "${srcdir}/${pkgname}-${pkgver}/Makefile" || true + sed 's|-include $(MAKEDIR)/devel.mk||g' -i "${srcdir}/${pkgname}-${pkgver}/mk/syslinux.mk" || true - ## Fix FHS manpage path + msg "Fix FHS manpage path" sed 's|/usr/man|/usr/share/man|g' -i "${srcdir}/${pkgname}-${pkgver}/mk/syslinux.mk" || true - # fix chainloading - # http://bugzilla.syslinux.org/show_bug.cgi?id=31 - # http://www.syslinux.org/archives/2013-October/020971.html - patch -Np1 -i "${srcdir}/syslinux-6.02-fix-chainloading.patch" + cd "${srcdir}/gnu-efi/" - # fix bios booting from isohybrid - # http://www.syslinux.org/archives/2013-November/021189.html - patch -Np1 -i "${srcdir}/syslinux-6.02-fix-bios-isolinux.patch" - - # fix efi booting in qemu/ovmf - # http://bugzilla.syslinux.org/show_bug.cgi?id=23 - patch -Np1 -i "${srcdir}/syslinux-6.02-fix-efi-ovmf.patch" + msg "Run git clean for gnu-efi" + git clean -x -d -f + + msg "Revert gnu-efi Makefile 'make install' problamatic commit" + git revert --no-commit 06744d69273de4945cf0ffcaa4a6abf7cec707b6 + + msg "Prepare gnu-efi source" + cp -r "${srcdir}/gnu-efi/gnu-efi-3.0" "${srcdir}/${pkgname}-${pkgver}/gnu-efi/gnu-efi-3.0" + + cd "${srcdir}/${pkgname}-${pkgver}/" } @@ -71,12 +84,18 @@ _build_syslinux_bios() { rm -rf "${srcdir}/${pkgname}-${pkgver}-bios/" || true cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-bios" + + mkdir -p "${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" cd "${srcdir}/${pkgname}-${pkgver}-bios/" - ## Do not try to build syslinux with our default LDFLAGS, it will fail + msg "Do not try to compile bios build with our default LDFLAGS, it will fail" unset LDFLAGS - make PYTHON="python2" bios - make PYTHON="python2" bios installer + + msg "Run make bios" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios + + msg "Run make bios installer" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios installer } @@ -84,17 +103,37 @@ _build_syslinux_efi64() { rm -rf "${srcdir}/${pkgname}-${pkgver}-efi64/" || true cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi64" + + mkdir -p "${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR/efi64/" + cd "${srcdir}/${pkgname}-${pkgver}-efi64/gnu-efi/gnu-efi-3.0/" + + msg "Unset all compiler FLAGS for gnu-efi efi64 build" + unset CFLAGS + unset CPPFLAGS + unset CXXFLAGS + unset LDFLAGS + unset MAKEFLAGS + + msg "Run make gnu-efi for syslinux efi64" + make ARCH="x86_64" -j1 + + msg "Run make install gnu-efi for syslinux efi64" + make ARCH="x86_64" PREFIX="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR/efi64/" -j1 install + cd "${srcdir}/${pkgname}-${pkgver}-efi64/" - ## Unset all compiler FLAGS for efi64 build + msg "Unset all compiler FLAGS for efi64 build" unset CFLAGS unset CPPFLAGS unset CXXFLAGS unset LDFLAGS unset MAKEFLAGS - make PYTHON="python2" efi64 - make PYTHON="python2" efi64 installer + msg "Run make efi64" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64 + + msg "Run make efi64 installer" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64 installer } @@ -102,17 +141,37 @@ _build_syslinux_efi32() { rm -rf "${srcdir}/${pkgname}-${pkgver}-efi32/" || true cp -r "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/${pkgname}-${pkgver}-efi32" + + mkdir -p "${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR/efi32/" + cd "${srcdir}/${pkgname}-${pkgver}-efi32/gnu-efi/gnu-efi-3.0/" + + msg "Unset all compiler FLAGS for gnu-efi efi32 build" + unset CFLAGS + unset CPPFLAGS + unset CXXFLAGS + unset LDFLAGS + unset MAKEFLAGS + + msg "Run make gnu-efi for syslinux efi32" + make ARCH="ia32" -j1 + + msg "Run make install gnu-efi for syslinux efi32" + make ARCH="ia32" PREFIX="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR/efi32/" install + cd "${srcdir}/${pkgname}-${pkgver}-efi32/" - ## Unset all compiler FLAGS for efi32 build + msg "Unset all compiler FLAGS for efi32 build" unset CFLAGS unset CPPFLAGS unset CXXFLAGS unset LDFLAGS unset MAKEFLAGS - make PYTHON="python2" efi32 - make PYTHON="python2" efi32 installer + msg "Run make efi32" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 + + msg "Run make efi32 installer" + make PYTHON="python2" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 installer } @@ -120,16 +179,22 @@ build() { cd "${srcdir}/${pkgname}-${pkgver}/" - ## Build syslinux-efi if [[ "${CARCH}" == "x86_64" ]]; then + msg "Build syslinux efi64" _build_syslinux_efi64 + + if [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then + msg "Build syslinux efi32" + _build_syslinux_efi32 + fi fi if [[ "${CARCH}" == "i686" ]]; then + msg "Build syslinux efi32" _build_syslinux_efi32 fi - ## Build syslinux-bios + msg "Build syslinux bios" _build_syslinux_bios } @@ -138,36 +203,36 @@ _package_syslinux_bios() { cd "${srcdir}/${pkgname}-${pkgver}-bios/" - ## Install Syslinux bios - make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/bios/" bios install + msg "Install Syslinux bios" + make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/bios/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-bios/OBJDIR" bios install - ## Remove syslinux.exe,syslinux64.exe,syslinux.com and dosutil dir + msg "Remove syslinux.exe,syslinux64.exe,syslinux.com and dosutil dir" rm "${pkgdir}/usr/lib/syslinux/bios"/syslinux.{com,exe} || true rm "${pkgdir}/usr/lib/syslinux/bios/syslinux64.exe" || true rm -rf "${pkgdir}/usr/lib/syslinux/bios/dosutil/" || true - ## Remove com32 and diag dirs + msg "Remove com32 and diag dirs" rm -rf "${pkgdir}/usr/lib/syslinux/bios/diag/" || true rm -rf "${pkgdir}/usr/lib/syslinux/bios/com32/" || true - ## Move extlinux binary to /usr/bin + msg "Move extlinux binary to /usr/bin" install -d "${pkgdir}/usr/bin" mv "${pkgdir}/sbin/extlinux" "${pkgdir}/usr/bin/extlinux" rm -rf "${pkgdir}/sbin/" - ## Install docs + msg "Install syslinux docs" install -d "${pkgdir}/usr/share/doc" cp -ar "${srcdir}/${pkgname}-${pkgver}/doc" "${pkgdir}/usr/share/doc/syslinux" - ## Install the default configuration + msg "Install syslinux.cfg" install -D -m0644 "${srcdir}/syslinux.cfg" "${pkgdir}/boot/syslinux/syslinux.cfg" - ## Install the installation and update script - ## This script is maintained at git://gist.github.com/772138.git + msg "Install the syslinux-install_update script" + ## This script is maintained at https://gist.github.com/pyther/772138 ## Script not yet updated for syslinux-efi install -D -m0755 "${srcdir}/syslinux-install_update" "${pkgdir}/usr/bin/syslinux-install_update" - # Install Parabola splash + msg "Install Parabola splash" install -D -m644 "${srcdir}/splash.png" "${pkgdir}/boot/syslinux/splash.png" } @@ -177,12 +242,20 @@ _package_syslinux_efi() { if [[ "${CARCH}" == "x86_64" ]]; then cd "${srcdir}/${pkgname}-${pkgver}-efi64/" - make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" efi64 install + msg "Install Syslinux efi64" + make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi64/OBJDIR" efi64 install + + if [[ "${_IA32_EFI_IN_ARCH_X64}" == "1" ]]; then + cd "${srcdir}/${pkgname}-${pkgver}-efi32/" + msg "Install Syslinux efi32" + make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 install + fi fi if [[ "${CARCH}" == "i686" ]]; then cd "${srcdir}/${pkgname}-${pkgver}-efi32/" - make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" efi32 install + msg "Install Syslinux efi32" + make INSTALLROOT="${pkgdir}/" AUXDIR="/usr/lib/syslinux/" OBJDIR="${srcdir}/${pkgname}-${pkgver}-efi32/OBJDIR" efi32 install fi } @@ -191,9 +264,10 @@ package() { cd "${srcdir}/${pkgname}-${pkgver}/" + msg "Package Syslinux efi" _package_syslinux_efi + msg "Package Syslinux bios" _package_syslinux_bios } - diff --git a/libre/syslinux/syslinux-6.00-efi-export-kbdmap.patch b/libre/syslinux/syslinux-6.00-efi-export-kbdmap.patch deleted file mode 100644 index cbcd9a6da..000000000 --- a/libre/syslinux/syslinux-6.00-efi-export-kbdmap.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 2a81889c7d680fbe51de63dbbeb4e8c290ec46fa Mon Sep 17 00:00:00 2001 -From: Matt Fleming <matt.fleming@intel.com> -Date: Fri, 21 Jun 2013 07:14:24 +0000 -Subject: efi: Tag symbols with __export - -I missed some symbols previously that are required to be exported when -loading vesamenu.c32. - -Signed-off-by: Matt Fleming <matt.fleming@intel.com> ---- -diff --git a/efi/main.c b/efi/main.c -index 51ff9f3..71333a4 100644 ---- a/efi/main.c -+++ b/efi/main.c -@@ -21,7 +21,7 @@ uint32_t _IdleTimer = 0; - char __lowmem_heap[32]; - uint32_t BIOS_timer_next; - uint32_t timer_irq; --uint8_t KbdMap[256]; -+__export uint8_t KbdMap[256]; - char aux_seg[256]; - - static inline EFI_STATUS -diff --git a/efi/vesa.c b/efi/vesa.c -index d259f60..b4a541b 100644 ---- a/efi/vesa.c -+++ b/efi/vesa.c -@@ -297,7 +297,7 @@ static int efi_vesacon_font_query(uint8_t **font) - return cp865_8x16_font_height; - } - --int __vesacon_i915resolution(int x, int y) -+__export int __vesacon_i915resolution(int x, int y) - { - /* We don't support this function */ - return 1; --- -cgit v0.9.2 diff --git a/libre/syslinux/syslinux-6.00-efi-fix-libcom32.patch b/libre/syslinux/syslinux-6.00-efi-fix-libcom32.patch deleted file mode 100644 index 7460cd195..000000000 --- a/libre/syslinux/syslinux-6.00-efi-fix-libcom32.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 013ef7679a573b3b3454f914f3a7f865991db9f2 Mon Sep 17 00:00:00 2001 -From: Matt Fleming <matt.fleming@intel.com> -Date: Fri, 21 Jun 2013 07:13:16 +0000 -Subject: efi: Export __bcopyxx_len - -We need to provide a __bcopyxx_len symbol for EFI because it's -referenced in generic code in libcom32.c32. Without this change, -libcom32.c32 will fail to load under EFI. - -Signed-off-by: Matt Fleming <matt.fleming@intel.com> ---- -diff --git a/core/include/core.h b/core/include/core.h -index 5736d39..127ac65 100644 ---- a/core/include/core.h -+++ b/core/include/core.h -@@ -26,6 +26,7 @@ extern char cmd_line[]; - extern char ConfigFile[]; - extern char syslinux_banner[]; - extern char copyright_str[]; -+extern unsigned int __bcopyxx_len; - - /* - * Mark symbols that are only used by BIOS as __weak until we can move -@@ -35,7 +36,6 @@ extern char copyright_str[]; - extern __weak uint16_t BIOSName; - extern __weak char KernelName[]; - extern __weak char StackBuf[]; --extern __weak unsigned int __bcopyxx_len; - - extern uint8_t KbdMap[256]; - -diff --git a/efi/main.c b/efi/main.c -index 438e88c..51ff9f3 100644 ---- a/efi/main.c -+++ b/efi/main.c -@@ -153,6 +153,7 @@ void pxenv(void) - uint16_t BIOS_fbm = 1; - far_ptr_t InitStack; - far_ptr_t PXEEntry; -+__export unsigned int __bcopyxx_len = 0; - - void gpxe_unload(void) - { --- -cgit v0.9.2 diff --git a/libre/syslinux/syslinux-dont-build-dos-windows-targets.patch b/libre/syslinux/syslinux-dont-build-dos-windows-targets.patch deleted file mode 100644 index 54151ab87..000000000 --- a/libre/syslinux/syslinux-dont-build-dos-windows-targets.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur syslinux-4.02.orig//Makefile syslinux-4.02//Makefile ---- syslinux-4.02.orig//Makefile 2010-07-21 21:33:13.000000000 +0200 -+++ syslinux-4.02//Makefile 2010-07-22 11:14:03.325522937 +0200 -@@ -54,7 +54,7 @@ - # files that depend only on the B phase, but may have to be regenerated - # for "make installer". - BSUBDIRS = codepage com32 lzo core memdisk mbr memdump gpxe sample \ -- diag libinstaller dos win32 win64 dosutil txt -+ libinstaller txt - ITARGET = - IOBJECTS = $(ITARGET) \ - utils/gethostip utils/isohybrid utils/mkdiskimage \ |