blob: e9dbefb93047c42200ce8d22a0c497c4559e582c [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Multi-purpose linux bootloader"
2HOMEPAGE = "http://www.syslinux.org/"
3LICENSE = "GPLv2+"
4LIC_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
9DEPENDS = "nasm-native util-linux e2fsprogs"
10PV = "6.04-pre2"
11
12SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \
13 file://syslinux-remove-clean-script.patch \
14 file://0001-linux-syslinux-support-ext2-3-4-device.patch \
15 file://0002-linux-syslinux-implement-open_ext2_fs.patch \
16 file://0003-linux-syslinux-implement-install_to_ext2.patch \
17 file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \
18 file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \
19 file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \
20 file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \
21 file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \
22 file://0009-linux-syslinux-implement-install_bootblock.patch \
23 file://0001-install-don-t-install-obsolete-file-com32.ld.patch \
24 "
25
26SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
27SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94"
28
29UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/"
30UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar"
31UPSTREAM_VERSION_UNKNOWN = "1"
32
33COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
34# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
35INSANE_SKIP_${PN}-misc = "arch"
36INSANE_SKIP_${PN}-chain = "arch"
37
38EXTRA_OEMAKE = " \
39 BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
40 DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
41"
42
43do_configure() {
44 # drop win32 targets or build fails
45 sed -e 's,win32/\S*,,g' -i Makefile
46
47 # clean installer executables included in source tarball
48 oe_runmake clean firmware="efi32" EFIINC="${includedir}"
49 # NOTE: There is a temporary work around above to specify
50 # the efi32 as the firmware else the pre-built bios
51 # files get erased contrary to the doc/distib.txt
52 # In the future this should be "bios" and not "efi32".
53}
54
55do_compile() {
56 # Make sure the recompile is OK.
57 # Though the ${B} should always exist, still check it before find and rm.
58 [ -d "${B}" ] && find ${B} -name '.*.d' -type f -exec rm -f {} \;
59
60 # Rebuild only the installer; keep precompiled bootloaders
61 # as per author's request (doc/distrib.txt)
Brad Bishop08902b02019-08-20 09:16:51 -040062 oe_runmake CC="${CC} ${CFLAGS}" \
63 LD="${LD}" LDFLAGS="${LDFLAGS}" \
64 OBJDUMP="${OBJDUMP}" \
65 OBJCOPY="${OBJCOPY}" \
66 AR="${AR}" \
67 STRIP="${STRIP}" \
68 NM="${NM}" \
69 RANLIB="${RANLIB}" \
70 firmware="bios" installer
Brad Bishop19323692019-04-05 15:28:33 -040071}
72
73do_install() {
Brad Bishop08902b02019-08-20 09:16:51 -040074 oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" \
75 OBJDUMP="${OBJDUMP}" \
76 OBJCOPY="${OBJCOPY}" \
77 AR="${AR}" \
78 STRIP="${STRIP}" \
79 NM="${NM}" \
80 RANLIB="${RANLIB}" \
81 firmware="bios" install INSTALLROOT="${D}"
Brad Bishop19323692019-04-05 15:28:33 -040082
83 install -d ${D}${datadir}/syslinux/
84 install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
85 install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
86 install -m 755 ${S}/bios/linux/syslinux-nomtools ${D}${bindir}/
87}
88
89PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
90
91RDEPENDS_${PN} += "mtools"
92RDEPENDS_${PN}-nomtools += "libext2fs"
93RDEPENDS_${PN}-misc += "perl"
94
95FILES_${PN} = "${bindir}/syslinux"
96FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools"
97FILES_${PN}-extlinux = "${sbindir}/extlinux"
98FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
99FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32"
100FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
101FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
102FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
103FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
104FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
105
106BBCLASSEXTEND = "native nativesdk"