forked from dan/liminix
Allow flashing
This commit is contained in:
parent
15451af8a0
commit
90b241d24e
@ -21,9 +21,18 @@
|
|||||||
Limitations
|
Limitations
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
- adding `he_bss_color="128"` causes `Invalid argument` for hostap
|
||||||
- nvme support untested
|
- nvme support untested
|
||||||
- I don't think the front LEDs work yet
|
- I don't think the front LEDs work yet
|
||||||
- adding `he_bss_color="128"` causes `Invalid argument` for hostap
|
|
||||||
|
Installation
|
||||||
|
============
|
||||||
|
|
||||||
|
- build the default output (the FIT image)
|
||||||
|
- rename it to 'openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb'
|
||||||
|
- start a TFTP server
|
||||||
|
- use 'Load production system via TFTP then write to NAND' and 'Boot production system from NAND'
|
||||||
|
from the serial uboot menu
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
@ -652,6 +661,7 @@
|
|||||||
#defaultOutput = "tftpboot";
|
#defaultOutput = "tftpboot";
|
||||||
loadAddress = lim.parseInt "0x44000000";
|
loadAddress = lim.parseInt "0x44000000";
|
||||||
entryPoint = lim.parseInt "0x44000000";
|
entryPoint = lim.parseInt "0x44000000";
|
||||||
|
alignment = 2048;
|
||||||
rootDevice = "/dev/fit0";
|
rootDevice = "/dev/fit0";
|
||||||
dts = {
|
dts = {
|
||||||
src = "${openwrt.src}/target/linux/mediatek/dts/mt7981b-openwrt-one.dts";
|
src = "${openwrt.src}/target/linux/mediatek/dts/mt7981b-openwrt-one.dts";
|
||||||
|
@ -25,6 +25,6 @@ in
|
|||||||
inherit (config.boot) commandLineDtbNode;
|
inherit (config.boot) commandLineDtbNode;
|
||||||
inherit (config.hardware) loadAddress entryPoint alignment;
|
inherit (config.hardware) loadAddress entryPoint alignment;
|
||||||
inherit (config.boot) imageFormat;
|
inherit (config.boot) imageFormat;
|
||||||
inherit (o) kernel dtb;
|
inherit (o) kernel dtb rootfs;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
default = "conf-1";
|
default = "config-1";
|
||||||
conf-1 {
|
config-1 {
|
||||||
description = "Boot Linux kernel with FDT blob";
|
description = "Boot Linux kernel with FDT blob";
|
||||||
kernel = "kernel";
|
kernel = "kernel";
|
||||||
fdt = "fdt-1";
|
fdt = "fdt-1";
|
||||||
|
@ -22,6 +22,7 @@ in {
|
|||||||
, imageFormat
|
, imageFormat
|
||||||
, alignment ? null
|
, alignment ? null
|
||||||
, dtb ? null
|
, dtb ? null
|
||||||
|
, rootfs
|
||||||
} : stdenv.mkDerivation {
|
} : stdenv.mkDerivation {
|
||||||
name = "kernel.image";
|
name = "kernel.image";
|
||||||
phases = [
|
phases = [
|
||||||
@ -53,6 +54,7 @@ in {
|
|||||||
|
|
||||||
buildPhaseFIT = ''
|
buildPhaseFIT = ''
|
||||||
${stripAndZip}
|
${stripAndZip}
|
||||||
|
cp ${rootfs} rootfs
|
||||||
cat ${./kernel_fdt.its} > mkimage.its
|
cat ${./kernel_fdt.its} > mkimage.its
|
||||||
cat << _VARS >> mkimage.its
|
cat << _VARS >> mkimage.its
|
||||||
/ {
|
/ {
|
||||||
@ -68,10 +70,26 @@ in {
|
|||||||
data = /incbin/("./tmp.dtb");
|
data = /incbin/("./tmp.dtb");
|
||||||
arch = "${arch}";
|
arch = "${arch}";
|
||||||
};
|
};
|
||||||
|
rootfs-1 {
|
||||||
|
description = "Liminix rootfs";
|
||||||
|
data = /incbin/("./rootfs");
|
||||||
|
type = "filesystem";
|
||||||
|
hash-1 {
|
||||||
|
algo = "crc32";
|
||||||
|
};
|
||||||
|
hash-2 {
|
||||||
|
algo = "sha1";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
configurations {
|
||||||
|
config-1 {
|
||||||
|
loadables = "rootfs-1";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_VARS
|
_VARS
|
||||||
mkimage -f mkimage.its ${lib.optionalString (alignment != null) "-B 0x${lib.toHexString alignment}"} kernel.uimage
|
mkimage -f mkimage.its -E ${lib.optionalString (alignment != null) "-B 0x${lib.toHexString alignment}"} kernel.uimage
|
||||||
mkimage -l kernel.uimage
|
mkimage -l kernel.uimage
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user