Hi, Now that Syslinux has ls.c32 and lua.c32, it should be possible to build a customizable boot menu in the bootloader itself, instead of generating it beforehand by hooking into the kernel installation/removal process. Sure that would not work over TFTP (no ls), but the already mentioned 20th century way would not either. Sadly, directory handling is not implemented in the embedded Lua interpreter, or at least I failed to find it. Is there perhaps some deep reason for this? Or is this idea useless anyway? -- Regards, Feri.
On 08/22/2013 10:20 AM, Ferenc Wagner wrote:> Hi, > > Now that Syslinux has ls.c32 and lua.c32, it should be possible to build > a customizable boot menu in the bootloader itself, instead of generating > it beforehand by hooking into the kernel installation/removal process. > Sure that would not work over TFTP (no ls), but the already mentioned > 20th century way would not either. Sadly, directory handling is not > implemented in the embedded Lua interpreter, or at least I failed to > find it. Is there perhaps some deep reason for this? Or is this idea > useless anyway? >No, there isn't any reason for that. It's just a matter of noone having done it yet. It would be a very good thing to get this done. -hpa
"H. Peter Anvin" <hpa at zytor.com> writes:> On 08/22/2013 10:20 AM, Ferenc Wagner wrote: > >> Now that Syslinux has ls.c32 and lua.c32, it should be possible to build >> a customizable boot menu in the bootloader itself, instead of generating >> it beforehand by hooking into the kernel installation/removal process. >> Sure that would not work over TFTP (no ls), but the already mentioned >> 20th century way would not either. Sadly, directory handling is not >> implemented in the embedded Lua interpreter, or at least I failed to >> find it. Is there perhaps some deep reason for this? Or is this idea >> useless anyway? >> > > No, there isn't any reason for that. It's just a matter of noone having > done it yet. > > It would be a very good thing to get this done.Thanks, glad to hear it. And would it be necessary to reimplement the menu system in Lua, or would it be possible to hand over the generated config to menu.c32 somehow? If not, then maybe extending menu.c32 with some "dynamic" directives would be a lot easier. Unfortunately that would restrict the functionality to the simple menu system and also make it more rigid, but that's probably the bulk of the use cases anyway... -- Regards, Feri.