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
Daniel Barlow
f57997c605
remove explicit MTD_BLKDEVS, is selected by MTD_BLOCK
2023-09-30 21:45:50 +01:00
Daniel Barlow
3c483ebd9a
set PARTITION_ADVANCED only in ramdisk module
2023-09-30 21:29:12 +01:00
Daniel Barlow
a30b658999
remove CMDLINE_PARTITION, we don't need it
...
(at least, I think we don't)
2023-09-30 21:20:29 +01:00
Daniel Barlow
1ec7fcc197
remove MTD_CMDLINE_PARTS from per-device config
...
it's enabled in modules/ramdisk, which is required by
flashimage and tftpboot
2023-09-29 21:00:25 +01:00
Daniel Barlow
f9f934b40c
spell GL.iNet consistently in docs
2023-09-28 23:22:54 +01:00
Daniel Barlow
e3c8ab351e
fix sphinx warning
2023-09-28 12:19:48 +01:00
Daniel Barlow
7e13eda490
add hardware device descriptions to doc
...
most of the text is recycled and follows no particular format
2023-09-28 12:17:30 +01:00
Daniel Barlow
3a2f074199
disable 4k flash erase blocks everywhere
2023-09-27 22:10:17 +01:00
Daniel Barlow
74f4e0a2f3
fiddle with manual layout
2023-09-27 13:44:26 +01:00
Daniel Barlow
9133475103
update tutorial discussion of liminix-rebuild
2023-09-27 11:05:06 +01:00
Daniel Barlow
abd01a7809
apply mtdpslit patch only for openwrt kernel
...
it doesn't apply to mainline because there's no mtdsplit
in mainline
2023-09-26 18:40:22 +01:00
Daniel Barlow
d0c2b3b274
explain the "demo" example
2023-09-26 18:24:40 +01:00
Daniel Barlow
dfe7228b99
fix jffs2 mtd partition splitting on little-endian CPU
2023-09-26 16:43:03 +01:00
Daniel Barlow
ab147abd9b
less padding in firmware.bin
...
we only need to align to erase block size, which may be
less than the 128k previously hard-coded
2023-09-26 16:43:03 +01:00
Daniel Barlow
bca0c9b26b
gl-mt300a use regular-sized flash erase blocks
2023-09-26 16:43:03 +01:00
Daniel Barlow
c59a228955
this is the dhcp6c service we want
2023-09-26 16:43:03 +01:00
Daniel Barlow
1673a71831
WIP third example
2023-09-24 23:11:28 +01:00
Daniel Barlow
94e51db649
tests: use run.sh instead of calling run-liminix-vm directly
...
this makes it easier to run tests on aarch64 where
qemu wants an Image file instead of a vmlinux
2023-09-24 00:24:48 +01:00
Daniel Barlow
3205a38ac9
mac80211 use correct arch
2023-09-24 00:17:32 +01:00
Daniel Barlow
119d6ad379
pkgconfig is now pkg-config
2023-09-21 12:25:35 +01:00
Daniel Barlow
8d356890b0
add aarch64 to CI
2023-09-21 00:00:21 +01:00
Daniel Barlow
be22fbbb0a
bootable aarch64 liminux with qemu
...
I may have broken the run-liminix-vm command a bit for MIPS due to
necessary changes in how we pass the command line. If CI isn't green
for this commit and youre trying the worked examples, I suggest
reverting to the commit before this one.
2023-09-20 22:55:51 +01:00
Daniel Barlow
9f87fd8625
import arch in qemu device config
2023-09-20 21:31:38 +01:00
Daniel Barlow
3a3ee8bbbd
fix CI doc error
2023-09-20 21:31:38 +01:00
Daniel Barlow
381730d081
fix CI flashimage error
2023-09-20 21:31:38 +01:00
Daniel Barlow
57eb55de58
found another mips-vm to rename
2023-09-20 19:13:04 +01:00
Daniel Barlow
4389fa15f7
rename mips-vm as run-liminix-vm
2023-09-20 18:33:20 +01:00
Daniel Barlow
4f29bdd3ed
detect arch in kernel and uimage
...
also move kernel builder to pkgs/
FIXME we need to straighten out the mess in calling
dtb.nix/uimage.nix
2023-09-20 18:26:33 +01:00
Daniel Barlow
f1c04c7979
extract mips kernel options to module
2023-09-20 17:50:21 +01:00
Daniel Barlow
f75995e895
introduce modules/arch/{mipsel,mipseb}.nix
...
for settings that are common to all mipse[lb] but would not be shared
with e.g. aarch64 or x86
2023-09-20 17:30:05 +01:00
Daniel Barlow
12b9feb8ee
using openwrt mtd command, advide erase before writing
2023-09-18 10:59:55 +01:00
Daniel Barlow
b3a7a2246d
tutorial: move the warning nearer to the decision point
2023-09-17 21:53:15 +01:00
Daniel Barlow
6674344021
don't end chapter with ellipsis
2023-09-17 21:47:09 +01:00
Daniel Barlow
c81ee62374
doc: proofread admin section, add link to TFTP
2023-09-17 21:44:32 +01:00
Daniel Barlow
dd0b1734c1
how to write a module
2023-09-17 21:32:22 +01:00
Daniel Barlow
0a2588013a
include generated module options
2023-09-17 17:47:04 +01:00
Daniel Barlow
71b583a756
copy "how to flash" from the old docs
2023-09-17 17:36:02 +01:00
Daniel Barlow
98e7536e59
think
2023-09-17 17:03:56 +01:00
Daniel Barlow
e72d78ab64
restore intro
2023-09-17 17:03:56 +01:00
Daniel Barlow
17035ca3b7
outline of the missing doc sections
2023-09-17 17:03:56 +01:00
Daniel Barlow
dece70b336
link to ADR
2023-09-17 17:03:56 +01:00
Daniel Barlow
50ea144dec
mention service dependencies
2023-09-17 17:03:56 +01:00
Daniel Barlow
fc84435985
improve syntax blah
2023-09-17 17:03:56 +01:00
Daniel Barlow
06b725cb77
document the module-based-services decision
2023-09-17 17:03:56 +01:00
Daniel Barlow
c74543c4ff
doc: how to define an s6 service
2023-09-17 17:03:56 +01:00
Daniel Barlow
54526c1e11
start writing configuration guide
2023-09-17 17:03:56 +01:00
Daniel Barlow
f81aa54444
rename file
2023-09-17 17:03:56 +01:00
Daniel Barlow
56261f77b0
add example with real hardware
2023-09-17 17:03:56 +01:00
Daniel Barlow
8600dfc8cf
proofread v2
2023-09-17 17:03:56 +01:00
Daniel Barlow
bb280c6d97
rename qemu example
2023-09-17 17:03:56 +01:00
Daniel Barlow
b7e805c97f
connecting a client to hellonet
2023-09-17 17:03:56 +01:00
Daniel Barlow
9223fa7ec4
first proofreading pass
2023-09-17 17:03:56 +01:00
Daniel Barlow
0f31afee2b
hellonet: set password for root
...
otherwise incoming ssh gets a bit fraught
2023-09-17 17:03:56 +01:00
Daniel Barlow
98c63e7498
hellonet: don't run ntp
...
it's a bit pointless when there's no connectivity to
any ntp server
2023-09-17 17:03:56 +01:00
Daniel Barlow
c6faf88dd1
doc WIP: build "hello net" example
2023-09-17 17:03:56 +01:00