Compare commits
2 Commits
60696dd8a2
...
63e3f2aa58
Author | SHA1 | Date |
---|---|---|
Arnout Engelen | 63e3f2aa58 | |
Arnout Engelen | 61494fdc0c |
1
ci.nix
1
ci.nix
|
@ -11,6 +11,7 @@ let
|
|||
devices = [
|
||||
"gl-ar750" "gl-mt300n-v2" "gl-mt300a"
|
||||
"qemu" "qemu-aarch64" "qemu-armv7l"
|
||||
"tp-archer-ax23"
|
||||
];
|
||||
vanilla = ./vanilla-configuration.nix;
|
||||
for-device = name:
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
imports = [
|
||||
../../modules/arch/mipsel.nix
|
||||
../../modules/outputs/tftpboot.nix
|
||||
../../modules/outputs/tplink.nix
|
||||
../../modules/outputs/tplink-safeloader.nix
|
||||
];
|
||||
config = {
|
||||
kernel = {
|
||||
|
@ -326,15 +326,10 @@
|
|||
MT7621_WDT = "y"; # or it might be this one
|
||||
};
|
||||
};
|
||||
tplink.board = "ARCHER-AX23-V1";
|
||||
tplink-safeloader.board = "ARCHER-AX23-V1";
|
||||
boot = {
|
||||
commandLine = [ "console=ttyS0,115200" ];
|
||||
tftp = {
|
||||
# IP addresses to use in the boot monitor when flashing/ booting
|
||||
# over TFTP. If you are flashing using the stock firmware's Web UI
|
||||
# then these dummy values are fine
|
||||
ipaddr = "192.168.0.1"; # router address
|
||||
serverip = "192.168.0.5"; # build machine or other tftp server
|
||||
# Should be a segment of free RAM, where the tftp artifact
|
||||
# can be stored before unpacking it to the 'hardware.loadAddress'
|
||||
# The 'hardware.loadAddress' is 0x80001000, which suggests the
|
||||
|
@ -397,12 +392,12 @@
|
|||
address = lim.parseInt "0xbc040000";
|
||||
# 0x000000040000-0x000000fa0000
|
||||
size = lim.parseInt "0xf60000";
|
||||
# guessed:
|
||||
# TODO: find in /proc/mtd on a running system
|
||||
eraseBlockSize = 65536;
|
||||
};
|
||||
|
||||
# since this is mentioned in the partition table as well?
|
||||
defaultOutput = "tplink";
|
||||
defaultOutput = "tplink-safeloader";
|
||||
# taken from openwrt sysupgrade image:
|
||||
# openwrt-23.05.2-ramips-mt7621-tplink_archer-ax23-v1-squashfs-sysupgrade.bin: u-boot legacy uImage, MIPS OpenWrt Linux-5.15.137, Linux/MIPS, OS Kernel Image (lzma), 2797386 bytes, Tue Nov 14 13:38:11 2023, Load Address: 0X80001000, Entry Point: 0X80001000, Header CRC: 0X19F74C5B, Data CRC: 0XF685563C
|
||||
loadAddress = lim.parseInt "0x80001000";
|
||||
|
|
|
@ -60,7 +60,7 @@ in
|
|||
Combined kernel and FDT in uImage (U-Boot compatible) format
|
||||
'';
|
||||
};
|
||||
tplink = mkOption {
|
||||
tplink-safeloader = mkOption {
|
||||
type = types.package;
|
||||
};
|
||||
u-boot = mkOption {
|
||||
|
|
|
@ -7,19 +7,19 @@
|
|||
let
|
||||
inherit (lib) mkOption types concatStringsSep;
|
||||
o = config.system.outputs;
|
||||
cfg = config.tplink;
|
||||
cfg = config.tplink-safeloader;
|
||||
in {
|
||||
options.tplink = {
|
||||
options.tplink-safeloader = {
|
||||
board = mkOption {
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
options.system.outputs = {
|
||||
tplink = mkOption {
|
||||
tplink-safeloader = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
tplink
|
||||
******
|
||||
tplink-safeloader
|
||||
*****************
|
||||
|
||||
For creating 'safeloader' images for tp-link devices.
|
||||
|
||||
|
@ -52,7 +52,7 @@ in {
|
|||
};
|
||||
config = {
|
||||
system.outputs = rec {
|
||||
tplink =
|
||||
tplink-safeloader =
|
||||
pkgs.runCommand "tplink" { nativeBuildInputs = with pkgs.pkgsBuildBuild; [ firmware-utils ]; } ''
|
||||
tplink-safeloader -B "${cfg.board}" -k "${o.uimage}" -r "${o.rootfs}" -o $out
|
||||
'';
|
Loading…
Reference in New Issue