blob: 1b0b45f2faaa93b555e6ea2d1c3871a7776e5fc5 [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
Brad Bishop19323692019-04-05 15:28:33 -04007DEPENDS = "nasm-native util-linux e2fsprogs"
Brad Bishop19323692019-04-05 15:28:33 -04008
9SRC_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 Geissler1e34c2d2020-05-29 16:02:59 -050020 file://0010-Workaround-multiple-definition-of-symbol-errors.patch \
Brad Bishop19323692019-04-05 15:28:33 -040021 file://0001-install-don-t-install-obsolete-file-com32.ld.patch \
22 "
23
24SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
25SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94"
26
Andrew Geisslerc723b722021-01-08 16:14:09 -060027RECIPE_NO_UPDATE_REASON = "6.04-pre3 is broken"
Brad Bishop19323692019-04-05 15:28:33 -040028UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/"
29UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar"
30UPSTREAM_VERSION_UNKNOWN = "1"
31
Andrew Geisslerc723b722021-01-08 16:14:09 -060032# We can build the native parts anywhere, but the target has to be x86
33COMPATIBLE_HOST_class-target = '(x86_64|i.86).*-(linux|freebsd.*)'
34
Brad Bishop19323692019-04-05 15:28:33 -040035# Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
36INSANE_SKIP_${PN}-misc = "arch"
37INSANE_SKIP_${PN}-chain = "arch"
38
Andrew Geisslerc723b722021-01-08 16:14:09 -060039# 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.
42TARGET_LDFLAGS = ""
43SECURITY_LDFLAGS = ""
44LDFLAGS_SECTION_REMOVAL = ""
45
Brad Bishop19323692019-04-05 15:28:33 -040046EXTRA_OEMAKE = " \
47 BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
48 DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
Andrew Geisslerc723b722021-01-08 16:14:09 -060049 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 Bishop19323692019-04-05 15:28:33 -040057"
58
Andrew Geisslerc723b722021-01-08 16:14:09 -060059#
60# Tasks for native/nativesdk which just build the installer.
61#
Brad Bishop19323692019-04-05 15:28:33 -040062do_configure() {
Andrew Geisslerc723b722021-01-08 16:14:09 -060063 oe_runmake firmware="bios" clean
Brad Bishop19323692019-04-05 15:28:33 -040064}
65
66do_compile() {
Andrew Geisslerc723b722021-01-08 16:14:09 -060067 oe_runmake firmware="bios" installer
Brad Bishop19323692019-04-05 15:28:33 -040068}
69
70do_install() {
Andrew Geisslerc723b722021-01-08 16:14:09 -060071 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#
82do_configure_class-target() {
83 # No need to do anything as we're mostly shipping the precompiled binaries
84 :
85}
86
87do_compile_class-target() {
88 # No need to do anything as we're mostly shipping the precompiled binaries
89 :
90}
91
92do_install_class-target() {
93 oe_runmake firmware="bios" install INSTALLROOT="${D}"
Brad Bishop19323692019-04-05 15:28:33 -040094
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 Bishop19323692019-04-05 15:28:33 -040098}
99
100PACKAGES += "${PN}-nomtools ${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
101
102RDEPENDS_${PN} += "mtools"
103RDEPENDS_${PN}-nomtools += "libext2fs"
104RDEPENDS_${PN}-misc += "perl"
105
106FILES_${PN} = "${bindir}/syslinux"
107FILES_${PN}-nomtools = "${bindir}/syslinux-nomtools"
108FILES_${PN}-extlinux = "${sbindir}/extlinux"
109FILES_${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
110FILES_${PN}-chain = "${datadir}/${BPN}/chain.c32"
111FILES_${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
112FILES_${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
113FILES_${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
114FILES_${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
115FILES_${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
116
117BBCLASSEXTEND = "native nativesdk"