WIP push to see what passes

This commit is contained in:
Daniel Barlow
2023-03-01 22:24:58 +00:00
parent 259f5c767b
commit adc198b3af
7 changed files with 100 additions and 57 deletions

View File

@@ -38,7 +38,7 @@
supported by the ath10k driver.
'';
module = {pkgs, ... }:
module = {pkgs, config, ... }:
let
openwrt = pkgs.pkgsBuildBuild.fetchFromGitHub {
name = "openwrt-source";
@@ -64,6 +64,10 @@
cp $blobdir/board.bin $out/ath10k/QCA9887/hw1.0/
'';
};
mac80211 = pkgs.mac80211.override {
drivers = ["ath9k" "ath10k_pci"];
klibBuild = config.outputs.kernel.modulesupport;
};
ath10k_cal_data =
let
offset = 1024 * 20; # 0x5000
@@ -81,12 +85,25 @@
down = "true";
};
inherit (pkgs.pseudofile) dir symlink;
inherit (pkgs.liminix.networking) interface;
in {
device = {
defaultOutput = "tftproot";
loadAddress = "0x80060000";
entryPoint = "0x80060000";
radios = ["ath9k" "ath10k_pci"];
networkInterfaces = {
lan = interface { device = "eth0"; };
wan = interface { device = "eth1"; };
wlan_24 = interface {
device = "wlan0";
dependencies = [ mac80211 ];
};
wlan_5 = interface {
device = "wlan1";
dependencies = [ mac80211 ath10k_cal_data ];
};
};
};
filesystem = dir {
lib = dir {

View File

@@ -1,7 +1,6 @@
# This "device" generates images that can be used with the QEMU
# emulator. The default output is a directory containing separate
# kernel (uncompressed vmlinux) and initrd (squashfs) images
{
system = {
crossSystem = {
@@ -13,7 +12,7 @@
};
};
module = {pkgs, ... }: {
module = {pkgs, config, ... }: {
kernel = {
src = pkgs.pkgsBuildBuild.fetchurl {
name = "linux.tar.gz";
@@ -41,9 +40,25 @@
SERIAL_8250_CONSOLE= "y";
};
};
device = {
defaultOutput = "vmroot";
radios = ["mac80211_hwsim"];
};
device =
let
mac80211 = pkgs.mac80211.override {
drivers = ["mac80211_hwsim"];
klibBuild = config.outputs.kernel.modulesupport;
};
inherit (pkgs.liminix.networking) interface;
in {
defaultOutput = "vmroot";
networkInterfaces = {
lan = interface { device = "eth0"; };
wan = interface { device = "eth1"; };
wlan_24 = interface {
device = "wlan0";
dependencies = [ mac80211 ];
};
};
};
};
}