Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4cd9fe96d62c83fa04c62a2bafdd2bbd0fe412b8)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Florian Franzmann <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4cd9fe96d62c83fa04c62a2bafdd2bbd0fe412b8)
  • Date: Thu, 31 Aug 2017 18:04:05 +0000

GIT changes to master grimoire by Florian Franzmann
<siflfran AT hawo.stw.uni-erlangen.de>:

utils/syslinux/DETAILS
| 1
utils/syslinux/HISTORY
| 4
utils/syslinux/PRE_BUILD
| 5
utils/syslinux/patches/0001-digest-sha.patch
| 23
utils/syslinux/patches/0002-gfxboot-menu-label.patch
| 49 +
utils/syslinux/patches/0003-extlinux-manpage.patch
| 29
utils/syslinux/patches/0004-gnu-efi-git.patch
| 18
utils/syslinux/patches/0005-load-linux-correct-type.patch
| 19
utils/syslinux/patches/0006-load-linux-protected-mode.patch
| 25
utils/syslinux/patches/0007-sysappend-fix-space-stripping.patch
| 41 +
utils/syslinux/patches/0008-Fix-gcc-5-ALIGN-causing-Boot-error.patch
| 71 ++
utils/syslinux/patches/0009-reproducible-build.patch
| 55 +
utils/syslinux/patches/0010-fix-ftbfs-with-default-pie.patch
| 15

utils/syslinux/patches/0011-bios-Dont-try-to-guess-the-section-alignment.patch
| 292 ++++++++++
utils/syslinux/patches/0012-ldlinux-Fix-return-pointer-to-local-data.patch
| 35 +

utils/syslinux/patches/0013-extlinux-pull-in-sys_sysmacros.h-for-major_minor_makedev.patch
| 33 +
utils/syslinux/patches/0014_fix_ftbfs_no_dynamic_linker.patch
| 13
utils/unetbootin/DETAILS
| 4
utils/unetbootin/HISTORY
| 3
19 files changed, 733 insertions(+), 2 deletions(-)

New commits:
commit 4cd9fe96d62c83fa04c62a2bafdd2bbd0fe412b8
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

utils/unetbootin: version 655

commit 64c84de39b9392442610a6185ab833a67cfa5221
Author: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
Commit: Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>

utils/syslinux: add bugfix patches from Debian

diff --git a/utils/syslinux/DETAILS b/utils/syslinux/DETAILS
index 693df73..69b04be 100755
--- a/utils/syslinux/DETAILS
+++ b/utils/syslinux/DETAILS
@@ -1,5 +1,6 @@
SPELL=syslinux
VERSION=6.03
+ PATCHLEVEL=1

