Commit graph

374 commits

Author SHA1 Message Date
Raito Bezarius
0c363be423 fennelrepl: add iwinfo to it
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-07 20:03:02 +02:00
Raito Bezarius
b57df3f288 iwinfo: use Lua 5.3 port
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-07 20:03:02 +02:00
Raito Bezarius
4cf10c2e75 iwinfo: init at unstable-07-09-2024
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-07 19:26:14 +02:00
Raito Bezarius
1a770910a6 fix(ubus): rendez vous URL for the unix socket
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-07 17:48:06 +02:00
Raito Bezarius
0fb671023c feat(services): introduce structured bundles
Structured bundles keep their original contents as a `passthru` field
named `components`.

This enable users to depend on a specific piece of the bundle instead of
the whole bundle.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-05 14:54:12 +02:00
Raito Bezarius
78d0088b65 ubus: build with Lua
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-04 16:30:44 +02:00
Raito Bezarius
6d4237ff87 libubox: build with Lua
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-04 16:29:59 +02:00
Raito Bezarius
4287a05182 ubus: init at unstable-04-09-2024
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-04 15:53:26 +02:00
Raito Bezarius
eb083bee20 libubox: init at unstable-04-09-2024
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-04 15:53:19 +02:00
Raito Bezarius
21ff11503e fix(bridge): pick up MAC from another interface
This avoids the OPERSTATE unknown when the bridge is brought up but the
members are not ready yet.

This will make OPERSTATE to down, enabling us to wait until we have
brought up completely all the members.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
f0b4e826cb fix(ifwait): match over strings and not symbols
Are they the same in Fennel?

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
ca9642a61e fix(ifwait): return :present if newlink is up/yes
Urgh…

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
17355c3911 fix(preinit): scan multiple times the cmdline and rename altroot in rootalt
The way the parsing works is examining one character at a time.

First, if we had `rootfstype=... root=...`, the parsing would jump and
ignore `root=...`, which sucks.

To fix this, we scan multiple times a copy of the cmdline.

Now, we have a new problem: `root=... altroot=...` lead to opts.device
being equal to the altroot as we are looking one char at a time, so we
will arrive at a moment looking at `root=...` for `altroot=...`.

