brcm2708: keep boot partition mounted to allow users to change config.txt
authorJohn Crispin <john@openwrt.org>
Mon, 5 Oct 2015 10:27:49 +0000 (10:27 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 5 Oct 2015 10:27:49 +0000 (10:27 +0000)
This way it's easier to configure device tree overlays, customize other
parameters...

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
SVN-Revision: 47126

target/linux/brcm2708/base-files/lib/preinit/79_move_config
target/linux/brcm2708/base-files/lib/upgrade/platform.sh

index 7bcea7bf6ff140cf50840df64ab943aee1b08de9..b0ee62a8092dc7437a25b23489b6087aef934e9b 100644 (file)
@@ -9,9 +9,9 @@ move_config() {
                insmod nls_iso8859-1
                insmod fat
                insmod vfat
-               mount -t vfat -o rw,noatime $BOOTPART /mnt
-               [ -f /mnt/sysupgrade.tgz ] && mv -f /mnt/sysupgrade.tgz /
-               umount /mnt
+               mkdir -p /boot
+               mount -t vfat -o rw,noatime $BOOTPART /boot
+               [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
        fi
 }
 
index 3e1ee0067c5bc2ac2621dd6deec19c5058c84a8a..1d4b694574c5acbc5bcac39cf3f2094026058ac5 100644 (file)
@@ -10,8 +10,9 @@ platform_do_upgrade() {
 }
 
 platform_copy_config() {
-       mount -t vfat -o rw,noatime /dev/mmcblk0p1 /mnt
-       cp -af "$CONF_TAR" /mnt/
+       mkdir -p /boot
+       [ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
+       cp -af "$CONF_TAR" /boot/
        sync
-       umount /mnt
+       umount /boot
 }