sysmobts: Put the rescue system into a ubi on its own.
When ubifs/ubi corrupts... the only way to recover is to format it again. We can only do that _if_ the rescue image is not in it. It is annoying because it means system0/system1 and rescue can not share the same reservation for badblocks.
This commit is contained in:
parent
f2b03e21a8
commit
52b44d0271
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test -e /dev/nand0.rescue.ubi; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
ubiattach -d 0 /dev/nand0.rescue
|
||||||
|
if [ $? != 0 ]; then
|
||||||
|
echo "failed to run ubiattach for rescue"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
|
@ -8,4 +8,4 @@ fi
|
||||||
global bootm.initrd=/mnt/rescue/initramfs
|
global bootm.initrd=/mnt/rescue/initramfs
|
||||||
|
|
||||||
global linux.bootargs.dyn.root="rdinit=/sbin/init rauc.slot=rescue"
|
global linux.bootargs.dyn.root="rdinit=/sbin/init rauc.slot=rescue"
|
||||||
global linux.bootargs.dyn.mtd="mtdparts=davinci_nand.0:${nand0.partitions} ubi.mtd=root"
|
global linux.bootargs.dyn.mtd="mtdparts=davinci_nand.0:${nand0.partitions} ubi.mtd=rescue"
|
||||||
|
|
|
@ -7,4 +7,4 @@ mkdir /mnt/system1
|
||||||
automount -d /mnt/system1 'prepare-ubi && mount /dev/nand0.root.ubi.system1 /mnt/system1'
|
automount -d /mnt/system1 'prepare-ubi && mount /dev/nand0.root.ubi.system1 /mnt/system1'
|
||||||
|
|
||||||
mkdir /mnt/rescue
|
mkdir /mnt/rescue
|
||||||
automount -d /mnt/rescue 'prepare-ubi && mount /dev/nand0.root.ubi.rescue /mnt/rescue'
|
automount -d /mnt/rescue 'prepare-ubi-rescue && mount /dev/nand0.rescue.ubi.rescue /mnt/rescue'
|
||||||
|
|
|
@ -54,8 +54,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
partition@3 {
|
partition@3 {
|
||||||
|
label = "rescue";
|
||||||
|
reg = <0x400000 0xd00000>;
|
||||||
|
};
|
||||||
|
|
||||||
|
partition@4 {
|
||||||
label = "root";
|
label = "root";
|
||||||
reg = <0x400000 0x0>;
|
reg = <0x1100000 0x0>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue