Luke Ledgerd
2014-Nov-10 18:31 UTC
[syslinux] pxelinux 6.03 lua module not loading syslinux.c32 dmi.c32 etc
I'm running pxelinux configured to use the path /bios on the tftp server for all the comboot files. The problem is dmi,syslinux,vesa etc modules are not being loaded in lua. Syslinux.version() returns not found in global index as does dmi.supported() For k,v in pairs(package.loaded) do print (k,v) end; shows that these modules that are normally loaded by lua are not loading. I got an idea to configure my syslinux pxe setup to support EFI32/64/legacy from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589 That's what clonezilla server is doing too. Config label luabios MENU LABEL Upgrade your BIOS! # path /bios makes no difference com32 lua.c32 append /flash/bios/biosupdate.lua lua.c32 /liblua.c32 isn't trying to list the directory for supported modules is it? (not supported over tftp of course). I can try again with a linux tftp server in debug mode, but from what I'm seeing from the tftp logs there is no attempt to load syslinux.c32/dmi.c32, but they do load after I type the require("syslinux") option. May be related: http://www.zytor.com/pipermail/syslinux/2014-June/022170.html My print(package.cpath) /bios/?.c32;/bios/?/init.c32;bios/?.c32;bios/?.c32;./?.c32 And I think I found the solution half-way through this email so I thought I would share anyway. The demos on the syslinux wiki don't reference this syslinux-6.03/com32/lua/doc/syslinux.asc 23 Modules must be explicitly loaded into the namespace 24 before use, for example: 25 ...................................................... 26 syslinux = require ("syslinux") 27 ...................................................... Problem solved. Cheers, Luke
Ferenc Wagner
2014-Nov-11 13:01 UTC
[syslinux] pxelinux 6.03 lua module not loading syslinux.c32 dmi.c32 etc
Luke Ledgerd <luke.ledgerd at niteco.se> writes:> The problem is dmi,syslinux,vesa etc modules are not being loaded in lua. > [...] > The demos on the syslinux wiki don't reference this > > syslinux-6.03/com32/lua/doc/syslinux.asc > 23 Modules must be explicitly loaded into the namespace > 24 before use, for example: > 25 ...................................................... > 26 syslinux = require ("syslinux") > 27 ...................................................... > > Problem solved.Yes, http://www.syslinux.org/wiki/index.php/Lua.c32 is rather outdated. Syslinux.asc is a much better source, but still not precise in 6.03. I went through it recently, but my changes over 6.03 are not pulled yet. So the version at https://github.com/wferi/syslinux/blob/pub/com32/lua/doc/syslinux.asc is not directly usable either, because it documents unreleased changes. -- Regards, Feri.