[syslinux] initramfs_init() changes in 6.04
wferi at niif.hu
Thu Aug 2 10:06:53 PDT 2018
David Woodhouse <dwmw2 at infradead.org> writes:
> Commit 73fb321a5d56b ("lua: make initramfs structures full userdata
> objects with methods") broke my boot script, requiring a workaround
> along the lines of the patch below:
> Is this an intentional user-visible change? I note the documentation at
> hasn't been updated and still shows what to do for 6.03 without any
> hint that it won't be compatible with 6.04.
Please accept my apologies. This was an intentional API change, but it
wasn't intended to be user visible on the basis that nobody used it yet.
Frankly, I didn't expect anybody come after me almost four years after I
> Also... if we are doing this, then why do we need to pass the first
> 'initramfs' argument into the initramfs.load() function? Surely it
> should have access to 'self' without the caller having to explicitly
> pass it in? Isn't that kind of the point?
Yes it is. You have to use the Lua method syntax to achieve that as
shown in com32/lua/doc/syslinux.asc:
local sl = require "syslinux"
kernel = sl.loadfile "/SuSE-11.1/x86_64/linux"
print("File name: " .. kernel:name() .. " size: " .. kernel:size())
initrd1 = "/SuSE-11.1/x86_64/initrd"
initrd = sl.initramfs()
print ("File name: " .. initrd1 .. " size: " .. initrd:size())
sl.boot_it(kernel, initrd, "init=/bin/bash")
Please refer to the in-tree documentation in preference to the online
More information about the Syslinux