Commit graph

49 commits

Author SHA1 Message Date
Daniel Barlow
4cfaed7303 specify root device as /dev/mtdblockn
the (openwrt?) magic that autodetects it based on mtd labels
won't work with a two-stage boot
2023-04-26 22:16:15 +01:00
Daniel Barlow
633a4f8003 move BLK_DEV_INITRD to base.nix 2023-04-10 22:57:50 +01:00
Daniel Barlow
42725f56f9 make jffs2 module provide o.rootfs, conditionally
it's enabled if config.rootfsType == "jffs2"
2023-04-10 20:01:58 +01:00
Daniel Barlow
a5cfa37ed3 unify kernel command line handling
We now use MIPS_CMDLINE_DTB_EXTEND for all boot varieties
(tftpboot, flash boot, kexec) with the addition of
MIPS_BOOTLOADER_CMDLINE_REQUIRE_COOKIE - local patch -
so that the bootloader args are ignored unless they
contain the string "liminix"
2023-03-23 22:24:44 +00:00
Daniel Barlow
4b19568f1b add kexecboot
This allows booting a new image from a running OS, creating a
phram mtd for the root squashfs

* enable CONFIG_KEXEC
* add modules/kexecboot
* patch kexec-tools to add --map-file option for the squashfs
* patch kernel kexec code to call new kernel with DTB
2023-03-19 20:25:43 +00:00
Daniel Barlow
3c6ec354ce move root's home directory to /home/root
/ is a bad choice of home directory

