Skip to content

Commit

Permalink
A hack to get out of recovery. (dd if a normally-rebooting image to t…
Browse files Browse the repository at this point in the history
…he param.blk)
  • Loading branch information
JackpotClavin authored and kerneltoast committed Apr 14, 2013
1 parent ad0e4c1 commit 9245c50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions usr/venturi_initramfs.list
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dir /lib 755 0 0
dir /lib/modules 755 0 0
file /stage1/busybox source/usr/venturi_initramfs_files/busybox 755 0 0
file /stage1/init source/usr/venturi_initramfs_files/init 755 0 0
file /stage1/normalboot.tar.gz source/usr/venturi_initramfs_files/normalboot.tar.gz 755 0 0
slink /stage1/sh busybox 755 0 0
slink /stage1/insmod busybox 755 0 0
slink /stage1/mount busybox 755 0 0
Expand All @@ -41,6 +42,7 @@ slink /stage1/umount busybox 755 0 0
slink /stage1/zcat busybox 755 0 0
slink /stage1/cpio busybox 755 0 0
slink /stage1/tail busybox 755 0 0
slink /stage1/tar busybox 755 0 0
slink /stage1/cp busybox 755 0 0
slink /stage1/echo busybox 755 0 0
slink /init /stage1/init 755 0 0
Expand Down
7 changes: 4 additions & 3 deletions usr/venturi_initramfs_files/init
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ load_len=$boot_len

mount -t ext4 /dev/block/mmcblk0p15 /cache

if test -e /cache/.startrecovery ; then
# recovery boot
if test -e /cache/.startrecovery || grep -q bootmode=2 /proc/cmdline ; then
# recovery boot and dd if a normally-booting param.blk to mmcblk0p9
tar -zxvf /stage1/normalboot.tar.gz
dd if=/bootnormally.img of=/dev/block/mmcblk0p9
rm -fr /cache/.startrecovery
load_offset=$recovery_offset
load_len=$recovery_len

# disable lpm
echo 0 > /sys/class/power_supply/battery/charging_mode_booting
fi
Expand Down
Binary file added usr/venturi_initramfs_files/normalboot.tar.gz
Binary file not shown.

0 comments on commit 9245c50

Please sign in to comment.