mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
rpi-eeprom: use wrapper to ensure /flash is writeable
This commit is contained in:
parent
505df7c788
commit
9e79363e78
@ -2,4 +2,3 @@
|
||||
FIRMWARE_ROOT="/usr/lib/kernel-overlays/base/lib/firmware/raspberrypi/bootloader"
|
||||
FIRMWARE_BACKUP_DIR="/storage/.config/rpifw-backup"
|
||||
BOOTFS=/flash
|
||||
USE_FLASHROM=${USE_FLASHROM:-1}
|
||||
|
@ -29,7 +29,9 @@ makeinstall_target() {
|
||||
done
|
||||
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -PRv ${PKG_BUILD}/rpi-eeprom-{config,update} ${INSTALL}/usr/bin
|
||||
cp -PRv ${PKG_DIR}/source/rpi-eeprom-update ${INSTALL}/usr/bin
|
||||
cp -PRv ${PKG_BUILD}/rpi-eeprom-update ${INSTALL}/usr/bin/.rpi-eeprom-update.real
|
||||
cp -PRv ${PKG_BUILD}/rpi-eeprom-config ${INSTALL}/usr/bin
|
||||
|
||||
mkdir -p ${INSTALL}/etc/default
|
||||
cp -PRv ${PKG_DIR}/config/* ${INSTALL}/etc/default
|
||||
|
10
packages/tools/rpi-eeprom/source/rpi-eeprom-update
Executable file
10
packages/tools/rpi-eeprom/source/rpi-eeprom-update
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# If read-only then mount writeable, and restore read-only on exit
|
||||
# This means we don't restore read-only if /flash is already writeable
|
||||
if [ -n "$(grep " /flash " /proc/mounts | grep "[[:space:]]ro[[:space:],]")" ]; then
|
||||
trap "mount -o remount,ro /flash" EXIT
|
||||
mount -o remount,rw /flash
|
||||
fi
|
||||
|
||||
sh /usr/bin/.rpi-eeprom-update.real $@
|
Loading…
x
Reference in New Issue
Block a user