View Single Post
Old 07-08-2015, 03:39 PM   #15
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by barobach_so View Post
hi
it doesn't work again
can u take a look at my script file please
here
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

Last edited by tshering; 07-08-2015 at 03:45 PM.
tshering is offline   Reply With Quote