Daniel Barlow
c40eef25d6
qemu: use phram instead of block2mtd
2023-11-05 19:13:51 +00:00
Daniel Barlow
80793aa694
belkin rt3200 is a ubifs device
2023-11-05 11:32:23 +00:00
Daniel Barlow
e6cb5e319b
extract NETDEVICES kconfig to kernel.nix module
2023-11-05 11:31:23 +00:00
Daniel Barlow
629914f65e
initial support for ubifs
2023-10-16 19:55:17 +01:00
Daniel Barlow
80a09a9a9b
rt3200: move the entryPoint
2023-10-10 20:25:42 +01:00
Daniel Barlow
bd20f3e419
uimage: make fit optional
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
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
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
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
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
bca0c9b26b
gl-mt300a use regular-sized flash erase blocks
2023-09-26 16:43:03 +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
4389fa15f7
rename mips-vm as run-liminix-vm
2023-09-20 18:33:20 +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
35c7f1643f
change defaultOutput for hardware devices to flashimage
...
if you're using tftpboot you probably know what you're doing
2023-09-17 17:00:45 +01:00
Daniel Barlow
70fb9f86d3
mt300a vlan interface services depend on primary
2023-09-17 17:00:38 +01:00
Daniel Barlow
f7b30939b5
remove service-state when service exits
2023-09-13 22:49:00 +01:00
Daniel Barlow
83092b7b73
add watchdog service
2023-09-02 17:28:40 +01:00
Daniel Barlow
d3dc9752f8
swap qemu network interfaces around
...
lan and wan were backwards, it looks like
2023-09-01 17:54:15 +01:00
Daniel Barlow
92970e8ed0
qemu: use service-based-module for network interfaces
2023-08-31 23:50:42 +01:00
Daniel Barlow
e04ec2e959
move SWCONFIG defn into per-device files
...
it doesn't work on qemu
2023-08-31 23:50:07 +01:00
Daniel Barlow
b094220466
mt300a: use module-based network services for lan/wan
2023-08-31 18:27:07 +01:00
Daniel Barlow
333327be75
make a module for vlan
...
Acked-by: Daniel Barlow <<dan@telent.net>>
2023-08-30 23:26:44 +01:00
Daniel Barlow
efa1919e04
move squashfs kernel options into module
2023-08-30 22:59:28 +01:00
Daniel Barlow
de77635490
move bridge-related kernel config to the module
2023-08-30 17:29:42 +01:00
Daniel Barlow
31f0213b6f
convert network link/address to module-based-service
...
... and make bridge use it.
We also had to convert bridge back into a pair of services.
Downstreams want to depend on the bridge it self being configured
even if not necessarily all the members are up. e.g. don't want
to break ssh on lan if there's a misconfigured wlan device
2023-08-28 22:02:28 +01:00
Daniel Barlow
2e50368bd2
rename config.outputs to config.system.outputs
...
New rules: everything under "config" that isn't actually configuration
(e.g. build products) will in future live in config.system. This is
the first step.
2023-07-13 19:24:59 +01:00
Daniel Barlow
3dd247a719
update arch for gl-ar750
...
not sure this is needed, tbh
2023-06-20 20:11:25 +01:00
Daniel Barlow
19212b1eeb
add funky dd features reqd by ath10k_cal_data
2023-05-30 18:20:42 +01:00
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
2f3b108ef1
tftpboot: set phram erase block size to match hardware
...
this is needed for tftp boot with a jffs2 filesystem
2023-04-23 21:24:37 +01:00
Daniel Barlow
29c7af5892
set qemu flash erase block size
2023-04-10 22:57:51 +01:00
Daniel Barlow
0a2881914b
set erase block size to something that works for jffs2
2023-04-10 22:57:50 +01:00
Daniel Barlow
633a4f8003
move BLK_DEV_INITRD to base.nix
2023-04-10 22:57:50 +01:00
Daniel Barlow
342c87b256
qemu: boot from mtd using mtd2block
...
doesn't make much difference for squashfs but this will make it much
simpler to test jffs2/ubifs
2023-04-04 21:07:02 +01:00
Daniel Barlow
4ea60a6082
watchdog support for mt300n-v2
2023-03-24 17:11:36 +00:00
Daniel Barlow
beb6e260d4
PoC support for hardware watchdog
2023-03-23 13:18:05 +00:00
Daniel Barlow
efd878dc5e
extract common code for patching kernel source fdorm openwrt
2023-03-18 19:17:58 +00:00
Daniel Barlow
ce05f4e44c
extract phram.mtd ramdisk support from tftpboot module
...
also rename tftproot output to tftpboot for consistency
2023-03-18 14:30:10 +00:00
Daniel Barlow
3f11a3c708
gl-ar750 gpio support is required for USB to work
...
_legacy_ gpio sysfs interface is required by the openwrt
ath79 phy usb driver
2023-03-18 14:30:10 +00:00
Daniel Barlow
ad3f241af9
support mt300n-v2 flash
2023-03-10 23:24:05 +00:00
Daniel Barlow
2594239bbc
can't use builtins.fetchurl on hydra?
2023-03-10 18:51:07 +00:00
Daniel Barlow
be06363e4f
new example for rsync/usb backup server
2023-03-10 18:42:32 +00:00
Daniel Barlow
d83bcc643e
add wifi firmware, move things around in ram
...
* at the base address we were using, the filesystem was getting
corrupted presumably because the kernel unpacked into it
* leave a little more space between compressed kernel and
squashfs. this is probably ineffective but also harmless
2023-03-10 00:48:47 +00:00
Daniel Barlow
f50b0627a2
gl-mt300n-v2: initialize switch & define networkInterfaces
...
It booted and mounted rootfs the first time I tried, which
was nice. Wireless doesn't work yet, it needs firmware
2023-03-09 19:30:57 +00:00
Daniel Barlow
f36d8ef1d0
make mt300a flash-ready
2023-03-08 20:35:41 +00:00
Daniel Barlow
85b5edc39d
vlan interfaces depend on parent
2023-03-08 20:34:39 +00:00
Daniel Barlow
d290965711
shuffle kernel config for gl-mt300a
2023-03-07 22:49:33 +00:00
Daniel Barlow
e8d5e4c788
move regulatory.db to wlan module
2023-03-07 21:32:21 +00:00
Daniel Barlow
c046c39613
wlan support for mt300a
2023-03-07 19:11:12 +00:00
Daniel Barlow
e86e9430fc
vlans and mt300a wired network interfaces
2023-03-07 19:10:12 +00:00
Daniel Barlow
38756af1c1
add in_outputs shell function which ensures umask is set
2023-03-03 23:07:03 +00:00
Daniel Barlow
e0ea576674
rename "device" config tree as "hardware"
...
we are also using "device" for "network device" (as in eth0,
wlan0 etc) so this makes it a bit less confusing perhaps
2023-03-03 22:52:33 +00:00
Daniel Barlow
263882cbe4
move dts config option from boot to device
2023-03-03 22:43:44 +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
259f5c767b
ath10k kernel support and and firmware
...
- some firmware from kvalo repository
- a service to extract calibration data ART partition
- missing kernel symbol to enable PCI support
2023-03-01 21:08:47 +00:00
Daniel Barlow
41ff5a1fe6
move FW_LOADER* config to modules/base
2023-03-01 18:16:01 +00:00
Daniel Barlow
f2e5f65149
add wireless support for hardware devices
...
* gl-ar750 the ath9k works, ath10k is untested
* gl-mt300[an] build but may not boot
2023-02-22 19:17:47 +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
a2d8eaf95d
make kernel config visually consistent: symbols are unquoted
2023-02-22 18:28:48 +00:00
Daniel Barlow
4faf529dc3
define kernel MODULE_SIG everywhere
2023-02-22 18:20:56 +00:00
Daniel Barlow
10aeb5e464
add notes about dual-band hardware
2023-02-19 18:14:27 +00:00
Daniel Barlow
81ccd11347
gl-ar750: support _actual_ mtd/spi not just fake one
...
the ath9k driver needs MTD because that's where it looks for
firmware/calibration data (ART partition)
2023-02-19 18:13:38 +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
5b51aa0826
tftp load address is per-device, IP addresses are local config
2023-02-15 22:06:28 +00:00
Daniel Barlow
dd8c8edd9c
rewrite phram boot to use correct sizes and offsets
2023-02-15 22:06:28 +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
afd9bbbc80
building but untested kernels for gl-mt300a, gl-mt300n-v2
2023-02-06 23:19:53 +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
0a46ba7fc3
move some wifi-related comments into wlan module
2022-10-19 17:36:31 +01:00
Daniel Barlow
f1b7780537
speed up kernel build
...
by having two separate derivations for patching the kernel source tree
and building it, we have to copy said source trees from one store
location to another which takes non-neglible time on spinning rust
(literally minutes on my machine). Replace with a single derivation
that can do more things on one tree in-place
2022-10-19 17:34:22 +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
3ff9e49085
enable eth1
2022-10-18 15:48:29 +01:00
Daniel Barlow
c2bcf2dd3e
fixup 4b513cd
2022-10-18 15:47:27 +01:00
Daniel Barlow
45d52a6c99
tidy kconfig a bit
2022-10-16 15:31:10 +01:00
Daniel Barlow
4b513cdb98
use openwrt kernel for gl-ar750
2022-10-16 15:15:18 +01:00
Daniel Barlow
77922c875b
add per-device overlay
...
presently this is used to reference the appropriate kernel and (if
needed) openwrt source trees, but I would not be surprised if we find
other uses
2022-10-15 18:55:33 +01:00
Daniel Barlow
e823e7a29c
HALFARSED enable toggling promptless kconfig symbols
...
Some kernel config symbols we need to enable in some configurations
don't have a "prompt" entry in the Kconfig files, meaning that
make oldconfig (or any other make fooconfig) won't change them.
So we add a Kconfig.local where they can be selected
In this patch we hardcode the required symbol. Next step would be
to generalise so that they could be specified in something like a
config.kernel.hiddenConfig attrset
2022-10-09 09:50:17 +01:00
Daniel Barlow
1c39da8544
tidy kconfig
2022-10-07 23:26:00 +01:00
Daniel Barlow
8e8c34b3fa
gl-ar750: frob kernel config for ttyS0 (SERIAL_OF_PLATFORM)
2022-10-07 23:24:36 +01:00
Daniel Barlow
423cf4cbee
WIP gl-ar750 mounts root fs and starts pid 1
...
but still can't open /dev/console so it panics quite quickly
2022-10-07 00:26:32 +01:00
Daniel Barlow
e78028e58f
make outputs.directory useful for tftp-booting devices
...
basically, add some more symlinks to it
2022-10-07 00:23:04 +01:00