Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "Multi-purpose linux bootloader" |
| 2 | HOMEPAGE = "http://www.syslinux.org/" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 3 | 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." |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 4 | LICENSE = "GPL-2.0-or-later" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ |
| 6 | file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a" |
| 7 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 8 | DEPENDS = "nasm-native util-linux e2fsprogs" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 9 | |
| 10 | SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \ |
| 11 | file://syslinux-remove-clean-script.patch \ |
| 12 | file://0001-linux-syslinux-support-ext2-3-4-device.patch \ |
| 13 | file://0002-linux-syslinux-implement-open_ext2_fs.patch \ |
| 14 | file://0003-linux-syslinux-implement-install_to_ext2.patch \ |
| 15 | file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \ |
| 16 | file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \ |
| 17 | file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \ |
| 18 | file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ |
| 19 | file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ |
| 20 | file://0009-linux-syslinux-implement-install_bootblock.patch \ |
Andrew Geissler | 1e34c2d | 2020-05-29 16:02:59 -0500 | [diff] [blame] | 21 | file://0010-Workaround-multiple-definition-of-symbol-errors.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | file://0001-install-don-t-install-obsolete-file-com32.ld.patch \ |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 23 | file://determinism.patch \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 24 | " |
| 25 | |
| 26 | SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec" |
| 27 | SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94" |
| 28 | |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 29 | # remove at next version upgrade or when output changes |
| 30 | PR = "r1" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 31 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 32 | RECIPE_NO_UPDATE_REASON = "6.04-pre3 is broken" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 33 | UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/" |
| 34 | UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar" |
| 35 | UPSTREAM_VERSION_UNKNOWN = "1" |
| 36 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 37 | # We can build the native parts anywhere, but the target has to be x86 |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 38 | COMPATIBLE_HOST:class-target = '(x86_64|i.86).*-(linux|freebsd.*)' |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 39 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 40 | # Don't let the sanity checker trip on the 32 bit real mode BIOS binaries |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 41 | INSANE_SKIP:${PN}-misc = "arch" |
| 42 | INSANE_SKIP:${PN}-chain = "arch" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 43 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 44 | # When building the installer, CC is used to link. When building the bootloader, |
| 45 | # LD is used. However, these variables assume that GCC is used and break the |
| 46 | # build, so unset them. |
| 47 | TARGET_LDFLAGS = "" |
| 48 | SECURITY_LDFLAGS = "" |
| 49 | LDFLAGS_SECTION_REMOVAL = "" |
| 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | CFLAGS:append = " -DNO_INLINE_FUNCS" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 52 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | EXTRA_OEMAKE = " \ |
| 54 | BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ |
| 55 | DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 56 | CC="${CC} ${CFLAGS} ${LDFLAGS}" \ |
| 57 | LD="${LD} ${LDFLAGS}" \ |
| 58 | OBJDUMP="${OBJDUMP}" \ |
| 59 | OBJCOPY="${OBJCOPY}" \ |
| 60 | AR="${AR}" \ |
| 61 | STRIP="${STRIP}" \ |
| 62 | NM="${NM}" \ |
| 63 | RANLIB="${RANLIB}" \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 64 | " |
| 65 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 66 | # |
| 67 | # Tasks for native/nativesdk which just build the installer. |
| 68 | # |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 69 | do_configure() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 70 | oe_runmake firmware="bios" clean |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 71 | } |
| 72 | |
| 73 | do_compile() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 74 | oe_runmake firmware="bios" installer |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | do_install() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 78 | install -d ${D}${bindir} |
| 79 | install \ |
| 80 | ${B}/bios/mtools/syslinux \ |
| 81 | ${B}/bios/extlinux/extlinux \ |
| 82 | ${B}/bios/utils/isohybrid \ |
| 83 | ${D}${bindir} |
| 84 | } |
| 85 | |
| 86 | # |
| 87 | # Tasks for target which ship the precompiled bootloader and installer |
| 88 | # |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 89 | do_configure:class-target() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 90 | # No need to do anything as we're mostly shipping the precompiled binaries |
| 91 | : |
| 92 | } |
| 93 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 94 | do_compile:class-target() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 95 | # No need to do anything as we're mostly shipping the precompiled binaries |
| 96 | : |
| 97 | } |
| 98 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 99 | do_install:class-target() { |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 100 | oe_runmake firmware="bios" install INSTALLROOT="${D}" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 101 | |
| 102 | install -d ${D}${datadir}/syslinux/ |
| 103 | install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/ |
| 104 | install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" |
| 108 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 109 | RDEPENDS:${PN} += "mtools" |
| 110 | RDEPENDS:${PN}-nomtools += "libext2fs" |
| 111 | RDEPENDS:${PN}-misc += "perl" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 112 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 113 | FILES:${PN} = "${bindir}/syslinux" |
| 114 | FILES:${PN}-nomtools = "${bindir}/syslinux-nomtools" |
| 115 | FILES:${PN}-extlinux = "${sbindir}/extlinux" |
| 116 | FILES:${PN}-mbr = "${datadir}/${BPN}/mbr.bin" |
| 117 | FILES:${PN}-chain = "${datadir}/${BPN}/chain.c32" |
| 118 | FILES:${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin" |
| 119 | FILES:${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0" |
| 120 | FILES:${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld" |
| 121 | FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a" |
| 122 | FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 123 | |
| 124 | BBCLASSEXTEND = "native nativesdk" |