SOURCE_HASH=sha512:dd2b2916962b9e93bc1e714182e3ca2a727a229b8afabe913050bcfdd43ee2af51ee3acf79121d8c20caf434583efaa7f3196871e0e07c04d82191323a50fe31
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
diff --git a/utils/syslinux/HISTORY b/utils/syslinux/HISTORY
index bf567fe..9fd17ff 100644
--- a/utils/syslinux/HISTORY
+++ b/utils/syslinux/HISTORY
@@ -1,3 +1,7 @@
+2017-08-31 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * PRE_BUILD, patches/*: add bugfixes from Debian
+ * DETAILS: PATCHLEVEL++
+
2015-06-01 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: Fixed SOURCE_URL[0]
updated spell to 6.03
diff --git a/utils/syslinux/PRE_BUILD b/utils/syslinux/PRE_BUILD
new file mode 100755
index 0000000..c14dcc8
--- /dev/null
+++ b/utils/syslinux/PRE_BUILD
@@ -0,0 +1,5 @@
+default_pre_build &&
+
+cd "$SOURCE_DIRECTORY" &&
+
+apply_patch_dir patches
diff --git a/utils/syslinux/patches/0001-digest-sha.patch
b/utils/syslinux/patches/0001-digest-sha.patch
new file mode 100644
index 0000000..8076114
--- /dev/null
+++ b/utils/syslinux/patches/0001-digest-sha.patch
@@ -0,0 +1,23 @@
+Author: Salvatore Bonaccorso <carnil AT debian.org>
+Description: use Digest::SHA for utils/sha1pass (Closes: #625812).
+
+diff -Naurp syslinux.orig/utils/sha1pass syslinux/utils/sha1pass
+--- syslinux.orig/utils/sha1pass
++++ syslinux/utils/sha1pass
+@@ -1,7 +1,7 @@
+ #!/usr/bin/perl
+
+ use bytes;
+-use Digest::SHA1;
++use Digest::SHA;
+ use MIME::Base64;
+
+ sub random_bytes($) {
+@@ -29,6 +29,6 @@ sub random_bytes($) {
+ unless (defined($salt)) {
+ $salt = MIME::Base64::encode(random_bytes(6), '');
+ }
+-$pass = Digest::SHA1::sha1_base64($salt, $pass);
++$pass = Digest::SHA::sha1_base64($salt, $pass);
+
+ print '$4$', $salt, '$', $pass, "\$\n";
diff --git a/utils/syslinux/patches/0002-gfxboot-menu-label.patch
b/utils/syslinux/patches/0002-gfxboot-menu-label.patch
new file mode 100644
index 0000000..eb0df01
--- /dev/null
+++ b/utils/syslinux/patches/0002-gfxboot-menu-label.patch
@@ -0,0 +1,49 @@
+Author: Colin Watson <cjwatson AT ubuntu.com>
+Description:
+ Allow boot entry to start with label instead of menu_label.
+ .
+ menu_ptr->menu_label is human-readable (perhaps even translatable!) text if
+ the MENU LABEL command is used, which isn't very convenient at the start of
+ a boot entry. Allow the entry to start with menu_ptr->label (an
+ identifier) as an alternative.
+
+diff -Naurp syslinux.orig/com32/gfxboot/gfxboot.c
syslinux/com32/gfxboot/gfxboot.c
+--- syslinux.orig/com32/gfxboot/gfxboot.c
++++ syslinux/com32/gfxboot/gfxboot.c
+@@ -810,7 +810,7 @@ void boot(int index)
+ {
+ char *arg, *alt_kernel;
+ menu_t *menu_ptr;
+- int i, label_len;
++ int i, label_len, menu_label_len;
+ unsigned ipapp;
+ const struct syslinux_ipappend_strings *ipappend;
+ char *gfxboot_cwd = (char *) gfx_config.gfxboot_cwd;
+@@ -828,18 +828,22 @@ void boot(int index)
+ if(!menu_ptr || !menu_ptr->menu_label) return;
+
+ arg = skipspace(cmdline);
+- label_len = strlen(menu_ptr->menu_label);
++ label_len = strlen(menu_ptr->label);
++ menu_label_len = strlen(menu_ptr->menu_label);
+
+ // if it does not start with label string, assume first word is kernel
name
+- if(strncmp(arg, menu_ptr->menu_label, label_len)) {
++ if(!strncmp(arg, menu_ptr->label, label_len)) {
++ arg += label_len;
++ }
++ else if(!strncmp(arg, menu_ptr->menu_label, menu_label_len)) {
++ arg += menu_label_len;
++ }
++ else {
+ alt_kernel = arg;
+ arg = skip_nonspaces(arg);
+ if(*arg) *arg++ = 0;
+ if(*alt_kernel) menu_ptr->alt_kernel = alt_kernel;
+ }
+- else {
+- arg += label_len;
+- }
+
+ arg = skipspace(arg);
+
diff --git a/utils/syslinux/patches/0003-extlinux-manpage.patch
b/utils/syslinux/patches/0003-extlinux-manpage.patch
new file mode 100644
index 0000000..682d556
--- /dev/null
+++ b/utils/syslinux/patches/0003-extlinux-manpage.patch
@@ -0,0 +1,29 @@
+Author: Daniel Baumann <mail AT daniel-baumann.ch>
+Description:
+ Updating list of supported filesystems in extlinux manpage (Closes:
#692844).
+
+diff -Naurp syslinux.orig/man/extlinux.1 syslinux/man/extlinux.1
+--- syslinux.orig/man/extlinux.1
++++ syslinux/man/extlinux.1
+@@ -1,17 +1,17 @@
+-.TH extlinux "1" "18 December 2007" "SYSLINUX for ext2/ext3 filesystem"
++.TH extlinux "1" "18 December 2007" "SYSLINUX for ext2/ext3/ext4/btrfs
filesystem"
+ .SH NAME
+-extlinux \- install the \s-1SYSLINUX\s+1 bootloader on a ext2/ext3
filesystem
++extlinux \- install the \s-1SYSLINUX\s+1 bootloader on a
ext2/ext3/ext4/btrfs filesystem
+ .SH SYNOPSIS
+ .B extlinux
+ [\fIoptions\fP] \fIdirectory\fP
+ .SH DESCRIPTION
+-\fBEXTLINUX\fP is a new syslinux derivative, which boots from a Linux
ext2/ext3
++\fBEXTLINUX\fP is a new syslinux derivative, which boots from a Linux
ext2/ext3/ext4 or btrfs
+ filesystem. It works the same way as \fBSYSLINUX\fP, with a few slight
modifications.
+ It is intended to simplify first-time installation of Linux, and for
creation of
+ rescue and other special-purpose boot disks.
+ .PP
+ The installer is designed to be run on a mounted directory. For example,
if you have an
+-ext2 or ext3 usb key mounted on /mnt, you can run the following command:
++ext2, ext3, ext4, or btrfs usb key mounted on /mnt, you can run the
following command:
+ .IP
+ .B extlinux --install /mnt
+ .SH OPTIONS
diff --git a/utils/syslinux/patches/0004-gnu-efi-git.patch
b/utils/syslinux/patches/0004-gnu-efi-git.patch
new file mode 100644
index 0000000..0284c38
--- /dev/null
+++ b/utils/syslinux/patches/0004-gnu-efi-git.patch
@@ -0,0 +1,18 @@
+Author: Daniel Baumann <mail AT daniel-baumann.ch>
+Description: Use embedded copy of gnu-efi.
+
+diff -Naurp syslinux.orig/efi/clean-gnu-efi.sh syslinux/efi/clean-gnu-efi.sh
+--- syslinux.orig/efi/clean-gnu-efi.sh
++++ syslinux/efi/clean-gnu-efi.sh
+@@ -21,11 +21,6 @@ fi
+ ARCH="$1"
+ objdir=$(readlink -f "$2")
+
+-(
+- cd ../..
+- git submodule update --init
+-)
+-
+ if [ -d "$objdir/gnu-efi" ];then
+ cd "$objdir/gnu-efi"
+ EFIDIR="$(readlink -f "$objdir/../gnu-efi/gnu-efi-3.0")"
diff --git a/utils/syslinux/patches/0005-load-linux-correct-type.patch
b/utils/syslinux/patches/0005-load-linux-correct-type.patch
new file mode 100644
index 0000000..10d29cb
--- /dev/null
+++ b/utils/syslinux/patches/0005-load-linux-correct-type.patch
@@ -0,0 +1,19 @@
+Author: Scot Doyle <lkml14 AT scotdoyle.com>
+Description: load_linux: correct a type
+ Correct base's type to match its initialization from prot_mode_base and
+ passage to syslinux_memmap_find(). Tested with extlinux.
+
+diff -Naurp syslinux.orig/com32/lib/syslinux/load_linux.c
syslinux/com32/lib/syslinux/load_linux.c
+--- syslinux.orig/com32/lib/syslinux/load_linux.c
++++ syslinux/com32/lib/syslinux/load_linux.c
+@@ -155,8 +155,8 @@ int bios_boot_linux(void *kernel_buf, si
+ char *cmdline)
+ {
+ struct linux_header hdr, *whdr;
+- size_t real_mode_size, prot_mode_size, base;
+- addr_t real_mode_base, prot_mode_base, prot_mode_max;
++ size_t real_mode_size, prot_mode_size;
++ addr_t real_mode_base, prot_mode_base, prot_mode_max, base;
+ addr_t irf_size;
+ size_t cmdline_size, cmdline_offset;
+ struct setup_data *sdp;
diff --git a/utils/syslinux/patches/0006-load-linux-protected-mode.patch
b/utils/syslinux/patches/0006-load-linux-protected-mode.patch
new file mode 100644
index 0000000..58bda3b
--- /dev/null
+++ b/utils/syslinux/patches/0006-load-linux-protected-mode.patch
@@ -0,0 +1,25 @@
+Author: Scot Doyle <lkml14 AT scotdoyle.com>
+Description: load_linux: relocate protected-mode code as intended
+ If the kernel is relocatable and the protected mode code will not fit
+ in the initially determined location, that code will be moved to the
+ next available location. However, beginning with commit 8f470e7b, the
+ code is moved to the initially determined location instead of the next
+ available location because prot_mode_base is no longer updated to the
+ correct location. Since whdr->code32_start is updated, it is pointing
+ to the wrong execution start location, random code is executed and
+ the machine is rebooted.
+ .
+ Restore the old behavior by assigning prot_mode_base the value of
+ base. Tested on a machine that exposed this behavior.
+
+diff -Naurp syslinux.orig/com32/lib/syslinux/load_linux.c
syslinux/com32/lib/syslinux/load_linux.c
+--- syslinux.orig/com32/lib/syslinux/load_linux.c
++++ syslinux/com32/lib/syslinux/load_linux.c
+@@ -323,6 +323,7 @@ int bios_boot_linux(void *kernel_buf, si
+ }
+
+ whdr->code32_start += base - prot_mode_base;
++ prot_mode_base = base;
+
+ /* Real mode code */
+ if (syslinux_memmap_find(amap, &real_mode_base,
diff --git a/utils/syslinux/patches/0007-sysappend-fix-space-stripping.patch
b/utils/syslinux/patches/0007-sysappend-fix-space-stripping.patch
new file mode 100644
index 0000000..a39bd9b
--- /dev/null
+++ b/utils/syslinux/patches/0007-sysappend-fix-space-stripping.patch
@@ -0,0 +1,41 @@
+Author: Dany St-Amant <dany.ephemeral.2014 AT icloud.com>
+Description: SYSAPPEND: Fix space stripping
+ The description of SYSAPPEND for the DMI information states that the spaces
+ are replaced by underscores, but this replacement does not occur in 6.03
(Closes: #795596).
+
+diff -Naurp syslinux.orig/com32/elflink/ldlinux/readconfig.c
syslinux/com32/elflink/ldlinux/readconfig.c
+--- syslinux.orig/com32/elflink/ldlinux/readconfig.c
++++ syslinux/com32/elflink/ldlinux/readconfig.c
+@@ -330,7 +330,7 @@ static char *copy_sysappend_string(char
+ char c;
+
+ while ((c = *src++)) {
+- if (c <= ' ' && c == '\x7f') {
++ if (c <= ' ' || c == '\x7f') {
+ if (!was_space)
+ *dst++ = '_';
+ was_space = true;
+diff -Naurp syslinux.orig/com32/menu/readconfig.c
syslinux/com32/menu/readconfig.c
+--- syslinux.orig/com32/menu/readconfig.c
++++ syslinux/com32/menu/readconfig.c
+@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char
+ char c;
+
+ while ((c = *src++)) {
+- if (c <= ' ' && c == '\x7f') {
++ if (c <= ' ' || c == '\x7f') {
+ if (!was_space)
+ *dst++ = '_';
+ was_space = true;
+diff -Naurp syslinux.orig/core/sysappend.c syslinux/core/sysappend.c
+--- syslinux.orig/core/sysappend.c
++++ syslinux/core/sysappend.c
+@@ -35,7 +35,7 @@ static char *copy_and_mangle(char *dst,
+ char c;
+
+ while ((c = *src++)) {
+- if (c <= ' ' && c == '\x7f') {
++ if (c <= ' ' || c == '\x7f') {
+ if (!was_space)
+ *dst++ = '_';
+ was_space = true;
diff --git
a/utils/syslinux/patches/0008-Fix-gcc-5-ALIGN-causing-Boot-error.patch
b/utils/syslinux/patches/0008-Fix-gcc-5-ALIGN-causing-Boot-error.patch
new file mode 100644
index 0000000..bf6c2de
--- /dev/null
+++ b/utils/syslinux/patches/0008-Fix-gcc-5-ALIGN-causing-Boot-error.patch
@@ -0,0 +1,71 @@
+commit e5f2b577ded109291c9632dacb6eaa621d8a59fe
+Author: Sylvain Gault <sylvain.gault AT gmail.com>
+Date: Tue Sep 29 02:38:25 2015 +0200
+
+ bios: Fix alignment change with gcc 5
+
+ The section aligment specified in the ld scripts have to be greater or
+ equal to those in the .o files generated by gcc.
+
+ Signed-off-by: Sylvain Gault <sylvain.gault AT gmail.com>
+ Tested-by: poma <pomidorabelisima AT gmail.com>
+ Signed-off-by: Paulo Alcantara <pcacjr AT zytor.com>
+
+--- a/core/i386/syslinux.ld
++++ b/core/i386/syslinux.ld
+@@ -266,7 +266,7 @@
+ __text_end = .;
+ }
+
+- . = ALIGN(16);
++ . = ALIGN(32);
+
+ __rodata_vma = .;
+ __rodata_lma = __rodata_vma + __text_lma - __text_vma;
+@@ -361,7 +361,7 @@
+ __dynamic_end = .;
+ }
+
+- . = ALIGN(16);
++ . = ALIGN(32);
+
+ __data_vma = .;
+ __data_lma = __data_vma + __text_lma - __text_vma;
+@@ -377,7 +377,7 @@
+ __pm_code_dwords = (__pm_code_len + 3) >> 2;
+
+ . = ALIGN(128);
+-
++
+ __bss_vma = .;
+ __bss_lma = .; /* Dummy */
+ .bss (NOLOAD) : AT (__bss_lma) {
+--- a/core/x86_64/syslinux.ld
++++ b/core/x86_64/syslinux.ld
+@@ -266,7 +266,7 @@
+ __text_end = .;
+ }
+
+- . = ALIGN(16);
++ . = ALIGN(32);
+
+ __rodata_vma = .;
+ __rodata_lma = __rodata_vma + __text_lma - __text_vma;
+@@ -361,7 +361,7 @@
+ __dynamic_end = .;
+ }
+
+- . = ALIGN(16);
++ . = ALIGN(32);
+
+ __data_vma = .;
+ __data_lma = __data_vma + __text_lma - __text_vma;
+@@ -377,7 +377,7 @@
+ __pm_code_dwords = (__pm_code_len + 3) >> 2;
+
+ . = ALIGN(128);
+-
++
+ __bss_vma = .;
+ __bss_lma = .; /* Dummy */
+ .bss (NOLOAD) : AT (__bss_lma) {
diff --git a/utils/syslinux/patches/0009-reproducible-build.patch
b/utils/syslinux/patches/0009-reproducible-build.patch
new file mode 100644
index 0000000..4e4b640
--- /dev/null
+++ b/utils/syslinux/patches/0009-reproducible-build.patch
@@ -0,0 +1,55 @@
+Author: Reiner Herrmann <reiner AT reiner-h.de>
+Description: Sort object files for reproducible linking order
+
+--- a/com32/hdt/Makefile
++++ b/com32/hdt/Makefile
+@@ -25,7 +25,7 @@
+ MODULES = hdt.c32
+ TESTFILES =
+
+-OBJS = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(wildcard $(SRC)/*.c)))
++OBJS = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(sort $(wildcard
$(SRC)/*.c))))
+ VERSION = $(shell $(SED) -n 's/\#define VERSION \"\(.*\)\"/\1/p' hdt.h)
+ CODENAME = $(shell $(SED) -n 's/\#define CODENAME \"\(.*\)\"/\1/p' hdt.h)
+ NODASH_VERSION = $(shell echo $(VERSION) | $(SED) -e 's/-/_/g' | $(SED) -e
's/\./_/g')
+--- a/com32/sysdump/Makefile
++++ b/com32/sysdump/Makefile
+@@ -27,7 +27,7 @@
+ MODULES = sysdump.c32
+ TESTFILES =
+
+-SRCS = $(wildcard $(SRC)/*.c)
++SRCS = $(sort $(wildcard $(SRC)/*.c))
+ OBJS = $(subst $(SRC)/,,$(patsubst %.c,%.o,$(SRCS)))
+
+ # The DATE is set on the make command line when building binaries for
+--- a/efi/Makefile
++++ b/efi/Makefile
+@@ -17,15 +17,15 @@
+ # Upstream gnu-efi has old-style function definitions.
+ CFLAGS += -Wno-strict-prototypes
+
+-CORE_CSRC := $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c)
++CORE_CSRC := $(sort $(wildcard $(core)/*.c $(core)/*/*.c $(core)/*/*/*.c))
+ CORE_COBJ := $(subst $(core),$(OBJ)/../core/,$(patsubst
%.c,%.o,$(CORE_CSRC)))
+
+ # We don't want to include any of the networking stack or the thread
+ # code since it will be implemented completely differently for EFI.
+-FILTERED_OBJS:= $(subst $(core),$(OBJ)/../core/,$(patsubst %.c,%.o, \
++FILTERED_OBJS:= $(sort $(subst $(core),$(OBJ)/../core/,$(patsubst %.c,%.o, \
+ $(wildcard $(core)/legacynet/*.c) \
+ $(wildcard $(core)/fs/pxe/*.c) \
+- $(wildcard $(core)/thread/*.c)))
++ $(wildcard $(core)/thread/*.c))))
+
+ # Don't include unit tests
+ FILTERED_OBJS += $(subst $(core),$(OBJ)/../core/, \
+@@ -44,7 +44,7 @@
+ LIB_OBJS = $(addprefix $(objdir)/com32/lib/,$(CORELIBOBJS)) \
+ $(LIBEFI)
+
+-CSRC = $(wildcard $(SRC)/*.c)
++CSRC = $(sort $(wildcard $(SRC)/*.c))
+ OBJS = $(subst $(SRC)/,,$(filter-out %wrapper.o, $(patsubst
%.c,%.o,$(CSRC))))
+
+ OBJS += $(objdir)/core/codepage.o $(ARCH)/linux.o
diff --git a/utils/syslinux/patches/0010-fix-ftbfs-with-default-pie.patch
b/utils/syslinux/patches/0010-fix-ftbfs-with-default-pie.patch
new file mode 100644
index 0000000..534fec0
--- /dev/null
+++ b/utils/syslinux/patches/0010-fix-ftbfs-with-default-pie.patch
@@ -0,0 +1,15 @@
+Description: Fix FTBFS when GCC configured with --enable-default-pie
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1579023
+Author: Graham Inggs <ginggs AT debian.org>
+Last-Update: 2016-05-20
+--- a/gpxe/src/Makefile
++++ b/gpxe/src/Makefile
+@@ -4,7 +4,7 @@
+ #
+
+ CLEANUP :=
+-CFLAGS :=
++CFLAGS := -fno-pie
+ ASFLAGS :=
+ LDFLAGS :=
+ MAKEDEPS := Makefile
diff --git
a/utils/syslinux/patches/0011-bios-Dont-try-to-guess-the-section-alignment.patch

b/utils/syslinux/patches/0011-bios-Dont-try-to-guess-the-section-alignment.patch
new file mode 100644
index 0000000..0848cfe
--- /dev/null
+++
b/utils/syslinux/patches/0011-bios-Dont-try-to-guess-the-section-alignment.patch
@@ -0,0 +1,292 @@
+From 0cc9a99e560a2f52bcf052fd85b1efae35ee812f Mon Sep 17 00:00:00 2001
+From: Sylvain Gault <sylvain.gault AT gmail.com>
+Date: Tue, 29 Sep 2015 04:45:09 +0200
+Subject: [PATCH] bios: Don't try to guess the sections alignment
+
+For the compression / decompression to succeed, the sections layout must
+be the same between the virtual memory and load memory. The section
+alignment was kept in sync by introducing aligment that should be
+greater or equal to the actual section alignment.
+
+This patch compute the load memory addresses of the sections so that
+the layout is the same as the virtual memory addresses.
+
+Signed-off-by: Sylvain Gault <sylvain.gault AT gmail.com>
+Tested-by: poma <pomidorabelisima AT gmail.com>
+Signed-off-by: Paulo Alcantara <pcacjr AT zytor.com>
+---
+ core/i386/syslinux.ld | 63
++++++++++---------------------------------------
+ core/x86_64/syslinux.ld | 63
++++++++++---------------------------------------
+ 2 files changed, 24 insertions(+), 102 deletions(-)
+
+diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld
+index 7390451..92b75b1 100644
+--- a/core/i386/syslinux.ld
++++ b/core/i386/syslinux.ld
+@@ -255,10 +255,9 @@ SECTIONS
+ . = 0x100000;
+
+ __pm_code_start = .;
++ __vma_to_lma = __pm_code_lma - __pm_code_start;
+
+- __text_vma = .;
+- __text_lma = __pm_code_lma;
+- .text : AT(__text_lma) {
++ .text : AT(ADDR(.text) + __vma_to_lma) {
+ FILL(0x90909090)
+ __text_start = .;
+ *(.text)
+@@ -266,106 +265,68 @@ SECTIONS
+ __text_end = .;
+ }
+
+- . = ALIGN(32);
+-
+- __rodata_vma = .;
+- __rodata_lma = __rodata_vma + __text_lma - __text_vma;
+- .rodata : AT(__rodata_lma) {
++ .rodata : AT(ADDR(.rodata) + __vma_to_lma) {
+ __rodata_start = .;
+ *(.rodata)
+ *(.rodata.*)
+ __rodata_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __ctors_vma = .;
+- __ctors_lma = __ctors_vma + __text_lma - __text_vma;
+- .ctors : AT(__ctors_lma) {
++ .ctors : AT(ADDR(.ctors) + __vma_to_lma) {
+ __ctors_start = .;
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __ctors_end = .;
+ }
+
+- __dtors_vma = .;
+- __dtors_lma = __dtors_vma + __text_lma - __text_vma;
+- .dtors : AT(__dtors_lma) {
++ .dtors : AT(ADDR(.dtors) + __vma_to_lma) {
+ __dtors_start = .;
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __dtors_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __dynsym_vma = .;
+- __dynsym_lma = __dynsym_vma + __text_lma - __text_vma;
+- .dynsym : AT(__dynsym_lma) {
++ .dynsym : AT(ADDR(.dynsym) + __vma_to_lma) {
+ __dynsym_start = .;
+ *(.dynsym)
+ __dynsym_end = .;
+ }
+ __dynsym_len = __dynsym_end - __dynsym_start;
+
+- . = ALIGN(4);
+-
+- __dynstr_vma = .;
+- __dynstr_lma = __dynstr_vma + __text_lma - __text_vma;
+- .dynstr : AT(__dynstr_lma) {
++ .dynstr : AT(ADDR(.dynstr) + __vma_to_lma) {
+ __dynstr_start = .;
+ *(.dynstr)
+ __dynstr_end = .;
+ }
+ __dynstr_len = __dynstr_end - __dynstr_start;
+
+- . = ALIGN(4);
+-
+- __gnu_hash_vma = .;
+- __gnu_hash_lma = __gnu_hash_vma + __text_lma - __text_vma;
+- .gnu.hash : AT(__gnu_hash_lma) {
++ .gnu.hash : AT(ADDR(.gnu.hash) + __vma_to_lma) {
+ __gnu_hash_start = .;
+ *(.gnu.hash)
+ __gnu_hash_end = .;
+ }
+
+
+- . = ALIGN(4);
+-
+- __dynlink_vma = .;
+- __dynlink_lma = __dynlink_vma + __text_lma - __text_vma;
+- .dynlink : AT(__dynlink_lma) {
++ .dynlink : AT(ADDR(.dynlink) + __vma_to_lma) {
+ __dynlink_start = .;
+ *(.dynlink)
+ __dynlink_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __got_vma = .;
+- __got_lma = __got_vma + __text_lma - __text_vma;
+- .got : AT(__got_lma) {
++ .got : AT(ADDR(.got) + __vma_to_lma) {
+ __got_start = .;
+ KEEP (*(.got.plt))
+ KEEP (*(.got))
+ __got_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __dynamic_vma = .;
+- __dynamic_lma = __dynamic_vma + __text_lma - __text_vma;
+- .dynamic : AT(__dynamic_lma) {
++ .dynamic : AT(ADDR(.dynamic) + __vma_to_lma) {
+ __dynamic_start = .;
+ *(.dynamic)
+ __dynamic_end = .;
+ }
+
+- . = ALIGN(32);
+-
+- __data_vma = .;
+- __data_lma = __data_vma + __text_lma - __text_vma;
+- .data : AT(__data_lma) {
++ .data : AT(ADDR(.data) + __vma_to_lma) {
+ __data_start = .;
+ *(.data)
+ *(.data.*)
+diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld
+index bf815c4..70c6e00 100644
+--- a/core/x86_64/syslinux.ld
++++ b/core/x86_64/syslinux.ld
+@@ -255,10 +255,9 @@ SECTIONS
+ . = 0x100000;
+
+ __pm_code_start = .;
++ __vma_to_lma = __pm_code_lma - __pm_code_start;
+
+- __text_vma = .;
+- __text_lma = __pm_code_lma;
+- .text : AT(__text_lma) {
++ .text : AT(ADDR(.text) + __vma_to_lma) {
+ FILL(0x90909090)
+ __text_start = .;
+ *(.text)
+@@ -266,106 +265,68 @@ SECTIONS
+ __text_end = .;
+ }
+
+- . = ALIGN(32);
+-
+- __rodata_vma = .;
+- __rodata_lma = __rodata_vma + __text_lma - __text_vma;
+- .rodata : AT(__rodata_lma) {
++ .rodata : AT(ADDR(.rodata) + __vma_to_lma) {
+ __rodata_start = .;
+ *(.rodata)
+ *(.rodata.*)
+ __rodata_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __ctors_vma = .;
+- __ctors_lma = __ctors_vma + __text_lma - __text_vma;
+- .ctors : AT(__ctors_lma) {
++ .ctors : AT(ADDR(.ctors) + __vma_to_lma) {
+ __ctors_start = .;
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __ctors_end = .;
+ }
+
+- __dtors_vma = .;
+- __dtors_lma = __dtors_vma + __text_lma - __text_vma;
+- .dtors : AT(__dtors_lma) {
++ .dtors : AT(ADDR(.dtors) + __vma_to_lma) {
+ __dtors_start = .;
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __dtors_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __dynsym_vma = .;
+- __dynsym_lma = __dynsym_vma + __text_lma - __text_vma;
+- .dynsym : AT(__dynsym_lma) {
++ .dynsym : AT(ADDR(.dynsym) + __vma_to_lma) {
+ __dynsym_start = .;
+ *(.dynsym)
+ __dynsym_end = .;
+ }
+ __dynsym_len = __dynsym_end - __dynsym_start;
+
+- . = ALIGN(4);
+-
+- __dynstr_vma = .;
+- __dynstr_lma = __dynstr_vma + __text_lma - __text_vma;
+- .dynstr : AT(__dynstr_lma) {
++ .dynstr : AT(ADDR(.dynstr) + __vma_to_lma) {
+ __dynstr_start = .;
+ *(.dynstr)
+ __dynstr_end = .;
+ }
+ __dynstr_len = __dynstr_end - __dynstr_start;
+
+- . = ALIGN(4);
+-
+- __gnu_hash_vma = .;
+- __gnu_hash_lma = __gnu_hash_vma + __text_lma - __text_vma;
+- .gnu.hash : AT(__gnu_hash_lma) {
++ .gnu.hash : AT(ADDR(.gnu.hash) + __vma_to_lma) {
+ __gnu_hash_start = .;
+ *(.gnu.hash)
+ __gnu_hash_end = .;
+ }
+
+
+- . = ALIGN(4);
+-
+- __dynlink_vma = .;
+- __dynlink_lma = __dynlink_vma + __text_lma - __text_vma;
+- .dynlink : AT(__dynlink_lma) {
++ .dynlink : AT(ADDR(.dynlink) + __vma_to_lma) {
+ __dynlink_start = .;
+ *(.dynlink)
+ __dynlink_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __got_vma = .;
+- __got_lma = __got_vma + __text_lma - __text_vma;
+- .got : AT(__got_lma) {
++ .got : AT(ADDR(.got) + __vma_to_lma) {
+ __got_start = .;
+ KEEP (*(.got.plt))
+ KEEP (*(.got))
+ __got_end = .;
+ }
+
+- . = ALIGN(4);
+-
+- __dynamic_vma = .;
+- __dynamic_lma = __dynamic_vma + __text_lma - __text_vma;
+- .dynamic : AT(__dynamic_lma) {
++ .dynamic : AT(ADDR(.dynamic) + __vma_to_lma) {
+ __dynamic_start = .;
+ *(.dynamic)
+ __dynamic_end = .;
+ }
+
+- . = ALIGN(32);
+-
+- __data_vma = .;
+- __data_lma = __data_vma + __text_lma - __text_vma;
+- .data : AT(__data_lma) {
++ .data : AT(ADDR(.data) + __vma_to_lma) {
+ __data_start = .;
+ *(.data)
+ *(.data.*)
+--
+2.7.4.GIT
+
diff --git
a/utils/syslinux/patches/0012-ldlinux-Fix-return-pointer-to-local-data.patch
b/utils/syslinux/patches/0012-ldlinux-Fix-return-pointer-to-local-data.patch
new file mode 100644
index 0000000..59191e5
--- /dev/null
+++
b/utils/syslinux/patches/0012-ldlinux-Fix-return-pointer-to-local-data.patch
@@ -0,0 +1,35 @@
+From 8dc6d758b564a1ccc44c3ae11f265d43628219ce Mon Sep 17 00:00:00 2001
+From: Sylvain Gault <sylvain.gault AT gmail.com>
+Date: Tue, 13 Oct 2015 06:18:07 +0200
+Subject: [PATCH] ldlinux: Fix return pointer to local data
+
+The command-line parsing used to return a pointer to a local array. The
+code used to work by chance, but now, gcc 5 is able to detect it and
+return a NULL pointer instead.
+
+The buffer is now marked static. This shouldn't be a problem as only one
+command line can be read at a time.
+
+Signed-off-by: Sylvain Gault <sylvain.gault AT gmail.com>
+Tested-by: poma <pomidorabelisima at gmail.com>
+Signed-off-by: Paulo Alcantara <pcacjr AT zytor.com>
+---
+ com32/elflink/ldlinux/cli.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
+index 6ff30c6..3119b11 100644
+--- a/com32/elflink/ldlinux/cli.c
++++ b/com32/elflink/ldlinux/cli.c
+@@ -125,7 +125,7 @@ const char *edit_cmdline(const char *input, int top /*,
int width */ ,
+ int (*pDraw_Menu) (int, int, int),
+ void (*show_fkey) (int), bool *timedout)
+ {
+- char cmdline[MAX_CMDLINE_LEN] = { };
++ static char cmdline[MAX_CMDLINE_LEN] = { };
+ int key, len, prev_len, cursor;
+ int redraw = 0;
+ int x, y;
+--
+2.7.4.GIT
+
diff --git
a/utils/syslinux/patches/0013-extlinux-pull-in-sys_sysmacros.h-for-major_minor_makedev.patch

b/utils/syslinux/patches/0013-extlinux-pull-in-sys_sysmacros.h-for-major_minor_makedev.patch
new file mode 100644
index 0000000..43af110
--- /dev/null
+++
b/utils/syslinux/patches/0013-extlinux-pull-in-sys_sysmacros.h-for-major_minor_makedev.patch
@@ -0,0 +1,33 @@
+From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier AT gentoo.org>
+Date: Tue, 19 Apr 2016 06:50:31 -0400
+Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev
+
+These functions are defined in sys/sysmacros.h, so add the include to
+main.c. This is already handled correctly in mountinfo.c. Otherwise
+we get build failures like:
+
+main.o: In function 'find_device_sysfs':
+extlinux/main.c:1131: undefined reference to 'minor'
+
+Signed-off-by: Mike Frysinger <vapier AT gentoo.org>
+Signed-off-by: Gene Cumm <gene.cumm AT gmail.com>
+---
+ extlinux/main.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/extlinux/main.c b/extlinux/main.c
+index a7ebd49..ebff7ea 100644
+--- a/extlinux/main.c
++++ b/extlinux/main.c
+@@ -38,6 +38,7 @@
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
+ #include <sys/vfs.h>
+--
+2.7.4.GIT
+
diff --git a/utils/syslinux/patches/0014_fix_ftbfs_no_dynamic_linker.patch
b/utils/syslinux/patches/0014_fix_ftbfs_no_dynamic_linker.patch
new file mode 100644
index 0000000..8fbd3b3
--- /dev/null
+++ b/utils/syslinux/patches/0014_fix_ftbfs_no_dynamic_linker.patch
@@ -0,0 +1,13 @@
+Fix for https://bugs.debian.org/846679 : syslinux: FTBFS: ld:
+ldlinux.elf: Not enough room for program headers, try linking with -N
+--- a/core/Makefile 2017-01-28 18:33:22.750959519 +0000
++++ b/core/Makefile 2017-01-28 18:27:47.387981830 +0000
+@@ -165,7 +165,7 @@
+
+ %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)
+ $(LD) $(LDFLAGS) -Bsymbolic $(LD_PIE) -E --hash-style=gnu -T
$(LDSCRIPT) -M -o $@ $< \
+- --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@)
--end-group \
++ --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@)
--end-group --no-dynamic-linker \
+ > $(@:.elf=.map)
+ $(OBJDUMP) -h $@ > $(@:.elf=.sec)
+ $(PERL) $(SRC)/lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec)
$(@:.elf=.lst)
diff --git a/utils/unetbootin/DETAILS b/utils/unetbootin/DETAILS
index fb9ecc7..93f94bc 100755
--- a/utils/unetbootin/DETAILS
+++ b/utils/unetbootin/DETAILS
@@ -1,7 +1,7 @@
SPELL=unetbootin
- VERSION=613
+ VERSION=655
SOURCE="${SPELL}-source-${VERSION}.tar.gz"
-
SOURCE_HASH=sha512:25d1a1603416429b4f975060698b8bec44197b1fa4cfa7206a4f2ea7926cc01cf01a9ae9ed5302cf3441e7bd24e6ec689243cbcdf8df94d48582893ae23b9840
+
SOURCE_HASH=sha512:d7681a53b79959f223afc4f446999412e36d5b5ff209a08550cf7488c34212a1627b2accb4d1c4f749f499d648caba2ce01391029e06f308bc4fb3db1bd6454b

SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/${SPELL}/UNetbootin/${VERSION}/${SOURCE}
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
WEB_SITE="http://unetbootin.sourceforge.net/";
diff --git a/utils/unetbootin/HISTORY b/utils/unetbootin/HISTORY
index bd117d3..bd0c0f4 100644
--- a/utils/unetbootin/HISTORY
+++ b/utils/unetbootin/HISTORY
@@ -1,3 +1,6 @@
+2017-08-31 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
+ * DETAILS: version 655
+
2015-09-10 Ismael Luceno <ismael AT sourcemage.org>
* BUILD, PRE_BUILD: Fixed build
* DETAILS: updated spell to 613



  • [SM-Commit] GIT changes to master grimoire by Florian Franzmann (4cd9fe96d62c83fa04c62a2bafdd2bbd0fe412b8), Florian Franzmann, 08/31/2017

Archive powered by MHonArc 2.6.24.

Top of Page