diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-02-03 13:15:11 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2016-02-03 13:15:11 +0100 |
commit | af90aa3080dd6af491f0131165a58beedb9e6217 (patch) | |
tree | d4a76180397fd7c2dd3c6ef6060bdc55be37cbe1 /usr | |
parent | 4fb23ca1a553ad49a02e0fffc0474f615a72660e (diff) | |
parent | be3d845ee40c30b52b56a7fb44013674ccab03fd (diff) | |
download | kernel_samsung_smdk4412-af90aa3080dd6af491f0131165a58beedb9e6217.zip kernel_samsung_smdk4412-af90aa3080dd6af491f0131165a58beedb9e6217.tar.gz kernel_samsung_smdk4412-af90aa3080dd6af491f0131165a58beedb9e6217.tar.bz2 |
Merge branch 'cm-13.0' of https://github.com/CyanogenMod/android_kernel_samsung_smdk4412 into replicant-6.0replicant-6.0-alpha-0002replicant-6.0-old
Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
Conflicts:
usr/galaxys2_initramfs_files/init
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/galaxys2_initramfs_files/init | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/usr/galaxys2_initramfs_files/init b/usr/galaxys2_initramfs_files/init new file mode 100755 index 0000000..cb3da8e --- /dev/null +++ b/usr/galaxys2_initramfs_files/init @@ -0,0 +1,42 @@ +#!/stage1/busybox sh +_PATH="$PATH" +export PATH=/stage1 + +busybox cd / +busybox date >>boot.txt +exec >>boot.txt 2>&1 +busybox rm init +busybox mount -t proc proc /proc +busybox mount -t sysfs sysfs /sys + +load_image=/stage1/boot.cpio + +if busybox grep -q bootmode=2 /proc/cmdline ; then + + # recovery boot + + # default to recovery ramdisk bundled with kernel + load_image=/stage1/recovery.cpio + + # attempt isorec (isolated recovery) boot + + # if the raw /dev/block/platform/dw_mmc/by-name/RECOVERY + # partition contains valid lzop-compressed data + if busybox lzop -dc /dev/block/mmcblk0p6 > /stage1/isorec.cpio ; then + # and if said data is a valid cpio archive + if busybox cpio -t < /stage1/isorec.cpio ; then + # then use it as the recovery ramdisk + load_image=/stage1/isorec.cpio + fi + fi + +fi + +busybox cpio -i < ${load_image} + +busybox umount /sys +busybox umount /proc +busybox date >>boot.txt +busybox rm -fr /stage1 /dev/* +export PATH="${_PATH}" +exec /init |