Commit d4422364 authored by Dalton Durst's avatar Dalton Durst

Check a flag file to decide whether to boot into recovery

With these changes, u-boot checks for the existence of
/persist/reboot-recovery to decide when to reboot into recovery (in
addition to holding the volume up key). By including a blank persist
partition in the device tarball, we ensure that the flag file is
deleted when an update completes. Otherwise, we can delete the flag
file early in Jumpdrive's init.

Additionally, disable the framebuffer console on the internal screen
and set 'systempart' and 'devnum' kernel cmdline arguments using
u-boot's devnum variable. This will help us run on either eMMC or SD.

This isn't a good option, but it will do until we find something else.
parent b81994a8
......@@ -24,6 +24,7 @@ $SCRIPT/deb-to-bootimg.sh ${TMPDOWN}/linux-image-*-pine64_*.deb ${HERE}/initrd.i
$SCRIPT/wget-extract-deb.sh http://repo.ubports.com/pool/xenial/main/l/linux-firmware-rtlwifi/linux-firmware-rtlwifi_20200316+0ubports0+0~xenial20200412191958.2~1.gbpdcaffd_all.deb ${TMP}/system
$SCRIPT/wget-extract-deb.sh http://repo.ubports.com/pool/xenial/main/l/linux-firmware-pine64-rtl8723-bt/linux-firmware-pine64-rtl8723-bt_20190223+0ubports0+0~xenial20200412190853.3~1.gbp327449_all.deb ${TMP}/system
$SCRIPT/mk-scr.sh uboot ${TMP}/partitions/
$SCRIPT/mk-persist.sh uboot ${TMP}/partitions/
cp ${TMPDOWN}/u-boot-sunxi-with-spl-pinephone.bin ${TMP}/partitions/loader.img
cp recovery-pinephone.img ${TMP}/partitions/recovery.img
......
#!/bin/bash
set -xe
SRC=$1
OUT=$2
truncate --size 500K persist.img
mkfs.ext2 persist.img
mv persist.img $OUT
echo "done"
cache /cache ext4 defaults
boot_a /boot ext4 defaults
persist /persist ext4 defaults
# White
gpio set 114; gpio set 115; gpio set 116
setenv bootargs console=tty0 console=${console} systempart=/dev/mmcblk0p9
setenv bootargs console=${console} systempart=/dev/mmcblk${devnum}p9 devnum=${devnum}
setenv kernel_addr_z 0x44080000
echo "[UBPORTS] Bootargs are" ${bootargs}
echo "[UBPORTS] Beginning load"
if test "${volume_key}" = "up"; then
if test "${volume_key}" = "up" -o -e ${devtype} ${devnum}:3 reboot-recovery; then
# recovery-a partition
setenv partnum 6
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment