diff options
author | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-24 09:34:37 +0700 |
---|---|---|
committer | Pawit Pornkitprasan <p.pawit@gmail.com> | 2011-12-24 09:35:11 +0700 |
commit | fdc19983538bec90010fa7f344a7417ff4731ba8 (patch) | |
tree | 8a84a1edd1c026b71fec4756caf27cbbb9e827d5 /usr/galaxysmtd_initramfs_files | |
parent | b55e9ac4df4d240b39eda4cd9c0198453dd59061 (diff) | |
download | kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.zip kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.tar.gz kernel_samsung_aries-fdc19983538bec90010fa7f344a7417ff4731ba8.tar.bz2 |
Added support for aries
Reverts "S5PC11X : FIMC apply v4l2 standard for asynchronous dequeue/queue"
5f4b037e6ebb18d65a3ac896032eb559d7fe2baf
Diffstat (limited to 'usr/galaxysmtd_initramfs_files')
-rwxr-xr-x | usr/galaxysmtd_initramfs_files/bml_over_mtd | bin | 0 -> 68036 bytes | |||
-rwxr-xr-x | usr/galaxysmtd_initramfs_files/busybox | bin | 0 -> 478916 bytes | |||
-rwxr-xr-x | usr/galaxysmtd_initramfs_files/erase_image | bin | 0 -> 59848 bytes | |||
-rwxr-xr-x | usr/galaxysmtd_initramfs_files/init | 70 |
4 files changed, 70 insertions, 0 deletions
diff --git a/usr/galaxysmtd_initramfs_files/bml_over_mtd b/usr/galaxysmtd_initramfs_files/bml_over_mtd Binary files differnew file mode 100755 index 0000000..1adaf99 --- /dev/null +++ b/usr/galaxysmtd_initramfs_files/bml_over_mtd diff --git a/usr/galaxysmtd_initramfs_files/busybox b/usr/galaxysmtd_initramfs_files/busybox Binary files differnew file mode 100755 index 0000000..9496f7a --- /dev/null +++ b/usr/galaxysmtd_initramfs_files/busybox diff --git a/usr/galaxysmtd_initramfs_files/erase_image b/usr/galaxysmtd_initramfs_files/erase_image Binary files differnew file mode 100755 index 0000000..9c08402 --- /dev/null +++ b/usr/galaxysmtd_initramfs_files/erase_image diff --git a/usr/galaxysmtd_initramfs_files/init b/usr/galaxysmtd_initramfs_files/init new file mode 100755 index 0000000..5d0a655 --- /dev/null +++ b/usr/galaxysmtd_initramfs_files/init @@ -0,0 +1,70 @@ +#!/stage1/busybox sh +export _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 + +bml_over_mtd dump boot 72 reservoir 2004 /stage1/boot.bin + +eval $(busybox grep -m 1 -A 1 BOOT_IMAGE_OFFSETS /stage1/boot.bin | busybox tail -n 1) + +load_offset=$boot_offset +load_len=$boot_len + +busybox mount -t yaffs2 /dev/block/mtdblock2 /system +busybox mount -t yaffs2 /dev/block/mtdblock3 /cache + +if busybox test -e /cache/.startrecovery || busybox grep -q bootmode=2 /proc/cmdline ; then + # recovery boot + busybox rm -fr /cache/.startrecovery + load_offset=$recovery_offset + load_len=$recovery_len + + # disable lpm + busybox echo 0 > /sys/class/power_supply/battery/charging_mode_booting +elif ! busybox test -e /system/build.prop ; then + # emergency boot + busybox umount /cache + erase_image cache + busybox mount -t yaffs2 /dev/block/mtdblock3 /cache + busybox mkdir /cache/recovery + + busybox mount -t vfat /dev/block/mmcblk0p1 /sdcard + + UPDATE=$(busybox cat /sdcard/cyanogenmod.cfg) + + if busybox test -e $UPDATE ; then + busybox echo "install_zip(\"`echo $UPDATE`\");" > /cache/recovery/extendedcommand + fi + + load_offset=$recovery_offset + load_len=$recovery_len + + # disable lpm + busybox echo 0 > /sys/class/power_supply/battery/charging_mode_booting +fi + +busybox umount /cache +busybox umount /system +busybox umount /sdcard +busybox rmdir /sdcard + +busybox dd bs=512 if=/stage1/boot.bin skip=$load_offset count=$load_len | busybox zcat | busybox cpio -i + +if busybox grep -q 1 /sys/class/power_supply/battery/charging_mode_booting ; then + # low power mode + busybox cp lpm.rc init.rc + busybox rm init.aries.rc +fi + +busybox umount /sys +busybox umount /proc +busybox date >>boot.txt +busybox rm -fr /stage1 /dev/* +export PATH="${_PATH}" +exec /init |