aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2017-10-21 14:51:14 +0300
committerStijn Tintel <stijn@linux-ipv6.be>2017-10-23 12:50:30 +0300
commita48e5bea12911da1647a499a7b74c2408a04ac90 (patch)
tree4a23e582f7ea41dd99002c3278e20f7fbcf439b2 /target/linux
parentf7a6fd31539be54d14d7c52b491b40b26bf8f740 (diff)
downloadupstream-a48e5bea12911da1647a499a7b74c2408a04ac90.tar.gz
upstream-a48e5bea12911da1647a499a7b74c2408a04ac90.tar.bz2
upstream-a48e5bea12911da1647a499a7b74c2408a04ac90.zip
brcm2708: restore /boot/config.txt before reboot
The Raspberry Pi bootloader reads configuration values from config.txt in the boot partition. This file allows to specify the amount of memory to assign to the GPU, the license keys for hardware MPEG-2 and VC-1 decoding, Device Tree parameters and overlays, and lots of other things. Since sysupgrade only restores the configuration after booting the newly flashed image, these values will not be active, even if sysupgrade would save /boot/config.txt. To solve this, add the file to the files to be backed up, and restore it in platform_copy_config, before reboot. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/brcm2708/base-files/lib/upgrade/keep.d/platform1
-rw-r--r--target/linux/brcm2708/base-files/lib/upgrade/platform.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/keep.d/platform b/target/linux/brcm2708/base-files/lib/upgrade/keep.d/platform
new file mode 100644
index 0000000000..786796577d
--- /dev/null
+++ b/target/linux/brcm2708/base-files/lib/upgrade/keep.d/platform
@@ -0,0 +1 @@
+/boot/config.txt
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
index 2f2aeb098e..b7613b446d 100644
--- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
@@ -27,6 +27,7 @@ platform_copy_config() {
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime /dev/mmcblk0p1 /boot
cp -af "$CONF_TAR" /boot/
+ tar --directory / -xvf "$CONF_TAR" boot/config.txt
sync
umount /boot
}