Library modules

From Syslinux Wiki
Revision as of 15:21, 18 September 2016 by Ady (talk | contribs) (Minor rewording. Minor wiki formatting.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


In versions prior to 5.00, almost all c32 modules were "stand alone"; adding the relevant module file into the adequate directory would be enough so to make it work as expected.

Since version 5.00, some c32 modules need additional files (libraries) so to work correctly.

This might sound as an unnecessary complication for users already used to the "stand alone" ways, but it will eventually allow to add new features that are otherwise not possible or more difficult to achieve.

Since version 5.00, all Syslinux variants require an additional module, ldlinux, to be loaded too. Specifically, ldlinux.c32 (BIOS), ldlinux.e32 (EFI IA32) or ldlinux.e64 (EFI X64). Note that EFI is supported since Syslinux 6.00.

Syslinux ".c32" modules now depend on library modules such as libcom32.c32, libgpl.c32, liblua.c32, libmenu.c32, libutil.c32.

Since Syslinux 6.00, there are respective binary files (e.g. boot loaders, Syslinux modules) under respective bios, efi32, efi64 directories.

All Syslinux variants need an additional ldlinux module

Since version 5.00, when a SYSLINUX or EXTLINUX installer is used, the relevant boot sector will be modified and two files will be added to the "installation directory": the ldlinux.sys boot loader file, and an auxiliary ldlinux.c32 file. Note that these two files are not necessary so as to execute the installers; they are already embedded in the installers themselves.

For other Syslinux variants (PXELINUX, ISOLINUX) booting BIOS firmware, the second file, ldlinux.c32, needs to be manually added, just as the boot loader. Both files shall match the same version. For example, before building a new ISOLINUX image, two files are now needed: the isolinux.bin boot loader file, and the same auxiliary ldlinux.c32 file.

Similarly, Syslinux variants booting (U)EFI firmware also require at least two files; the syslinux.efi boot loader (from the respective efi32 or efi64 directories), and the respective ldlinux module: ldlinux.e32 for EFI IA32, ldlinux.e64 for EFI X64.

Syslinux Modules by Firmware and Architecture

Starting from Syslinux 6.00, binary files included in official Syslinux releases are separated by Firmware and Architecture. There are respective binary files under respective bios, efi32, efi64 directories.

Note that only the ldlinux module changes its filename's extension according to firmware and architecture. All other Syslinux modules remain as "*.c32".

So now there are several Syslinux modules with the same filename. For example, there are "bios/com32/menu.c32", "efi32/com32/menu.c32", "efi64/com32/menu.c32". Each set of modules is used under different circumstances and from different expected paths, so there is no conflict between them.

ldlinux.* is required:
isolinux*.bin : ldlinux.c32
*pxelinux.0 : ldlinux.c32
ldlinux.* : ldlinux.c32
(efi ia32) syslinux.efi
(or renamed) :
(efi x64) syslinux.efi
(or renamed) :

Syslinux modules working dependencies

The following is a list, sorted alphabetically by module, of dependencies for c32 modules since version 5.00. The information is obtained under a GNU/Linux OS by (recurrently) running the "ldd" tool on the c32 modules.

So for example, for chain.c32 to work, two additional files are also needed: libutil_com.c32 libutil.c32 and libcom32.c32. All files shall match the same version.

In case the necessary library modules (lib*.c32) are added and the relevant c32 module fails anyway, please look for more information regarding the PATH directive (also introduced in version 5.00), about the location where the lib*.c32 files are searched for in the boot device.

Note: In version 5.01, libutil_com.c32 was renamed to libutil.c32, and libcom32gpl.c32 was renamed to libgpl.c32, in order to conform to "8.3" file name length format (used in FAT fs when there is no LFN support; and used in basic ISO9660). All references in this page are updated accordingly.

Library modules c32 dependencies:
com32/samples/ advdump.c32: _
com32/modules/ cat.c32: _
com32/chain/ chain.c32: libutil.c32
com32/modules/ cmd.c32: libcom32.c32
com32/lua/src/ cmenu.c32: libmenu.c32
(+) libutil.c32
(+) libcom32.c32
com32/cmenu/ complex.c32: libcom32.c32
(+) libutil.c32
com32/modules/ config.c32: libcom32.c32
com32/modules/ cptime.c32: libutil.c32
com32/lua/src/ cpu.c32: libgpl.c32
com32/modules/ cpuid.c32: _
com32/modules/ cpuidtest.c32: (i) libgpl.c32
com32/modules/ debug.c32: _
com32/lua/src/ dhcp.c32: libcom32.c32
com32/modules/ disk.c32: libgpl.c32
com32/cmenu/ display.c32: libmenu.c32
(+) libutil.c32
com32/lua/src/ dmi.c32: libgpl.c32
com32/modules/ dmitest.c32: libgpl.c32
com32/modules/ elf.c32: libcom32.c32
com32/samples/ entrydump.c32: (i) _
com32/modules/ ethersel.c32: libcom32.c32
com32/samples/ fancyhello.c32: (i) libutil.c32
com32/gfxboot/ gfxboot.c32: libcom32.c32
com32/modules/ gpxecmd.c32: libcom32.c32
com32/hdt/ hdt.c32: libutil.c32
com32/samples/ hello.c32: _
com32/modules/ hexdump.c32: libcom32.c32
com32/modules/ host.c32: libcom32.c32
com32/modules/ ifcpu.c32: libutil.c32
com32/modules/ ifcpu64.c32: libcom32.c32
com32/modules/ ifmemdsk.c32: libcom32.c32
com32/modules/ ifplop.c32: libcom32.c32
com32/modules/ kbdmap.c32: libcom32.c32
com32/samples/ keytest.c32: libutil.c32
com32/modules/ kontron_wdt.c32: (i) libcom32.c32
com32/elflink/ldlinux/ ldlinux.c32: _
com32/lua/src/ lfs.c32: _
com32/lib/ libcom32.c32: _
com32/gpllib/ libgpl.c32: _
com32/lua/src/ liblua.c32: _
com32/cmenu/libmenu/ libmenu.c32: libutil.c32
com32/libutil/ libutil.c32: _
com32/modules/ linux.c32: libcom32.c32
com32/samples/ localboot.c32: (i) libcom32.c32
com32/modules/ ls.c32: _
com32/lua/src/ lua.c32: liblua.c32
com32/mboot/ mboot.c32: libcom32.c32
com32/modules/ meminfo.c32: _
com32/menu/ menu.c32: libutil.c32
com32/lua/src/ pci.c32: libcom32.c32
com32/modules/ pcitest.c32: libcom32.c32
com32/modules/ pmload.c32: libcom32.c32
com32/modules/ poweroff.c32: _
com32/modules/ prdhcp.c32: libutil.c32
com32/modules/ pwd.c32: _
com32/modules/ pxechn.c32: libutil.c32
com32/modules/ reboot.c32: libcom32.c32
com32/samples/ resolv.c32: _
com32/rosh/ rosh.c32: libutil.c32
com32/modules/ sanboot.c32: libcom32.c32
com32/modules/ sdi.c32: libcom32.c32
com32/samples/ serialinfo.c32: (i) _
com32/cmenu/ simple.c32: libmenu.c32
(+) libutil.c32
com32/sysdump/ sysdump.c32: libcom32.c32
com32/lua/src/ syslinux.c32: libcom32.c32
com32/cmenu/ test.c32: libmenu.c32
(+) libutil.c32
com32/cmenu/ test2.c32: libmenu.c32
(+) libutil.c32
com32/lua/src/ vesa.c32: libcom32.c32
com32/modules/ vesainfo.c32: _
com32/menu/ vesamenu.c32: libutil.c32
com32/modules/ vpdtest.c32: libgpl.c32
com32/modules/ whichsys.c32: libcom32.c32
com32/modules/ zzjson.c32: libgpl.c32

(i) File name is longer than 8.3 characters, so it needs special considerations in ISO9660 Level1 and in FAT without LongFileName support.