/home/root instead of /root is to make it easier to write
ssh keys to the right place
2023-03-18 14:46:50 +00:00
Daniel Barlow
e78d5212e6 move tftp config to base module
we need it for flashing from u-boot even when tftp booting
is not enabled
2023-03-18 14:45:51 +00:00
Daniel Barlow
225fc6fe51 configurable busybox
allows modules to add to the busybox applets and change config
2023-03-10 18:40:45 +00:00
Daniel Barlow
43f1fb230b remove unrecoginsed earlyprintk param from kernel commandline 2023-03-10 00:50:28 +00:00
Daniel Barlow
fec77a44b5 DRY loopback interface, it's the same everywhere 2023-03-07 22:36:48 +00:00
Daniel Barlow
a3cdc32142 define structured options for config.users 2023-03-04 00:24:48 +00:00
Daniel Barlow
bbd699d7b1 add module for device-specific config
in principle this module declares the config that's defined in
devices/foo/default.nix
2023-03-03 20:04:39 +00:00
Daniel Barlow
0cd1bd99e1 declare device.flash options in base.nix
because they're specified in devices/*/default.nix
2023-03-02 23:28:39 +00:00
Daniel Barlow
6d191b73ae add outputs.flashable - flashable firmware.bin 2023-03-02 23:01:26 +00:00
Daniel Barlow
adc198b3af WIP push to see what passes 2023-03-01 22:24:58 +00:00
Daniel Barlow
41ff5a1fe6 move FW_LOADER* config to modules/base 2023-03-01 18:16:01 +00:00
Daniel Barlow
59ce03630a consistent ownership/permissions for /run/service-state/** 2023-02-25 22:53:06 +00:00
Daniel Barlow
690cedf00d better type for config.groups
instead of an attrset of anything, specify the expected
structure of each value
2023-02-25 20:33:18 +00:00
Daniel Barlow
751920c8fc qemu: switch to building wireless as kernel modules
This is a hefty change

* add support for kernel backports project
* build wireless stack/drivers as modules from a backported kernel
* create a service to load/unload the modules
2023-02-22 18:41:41 +00:00
Daniel Barlow
e89fcfbf09 collect "device" options into an attrset 2023-02-22 18:31:46 +00:00
Daniel Barlow
4faf529dc3 define kernel MODULE_SIG everywhere 2023-02-22 18:20:56 +00:00
Daniel Barlow
817c3793d4 move dts config from kernel to boot
The kernel does not need to know about the DTS. I am prepared
to be very slightly injured on this hill.
2023-02-18 15:13:19 +00:00
Daniel Barlow
1a08aaad01 move outputs into a module 2023-02-10 23:10:44 +00:00
Daniel Barlow
0a06319d0c make loadAddress and entryPoint device configuration
... already having second thoughts about loadAddress
2023-02-10 18:20:01 +00:00
Daniel Barlow
8cead61740 convert devices from overlay to module
this makes it possible for devices to stash things in
`config` (e.g. pathname to DTS) that can later be overwritten
(even by the end user)
2023-02-10 17:54:33 +00:00
Daniel Barlow
eaf90df56c per-device dts 2023-02-06 23:19:35 +00:00
Daniel Barlow
76243d306c remove checkedConfig, check all the config 2022-10-19 22:09:38 +01:00
Daniel Barlow
3ef30056c4 trim down the qemu kernel config
just retain the options we need to pass the tests
2022-10-18 22:28:07 +01:00
Daniel Barlow
c6ed5d6f2d add ipv4/v6 to base kernel config 2022-10-18 18:56:29 +01:00
Daniel Barlow
026932a745 add unix-domain socket support
this is a curious config option to default to "n", I think
2022-10-18 15:48:37 +01:00
Daniel Barlow
7d1c85f680 kernel: enlarge offset to rootfs, disable sysfs devlink
the ag71xx driver doesn't probe with fw_devlink enabled
2022-10-15 16:11:40 +01:00
Daniel Barlow
70fa328574 support out-of-tree module builds in vmlinux derivation
run "make modules_prepare" to create scripts/modules.lds
2022-10-09 09:55:30 +01:00
Daniel Barlow
fe7080e75c kconfig reqd for tmpfs mount, getty baud rate to = gl-ar750 u-boot 2022-10-07 23:26:24 +01:00
Daniel Barlow
58c287ef6a add config option for kernel commmand line 2022-10-07 00:21:04 +01:00
Daniel Barlow
2f3072d7d5 enable /proc/config.gz
previous attempt hadn't noticed that it has a missing dependency
2022-10-05 21:50:10 +01:00
Daniel Barlow
f9626d00f4 generate probably-non-functional firmware image for gl-ar750 2022-10-03 22:28:15 +01:00
Daniel Barlow
0ed97a5232 support /proc/config.gz 2022-10-02 10:04:36 +01:00
Daniel Barlow
1aa9f8d61f add s6 package for logfile timestamp decoder s6-tai64nlocal 2022-10-02 10:04:35 +01:00
Daniel Barlow
6f23a45696 configuration for users and groups 2022-09-28 21:31:15 +01:00
Daniel Barlow
5d10a9e760 rename config.environment as config.filesystem 2022-09-27 16:48:17 +01:00
Daniel Barlow
696bbe6521 rename systemPackages as defaultProfile.packages
it doesn't work the same way as in nixos, so don't name it the same way
2022-09-27 16:47:42 +01:00
Daniel Barlow
e40a91fca0 move all remaining pseudofiles to base module 2022-09-27 14:06:07 +01:00
Daniel Barlow
4c89e9aee6 add passwd and group in environment.etc 2022-09-26 21:02:10 +01:00
Daniel Barlow
bd6cbd373f add config environment.etc which gets converted to pseudofiles 2022-09-26 20:46:28 +01:00
Daniel Barlow
09a9dba963 export "dir" and "symlink" from pseudofiles package 2022-09-26 18:27:43 +01:00
Daniel Barlow
f0024dcac5 check type of kernel config attrsets 2022-09-26 12:11:26 +01:00
Daniel Barlow
9902d4052b add a type definiton for s6-rc modules 2022-09-26 11:46:09 +01:00
Daniel Barlow
0c25983c0b fix kconfig override
the default kconfig should be in a config stanza, not in the
default attr of the options stanza, otherwise it gets overridden
completely instead of merged
2022-09-25 13:17:21 +01:00
Daniel Barlow
c6e56b1637 merge-modules accepts >1 module 2022-09-25 11:52:02 +01:00