blob: 56049015927f53d1c0c85e4e5a23dfb1a67ba9da [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "Multi-purpose linux bootloader"
2HOMEPAGE = "http://www.syslinux.org/"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003DESCRIPTION = "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 Geissler7e0e3c02022-02-25 20:34:39 +00004LICENSE = "GPL-2.0-or-later"
Brad Bishop19323692019-04-05 15:28:33 -04005LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
6 file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
7
Brad Bishop19323692019-04-05 15:28:33 -04008DEPENDS = "nasm-native util-linux e2fsprogs"
Brad Bishop19323692019-04-05 15:28:33 -04009
10SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \
Brad Bishop19323692019-04-05 15:28:33 -040011 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 Geissler1e34c2d2020-05-29 16:02:59 -050020 file://0010-Workaround-multiple-definition-of-symbol-errors.patch \
Patrick Williams92b42cb2022-09-03 06:53:57 -050021 file://0011-install-don-t-install-obsolete-file-com32.ld.patch \
22 file://0012-libinstaller-Fix-build-with-glibc-2.36.patch \
23 file://0013-remove-clean-script.patch \
24 file://0014-Fix-reproducibility-issues.patch \
25"
Brad Bishop19323692019-04-05 15:28:33 -040026
27SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
28SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94"
29
Andrew Geissler90fd73c2021-03-05 15:25:55 -060030# remove at next version upgrade or when output changes
31PR = "r1"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060032
Andrew Geisslerd1e89492021-02-12 15:35:20 -060033RECIPE_NO_UPDATE_REASON = "6.04-pre3 is broken"
Brad Bishop19323692019-04-05 15:28:33 -040034UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/"
35UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar"
36UPSTREAM_VERSION_UNKNOWN = "1"
37
Andrew Geisslerd1e89492021-02-12 15:35:20 -060038# We can build the native parts anywhere, but the target has to be x86
Patrick Williams213cb262021-08-07 19:21:33 -050039COMPATIBLE_HOST:class-target = '(x86_64|i.86).*-(linux|freebsd.*)'
Andrew Geisslerd1e89492021-02-12 15:35:20 -060040
Brad Bishop19323692019-04-05 15:28:33 -040041# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
Patrick Williams213cb262021-08-07 19:21:33 -050042INSANE_SKIP:${PN}-misc = "arch"
43INSANE_SKIP:${PN}-chain = "arch"
Brad Bishop19323692019-04-05 15:28:33 -040044
Andrew Geisslerd1e89492021-02-12 15:35:20 -060045# When building the installer, CC is used to link. When building the bootloader,
46# LD is used. However, these variables assume that GCC is used and break the
47# build, so unset them.
48TARGET_LDFLAGS = ""
49SECURITY_LDFLAGS = ""
50LDFLAGS_SECTION_REMOVAL = ""
51
Patrick Williams213cb262021-08-07 19:21:33 -050052CFLAGS:append = " -DNO_INLINE_FUNCS"
Andrew Geissler90fd73c2021-03-05 15:25:55 -060053
Brad Bishop19323692019-04-05 15:28:33 -040054EXTRA_OEMAKE = " \
55 BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
56 DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
Andrew Geisslerd1e89492021-02-12 15:35:20 -060057 CC="${CC} ${CFLAGS} ${LDFLAGS}" \
58 LD="${LD} ${LDFLAGS}" \
59 OBJDUMP="${OBJDUMP}" \
60 OBJCOPY="${OBJCOPY}" \
61 AR="${AR}" \
62 STRIP="${STRIP}" \
63 NM="${NM}" \
64 RANLIB="${RANLIB}" \
Brad Bishop19323692019-04-05 15:28:33 -040065"
66
Andrew Geisslerd1e89492021-02-12 15:35:20 -060067#
68# Tasks for native/nativesdk which just build the installer.
69#
Brad Bishop19323692019-04-05 15:28:33 -040070do_configure() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -060071 oe_runmake firmware="bios" clean
Brad Bishop19323692019-04-05 15:28:33 -040072}
73
74do_compile() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -060075 oe_runmake firmware="bios" installer
Brad Bishop19323692019-04-05 15:28:33 -040076}
77
78do_install() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -060079 install -d ${D}${bindir}
80 install \
81 ${B}/bios/mtools/syslinux \
82 ${B}/bios/extlinux/extlinux \
83 ${B}/bios/utils/isohybrid \
84 ${D}${bindir}
85}
86
87#
88# Tasks for target which ship the precompiled bootloader and installer
89#
Patrick Williams213cb262021-08-07 19:21:33 -050090do_configure:class-target() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -060091 # No need to do anything as we're mostly shipping the precompiled binaries
92 :
93}
94
Patrick Williams213cb262021-08-07 19:21:33 -050095do_compile:class-target() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -060096 # No need to do anything as we're mostly shipping the precompiled binaries
97 :
98}
99
Patrick Williams213cb262021-08-07 19:21:33 -0500100do_install:class-target() {
Andrew Geisslerd1e89492021-02-12 15:35:20 -0600101 oe_runmake firmware="bios" install INSTALLROOT="${D}"
Brad Bishop19323692019-04-05 15:28:33 -0400102
103 install -d ${D}${datadir}/syslinux/
104 install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
105 install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
Brad Bishop19323692019-04-05 15:28:33 -0400106}
107
108PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
109
Patrick Williams213cb262021-08-07 19:21:33 -0500110RDEPENDS:${PN} += "mtools"
111RDEPENDS:${PN}-nomtools += "libext2fs"
112RDEPENDS:${PN}-misc += "perl"
Brad Bishop19323692019-04-05 15:28:33 -0400113
Patrick Williams213cb262021-08-07 19:21:33 -0500114FILES:${PN} = "${bindir}/syslinux"
115FILES:${PN}-nomtools = "${bindir}/syslinux-nomtools"
116FILES:${PN}-extlinux = "${sbindir}/extlinux"
117FILES:${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
118FILES:${PN}-chain = "${datadir}/${BPN}/chain.c32"
119FILES:${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
120FILES:${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
121FILES:${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
122FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
123FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
Brad Bishop19323692019-04-05 15:28:33 -0400124
125BBCLASSEXTEND = "native nativesdk"