To avoid this, we rename `altroot` in `rootalt`, cheap, I know.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
c1e61d6af5 fix(zyxel/nwa50ax): ubi cannot run on phram
Discovered the hard way.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
092e9f5524 pkgs/run-liminix-vm: use build packages
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-08-25 18:44:44 +02:00
Daniel Barlow
9cb73f3fec barebones usb_modeswitch package 2024-05-24 17:23:27 +02:00
Daniel Barlow
cd116ad9e7 list pkgs we need in bordervm build
it's a bit silly trying to build it with the whole liminix overlay
when it's a nixos system not a liminix system
2024-05-24 17:23:27 +02:00
1e9204f2f0 Merge pull request 'feat: add proper A/B schema' (#1) from preinit-ab into main
Reviewed-on: DGNum/liminix#1
2024-05-24 17:22:45 +02:00
Daniel Barlow
471c63b399 s6-rc do cleanup in "finish", don't append to "run" script
s6-supervise sends signals (e.g. SIGTERM) to the pid of the process
running "run", so how do we know if the ceanup commands are even
getting executed if the shell interpreter that is supposed to do that
got killed already?
2024-05-13 17:53:02 +01:00
Daniel Barlow
8b69dcc209 pass entire config fragment to levitate, not just services
to make it useful we need to be able to set packages, passwords, ssh
keys etc
2024-04-29 20:07:01 +01:00
Daniel Barlow
3d4e782929 devout: run tests in postBuild
because checkPhase is not executed when cross-compiling, and this
package is always only cross-compiled
2024-04-27 21:07:25 +01:00
Daniel Barlow
1b6a05aec5 make uevent-watch use devout instead of direct netlink 2024-04-27 21:07:25 +01:00
Daniel Barlow
80628a3d90 move event matching tests to devout
in preparation for future uevent-watch not needing to do
event matching
2024-04-27 21:07:25 +01:00
Daniel Barlow
bf0cafffed start devout alongside mdevd
ensure it starts before mdevd-coldplug so it can populate
its database
2024-04-26 20:52:12 +01:00
Daniel Barlow
e49aba127c devout: improve socket error handling 2024-04-26 20:49:23 +01:00
Daniel Barlow
324465bc18 devout: write uevent KEY=value format to clients 2024-04-26 17:37:28 +01:00
Daniel Barlow
b33249a050 devout: add readiness notification 2024-04-26 17:23:29 +01:00
Daniel Barlow
b9c084415e devout: handle readiness on netlink socket but no event 2024-04-26 17:20:33 +01:00
Daniel Barlow
cf9cadd212 devout: replay relevant events to new subscriber 2024-04-26 17:20:33 +01:00
Daniel Barlow
a116fe084a devout: use socket constants from anoia.net.constants 2024-04-26 16:48:51 +01:00
Daniel Barlow
74cf3e0711 add anoia.net.constants for SOCK_{STREAM,DGRAM} etc
we use an ugly bit of C preprocessor to get the values from
header files, because certain constants are different on MIPS
than on other architectures
2024-04-26 16:43:09 +01:00
Daniel Barlow
cdb23b147c convert anoia.fs to use lualinux 2024-04-25 21:14:37 +01:00
Daniel Barlow
dbd1264352 convert anoia.fs to use lualinux instead of lfs 2024-04-24 20:44:32 +01:00
Daniel Barlow
18335b95e3 devout: strip newlines from client terms
this is just to make testing with socat easier
2024-04-24 18:33:02 +01:00
Daniel Barlow
6bee2f67ac devout: add incoming netlink messages to database 2024-04-24 18:32:27 +01:00
Daniel Barlow
b4ba3eea21 fix revents in unpack-pollfds 2024-04-24 18:31:26 +01:00
Daniel Barlow
16af3984c9 add lualinux to fennelrepl 2024-04-24 18:30:34 +01:00
Daniel Barlow
ce7e395295 devout test: replace minisock with lualinux 2024-04-24 18:29:24 +01:00
Daniel Barlow
7e13e017eb add readline suport to fennelrepl 2024-04-24 18:28:39 +01:00
Daniel Barlow
bbf2f53c0e cross-compile lualinux 2024-04-24 18:28:14 +01:00
Daniel Barlow
032d0f8aca add netlink socket
it's not hooked up to anything yet, but it proves we can
do this with lualinux
2024-04-23 23:34:25 +01:00
Daniel Barlow
b8ac9e5279 convert devout from minisock to lualinux 2024-04-23 23:33:11 +01:00
Daniel Barlow
72789984ce add lualinux package 2024-04-23 22:41:38 +01:00
Daniel Barlow
90d9d0e811 update minisock to not scribble on lua strings 2024-04-23 20:19:33 +01:00
Daniel Barlow
97a8ae1c84 devout: add event loop and main run function 2024-04-23 20:15:02 +01:00
Daniel Barlow
52eb283a26 implement unsubscribe
and add ids to subscribe so that there's a unique identifier
to pass to unsubscribe
2024-04-23 20:12:46 +01:00
Daniel Barlow
cbb1de804e switch to minisock fork witj poll() call
this is likely to be temporary as minisock is getting
replaced with lualinux
2024-04-23 20:09:41 +01:00
Raito Bezarius
afb14d844b feat(preinit): support alternative roots
In A/B schemas, it is possible to have multiple rootfs.

Thus, it is necessary to let the B kernel preinitialize either the A
rootfs or the B rootfs failing to mount the A rootfs.

Ideally, we should also try to switch to the B rootfs if we cannot start
up the init on the A rootfs, but that's a FUTUREWORK.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-04-21 17:26:37 +02:00
Daniel Barlow
f9c03998b8 implement subscriptions with callback 2024-04-21 13:19:17 +01:00
Daniel Barlow
50de1b090f add the rest of the test list (all we've thought of) 2024-04-21 11:22:26 +01:00