syslinux_6.04-pre2.bb 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. SUMMARY = "Multi-purpose linux bootloader"
  2. HOMEPAGE = "http://www.syslinux.org/"
  3. DESCRIPTION = "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."
  4. LICENSE = "GPL-2.0-or-later"
  5. LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
  6. file://README;beginline=35;endline=41;md5=558f2c71cb1fb9ba511ccd4858e48e8a"
  7. DEPENDS = "nasm-native util-linux e2fsprogs"
  8. SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz \
  9. file://0001-linux-syslinux-support-ext2-3-4-device.patch \
  10. file://0002-linux-syslinux-implement-open_ext2_fs.patch \
  11. file://0003-linux-syslinux-implement-install_to_ext2.patch \
  12. file://0004-linux-syslinux-add-ext_file_read-and-ext_file_write.patch \
  13. file://0005-linux-syslinux-implement-handle_adv_on_ext.patch \
  14. file://0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch \
  15. file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \
  16. file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \
  17. file://0009-linux-syslinux-implement-install_bootblock.patch \
  18. file://0010-Workaround-multiple-definition-of-symbol-errors.patch \
  19. file://0011-install-don-t-install-obsolete-file-com32.ld.patch \
  20. file://0012-libinstaller-Fix-build-with-glibc-2.36.patch \
  21. file://0013-remove-clean-script.patch \
  22. file://0014-Fix-reproducibility-issues.patch \
  23. file://0001-ext2_fs.h-do-not-carry-an-outdated-copy.patch \
  24. file://0001-Add-extra-sector-count-from-section-entry-for-EFI-ca.patch \
  25. "
  26. SRC_URI[sha256sum] = "4441a5d593f85bb6e8d578cf6653fb4ec30f9e8f4a2315a3d8f2d0a8b3fadf94"
  27. # remove at next version upgrade or when output changes
  28. RECIPE_NO_UPDATE_REASON = "6.04-pre3 is broken"
  29. UPSTREAM_CHECK_URI = "https://www.zytor.com/pub/syslinux/"
  30. UPSTREAM_CHECK_REGEX = "syslinux-(?P<pver>.+)\.tar"
  31. UPSTREAM_VERSION_UNKNOWN = "1"
  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. # Don't let the sanity checker trip on the 32 bit real mode BIOS binaries
  35. INSANE_SKIP:${PN}-misc = "arch"
  36. INSANE_SKIP:${PN}-chain = "arch"
  37. # When building the installer, CC is used to link. When building the bootloader,
  38. # LD is used. However, these variables assume that GCC is used and break the
  39. # build, so unset them.
  40. TARGET_LDFLAGS = ""
  41. SECURITY_LDFLAGS = ""
  42. LDFLAGS_SECTION_REMOVAL = ""
  43. CFLAGS += "-DNO_INLINE_FUNCS -Wno-error=implicit-function-declaration -idirafter ${STAGING_INCDIR}"
  44. EXTRA_OEMAKE = " \
  45. BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
  46. DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
  47. CC="${CC} ${CFLAGS} ${LDFLAGS}" \
  48. LD="${LD} ${LDFLAGS}" \
  49. OBJDUMP="${OBJDUMP}" \
  50. OBJCOPY="${OBJCOPY}" \
  51. AR="${AR}" \
  52. STRIP="${STRIP}" \
  53. NM="${NM}" \
  54. RANLIB="${RANLIB}" \
  55. "
  56. # mtools allows non-root users to install syslinux
  57. PACKAGECONFIG ??= "mtools"
  58. PACKAGECONFIG[mtools] = ",,,"
  59. #
  60. # Tasks for native/nativesdk which just build the installer.
  61. #
  62. do_configure() {
  63. oe_runmake firmware="bios" clean
  64. }
  65. do_compile() {
  66. oe_runmake firmware="bios" installer
  67. }
  68. do_install() {
  69. install -d ${D}${bindir}
  70. install \
  71. ${B}/bios/extlinux/extlinux \
  72. ${B}/bios/utils/isohybrid \
  73. ${D}${bindir}
  74. if ${@bb.utils.contains("PACKAGECONFIG", "mtools", "true", "false", d)}; then
  75. install ${B}/bios/mtools/syslinux ${D}${bindir}
  76. else
  77. install ${B}/bios/linux/syslinux ${D}${bindir}
  78. fi
  79. }
  80. #
  81. # Tasks for target which ship the precompiled bootloader and installer
  82. #
  83. do_configure:class-target() {
  84. # No need to do anything as we're mostly shipping the precompiled binaries
  85. :
  86. }
  87. do_compile:class-target() {
  88. # No need to do anything as we're mostly shipping the precompiled binaries
  89. :
  90. }
  91. do_install:class-target() {
  92. oe_runmake firmware="bios" install INSTALLROOT="${D}"
  93. install -d ${D}${datadir}/syslinux/
  94. install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
  95. install -m 644 ${S}/bios/core/ldlinux.bss ${D}${datadir}/syslinux/
  96. }
  97. PACKAGES += "${PN}-extlinux ${PN}-mbr ${PN}-chain ${PN}-pxelinux ${PN}-isolinux ${PN}-misc"
  98. RDEPENDS:${PN} += "${@bb.utils.contains("PACKAGECONFIG", "mtools", "mtools", "", d)}"
  99. RDEPENDS:${PN}-misc += "perl"
  100. FILES:${PN} = "${bindir}/syslinux"
  101. FILES:${PN}-extlinux = "${sbindir}/extlinux"
  102. FILES:${PN}-mbr = "${datadir}/${BPN}/mbr.bin"
  103. FILES:${PN}-chain = "${datadir}/${BPN}/chain.c32"
  104. FILES:${PN}-isolinux = "${datadir}/${BPN}/isolinux.bin"
  105. FILES:${PN}-pxelinux = "${datadir}/${BPN}/pxelinux.0"
  106. FILES:${PN}-dev += "${datadir}/${BPN}/com32/lib*${SOLIBS} ${datadir}/${BPN}/com32/include ${datadir}/${BPN}/com32/com32.ld"
  107. FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/lib*.a"
  108. FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
  109. BBCLASSEXTEND = "native nativesdk"
  110. # com32/lib/../include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found
  111. # 9 | #include_next <stdarg.h>
  112. # | ^~~~~~~~~~
  113. TOOLCHAIN = "gcc"