1
0

Compare commits

...

4 Commits

Author SHA1 Message Date
35c7f1643f change defaultOutput for hardware devices to flashimage
if you're using tftpboot you probably know what you're doing
2023-09-17 17:00:45 +01:00
70fb9f86d3 mt300a vlan interface services depend on primary 2023-09-17 17:00:38 +01:00
b36272f99e add outputs for vlan service 2023-09-17 17:00:31 +01:00
0abe4f96a7 ssh ensure we create /run/dropbear
this is required if we don't have persistent store (jffs2)
2023-09-17 17:00:26 +01:00
5 changed files with 12 additions and 5 deletions

View File

@ -85,7 +85,7 @@
FEATURE_DD_IBS_OBS = "y"; # ath10k_cal_data needs skip_bytes,fullblock
};
hardware = {
defaultOutput = "tftpboot";
defaultOutput = "flashimage";
loadAddress = "0x80060000";
entryPoint = "0x80060000";
flash = {

View File

@ -28,7 +28,7 @@
};
in {
hardware = {
defaultOutput = "tftpboot";
defaultOutput = "flashimage";
loadAddress = "0x80000000";
entryPoint = "0x80000000";
@ -70,20 +70,22 @@
swconfig dev switch0 vlan 2 set ports '0 6t'
swconfig dev switch0 set apply
'';
down = "swconfig dev switch0 set reset";
down = "${pkgs.swconfig}/bin/swconfig dev switch0 set reset";
};
in rec {
eth = link.build { ifname = "eth0"; dependencies = [swconfig]; };
eth = link.build { ifname = "eth0"; };
# lan and wan ports are both behind a switch on eth0
lan = vlan.build {
ifname = "eth0.1";
primary = eth;
vid = "1";
dependencies = [swconfig eth];
};
wan = vlan.build {
ifname = "eth0.2";
primary = eth;
vid = "2";
dependencies = [swconfig eth];
};
wlan = link.build {
ifname = "wlan0";

View File

@ -35,7 +35,7 @@
};
};
hardware = {
defaultOutput = "tftpboot";
defaultOutput = "flashimage";
loadAddress = "0x80000000";
entryPoint = "0x80000000";

View File

@ -35,6 +35,8 @@ longrun {
if test -d /persist; then
mkdir -p /persist/secrets/dropbear
ln -s /persist/secrets/dropbear /run
else
mkdir -p /run/dropbear
fi
. /etc/profile # sets PATH but do we need this? it's the same file as ashrc
exec env -i ENV=/etc/ashrc PATH=$PATH ${dropbear}/bin/dropbear ${concatStringsSep " " options}

View File

@ -10,6 +10,9 @@ in oneshot rec {
up = ''
ip link add link $(output ${primary} ifname) name ${ifname} type vlan id ${vid}
${liminix.networking.ifup name ifname}
(in_outputs ${name}
echo ${ifname} > ifname
)
'';
down = "ip link set down dev ${ifname}";
}