forked from dan/liminix
Create tplink-safeloader image
This commit is contained in:
parent
a463111687
commit
2e57450a26
|
@ -36,7 +36,7 @@
|
|||
imports = [
|
||||
../../modules/arch/mipsel.nix
|
||||
../../modules/outputs/tftpboot.nix
|
||||
../../modules/outputs/ubifs.nix
|
||||
../../modules/outputs/tplink.nix
|
||||
];
|
||||
config = {
|
||||
kernel = {
|
||||
|
@ -400,7 +400,7 @@ ZSTD_DECOMPRESS="y";
|
|||
# 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";
|
||||
entryPoint = lim.parseInt "0x80001000";
|
||||
rootDevice = "ubi0:liminix";
|
||||
rootDevice = "/dev/mtdblock3";
|
||||
dts = {
|
||||
src = "${openwrt.src}/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts";
|
||||
includes = [
|
||||
|
|
|
@ -60,6 +60,9 @@ in
|
|||
Combined kernel and FDT in uImage (U-Boot compatible) format
|
||||
'';
|
||||
};
|
||||
tplink = mkOption {
|
||||
type = types.package;
|
||||
};
|
||||
u-boot = mkOption {
|
||||
type = types.package;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkOption types concatStringsSep;
|
||||
o = config.system.outputs;
|
||||
in {
|
||||
options.system.outputs = {
|
||||
tplink = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
tplink
|
||||
******
|
||||
|
||||
For creating tp-link 'safeloader' images
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = {
|
||||
system.outputs = rec {
|
||||
tplink =
|
||||
pkgs.runCommand "tplink" { nativeBuildInputs = with pkgs.pkgsBuildBuild; [ firmware-utils ]; } ''
|
||||
tplink-safeloader -B ARCHER-AX23-V1 -k "${o.uimage}" -r "${o.rootfs}" -o $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -58,7 +58,8 @@ in {
|
|||
anoia = callPackage ./anoia {};
|
||||
fennel = callPackage ./fennel {};
|
||||
fennelrepl = callPackage ./fennelrepl {};
|
||||
firewallgen = callPackage ./firewallgen {};
|
||||
firewallgen = callPackage ./firewallgen {};
|
||||
firmware-utils = callPackage ./firmware-utils {};
|
||||
gen_init_cpio = callPackage ./gen_init_cpio {};
|
||||
go-l2tp = callPackage ./go-l2tp {};
|
||||
hi = callPackage ./hi {};
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, zlib
|
||||
, openssl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "firmware-utils";
|
||||
version = "snapshot";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "openwrt";
|
||||
repo = "firmware-utils";
|
||||
rev = "e87f23849790a7c77b4cd0e8ef0384da188174e5";
|
||||
hash = "sha256-285Isf9sRuUt5S56SozgqpnS0+LOfnvpxpnWLwuWYUk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
zlib
|
||||
openssl
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue