victronenergy / venus

Victron Energy Unix/Linux OS

Home Page:https://github.com/victronenergy/venus/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Since system is read-only now: include serial-starter.rules on /data

M66B opened this issue · comments

Since the system is read-only now (good), there should be a way to add (include) rules to /etc/udev/rules.d/serial-starter.rules using the data partition, so the rules can survive a firmware update.

Similar to /data/conf/serial-starter.d

Ref: https://github.com/victronenergy/venus/wiki/howto-add-a-driver-to-Venus

Those of us that create Venus OS modifications typically remount /root as read-write because that's the only way we can modify, for example the gui-v1 files.

Anything that would allow mods while leaving /root as read only would be a good thing but might be more complicated than is necessary.

@kwindrem What about drivers for specific equipment? IMHO, they should survive firmware updates.

I don't think it is complicated to implement this, just include/add an extra rules file, and that's it.

Any modification should survive a firmware update. Right now, we use code called from /data/rc.local to reinstall the mod after a firmware update. That's where we remount /root read-write and resize it so there's room for the mod.

My SetupHelper aid to Venus OS modifications stores information in /root so it IS purged on firmware update so reinstalls can occur.

Making it easier for mods to survive a firmware update IS a good thing, so I'm all for whatever can be done. I'm certainly in favor of the proposed change for serial-starter.

A generic mechanism to install mods without remounting /root as read-write is what I meant by "complicated". That would most likely require a major change to Venus OS, moving lots of it to /data which side steps the whole idea of the file system being read-only.

Services are already handled in a way that allows them to be added with /root remaining read-only: /service is in a temp, volatile fs and /opt/victronenergy/service is copied there on boot. Services can be added to the latter location and maintain the read-only /root. Any other areas that would allow modification would need to be handled in a similar way. That's what I meant by complicated.