Эх сурвалжийг харах

[Improve][rootfs][filesystem]

2021.03.12 / Folus Wen

Actions:
1. /dev/mtd13 file system change to ubifs.

Files:
1. As follow commit history

Image version: D0.00.XX.XXXX.XX
Image checksum: XXXXXXXX

Hardware PWB P/N : XXXXXXX
Hardware Version : XXXXXXX
FolusWen 4 жил өмнө
parent
commit
e2b324597c

+ 4 - 0
EVSE/rootfs/bin/flash_eraseall

@@ -0,0 +1,4 @@
+#!/bin/sh
+echo "${0##*/} has been replaced by \`flash_erase <mtddev> 0 0\`; please use it" 1>&2
+[ $# -ne 0 ] && set -- "$@" 0 0
+exec flash_erase "$@"

+ 14 - 1
EVSE/rootfs/etc/init.d/rcS

@@ -35,7 +35,20 @@ mount -a
 mount -t tmpfs tmpfs /mnt
 
 chmod 777 /Storage
-mount -t jffs2 /dev/mtdblock13 /Storage
+#mount -t jffs2 /dev/mtdblock13 /Storage
+ubiattach /dev/ubi_ctrl -m 13
+if [ "$?" -eq "0" ]
+then
+   echo "Success."
+else
+   echo "Erase /dev/mtd13 jffs2 block"
+   flash_eraseall /dev/mtd13
+   ubiattach /dev/ubi_ctrl -m 13
+fi
+
+ubimkvol /dev/ubi0 -N ubiNandFs -s 796MiB
+mount -t ubifs ubi0:ubiNandFs /Storage
+
 mkdir -p /Storage/EventLog
 mkdir -p /Storage/ChargeLog
 mkdir -p /Storage/SystemLog