mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
fwupdate: odroidc1 support should now be complete
This commit is contained in:
parent
b3f614ec23
commit
5bfb363761
@ -230,7 +230,13 @@ function flash_boot() {
|
||||
wait $pid
|
||||
|
||||
mount -o rw /boot
|
||||
restore_boot_$board $FW_DIR/old_boot 2>/dev/null || true
|
||||
|
||||
# the /usr/libexec/fw-restore-boot-cfg script, if present, takes the old (backup) boot dir as argument
|
||||
# and should restore any /boot configuration that needs to be preserved across updates
|
||||
# from the old boot dir to the current (new) /boot dir
|
||||
if [ -x /usr/libexec/fw-restore-boot-cfg ]; then
|
||||
/usr/libexec/fw-restore-boot-cfg $FW_DIR/old_boot 2>/dev/null || true
|
||||
fi
|
||||
touch $FW_DIR/$BOOT_READY_FILE
|
||||
}
|
||||
|
||||
@ -257,19 +263,6 @@ function flash_cleanup() {
|
||||
mount /boot 2>/dev/null
|
||||
}
|
||||
|
||||
function restore_boot_raspberrypi() {
|
||||
old_boot=$1
|
||||
cp $old_boot/config.txt /boot
|
||||
}
|
||||
|
||||
function restore_boot_raspberrypi2() {
|
||||
restore_boot_raspberrypi
|
||||
}
|
||||
|
||||
function restore_boot_raspberrypi3() {
|
||||
restore_boot_raspberrypi
|
||||
}
|
||||
|
||||
|
||||
#### flash reboot ####
|
||||
|
||||
@ -278,8 +271,13 @@ function flash_reboot() {
|
||||
|
||||
board=$(cat $SYS_BOARD_FILE)
|
||||
|
||||
# the /usr/libexec/fw-prepare-boot script should be present and should
|
||||
# make the necessary changes to the current boot configuration so that
|
||||
# the firmware update initramfs will be used by the next boot
|
||||
mount -o remount,rw /boot
|
||||
prepare_boot_$board
|
||||
if [ -x /usr/libexec/fw-prepare-boot ]; then
|
||||
/usr/libexec/fw-prepare-boot
|
||||
fi
|
||||
|
||||
sync
|
||||
busybox reboot &
|
||||
@ -289,18 +287,6 @@ function flash_reboot() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
function prepare_boot_raspberrypi() {
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
}
|
||||
|
||||
function prepare_boot_raspberrypi2() {
|
||||
prepare_boot_raspberrypi
|
||||
}
|
||||
|
||||
function prepare_boot_raspberrypi3() {
|
||||
prepare_boot_raspberrypi
|
||||
}
|
||||
|
||||
|
||||
#### status ####
|
||||
|
||||
|
4
board/odroidc1/usr/libexec/fw-prepare-boot
Executable file
4
board/odroidc1/usr/libexec/fw-prepare-boot
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
sed -i 's/00 - 0x/00 0x22000000 0x/' /boot/boot.ini
|
||||
|
4
board/raspberrypi/overlay/usr/libexec/fw-prepare-boot
Executable file
4
board/raspberrypi/overlay/usr/libexec/fw-prepare-boot
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
10
board/raspberrypi/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
10
board/raspberrypi/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <old_boot>" 1>&2
|
||||
exit -1
|
||||
fi
|
||||
|
||||
old_boot=$1
|
||||
cp $old_boot/config.txt /boot
|
||||
|
4
board/raspberrypi2/overlay/usr/libexec/fw-prepare-boot
Executable file
4
board/raspberrypi2/overlay/usr/libexec/fw-prepare-boot
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
10
board/raspberrypi2/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
10
board/raspberrypi2/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <old_boot>" 1>&2
|
||||
exit -1
|
||||
fi
|
||||
|
||||
old_boot=$1
|
||||
cp $old_boot/config.txt /boot
|
||||
|
4
board/raspberrypi3/overlay/usr/libexec/fw-prepare-boot
Executable file
4
board/raspberrypi3/overlay/usr/libexec/fw-prepare-boot
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "initramfs fwupdater.gz" >> /boot/config.txt
|
||||
|
10
board/raspberrypi3/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
10
board/raspberrypi3/overlay/usr/libexec/fw-restore-boot-cfg
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <old_boot>" 1>&2
|
||||
exit -1
|
||||
fi
|
||||
|
||||
old_boot=$1
|
||||
cp $old_boot/config.txt /boot
|
||||
|
Loading…
x
Reference in New Issue
Block a user