specify root device as /dev/mtdblockn

the (openwrt?) magic that autodetects it based on mtd labels
won't work with a two-stage boot
This commit is contained in:
Daniel Barlow 2023-04-26 22:16:15 +01:00
parent 6d6dbe1cbb
commit 4cfaed7303
5 changed files with 9 additions and 3 deletions

View File

@ -89,7 +89,7 @@
size ="0xfa0000";
eraseBlockSize = "65536";
};
rootDevice = "1f05";
rootDevice = "/dev/mtdblock5";
dts = {
src = "${openwrt.src}/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts";
includes = [

View File

@ -47,7 +47,7 @@
size ="0xf80000";
eraseBlockSize = "65536";
};
rootDevice = "1f05";
rootDevice = "/dev/mtdblock5";
dts = {
src = "${openwrt.src}/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts";

View File

@ -44,7 +44,7 @@
size = "0xfb0000";
eraseBlockSize = "65536";
};
rootDevice = "1f05";
rootDevice = "/dev/mtdblock5";
dts = {
src = "${openwrt.src}/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts";

View File

@ -119,6 +119,7 @@ in {
};
boot.commandLine = [
"console=ttyS0,115200 panic=10 oops=panic init=/bin/init loglevel=8"
"root=${config.hardware.rootDevice}"
"rootfstype=${config.rootfsType}"
"fw_devlink=off"
];

View File

@ -31,6 +31,11 @@ in
dir /dev 0755 0 0
nod /dev/console 0600 0 0 c 5 1
nod /dev/mtdblock0 0600 0 0 b 31 0
nod /dev/mtdblock1 0600 0 0 b 31 1
nod /dev/mtdblock2 0600 0 0 b 31 2
nod /dev/mtdblock3 0600 0 0 b 31 3
nod /dev/mtdblock4 0600 0 0 b 31 4
nod /dev/mtdblock5 0600 0 0 b 31 5
dir /target 0755 0 0
dir /target/persist 0755 0 0
dir /target/nix 0755 0 0