Commit graph

325 commits

Author SHA1 Message Date
Raito Bezarius
f34a63d1c8 feat(pki): init TLS PKI module
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
3d528a71e9 feat(hostapd): make the package configurable to enable RADIUS
The default hostapd disable too many things, we need a bit more for
RADIUS.

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
86e81efbd6 tftp: introduce an alternative command line for TFTP
Normal command line and TFTP command line can be sometimes very
different.

e.g. We don't want to load UBI filesystems for a TFTP boot as it may
interfere with our root device loading.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
2d6414ea41 tftp: introduce the FIT enclosing boot.scr
This simplify TFTP.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-09-01 17:48:54 +02:00
Raito Bezarius
afe9d2211b outputs/vmroot: use the build runtime shell
otherwise, this will use the cross runtime shell, which is wrong!

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-08-25 19:07:42 +02:00
Raito Bezarius
46217b24a3 fix(modules/hardware): default for ubi.mtds is []
Otherwise, evaluation error for anything not using it.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-08-23 19:37:43 +02:00
Raito Bezarius
7206fea4b4 fix(nixpkgs): drop meta.*
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-24 19:00:29 +02:00
Raito Bezarius
561d47822a fix(assertions): wire up the assertion system
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-24 19:00:04 +02:00
Raito Bezarius
8a6709e91b fix(nixpkgs): drop nixpkgs.initialSystem
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-24 18:54:16 +02:00
Raito Bezarius
081b9ab370 feat(modules): add a nixpkgs module
Like nixpkgs itself, we can control Liminix's package set via the module
system.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-24 17:36:05 +02:00
Daniel Barlow
00a99d16b5 make a serviceDefn for wwan 2024-05-24 17:23:27 +02:00
Daniel Barlow
c3d6c55a74 commentary 2024-05-24 17:23:27 +02:00
Daniel Barlow
fa7fde87db add hacky wwan service with hardcoding all over 2024-05-24 17:23:27 +02:00
Daniel Barlow
0f520ceee2 create cdc-ncm module 2024-05-24 17:23:27 +02:00
Daniel Barlow
1c9f20dd40 exec xl2tpd
haven't fully worked out why, but without this s6 is unable to stop it.
2024-05-24 17:23:27 +02:00
Daniel Barlow
4a6d93dc2c add rudimentary l2tp service module 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
Raito Bezarius
59d6640343 feat(zyxel): cleanup A/B schema
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-05-13 01:45:27 +02:00
Daniel Barlow
782feaeafa set default for firewall extraRules 2024-05-03 16:28:53 +01:00
Daniel Barlow
e249f48cff add deps on {ins,rm}mod and kconfig for firewall module 2024-05-01 23:06:12 +01:00
Daniel Barlow
660ed5df8f vlan interface services depend on primary 2024-04-28 21:33:36 +01:00
Daniel Barlow
7e4a05bbf8 separate kernel and base modules
this is needed for levitate
2024-04-28 12:44:27 +01:00
Daniel Barlow
a4ba5c85e1 alphabetize list in all-modules 2024-04-28 12:42:47 +01:00
Daniel Barlow
1b6a05aec5 make uevent-watch use devout instead of direct netlink 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
cdb23b147c convert anoia.fs to use lualinux 2024-04-25 21:14:37 +01:00
Daniel Barlow
771585546d import expect= where previously it was copy-pasted 2024-04-20 15:09:50 +01:00
Daniel Barlow
19ad6cd278 watchdog: put s6 pkg on $PATH for s6-svstat 2024-04-17 13:01:10 +01:00
Daniel Barlow
00076c7b81 mount service: use uevent-watch 2024-04-17 12:59:13 +01:00
Daniel Barlow
b6a054c588 add mdevd as module
following the upstream example, it republishes uevent messages
using multicast group 4 instead of group 2 as used by udev.
2024-04-14 21:59:23 +01:00
Daniel Barlow
5df5c822ea convert mount service to trigger
Good: this means it's not hanging holding the s6 dataase lock.

Bad: it's the ugliest implementation and doesn't deserve to be preserved

