rename flashimage to mtdimage
This commit is contained in:
parent
39c338d710
commit
876bd7d8ce
10 changed files with 20 additions and 21 deletions
2
ci.nix
2
ci.nix
|
@ -40,7 +40,7 @@ let
|
||||||
}).outputs.optionsJson;
|
}).outputs.optionsJson;
|
||||||
installers = map (f: "system.outputs.${f}") [
|
installers = map (f: "system.outputs.${f}") [
|
||||||
"vmroot"
|
"vmroot"
|
||||||
"flashimage"
|
"mtdimage"
|
||||||
"ubimage"
|
"ubimage"
|
||||||
];
|
];
|
||||||
inherit (pkgs.lib) concatStringsSep;
|
inherit (pkgs.lib) concatStringsSep;
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
As with many GL.iNet devices, the stock vendor firmware
|
As with many GL.iNet devices, the stock vendor firmware
|
||||||
is a fork of OpenWrt, meaning that the binary created by
|
is a fork of OpenWrt, meaning that the binary created by
|
||||||
:ref:`system-outputs-flashimage` can be flashed using the
|
:ref:`system-outputs-mtdimage` can be flashed using the
|
||||||
vendor web UI or the U-Boot emergency "unbrick" routine.
|
vendor web UI or the U-Boot emergency "unbrick" routine.
|
||||||
|
|
||||||
For flashing from an existing Liminix system (we believe that) it
|
For flashing from an existing Liminix system (we believe that) it
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
../../modules/network
|
../../modules/network
|
||||||
../../modules/arch/mipseb.nix
|
../../modules/arch/mipseb.nix
|
||||||
../../modules/outputs/tftpboot.nix
|
../../modules/outputs/tftpboot.nix
|
||||||
../../modules/outputs/flashimage.nix
|
../../modules/outputs/mtdimage.nix
|
||||||
../../modules/outputs/jffs2.nix
|
../../modules/outputs/jffs2.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
|
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
|
||||||
};
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
defaultOutput = "flashimage";
|
defaultOutput = "mtdimage";
|
||||||
loadAddress = lim.parseInt "0x80060000";
|
loadAddress = lim.parseInt "0x80060000";
|
||||||
entryPoint = lim.parseInt "0x80060000";
|
entryPoint = lim.parseInt "0x80060000";
|
||||||
flash = {
|
flash = {
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
============
|
============
|
||||||
|
|
||||||
The stock vendor firmware is a fork of OpenWrt, meaning that the
|
The stock vendor firmware is a fork of OpenWrt, meaning that the
|
||||||
binary created by :ref:`system-outputs-flashimage` can be flashed
|
binary created by :ref:`system-outputs-mtdimage` can be flashed
|
||||||
using the vendor web UI or the U-Boot emergency "unbrick" routine.
|
using the vendor web UI or the U-Boot emergency "unbrick" routine.
|
||||||
|
|
||||||
For flashing from an existing Liminix system (we think) it
|
For flashing from an existing Liminix system (we think) it
|
||||||
|
@ -55,11 +55,11 @@
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/arch/mipsel.nix
|
../../modules/arch/mipsel.nix
|
||||||
../../modules/outputs/tftpboot.nix
|
../../modules/outputs/tftpboot.nix
|
||||||
../../modules/outputs/flashimage.nix
|
../../modules/outputs/mtdimage.nix
|
||||||
../../modules/outputs/jffs2.nix
|
../../modules/outputs/jffs2.nix
|
||||||
];
|
];
|
||||||
hardware = {
|
hardware = {
|
||||||
defaultOutput = "flashimage";
|
defaultOutput = "mtdimage";
|
||||||
loadAddress = lim.parseInt "0x80000000";
|
loadAddress = lim.parseInt "0x80000000";
|
||||||
entryPoint = lim.parseInt "0x80000000";
|
entryPoint = lim.parseInt "0x80000000";
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
============
|
============
|
||||||
|
|
||||||
The stock vendor firmware is a fork of OpenWrt, meaning that the
|
The stock vendor firmware is a fork of OpenWrt, meaning that the
|
||||||
binary created by :ref:`system-outputs-flashimage` can be flashed
|
binary created by :ref:`system-outputs-mtdimage` can be flashed
|
||||||
using the vendor web UI or the U-Boot emergency "unbrick" routine.
|
using the vendor web UI or the U-Boot emergency "unbrick" routine.
|
||||||
|
|
||||||
For flashing from an existing Liminix system (we think) it
|
For flashing from an existing Liminix system (we think) it
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/arch/mipsel.nix
|
../../modules/arch/mipsel.nix
|
||||||
../../modules/outputs/tftpboot.nix
|
../../modules/outputs/tftpboot.nix
|
||||||
../../modules/outputs/flashimage.nix
|
../../modules/outputs/mtdimage.nix
|
||||||
../../modules/outputs/jffs2.nix
|
../../modules/outputs/jffs2.nix
|
||||||
];
|
];
|
||||||
filesystem = dir {
|
filesystem = dir {
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
hardware = {
|
hardware = {
|
||||||
defaultOutput = "flashimage";
|
defaultOutput = "mtdimage";
|
||||||
loadAddress = lim.parseInt "0x80000000";
|
loadAddress = lim.parseInt "0x80000000";
|
||||||
entryPoint = lim.parseInt "0x80000000";
|
entryPoint = lim.parseInt "0x80000000";
|
||||||
|
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
klibBuild = config.system.outputs.kernel.modulesupport;
|
klibBuild = config.system.outputs.kernel.modulesupport;
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
defaultOutput = "flashimage";
|
defaultOutput = "mtdimage";
|
||||||
loadAddress = lim.parseInt "0x00008000";
|
loadAddress = lim.parseInt "0x00008000";
|
||||||
entryPoint = lim.parseInt "0x00008000";
|
entryPoint = lim.parseInt "0x00008000";
|
||||||
rootDevice = "/dev/mtdblock0";
|
rootDevice = "/dev/mtdblock0";
|
||||||
|
|
|
@ -180,7 +180,7 @@ Now add the device and server IP addresses to your configuration:
|
||||||
};
|
};
|
||||||
|
|
||||||
and then build the derivation for ``outputs.default`` or
|
and then build the derivation for ``outputs.default`` or
|
||||||
``outputs.flashimage`` (for which it will be an alias on any device
|
``outputs.mtdimage`` (for which it will be an alias on any device
|
||||||
where this is applicable). You should find it has created
|
where this is applicable). You should find it has created
|
||||||
|
|
||||||
* :file:`result/firmware.bin` which is the file you are going to flash
|
* :file:`result/firmware.bin` which is the file you are going to flash
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
./outputs.nix
|
./outputs.nix
|
||||||
./outputs/vmroot.nix
|
./outputs/vmroot.nix
|
||||||
./outputs/ubimage.nix
|
./outputs/ubimage.nix
|
||||||
./outputs/flashimage.nix
|
./outputs/mtdimage.nix
|
||||||
./ppp
|
./ppp
|
||||||
./ramdisk.nix
|
./ramdisk.nix
|
||||||
./squashfs.nix
|
./squashfs.nix
|
||||||
|
|
|
@ -32,7 +32,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
defaultOutput = mkOption {
|
defaultOutput = mkOption {
|
||||||
description = "\"Default\" output: what gets built for this device when outputs.default is requested. Typically this is \"flashimage\" or \"vmroot\"";
|
description = "\"Default\" output: what gets built for this device when outputs.default is requested. Typically this is \"mtdimage\" or \"vmroot\"";
|
||||||
type = types.nonEmptyStr;
|
type = types.nonEmptyStr;
|
||||||
};
|
};
|
||||||
ram = {
|
ram = {
|
||||||
|
|
|
@ -9,7 +9,6 @@ let
|
||||||
o = config.system.outputs;
|
o = config.system.outputs;
|
||||||
phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024);
|
phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024);
|
||||||
in {
|
in {
|
||||||
# imports = [ ./flashimage.nix ];
|
|
||||||
options.system.outputs = {
|
options.system.outputs = {
|
||||||
diskimage = mkOption {
|
diskimage = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -11,7 +11,7 @@ in {
|
||||||
options.system.outputs = {
|
options.system.outputs = {
|
||||||
firmware = mkOption {
|
firmware = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
internal = true; # component of flashimage
|
internal = true; # component of mtdimage
|
||||||
description = ''
|
description = ''
|
||||||
Binary image (combining kernel, FDT, rootfs, initramfs
|
Binary image (combining kernel, FDT, rootfs, initramfs
|
||||||
if needed, etc) for the target device.
|
if needed, etc) for the target device.
|
||||||
|
@ -19,16 +19,16 @@ in {
|
||||||
};
|
};
|
||||||
flash-scr = mkOption {
|
flash-scr = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
internal = true; # component of flashimage
|
internal = true; # component of mtdimage
|
||||||
description = ''
|
description = ''
|
||||||
Copy-pastable U-Boot commands to TFTP download the
|
Copy-pastable U-Boot commands to TFTP download the
|
||||||
image and write it to flash
|
image and write it to flash
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
flashimage = mkOption {
|
mtdimage = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
description = ''
|
description = ''
|
||||||
flashimage
|
mtdimage
|
||||||
**********
|
**********
|
||||||
|
|
||||||
This creates an image called :file:`firmware.bin` suitable for
|
This creates an image called :file:`firmware.bin` suitable for
|
||||||
|
@ -80,10 +80,10 @@ in {
|
||||||
dd if=${o.uimage} of=$out bs=${bs} conv=sync
|
dd if=${o.uimage} of=$out bs=${bs} conv=sync
|
||||||
dd if=${o.rootfs} of=$out bs=${bs} conv=sync,nocreat,notrunc oflag=append
|
dd if=${o.rootfs} of=$out bs=${bs} conv=sync,nocreat,notrunc oflag=append
|
||||||
'';
|
'';
|
||||||
flashimage =
|
mtdimage =
|
||||||
let o = config.system.outputs; in
|
let o = config.system.outputs; in
|
||||||
# could use trivial-builders.linkFarmFromDrvs here?
|
# could use trivial-builders.linkFarmFromDrvs here?
|
||||||
pkgs.runCommand "flashimage" {} ''
|
pkgs.runCommand "mtdimage" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cd $out
|
cd $out
|
||||||
ln -s ${o.firmware} firmware.bin
|
ln -s ${o.firmware} firmware.bin
|
Loading…
Reference in a new issue