Commit Graph
100 Commits
Author SHA1 Message Date
Daniel Barlow 0242cec977 run-liminix-vm: remove unneeded second copy of pad code 2023-12-04 23:37:39 +00:00
Daniel Barlow 5a2963543e thonk 2023-12-04 23:29:36 +00:00
Daniel Barlow 98d3336926 rewrite run-liminix-vm as a fennel program
the effect of shell quoting/word splitting rules was reaching
completely unreasonable, insofar as I was unable to reason about it
2023-12-03 22:51:39 +00:00
Daniel Barlow cb6ebbdc60 alphabetize derivations in overlay 2023-12-02 17:08:59 +00:00
Daniel Barlow bb335050fd derivation that produces /boot 2023-12-02 15:31:55 +00:00
Daniel Barlow 395f624338 think 2023-12-02 15:31:09 +00:00
Daniel Barlow e518ab667b make job control work in console shell 2023-11-29 19:49:51 +00:00
Daniel Barlow 382128b6cf omnia: make wan interface work 2023-11-28 21:38:45 +00:00
Daniel Barlow c803772074 omnia: add hardware ethernet and switch config 2023-11-27 21:37:15 +00:00
Daniel Barlow 32c24f3809 switch pppoe test back to qemu mips
while we find out why it fails
2023-11-26 23:18:24 +00:00
Daniel Barlow cc73a98419 support setting network device names
this means that net devices in devices/foo/default.nix can be
specified by their sysfs paths (instead of by "eth0" and "eth1" that
may change from one kernel version to the next) and given mnenomic
names that are helpful for the hardware. Like "wan" and "lan[1..4]"
2023-11-26 23:15:28 +00:00
Daniel Barlow e2ea145ce5 wip 2023-11-26 22:43:56 +00:00
Daniel Barlow b036a161f5 thonk 2023-11-26 22:43:31 +00:00
Daniel Barlow 31a2969972 omnia: add support for wifi
- ath9k and ath10k, both on PCI bus (which can be enumerated, hence
they don't need to be in device tree)

- need to disable PCIe ASPM for the ath9k to work

- appropriate firmware files added for ath10k
2023-11-26 13:25:01 +00:00
Daniel Barlow 76a370cc92 omnia kernel: add watchdog
it's enabled by u-boot so we need at least this minimal capability
otherwise the system reboots after three minutes
2023-11-26 13:07:44 +00:00
Daniel Barlow bf9f264f0c update TODO 2023-11-25 18:49:26 +00:00
Daniel Barlow e35b61b68c mac80211: support ath9k pci variant
if you ask for "ath9k" you get AHB, but if you ask for "atk9k_pci"
now you get PCI. Note that the kernel module name is the same in
both cases.
2023-11-25 18:39:15 +00:00
Daniel Barlow a8f98ccfe7 use linuxArch instead of case statement 2023-11-25 18:16:20 +00:00
Daniel Barlow 27ce61ae4e add bootable config for Turris Omnia 2023-11-24 23:29:12 +00:00
Daniel Barlow 3f0f621809 openwrt patches for mvebu (armv7l) 2023-11-24 22:43:58 +00:00
Daniel Barlow b0ae314df4 stuff 2023-11-24 22:33:42 +00:00
Daniel Barlow d789a23113 twiddle timeouts 2023-11-24 21:32:53 +00:00
Daniel Barlow 5ba14fd915 add levitate package
sets up a chroot system in tmpfs that will be executed on the next
reboot to enable system maintenance without the regular filesystems
mounted
2023-11-23 22:21:03 +00:00
Daniel Barlow 3df34428d6 remove unneeded login and getty applets 2023-11-23 20:01:13 +00:00
Daniel Barlow 62c788eb86 add hook to run maintenance mode instead of rebooting 2023-11-22 00:05:55 +00:00
Daniel Barlow bab6d346a8 add .../s6/bin to PATH for shutdownd 2023-11-22 00:05:03 +00:00
Daniel Barlow a202ae476a extract console redirection stuff from "quit" function
so we can use it for scripts that don't reboot at their end
2023-11-21 23:32:37 +00:00
Daniel Barlow 7c9297f91d use shotdown instead of hpr in .s6-svscan/SIGFOO
this is to bring them into line with what more recent
s6-init-linux-maker creates
2023-11-21 23:19:00 +00:00
Daniel Barlow a0bd250963 switch from getty to root shell on console
this just makes things marginally simpler
2023-11-21 23:09:48 +00:00
Daniel Barlow c8b2d58dd3 exit 0 on service down even if no outputs to delete 2023-11-21 17:25:50 +00:00
Daniel Barlow e5223f093f kernel.src may be a path not just a package
this makes it easier to hack the kernel locally and test things
2023-11-18 14:21:18 +00:00
Daniel Barlow c563a6451f add missing param 2023-11-18 14:20:59 +00:00
Daniel Barlow f45326b9d3 why we decided not to depend on kexec 2023-11-18 11:51:57 +00:00
Daniel Barlow f9f4d97bb8 convert flash params to int 2023-11-12 20:39:06 +00:00
Daniel Barlow abfb35a231 and entryPoint 2023-11-12 18:50:47 +00:00
Daniel Barlow 315907de98 convert hardware loadAddress to int 2023-11-12 18:47:31 +00:00
Daniel Barlow 185117843b convert tftp.loadAddress from string to int 2023-11-12 18:37:33 +00:00
Daniel Barlow 0131686661 use parseInt for hex values 2023-11-12 18:25:38 +00:00
Daniel Barlow 3da692f7ef don't import flashimage unconditionally, it breaks qemu 2023-11-12 18:11:13 +00:00
Daniel Barlow f61e737b54 improve doc for outputs and hardware
Changed my mind about "installer" as a first-class concept, at least
in the current implementation. Not every documented output is an
installer
2023-11-12 17:15:58 +00:00
Daniel Barlow 262efaabe6 doc: put all the u-boot/serial stuff in one place to link from 2023-11-12 17:14:33 +00:00
Daniel Barlow 7cfb92e3ce more doc 2023-11-10 21:17:20 +00:00
Daniel Barlow 22882dabee think 2023-11-10 21:10:26 +00:00
Daniel Barlow 5e046490de support links from device pages to their installation methods 2023-11-09 23:02:35 +00:00
Daniel Barlow a9760d239c basic doc for flashimage installer 2023-11-09 22:43:50 +00:00
Daniel Barlow 5729cfb4a7 document installation methods (only vmroot yet) 2023-11-09 22:14:31 +00:00
Daniel Barlow 7d5c7b9b44 export evaluation from default.nix and use it for docs 2023-11-09 22:14:31 +00:00
Daniel Barlow 23b3a2baef extract vmroot output into its own file 2023-11-08 23:19:11 +00:00
Daniel Barlow 4cb4f904f8 delete unused kconfig for arm qemus 2023-11-08 21:28:12 +00:00
Daniel Barlow a9d847e2c0 add ext4 as rootfsType 2023-11-06 21:52:31 +00:00
Daniel Barlow 6bbff2f5b3 think think 2023-11-05 23:39:50 +00:00
Daniel Barlow 5c1f5fabe2 switch pppoe test to use armv7l 2023-11-05 23:19:40 +00:00
Daniel Barlow 6489a39424 qemu armv7 2023-11-05 23:19:11 +00:00
Daniel Barlow c94d12934f remove direct use of run-liminix-vm from tests and doc 2023-11-05 20:37:23 +00:00
Daniel Barlow c40eef25d6 qemu: use phram instead of block2mtd 2023-11-05 19:13:51 +00:00
Daniel Barlow 46991e2761 aarch64 ram starts at 0x40000000 2023-11-05 15:33:10 +00:00
Daniel Barlow a135cb1217 introduce lim, the liminix library
so far we have lim.parseInt, which parses an integer from a string
with optional base-selecting-prefix (e.g. 0755, 0x12ab)
2023-11-05 15:13:06 +00:00
Daniel Barlow 863045b86b added hardware.ram.startAddress config
it's not 0 on arm32, so this will be useful for qemu
2023-11-05 15:11:58 +00:00
Daniel Barlow 629624bb25 replace multiway if with pkgs.stdenv.hostPlatform.qemuArch 2023-11-05 11:40:26 +00:00
Daniel Barlow 92b9bf959e options.system.outputs.initramfs -> initramfs module 2023-11-05 11:33:02 +00:00
Daniel Barlow c5c5f1687a patch qemu to load uncompressed ARM kernels at correct offset 2023-11-05 11:32:47 +00:00
Daniel Barlow 80793aa694 belkin rt3200 is a ubifs device 2023-11-05 11:32:23 +00:00
Daniel Barlow 824536f9b3 in uimage FIT, honour ${arch} 2023-11-05 11:31:28 +00:00
Daniel Barlow e6cb5e319b extract NETDEVICES kconfig to kernel.nix module 2023-11-05 11:31:23 +00:00
Daniel Barlow c3ccee6506 preinit: print errno (in hex, it's easier) for failures 2023-11-05 11:27:57 +00:00
Daniel Barlow 6db982f25f preinit: pause before exiting
as explained in the comment, this is to give us a
chance to see error messages before the kernel panics
2023-11-05 11:27:57 +00:00
Daniel Barlow 86a5224f3c preinit: fix compiler warnings 2023-11-05 11:27:43 +00:00
Daniel Barlow 155a29d9b3 preinit: strip trailing newline(s) on /proc/cmdline 2023-11-05 11:27:34 +00:00
Daniel Barlow e6ef4f78bb "ubimage" module contains ubifs image + instructions
Presently either you run this from U-Boot or you figure out for
yourself how to kexecboot into a recovery system :-)
2023-10-21 23:20:53 +01:00
Daniel Barlow d2f517a4e9 preinit.c: reindent 2023-10-19 21:02:18 +01:00
Daniel Barlow 0f38ee0e9c remove PREINIT_USE_LIBC option as it is now the only option 2023-10-19 18:59:02 +01:00
Daniel Barlow 61dc5beca8 preinit: parse rootfstype from kernel command line 2023-10-19 18:56:09 +01:00
Daniel Barlow f3225c2bd5 delete dup outputs.systemConfiguration
perhaps this should go into initramfs.nix not jffs2.nix
2023-10-19 10:09:08 +01:00
Daniel Barlow 8798ee9830 partial fix for timeout handling
1) "Unknown transfer id" message was because the local variable "tid"
is not a transfer id, it is a sequence number  - so the check was
actually comparing expected vs actual acknowledged sequence number,
not TID.  It's still a problem if we get the wrong one, but it
indicates a lost packet (so we should resend) not a packet that was
sent from somewhere else.