(tbf the ugliness is not new)
2024-04-03 23:17:36 +01:00
Daniel Barlow
4795dd05b7 unconditionally restart trigger services on liminix-rebuild
We call s6-rc -u -p default to restart/start the base services
on a rebuild, otherwise services that are only in the new
configuration won't come up. However, this stops any service
started by a trigger. So, workaround is to restart the trigger
service and expect it to restart the services it manages if they're
needed
2024-04-03 23:07:56 +01:00
Daniel Barlow
a192f08881 remove missing module 2024-03-29 17:34:10 +00:00
Daniel Barlow
a873dc6608 Merge commit 'efcfdcc' 2024-03-28 23:47:04 +00:00
Daniel Barlow
dca2e4def1 fix params to s6-rc-init
flags must precede scandir otherwise they're ignored
2024-03-28 21:56:28 +00:00
Daniel Barlow
28a5dec7dd implement ifwait trigger service and use in bridge
should we convert all ifwait uses to this trigger too? seems
reasonable
2024-03-28 20:59:39 +00:00
Daniel Barlow
fad0a47b75 add config.system.callService
this is like pkgs.callService except that it passes
config.system.service as a param so that the service
being defined can invoke other services

if this proves to be a good idea, all uses of
pkgs.callService should be changed to use it instead
2024-03-28 20:59:39 +00:00
Daniel Barlow
1a314e55b7 firewall module: provide default rules and merge extraRules
a firewall with no configuration will get a relatively sane ruleset. a
firewall with `extraRules` will get them deep merged into the default
rules.  Specifying `rules` will override the defaults
2024-03-21 12:00:34 +00:00
Daniel Barlow
9263b21faa create gateway profile by extracting from rotuer example 2024-03-21 10:04:42 +00:00
Florian Klink
436eb03a7b tftpboot: use commandLineDtbNode
config.boot.commandLineDtbNode can be set from `bootargs` to
`bootargs-override` (used for boards where the u-boot on the board does
set `bootargs` on its own).

In that case, the code updating the cmdline for tftpboot purposes also
needs to update this node, not the `bootargs` node.

Otherwise the kernel won't find the phram device, as it never heard
about it, as it didn't get the necessary cmdline options.
2024-03-16 20:06:38 +02:00
Daniel Barlow
9d6e50cbbc extract extneder example to a "profile"
this is a bit of an experiment to reduce the copy-paste in
examples by turning them into "application" modules.

planning to follow up with another module for "wifi router"
2024-02-27 23:13:12 +00:00
Daniel Barlow
94dbc56595 fix doc 2024-02-27 20:08:30 +00:00
Daniel Barlow
2cd7f932eb alignment may be null 2024-02-27 19:47:46 +00:00
Raito Bezarius
d6ffdd7be6 devices/zyxel-nwa50ax: expose primary and secondary images
To support A/B a bit better.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-02-19 02:57:34 +01:00
Raito Bezarius
422f3edab1 modules/zyxel-dual-image: init
This adds a simple boot blessing module, to be used, with the Zyxel NWA50AX.

There's a lot of elephant in the rooms: how do you upgrade kernel, etc.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-02-19 02:48:50 +01:00
Raito Bezarius
c14b2f6356 modules/busybox: add dhcprelay
This enables to run a DHCP relay from multiple interfaces.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-02-19 02:48:50 +01:00
Raito Bezarius
63007859c2 modules/outputs/zyxel-nwa-fit: init
Zyxel "firmware" format is just… a FIT with some metadata on the models.

This FIT is like this:

--------------------------
    uImage FIT header
--------------------------
    Linux kernel
--------------------------
    FDT DTB
--------------------------
    Padding so that
    this makes
    8192kb [1]
--------------------------
    UBI volume
    as a root filesystem
--------------------------

We just reproduce this in a very brutal and naive way.
In the future, this seems worth to generalize and modularize this idea
so that zyxel-nwa-fit is just an instance of a more general output.

[1]: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/image/mt7621.mk;h=ab1b829ba0086cb9fc9ca8cbbf3cbc14735034d6;hb=refs/heads/main#l3097

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2024-02-18 20:30:41 +01:00
Raito Bezarius
e9ab8d7183 modules/outputs/ubivolume: introduce ubinization
It creates an UBI image based on an UBI volume configuration.

For now, it creates only an empty rootfs.
2024-02-18 20:30:41 +01:00