Daniel Barlow
3c950704e1
rename /run/service-state to /run/services/outputs
2024-02-13 21:41:43 +00:00
Daniel Barlow
3851698d35
fix tftpboot compressed rootfs
2024-02-13 18:16:17 +00:00
Daniel Barlow
f69ebbb6f5
fix doc CI target
2024-02-13 15:41:45 +00:00
Daniel Barlow
16e4b05653
dhcp6c: set preferred and valid address lifetimes
...
also workaround a bug in rebinding/updates where we get an error
from "ip addr add" trying to add an address that's already present
2024-02-13 13:49:12 +00:00
Daniel Barlow
65479e206b
use regular kernel not backports for mac80211
...
the kernel on most devices is now newer than the version that the
backported drivers were backported from
2024-02-12 20:41:10 +00:00
Daniel Barlow
b9c0d93670
build modules at same time as main kernel vmlinux
...
This changes the practice for building kernel modules: now we expect
that the appropriate Kconfig symbols are set to =m in
config.kernel.config, and then use pkgs.kmodloader to create
a service that loads and unloads all the modules depended on by
a particular requirement.
Note that modules won't be installed on the target device just by
virue of having been built: only the modules that are referenced by a
kmodloader package will be in the closure.
An example may make this clearer: see modules/firewall/default.nix
in this commit.
Why?
If you have a compiled Linux kernel source tree and you change some
symbol from "is not set" to m and then run make modules, you cannot in
general expect that newly compiled module to work. This is because
there are places in the build of the main kernel where it looks to see
which modules _may_ be defined and uses that information to
accommodate them.
For example in an in-kernel build of
https://github.com/torvalds/linux/blob/master/net/netfilter/core.c#L689
some symbols are defined only if CONFIG_NF_CONNTRACK is set, meaning
this code won't work if we have it unset initially then try later to
enable it and build modules only. Or see
https://github.com/torvalds/linux/blob/master/include/linux/netdevice.h#L160
2024-02-11 23:47:11 +00:00
Daniel Barlow
dce983ec79
move kernel module to its own subdir
2024-02-11 18:15:55 +00:00
Daniel Barlow
812f497660
add kernel.version param to allow for version-specific patches
...
default to 5.15.137 to avoid breaking the devices that don't declare it
2024-02-11 16:19:52 +00:00
dan
273c66b2d3
Merge pull request 'Add support for TP-Link Archer AX23' ( #6 ) from raboof/liminix:add-archer-ax23-v1-bak into main
...
Reviewed-on: https://gti.telent.net/dan/liminix/pulls/6
2024-02-08 17:47:46 +00:00
Daniel Barlow
6f1f9d6f20
firewall: fix module loading
2024-02-07 23:43:41 +00:00
Daniel Barlow
34291292c0
fix dependency on kernel moduels in firewall service
2024-02-07 16:21:14 +00:00
Arnout Engelen
61494fdc0c
Add tplink module for creating 'safeloader' images
2024-02-06 17:59:38 +01:00
Daniel Barlow
c8154a2db9
kernel: add "conditional" config
...
imagine: you are using a device that requires
CONFIG_MYDEVICE_FROBOZZ_DRIVER but only if CONFIG_FROBOZZ has been
specified elsewhere. Because we check that every requested config
symbol actually appears in .config then it can't be added
unconditionally or the build will fail if CONFIG_FROBOZZ wasn't asked
for.
I'm not 100% happy about this design but it's the best I've thought of
so far.
2024-02-04 18:12:15 +00:00
Daniel Barlow
89c88dd472
specify type for rootDevice module option
2024-02-02 19:50:13 +00:00
Daniel Barlow
c1ad139310
whitespace
2024-02-02 19:43:34 +00:00
Daniel Barlow
9e199c6957
tftpboot: compute dtbSize *after* changing dtb
...
Adding the reserved-memory node to the dtb can cause it to grow
by enough that it needs an extra page - this will overlap the start
of the kernel image if we calculate offsets based on the original size
Reported-by: sinavir
Authored-by: sinavir
2024-01-26 22:51:58 +00:00
Daniel Barlow
dd8ec18881
restore boot.tftp.freeSpaceBytes
2024-01-26 22:46:36 +00:00
Daniel Barlow
c219350d7c
add usb storage for turris omnia
...
ideally we would make this a module instead of compiling in
directly
2024-01-26 22:46:36 +00:00
Daniel Barlow
c1101d3af5
make extlinux work with liminix-rebuild
...
add /boot to the systemConfiguration closure
2024-01-08 18:58:07 +00:00
Daniel Barlow
228c0a1668
pass rootOptions config as rootflags= kernel cmdline opt
2024-01-08 18:54:49 +00:00
Daniel Barlow
7bc9cb6c55
why is extlink hardcoding root device?
2024-01-07 20:30:23 +00:00
Daniel Barlow
3c941b4ce2
partial btrfs support
...
doesn't actually know how to make the filesystem, just
kernel config and accept it as a valid option
2024-01-07 16:43:43 +00:00
Daniel Barlow
2a93f24a58
add turris "schnapps" tool
...
in its current state this is useful for turris omnia only, but will
allow us to do installs and rollback to turris os if needed.
2024-01-05 00:07:01 +00:00
Daniel Barlow
64898eada8
mount tmpfs on /tmp
...
too much stuff doesn't work without it and it's not
all worth patching
2024-01-04 23:22:02 +00:00
Daniel Barlow
ff991508ae
build kernel only once for multiple outputs
...
e.g. vmlinux + zImage
2024-01-02 19:40:57 +00:00
Daniel Barlow
921b4f24af
boot.scr: append ; not \n to lzmadec command
...
this is simply to make copy-paste slightly more convenient
2024-01-01 20:21:42 +00:00
Daniel Barlow
ec1ff283da
vmdisk output: allow extra params to run.sh
2023-12-29 18:12:57 +00:00
Daniel Barlow
0bf98c5243
add output for u-boot
2023-12-29 17:07:47 +00:00
Daniel Barlow
dbf1ecdcb7
swap zimage and dtb in ram
...
kernel uncompression code creates a stack directly
after the compressed payload, which was trashing the dtb
2023-12-23 15:38:32 +00:00
Daniel Barlow
1042be912c
turris omnia: switch to regular tftpboot output
...
now it does zimage and rootfs compression
2023-12-23 00:05:34 +00:00
Daniel Barlow
c931d84828
tftproot: put command line in dtb
2023-12-23 00:05:34 +00:00
Daniel Barlow
64a3f50248
tftpboot: support compressed root
2023-12-23 00:05:34 +00:00
Daniel Barlow
c5e9fcecc7
uninit var
2023-12-23 00:05:34 +00:00
Daniel Barlow
f25c41b4d2
tftpboot: move things around in memory
...
new layout has rootfs followed by kernel and dtb, so that we
know the rootfs start and size to embed them into the dtb instead
of having to use dummy values and fill them in afterwards
2023-12-23 00:05:34 +00:00
Daniel Barlow
bfa68d9c55
remove unused variable
2023-12-23 00:05:34 +00:00
Daniel Barlow
ff0ef825a6
tftpboot: add option for kernel image format
2023-12-23 00:05:34 +00:00
Daniel Barlow
44a0cf364b
remove boot-scr output, merge into tftpboot
...
(1) it creates two things (script and dtb); (2) it's a bit pointless
without the tftpboot output it depends on
2023-12-22 21:37:15 +00:00
Daniel Barlow
c7b2733bea
tftpbootlz: put command line in dtb
...
this makes boot.scr substantially shorter, in anticipation of using it
for first boot of the omnia and not wanting to embed an essay in
a setenv value
2023-12-22 20:09:44 +00:00
Daniel Barlow
dfbc72dd51
tftpboot test: fix reserved-memory dt for aarch64
2023-12-22 17:37:53 +00:00
Daniel Barlow
231c2cef03
make reserved-memory work on mips, and improve test
2023-12-21 22:21:20 +00:00
Daniel Barlow
32c13c46bb
support aarch64 in tftpboot test
2023-12-19 12:12:12 +00:00
Daniel Barlow
9ca9723c9d
make rootfs work with tftpbootlz
2023-12-17 19:39:26 +00:00
Daniel Barlow
d1e2d525a4
tftpboot omnia using bootz not bootm
...
because kernel size is now beyond the u-boot size
limit for bootm
2023-12-16 23:40:55 +00:00
Daniel Barlow
80528376a2
move o.systemConfiguration to initramfs module
...
as far as I can tell, we define it identically in every module
that uses initramfs
2023-12-11 21:47:15 +00:00
Daniel Barlow
d707345891
rename rootfsFiles to rootdir, add bootablerootdir
2023-12-11 21:21:12 +00:00
Daniel Barlow
601bb289ee
rename diskimage to mbrimage
2023-12-11 19:09:19 +00:00
Daniel Barlow
876bd7d8ce
rename flashimage to mtdimage
2023-12-11 19:09:18 +00:00
Daniel Barlow
4ddce6e926
fix the tests we broke
2023-12-10 17:12:57 +00:00
Daniel Barlow
5eeb277564
move output module imports example -> device
...
The outputs available are a characteristic of the device, not
the example.
2023-12-10 16:38:53 +00:00
Daniel Barlow
c81e7c4d35
move all output modules to subdirectory, trash standard.nix
...
standard.nix isn't, is the essence here. Not all devices
support flashimage as it is currently defined - some
have diskimage, some have neither
2023-12-10 15:23:12 +00:00