Frank Hunleth
2017-Jan-25 19:44 UTC
[syslinux] Possible to persist data across reboots from Lua?
I'd like to be able to save a boolean value across reboots. I believe that being able to store to the auxiliary data vector would satisfy this need, but I'm using syslinux and that doesn't seem to be implemented. While I'm currently using a Lua script, I'm not tied to it, so if there's a way to read and write any persistent filesystem or disk, I'd be happy to switch. Reading through the source code, it seems like most filesystem operations are read-only and I couldn't find any information on the wiki. If this is possible, could you point me to an example or where to read up? Thanks, Frank
Ferenc Wágner
2017-Jan-27 12:54 UTC
[syslinux] Possible to persist data across reboots from Lua?
Frank Hunleth via Syslinux <syslinux at zytor.com> writes:> I'd like to be able to save a boolean value across reboots. I believe > that being able to store to the auxiliary data vector would satisfy > this need, but I'm using syslinux and that doesn't seem to be > implemented.It's implemented in the Syslinux API, just not exported to Lua.> While I'm currently using a Lua script, I'm not tied to it, so if > there's a way to read and write any persistent filesystem or disk, I'd > be happy to switch.I think the best would be adding Lua bindings for syslinux_getadv(), syslinux_setadv(), syslinux_adv_write(), syslinux_adv_size() and the BOOTONCE and MENUSAVE tags. And define some policy for allocating new tags... which is the hard part.> Reading through the source code, it seems like most filesystem > operations are read-onlyYes, the filesystem drivers in Syslinux are read-only. -- Feri
Frank Hunleth
2017-Jan-27 21:34 UTC
[syslinux] Possible to persist data across reboots from Lua?
On Fri, Jan 27, 2017 at 7:54 AM, Ferenc W?gner <wferi at niif.hu> wrote:> Frank Hunleth via Syslinux <syslinux at zytor.com> writes: > >> I'd like to be able to save a boolean value across reboots. I believe >> that being able to store to the auxiliary data vector would satisfy >> this need, but I'm using syslinux and that doesn't seem to be >> implemented. > > It's implemented in the Syslinux API, just not exported to Lua. > >> While I'm currently using a Lua script, I'm not tied to it, so if >> there's a way to read and write any persistent filesystem or disk, I'd >> be happy to switch. > > I think the best would be adding Lua bindings for syslinux_getadv(), > syslinux_setadv(), syslinux_adv_write(), syslinux_adv_size() and the > BOOTONCE and MENUSAVE tags. And define some policy for allocating new > tags... which is the hard part.Thanks. That points me in the right direction for where to look. Frank> >> Reading through the source code, it seems like most filesystem >> operations are read-only > > Yes, the filesystem drivers in Syslinux are read-only. > -- > Feri-- Frank Hunleth Troodon Software LLC Embedded Software Development http://troodon-software.com/