Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Multi-purpose linux bootloader" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "http://www.syslinux.org/" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 3 | LICENSE = "GPLv2+" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ |
| 5 | file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a" |
| 6 | |
| 7 | # If you really want to run syslinux, you need mtools. We just want the |
| 8 | # ldlinux.* stuff for now, so skip mtools-native |
| 9 | DEPENDS = "nasm-native util-linux e2fsprogs" |
| 10 | |
| 11 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \ |
| 12 | file://syslinux-fix-parallel-building-issue.patch \ |
| 13 | file://syslinux-libupload-depend-lib.patch \ |
| 14 | file://syslinux-remove-clean-script.patch \ |
| 15 | file://0001-linux-syslinux-support-ext2-3-4-device.patch \ |
| 16 | file://0002-linux-syslinux-implement-open_ext2_fs.patch \ |
| 17 | file://0003-linux-syslinux-implement-install_to_ext2.patch \ |
| 18 | file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \ |
| 19 | file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \ |
| 20 | file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \ |
| 21 | file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ |
| 22 | file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ |
| 23 | file://0009-linux-syslinux-implement-install_bootblock.patch \ |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 24 | file://0010-gcc46-compatibility.patch \ |
| 25 | file://0011-mk-MMD-does-not-take-any-arguments.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | file://syslinux-6.03-sysmacros.patch \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | " |
| 28 | |
| 29 | SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13" |
| 30 | SRC_URI[sha256sum] = "26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e" |
| 31 | |
| 32 | COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)' |
| 33 | # Don't let the sanity checker trip on the 32 bit real mode BIOS binaries |
| 34 | INSANE_SKIP_${PN}-misc = "arch" |
| 35 | INSANE_SKIP_${PN}-chain = "arch" |
| 36 | |
| 37 | EXTRA_OEMAKE = " \ |
| 38 | BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \ |
| 39 | DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \ |
| 40 | " |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | |
| 42 | do_configure() { |
| 43 | # drop win32 targets or build fails |
| 44 | sed -e 's,win32/\S*,,g' -i Makefile |
| 45 | |
| 46 | # clean installer executables included in source tarball |
| 47 | oe_runmake clean firmware="efi32" EFIINC="${includedir}" |
| 48 | # NOTE: There is a temporary work around above to specify |
| 49 | # the efi32 as the firmware else the pre-built bios |
| 50 | # files get erased contrary to the doc/distib.txt |
| 51 | # In the future this should be "bios" and not "efi32". |
| 52 | } |
| 53 | |
| 54 | do_compile() { |
| 55 | # Make sure the recompile is OK. |
| 56 | # Though the ${B} should always exist, still check it before find and rm. |
| 57 | [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \; |
| 58 | |
| 59 | # Rebuild only the installer; keep precompiled bootloaders |
| 60 | # as per author's request (doc/distrib.txt) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 61 | oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" firmware="bios" installer |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | do_install() { |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 65 | oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" install INSTALLROOT="${D}" firmware="bios" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | |
| 67 | install -d ${D}${datadir}/syslinux/ |
| 68 | install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/ |
| 69 | install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/ |
| 70 | install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/ |
| 71 | } |
| 72 | |
| 73 | PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc" |
| 74 | |
| 75 | RDEPENDS_${PN} += "mtools" |
| 76 | RDEPENDS_${PN}-nomtools += "libext2fs" |
| 77 | RDEPENDS_${PN}-misc += "perl" |
| 78 | |
| 79 | FILES_${PN} = "${bindir}/syslinux" |
| 80 | FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools" |
| 81 | FILES_${PN}-extlinux = "${sbindir}/extlinux" |
| 82 | FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin" |
| 83 | FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32" |
| 84 | FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin" |
| 85 | FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0" |
| 86 | FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld" |
| 87 | FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a" |
| 88 | FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" |
| 89 | |
| 90 | BBCLASSEXTEND = "native nativesdk" |