2) if the ACK packet has not been received, our retry should involve
_resending_ it, not just trying to wait for it again.

3) I have removed the timeout condition for terminating the resend
loop, because in practice (assuming both ends have the same timeout
setting) all it did was ensure that the loop only ran once. The
timeout is supposed to regulate how long we wait for before retrying
(it doesn't do this, we wait indefinitely), not how long we wait for
before giving up.
2023-10-18 23:35:23 +01:00
Daniel Barlow 629914f65e initial support for ubifs 2023-10-16 19:55:17 +01:00
Daniel Barlow 0693cf23d8 preinit: improve error logging for fork_exec 2023-10-12 19:00:57 +01:00
Daniel Barlow c341eb46b6 use hostPlatform.linuxArch in kernel derivation 2023-10-12 18:59:45 +01:00
Daniel Barlow 1a369ff3bf preinit: remove no-longer-used mips assembly 2023-10-12 18:57:54 +01:00
Daniel Barlow 364c5faf9e tftpboot: fix errors in phram partition size calc 2023-10-10 20:26:27 +01:00
Daniel Barlow 80a09a9a9b rt3200: move the entryPoint 2023-10-10 20:25:42 +01:00
Daniel Barlow 3518e2ecca Merge branch 'hark-how-all-the-belkin-rings' 2023-10-09 19:56:48 +01:00
Daniel Barlow fc2eb6ee4d rt3200 mumble 2023-10-09 19:56:22 +01:00
Daniel Barlow bd20f3e419 uimage: make fit optional 2023-10-09 19:47:57 +01:00
Daniel Barlow f62ad0e1d7 use "tftpboot" instead of "tftp" in u-boot commands
openwrt's u-boot installation doesn't accept the short form
2023-10-09 19:47:57 +01:00
Daniel Barlow ed792e0dc0 rt3200: swap wireless driver load order
mt7515e loads first, so that wlan0 is 2.4GHz
mt7515e loads after, so that 5GHz gets wlan1
2023-10-09 19:47:57 +01:00
Daniel Barlow d025c33d30 rt3200: enable flash/mtd 2023-10-09 19:47:57 +01:00
Daniel Barlow a755c9c3c5 delete some inapplicable kconfig 2023-10-09 19:47:57 +01:00
Daniel Barlow fdf74fa06b add mt7915, 7615 wifi modules
7915 won't work until we have working MTD, because it needs to
read calibration data from flash
2023-10-09 19:47:57 +01:00
Daniel Barlow b8dea2ed34 rt3200: add DSA
this creates a bunch of network interfaces {lan[1234],wan}@eth0
2023-10-09 19:47:57 +01:00
Daniel Barlow c18f07f02f aarch64: make tftpboot work
- patch dtb to add reserved-memory stanza for the phram device to use
  (aarch64 does not accept memmap= command line option)

- patch phram driver to use memremap() instead of ioremap() as
  ioremap can't be used for system ram on arm devices
2023-10-09 19:47:57 +01:00
Daniel Barlow 1c4412a1f4 rt3200: enable serial console 2023-10-09 19:47:57 +01:00
Daniel Barlow dbc16edf96 don't use ttyAMA0 console on all aarch64, just qemu 2023-10-09 19:47:57 +01:00
Daniel Barlow 528d619d76 WIP kernel config for belkin rt3200 2023-10-09 19:47:57 +01:00
Daniel Barlow 269e972970 use FIT images not appended DTB for aarch64 uimage 2023-10-07 22:52:09 +01:00
Daniel Barlow 2a5669c2cd enable openwrt mediatek family patches 2023-10-07 22:42:31 +01:00
Daniel Barlow 4df248323c use MTD_SPI_NOR_USE_4K_SECTORS only on MIPS 2023-10-07 22:41:15 +01:00
Daniel Barlow b01840fa7f add support for mt7915, mt7615 in mac80211 package
mt7915 additionally requires working MTD, so that it can
read calibration data from flash
2023-10-07 22:29:38 +01:00
Daniel Barlow a896c4e31c rename wlan services for devices with > 1 radio
let's standardise on having 2.4GHz radio be "wlan", and
5GHz as "wlan5"
2023-10-07 22:28:57 +01:00
Daniel Barlow caf8e85061 remove USE_OF from aarch64 2023-10-02 22:43:13 +01:00
Daniel Barlow 76f03ecf0f move OF and USE_OF to arch modules 2023-09-30 21:52:13 +01:00