forked from DGNum/liminix
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;
|
||||
installers = map (f: "system.outputs.${f}") [
|
||||
"vmroot"
|
||||
"flashimage"
|
||||
"mtdimage"
|
||||
"ubimage"
|
||||
];
|
||||
inherit (pkgs.lib) concatStringsSep;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
As with many GL.iNet devices, the stock vendor firmware
|
||||
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.
|
||||
|
||||
For flashing from an existing Liminix system (we believe that) it
|
||||
|
@ -97,7 +97,7 @@
|
|||
../../modules/network
|
||||
../../modules/arch/mipseb.nix
|
||||
../../modules/outputs/tftpboot.nix
|
||||
../../modules/outputs/flashimage.nix
|
||||
../../modules/outputs/mtdimage.nix
|
||||
../../modules/outputs/jffs2.nix
|
||||
];
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
|||
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
|
||||
};
|
||||
hardware = {
|
||||
defaultOutput = "flashimage";
|
||||
defaultOutput = "mtdimage";
|
||||
loadAddress = lim.parseInt "0x80060000";
|
||||
entryPoint = lim.parseInt "0x80060000";
|
||||
flash = {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
============
|
||||
|
||||
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.
|
||||
|
||||
For flashing from an existing Liminix system (we think) it
|
||||
|
@ -55,11 +55,11 @@
|
|||
imports = [
|
||||
../../modules/arch/mipsel.nix
|
||||
../../modules/outputs/tftpboot.nix
|
||||
../../modules/outputs/flashimage.nix
|
||||
../../modules/outputs/mtdimage.nix
|
||||
../../modules/outputs/jffs2.nix
|
||||
];
|
||||
hardware = {
|
||||
defaultOutput = "flashimage";
|
||||
defaultOutput = "mtdimage";
|
||||
loadAddress = lim.parseInt "0x80000000";
|
||||
entryPoint = lim.parseInt "0x80000000";
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
============
|
||||
|
||||
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.
|
||||
|
||||
For flashing from an existing Liminix system (we think) it
|
||||
|
@ -55,7 +55,7 @@
|
|||
imports = [
|
||||
../../modules/arch/mipsel.nix
|
||||
../../modules/outputs/tftpboot.nix
|
||||
../../modules/outputs/flashimage.nix
|
||||
../../modules/outputs/mtdimage.nix
|
||||
../../modules/outputs/jffs2.nix
|
||||
];
|
||||
filesystem = dir {
|
||||
|
@ -66,7 +66,7 @@
|
|||
};
|
||||
};
|
||||
hardware = {
|
||||
defaultOutput = "flashimage";
|
||||
defaultOutput = "mtdimage";
|
||||
loadAddress = lim.parseInt "0x80000000";
|
||||
entryPoint = lim.parseInt "0x80000000";
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
klibBuild = config.system.outputs.kernel.modulesupport;
|
||||
};
|
||||
in {
|
||||
defaultOutput = "flashimage";
|
||||
defaultOutput = "mtdimage";
|
||||
loadAddress = lim.parseInt "0x00008000";
|
||||
entryPoint = lim.parseInt "0x00008000";
|
||||
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
|
||||
``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
|
||||
|
||||
* :file:`result/firmware.bin` which is the file you are going to flash
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
./outputs.nix
|
||||
./outputs/vmroot.nix
|
||||
./outputs/ubimage.nix
|
||||
./outputs/flashimage.nix
|
||||
./outputs/mtdimage.nix
|
||||
./ppp
|
||||
./ramdisk.nix
|
||||
./squashfs.nix
|
||||
|
|
|
@ -32,7 +32,7 @@ in {
|
|||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
ram = {
|
||||
|
|
|
@ -9,7 +9,6 @@ let
|
|||
o = config.system.outputs;
|
||||
phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024);
|
||||
in {
|
||||
# imports = [ ./flashimage.nix ];
|
||||
options.system.outputs = {
|
||||
diskimage = mkOption {
|
||||
type = types.package;
|
||||
|
|
|
@ -11,7 +11,7 @@ in {
|
|||
options.system.outputs = {
|
||||
firmware = mkOption {
|
||||
type = types.package;
|
||||
internal = true; # component of flashimage
|
||||
internal = true; # component of mtdimage
|
||||
description = ''
|
||||
Binary image (combining kernel, FDT, rootfs, initramfs
|
||||
if needed, etc) for the target device.
|
||||
|
@ -19,16 +19,16 @@ in {
|
|||
};
|
||||
flash-scr = mkOption {
|
||||
type = types.package;
|
||||
internal = true; # component of flashimage
|
||||
internal = true; # component of mtdimage
|
||||
description = ''
|
||||
Copy-pastable U-Boot commands to TFTP download the
|
||||
image and write it to flash
|
||||
'';
|
||||
};
|
||||
flashimage = mkOption {
|
||||
mtdimage = mkOption {
|
||||
type = types.package;
|
||||
description = ''
|
||||
flashimage
|
||||
mtdimage
|
||||
**********
|
||||
|
||||
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.rootfs} of=$out bs=${bs} conv=sync,nocreat,notrunc oflag=append
|
||||
'';
|
||||
flashimage =
|
||||
mtdimage =
|
||||
let o = config.system.outputs; in
|
||||
# could use trivial-builders.linkFarmFromDrvs here?
|
||||
pkgs.runCommand "flashimage" {} ''
|
||||
pkgs.runCommand "mtdimage" {} ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
ln -s ${o.firmware} firmware.bin
|
Loading…
Reference in a new issue