fwupdate: odroidc1 support should now be complete

This commit is contained in:
Calin Crisan 2017-03-06 21:26:28 +02:00
parent b3f614ec23
commit 5bfb363761
8 changed files with 59 additions and 27 deletions

View File

@ -230,7 +230,13 @@ function flash_boot() {
wait $pid wait $pid
mount -o rw /boot 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 touch $FW_DIR/$BOOT_READY_FILE
} }
@ -257,19 +263,6 @@ function flash_cleanup() {
mount /boot 2>/dev/null 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 #### #### flash reboot ####
@ -278,8 +271,13 @@ function flash_reboot() {
board=$(cat $SYS_BOARD_FILE) 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 mount -o remount,rw /boot
prepare_boot_$board if [ -x /usr/libexec/fw-prepare-boot ]; then
/usr/libexec/fw-prepare-boot
fi
sync sync
busybox reboot & busybox reboot &
@ -289,18 +287,6 @@ function flash_reboot() {
exit 0 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 #### #### status ####

View File

@ -0,0 +1,4 @@
#!/bin/bash
sed -i 's/00 - 0x/00 0x22000000 0x/' /boot/boot.ini

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo "initramfs fwupdater.gz" >> /boot/config.txt

View 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

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo "initramfs fwupdater.gz" >> /boot/config.txt

View 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

View File

@ -0,0 +1,4 @@
#!/bin/bash
echo "initramfs fwupdater.gz" >> /boot/config.txt

View 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