diff options
Diffstat (limited to 'meta/recipes-devtools/syslinux')
9 files changed, 300 insertions, 179 deletions
diff --git a/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch b/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch new file mode 100644 index 0000000000..bfd7f41b13 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/0001-install-don-t-install-obsolete-file-com32.ld.patch @@ -0,0 +1,32 @@ +From bf6db5b48ec25f83939f1fdebb59028bc3c40b00 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin (Intel)" <hpa@zytor.com> +Date: Wed, 6 Feb 2019 11:30:51 -0800 +Subject: [PATCH] install: don't install obsolete file com32.ld + +com32.ld has been obsolete for a long time, and has been removed now; +don't install it either. + +Reported-by: Joakim Tjernlund <Joakim.Tjernlund@infinera.com> +Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> + +Upstream-Status: Backport +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + com32/lib/Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/com32/lib/Makefile b/com32/lib/Makefile +index 74fff149..6a931492 100644 +--- a/com32/lib/Makefile ++++ b/com32/lib/Makefile +@@ -113,7 +113,6 @@ spotless: clean + + install: all + mkdir -m 755 -p $(INSTALLROOT)$(COM32DIR) +- install -m 644 $(SRC)/com32.ld $(INSTALLROOT)$(COM32DIR) + -rm -rf $(INSTALLROOT)$(COM32DIR)/include + cp -r $(SRC)/../include $(INSTALLROOT)$(COM32DIR) + +-- +2.17.1 + diff --git a/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch b/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch index 3ab7875274..47a8dac10e 100644 --- a/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch +++ b/meta/recipes-devtools/syslinux/syslinux/0001-linux-syslinux-support-ext2-3-4-device.patch @@ -10,7 +10,7 @@ Subject: [PATCH 1/9] linux/syslinux: support ext2/3/4 device * The ext2/3/4 support doesn't require root privileges since it doesn't need mount (but write permission is required). -Upstream-Status: Submitted +Upstream-Status: Submitted [https://www.syslinux.org/archives/2015-January/023039.html] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Tested-by: Du Dolpher <dolpher.du@intel.com> diff --git a/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch index 2400c98d6a..f1d01fa43c 100644 --- a/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch +++ b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch @@ -1,8 +1,7 @@ -From 78d76b87a4b855e6b661ae457283a63f385c04c9 Mon Sep 17 00:00:00 2001 +From efce87e5ab98664c57e5f4e3955a2f3747df5737 Mon Sep 17 00:00:00 2001 From: Robert Yang <liezhi.yang@windriver.com> Date: Fri, 2 Jan 2015 12:26:46 +0800 -Subject: [PATCH 8/9] libinstaller/syslinuxext: implement - syslinux_patch_bootsect() +Subject: [PATCH] libinstaller/syslinuxext: implement syslinux_patch_bootsect() Move the related from extlinux/main.c to libinstaller/syslinuxext.c, the syslinux_patch_bootsect() are used by both extlinux/main.c and @@ -12,17 +11,21 @@ Upstream-Status: Submitted Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Tested-by: Du Dolpher <dolpher.du@intel.com> + +Edited to include sysmacros.h + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> --- extlinux/Makefile | 3 +- - extlinux/main.c | 167 +------------------------------------------- - libinstaller/syslinuxext.c | 170 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 175 insertions(+), 165 deletions(-) + extlinux/main.c | 167 +----------------------------------- + libinstaller/syslinuxext.c | 171 +++++++++++++++++++++++++++++++++++++ + 3 files changed, 176 insertions(+), 165 deletions(-) diff --git a/extlinux/Makefile b/extlinux/Makefile -index 02d1db5..90dd92f 100644 +index 1721ee54..62a49728 100644 --- a/extlinux/Makefile +++ b/extlinux/Makefile -@@ -31,7 +31,8 @@ SRCS = main.c \ +@@ -32,7 +32,8 @@ SRCS = main.c \ ../libinstaller/advio.c \ ../libinstaller/bootsect_bin.c \ ../libinstaller/ldlinuxc32_bin.c \ @@ -33,10 +36,10 @@ index 02d1db5..90dd92f 100644 .SUFFIXES: .c .o .i .s .S diff --git a/extlinux/main.c b/extlinux/main.c -index 09740bd..6fe026e 100644 +index ebff7eae..9add50fb 100644 --- a/extlinux/main.c +++ b/extlinux/main.c -@@ -60,6 +60,7 @@ +@@ -62,6 +62,7 @@ #include "setadv.h" #include "syslxopt.h" /* unified options */ #include "mountinfo.h" @@ -44,7 +47,7 @@ index 09740bd..6fe026e 100644 #ifdef DEBUG # define dprintf printf -@@ -67,10 +68,6 @@ +@@ -69,10 +70,6 @@ # define dprintf(...) ((void)0) #endif @@ -55,10 +58,11 @@ index 09740bd..6fe026e 100644 /* Since we have unused 2048 bytes in the primary AG of an XFS partition, * we will use the first 0~512 bytes starting from 2048 for the Syslinux * boot sector. -@@ -92,136 +89,6 @@ static char subvol[BTRFS_SUBVOL_MAX]; +@@ -93,136 +90,6 @@ static char subvol[BTRFS_SUBVOL_MAX]; + #define BTRFS_ADV_OFFSET (BTRFS_BOOT_AREA_A_OFFSET + BTRFS_BOOT_AREA_A_SIZE \ - 2*ADV_SIZE) - /* +-/* - * Get the size of a block device - */ -static uint64_t get_size(int devfd) @@ -188,11 +192,10 @@ index 09740bd..6fe026e 100644 - return rv; -} - --/* + /* * Query the device geometry and put it into the boot sector. * Map the file and put the map in the boot sector and file. - * Stick the "current directory" inode number into the file. -@@ -231,11 +98,8 @@ ok: +@@ -233,11 +100,8 @@ ok: static int patch_file_and_bootblock(int fd, const char *dir, int devfd) { struct stat dirst, xdst; @@ -204,7 +207,7 @@ index 09740bd..6fe026e 100644 char *dirpath, *subpath, *xdirpath; int rv; -@@ -279,33 +143,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) +@@ -281,33 +145,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) /* Now subpath should contain the path relative to the fs base */ dprintf("subpath = %s\n", subpath); @@ -241,14 +244,15 @@ index 09740bd..6fe026e 100644 /* Construct the boot file map */ diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c -index bb54cef..5a4423b 100644 +index bb54cefc..9ae82884 100644 --- a/libinstaller/syslinuxext.c +++ b/libinstaller/syslinuxext.c -@@ -1,7 +1,177 @@ +@@ -1,7 +1,178 @@ #define _GNU_SOURCE +#include <sys/stat.h> +#include <sys/types.h> ++#include <sys/sysmacros.h> +#include <getopt.h> +#include <ext2fs/ext2fs.h> + @@ -423,5 +427,5 @@ index bb54cef..5a4423b 100644 } -- -1.9.1 +2.17.1 diff --git a/meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch b/meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch new file mode 100644 index 0000000000..44cb153276 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch @@ -0,0 +1,97 @@ +From 951928f2cad5682c2844e6bd0f7201236c5d9b66 Mon Sep 17 00:00:00 2001 +From: Merlin Mathesius <mmathesi@redhat.com> +Date: Wed, 13 May 2020 08:02:27 -0500 +Subject: [PATCH] Workaround multiple definition of symbol errors + +Lifted from Fedora https://src.fedoraproject.org/rpms/syslinux/blob/master/f/0005-Workaround-multiple-definition-of-symbol-errors.patch + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + com32/cmenu/Makefile | 2 +- + com32/elflink/ldlinux/Makefile | 2 +- + com32/gpllib/Makefile | 2 +- + com32/hdt/Makefile | 2 +- + core/Makefile | 2 +- + dos/Makefile | 2 +- + efi/Makefile | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +--- a/com32/cmenu/Makefile ++++ b/com32/cmenu/Makefile +@@ -49,7 +49,7 @@ makeoutputdirs: + @mkdir -p $(OBJ)/libmenu + + libmenu/libmenu.elf: $(LIBMENU) +- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) \ ++ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) \ + -o $@ $^ + + tidy dist: +--- a/com32/elflink/ldlinux/Makefile ++++ b/com32/elflink/ldlinux/Makefile +@@ -33,7 +33,7 @@ endif + all: $(BTARGET) ldlinux_lnx.a + + ldlinux.elf : $(OBJS) +- $(LD) $(LDFLAGS) -soname $(SONAME) -o $@ $^ $(LIBS) ++ $(LD) $(LDFLAGS) -z muldefs -soname $(SONAME) -o $@ $^ $(LIBS) + + LNXCFLAGS += -D__export='__attribute__((visibility("default")))' + LNXLIBOBJS = get_key.lo +--- a/com32/gpllib/Makefile ++++ b/com32/gpllib/Makefile +@@ -24,7 +24,7 @@ makeoutputdirs: + $(addprefix $(OBJ),$(sort $(dir $(LIBOBJS)))),$(b)) + + libgpl.elf : $(LIBOBJS) +- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ ++ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ + + tidy dist clean: + find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \ +--- a/com32/hdt/Makefile ++++ b/com32/hdt/Makefile +@@ -52,7 +52,7 @@ QEMU ?= qemu-kvm + all: $(MODULES) $(TESTFILES) + + hdt.elf : $(OBJS) $(LIBS) $(C_LIBS) +- $(LD) $(LDFLAGS) -o $@ $^ ++ $(LD) $(LDFLAGS) -z muldefs -o $@ $^ + + memtest: + -[ ! -f $(FLOPPY_DIR)/$(MEMTEST) ] && $(WGET) $(MEMTEST_URL) -O $(FLOPPY_DIR)/$(MEMTEST) +--- a/core/Makefile ++++ b/core/Makefile +@@ -156,7 +156,7 @@ LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld + NASM_ELF = elf + + %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) +- $(LD) $(LDFLAGS) -pie -Bsymbolic \ ++ $(LD) $(LDFLAGS) -z muldefs -pie -Bsymbolic \ + -T $(LDSCRIPT) \ + --unresolved-symbols=report-all \ + -E --hash-style=gnu -M -o $@ $< \ +--- a/dos/Makefile ++++ b/dos/Makefile +@@ -19,7 +19,7 @@ include $(MAKEDIR)/embedded.mk + CFLAGS += -D__MSDOS__ -mregparm=3 -DREGPARM=3 + # CFLAGS += -DDEBUG + +-LDFLAGS = -T $(SRC)/dosexe.ld ++LDFLAGS = -T $(SRC)/dosexe.ld -z muldefs + OPTFLAGS = -g + INCLUDES = -include code16.h -nostdinc -iwithprefix include \ + -I$(SRC) -I$(SRC)/.. -I$(SRC)/../libfat \ +--- a/efi/Makefile ++++ b/efi/Makefile +@@ -71,7 +71,7 @@ $(OBJS): | $(OBJ)/$(ARCH) + BTARGET = syslinux.efi + + syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) +- $(LD) $(LDFLAGS) --strip-debug -o $@ $^ -lgnuefi -lefi ++ $(LD) $(LDFLAGS) -z muldefs --strip-debug -o $@ $^ -lgnuefi -lefi + + # We need to rename the .hash section because the EFI firmware + # linker really doesn't like it. diff --git a/meta/recipes-devtools/syslinux/syslinux/determinism.patch b/meta/recipes-devtools/syslinux/syslinux/determinism.patch new file mode 100644 index 0000000000..2fb8c64df3 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux/determinism.patch @@ -0,0 +1,22 @@ +In order to build deterministic binaries, we need to sort the wildcard expansion +so the libraries are linked in the same order each time. This fixes reproducibility +issues within syslinux builds. + +Upstream-Status: Pending +RP 2021/3/1 + +Index: syslinux-6.04-pre2/mk/lib.mk +=================================================================== +--- syslinux-6.04-pre2.orig/mk/lib.mk ++++ syslinux-6.04-pre2/mk/lib.mk +@@ -130,8 +130,8 @@ LIBENTRY_OBJS = \ + exit.o + + LIBGCC_OBJS = \ +- $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c)) \ +- $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S)) ++ $(sort $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c))) \ ++ $(sort $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S))) + + LIBCONSOLE_OBJS = \ + \ diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch deleted file mode 100644 index 312b1e8aed..0000000000 --- a/meta/recipes-devtools/syslinux/syslinux/syslinux-fix-parallel-building-issue.patch +++ /dev/null @@ -1,35 +0,0 @@ -syslinux-native: fix parallel building issue - -There might be an error when parallel build: - -[snip] -cp: cannot create directory `tmp/sysroots/x86_64-linux/usr/share/ -syslinux/com32/include/gplinclude': No such file or directory -make[4]: *** [install] Error 1 -make[3]: *** [gpllib] Error 2 -[snip] - -This is a potential issue. In ${S}/com32/gpllib/Makefile file, -install target wants to copy $(SRC)/../gplinclude to -$(INSTALLROOT)$(COM32DIR)/include/ directory, but in ${S}/com32/lib/Makefile -file, the install target will remove $(INSTALLROOT)$(COM32DIR)/include -directory. We need to do com32/lib first. - -The patch make com32/gpllib depends on com32/lib to fix this issue. - -Upstream-Status: Pending - -Signed-off-by: Chong Lu <Chong.Lu@windriver.com> ---- - com32/Makefile | 1 + - 1 file changed, 1 insertion(+) - -Index: syslinux-6.03/com32/Makefile -=================================================================== ---- syslinux-6.03.orig/com32/Makefile -+++ syslinux-6.03/com32/Makefile -@@ -21,3 +21,4 @@ rosh: lib libutil - samples: libutil elflink/ldlinux - sysdump: lib libutil libupload gpllib - lua/src: cmenu modules -+gpllib: lib diff --git a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch b/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch deleted file mode 100644 index c0714b5175..0000000000 --- a/meta/recipes-devtools/syslinux/syslinux/syslinux-libupload-depend-lib.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 490fc3bbd65c2c252c1fdf3da0fac9898aa9eea6 Mon Sep 17 00:00:00 2001 -From: Robert Yang <liezhi.yang@windriver.com> -Date: Fri, 15 Aug 2014 21:09:16 -0700 -Subject: [PATCH] com32/Makefile: fix parallel issue - -Fixed: -cp -r syslinux-6.01/com32/libupload/*.h image/usr/share/syslinux/com32/include/ -[snip] -rm -rf image/usr/share/syslinux/com32/include -[snip] -cp: cannot create regular file `image/usr/share/syslinux/com32/include/serial.h': No such file or directory - -The cp is happened in the "libupload" dir, while "rm -fr" is happend in -"lib" dir, let "libupload" depend "lib" will fix the problem. - -Upstream-Status: Pending - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> ---- - com32/Makefile | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/com32/Makefile b/com32/Makefile -index 9a1721b..f172db2 100644 ---- a/com32/Makefile -+++ b/com32/Makefile -@@ -21,3 +21,4 @@ rosh: lib libutil - samples: libutil elflink/ldlinux - sysdump: libupload gpllib - gpllib: lib -+libupload: lib --- -1.7.9.5 - diff --git a/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb deleted file mode 100644 index ef9ae2fbea..0000000000 --- a/meta/recipes-devtools/syslinux/syslinux_6.03.bb +++ /dev/null @@ -1,89 +0,0 @@ -SUMMARY = "Multi-purpose linux bootloader" -HOMEPAGE = "http://syslinux.zytor.com/" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a" - -# If you really want to run syslinux, you need mtools. We just want the -# ldlinux.* stuff for now, so skip mtools-native -DEPENDS = "nasm-native util-linux e2fsprogs" - -SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \ - file://syslinux-fix-parallel-building-issue.patch \ - file://syslinux-libupload-depend-lib.patch \ - file://syslinux-remove-clean-script.patch \ - file://0001-linux-syslinux-support-ext2-3-4-device.patch \ - file://0002-linux-syslinux-implement-open_ext2_fs.patch \ - file://0003-linux-syslinux-implement-install_to_ext2.patch \ - file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \ - file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \ - file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \ - file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ - file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ - file://0009-linux-syslinux-implement-install_bootblock.patch \ - " - -SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" -SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" - -COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' -# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries -INSANE_SKIP_${PN}-misc = "arch" -INSANE_SKIP_${PN}-chain = "arch" - -EXTRA_OEMAKE = " \ - BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ - DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ -" -# syslinux uses $LD for linking, strip `-Wl,' so it can work -export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`" - -do_configure() { - # drop win32 targets or build fails - sed -e 's,win32/\S*,,g' -i Makefile - - # clean installer executables included in source tarball - oe_runmake clean firmware="efi32" EFIINC="${includedir}" - # NOTE: There is a temporary work around above to specify - # the efi32 as the firmware else the pre-built bios - # files get erased contrary to the doc/distib.txt - # In the future this should be "bios" and not "efi32". -} - -do_compile() { - # Make sure the recompile is OK. - # Though the ${B} should always exist, still check it before find and rm. - [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \; - - # Rebuild only the installer; keep precompiled bootloaders - # as per author's request (doc/distrib.txt) - oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer -} - -do_install() { - oe_runmake CC="${CC} ${CFLAGS}" install INSTALLROOT="${D}" firmware="bios" - - install -d ${D}${datadir}/syslinux/ - install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/ - install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/ - install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/ -} - -PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" - -RDEPENDS_${PN} += "mtools" -RDEPENDS_${PN}-nomtools += "libext2fs" -RDEPENDS_${PN}-misc += "perl" - -FILES_${PN} = "${bindir}/syslinux" -FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools" -FILES_${PN}-extlinux = "${sbindir}/extlinux" -FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin" -FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32" -FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin" -FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0" -FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld" -FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a" -FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb new file mode 100644 index 0000000000..62aa1b0e87 --- /dev/null +++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb @@ -0,0 +1,124 @@ +SUMMARY = "Multi-purpose linux bootloader" +HOMEPAGE = "http://www.syslinux.org/" +DESCRIPTION = "The Syslinux Project covers lightweight bootloaders for MS-DOS FAT filesystems (SYSLINUX), network booting (PXELINUX), bootable "El Torito" CD-ROMs (ISOLINUX), and Linux ext2/ext3/ext4 or btrfs filesystems (EXTLINUX). The project also includes MEMDISK, a tool to boot legacy operating systems (such as DOS) from nontraditional media; it is usually used in conjunction with PXELINUX and ISOLINUX." +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ + file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a" + +DEPENDS = "nasm-native util-linux e2fsprogs" + +SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \ + file://syslinux-remove-clean-script.patch \ + file://0001-linux-syslinux-support-ext2-3-4-device.patch \ + file://0002-linux-syslinux-implement-open_ext2_fs.patch \ + file://0003-linux-syslinux-implement-install_to_ext2.patch \ + file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \ + file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \ + file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \ + file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ + file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ + file://0009-linux-syslinux-implement-install_bootblock.patch \ + file://0010-Workaround-multiple-definition-of-symbol-errors.patch \ + file://0001-install-don-t-install-obsolete-file-com32.ld.patch \ + file://determinism.patch \ + " + +SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec" +SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94" + +# remove at next version upgrade or when output changes +PR = "r1" + +RECIPE_NO_UPDATE_REASON = "6.04-pre3 is broken" +UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/" +UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar" +UPSTREAM_VERSION_UNKNOWN = "1" + +# We can build the native parts anywhere, but the target has to be x86 +COMPATIBLE_HOST:class-target = '(x86_64|i.86).*-(linux|freebsd.*)' + +# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries +INSANE_SKIP:${PN}-misc = "arch" +INSANE_SKIP:${PN}-chain = "arch" + +# When building the installer, CC is used to link. When building the bootloader, +# LD is used. However, these variables assume that GCC is used and break the +# build, so unset them. +TARGET_LDFLAGS = "" +SECURITY_LDFLAGS = "" +LDFLAGS_SECTION_REMOVAL = "" + +CFLAGS:append = " -DNO_INLINE_FUNCS" + +EXTRA_OEMAKE = " \ + BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ + DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ + CC="${CC} ${CFLAGS} ${LDFLAGS}" \ + LD="${LD} ${LDFLAGS}" \ + OBJDUMP="${OBJDUMP}" \ + OBJCOPY="${OBJCOPY}" \ + AR="${AR}" \ + STRIP="${STRIP}" \ + NM="${NM}" \ + RANLIB="${RANLIB}" \ +" + +# +# Tasks for native/nativesdk which just build the installer. +# +do_configure() { + oe_runmake firmware="bios" clean +} + +do_compile() { + oe_runmake firmware="bios" installer +} + +do_install() { + install -d ${D}${bindir} + install \ + ${B}/bios/mtools/syslinux \ + ${B}/bios/extlinux/extlinux \ + ${B}/bios/utils/isohybrid \ + ${D}${bindir} +} + +# +# Tasks for target which ship the precompiled bootloader and installer +# +do_configure:class-target() { + # No need to do anything as we're mostly shipping the precompiled binaries + : +} + +do_compile:class-target() { + # No need to do anything as we're mostly shipping the precompiled binaries + : +} + +do_install:class-target() { + oe_runmake firmware="bios" install INSTALLROOT="${D}" + + install -d ${D}${datadir}/syslinux/ + install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/ + install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/ +} + +PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" + +RDEPENDS:${PN} += "mtools" +RDEPENDS:${PN}-nomtools += "libext2fs" +RDEPENDS:${PN}-misc += "perl" + +FILES:${PN} = "${bindir}/syslinux" +FILES:${PN}-nomtools = "${bindir}/syslinux-nomtools" +FILES:${PN}-extlinux = "${sbindir}/extlinux" +FILES:${PN}-mbr = "${datadir}/${BPN}/mbr.bin" +FILES:${PN}-chain = "${datadir}/${BPN}/chain.c32" +FILES:${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin" +FILES:${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0" +FILES:${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld" +FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a" +FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" + +BBCLASSEXTEND = "native nativesdk" |