View Single Post
Old 07-12-2015, 02:49 PM   #16
barobach_so
Connoisseur
barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.barobach_so knows what's going on.
 
Posts: 76
Karma: 25460
Join Date: Feb 2015
Device: kobo h2o
Quote:
Originally Posted by tshering View Post
Use unix style line endings (LF), instead of Windows style endings (CR+LF). You can select in notepad++ the end of line character (or sequence of charactres).

You can add some lines to the script in order to give you an optical feedback whether the script is executed at all. The led will start blinking.


Spoiler:
Code:
#!/bin/sh

echo "ch 3" > /sys/devices/platform/pmic_light.1/lit
echo "cur 1" > /sys/devices/platform/pmic_light.1/lit
echo "bp 5" > /sys/devices/platform/pmic_light.1/lit
echo "dc 5" > /sys/devices/platform/pmic_light.1/lit

PLATFORM=freescale
if [ `dd if=/dev/mmcblk0 bs=512 skip=1024 count=1 | grep -c "HW CONFIG"` == 1 ]; then
  CPU=`ntx_hwconfig -s -p /dev/mmcblk0 CPU`
  PLATFORM=$CPU-ntx
fi

if [ -f "/etc/u-boot/${PLATFORM}/u-boot.recovery" ]; then
  dd if=/etc/u-boot/${PLATFORM}/u-boot.recovery of=/dev/mmcblk0 bs=128k count=1 seek=6
  sync
  reboot
else
  mount -o remount,rw /mnt/sd
  sleep 2
  echo "Cannot find /etc/u-boot/${PLATFORM}/u-boot.recovery" > /mnt/sd/factory_reset.log
  sync
  /bin/busybox poweroff
fi
hi

thank you
Its worked on H2O with your written patch
I asked my friend to use Linux to make script

here is the file for those who don't have Linux
barobach_so is offline   Reply With Quote