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