1
0

Compare commits

..

No commits in common. "43f1fb230b9348781366c88c1945a8e2ab472f7d" and "f50b0627a23493877f17f0e55dd6e6f9d2795526" have entirely different histories.

3 changed files with 3 additions and 18 deletions

View File

@ -15,8 +15,6 @@
let
inherit (pkgs.liminix.networking) interface;
inherit (pkgs.liminix.services) oneshot;
inherit (pkgs.pseudofile) dir symlink;
openwrt = pkgs.fetchFromGitHub {
name = "openwrt-source";
repo = "openwrt";
@ -28,18 +26,7 @@
drivers = ["mt7603e"];
klibBuild = config.outputs.kernel.modulesupport;
};
wlan_firmware = builtins.fetchurl {
url = "https://github.com/openwrt/mt76/raw/f24b56f935392ca1d35fae5fd6e56ef9deda4aad/firmware/mt7628_e2.bin";
sha256 = "sha256:1dkhfznmdz6s50kwc841x3wj0h6zg6icg5g2bim9pvg66as2vmh9";
};
in {
filesystem = dir {
lib = dir {
firmware = dir {
"mt7628_e2.bin" = symlink wlan_firmware;
};
};
};
hardware = {
defaultOutput = "tftproot";
loadAddress = "0x80000000";
@ -90,9 +77,7 @@
};
};
boot.tftp = {
# 20MB seems to give enough room to uncompress the kernel
# without anything getting trodden on. 10MB was too small
loadAddress = "0x1400000";
loadAddress = "0x00A00000";
};
kernel = {

View File

@ -94,7 +94,7 @@ in {
};
};
boot.commandLine = [
"console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 rootfstype=squashfs"
"earlyprintk=serial,ttyS0 console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8 rootfstype=squashfs"
"fw_devlink=off"
];
users.root = {

View File

@ -62,7 +62,7 @@ in {
in
pkgs.buildPackages.runCommand "" {} ''
uimageSize=$(($(stat -L -c %s ${config.outputs.uimage}) + 0x1000 &(~0xfff)))
squashfsStart=0x$(printf %x $((${cfg.loadAddress} + 0x100000 + $uimageSize)))
squashfsStart=0x$(printf %x $((${cfg.loadAddress} + $uimageSize)))
squashfsBytes=$(($(stat -L -c %s ${config.outputs.squashfs}) + 0x100000 &(~0xfffff)))
squashfsMb=$(($squashfsBytes >> 20))
cmd="mtdparts=phram0:''${squashfsMb}M(nix) phram.phram=phram0,''${squashfsStart},''${squashfsMb}Mi memmap=''${squashfsMb}M\$''${squashfsStart} root=1f00";