Sign up here and you can log into the forum!

[SOLVED] Bricked SMP

Yes, this is your place to show off. Let us see what you're doing with your device[s]

Re: Bricked SMP   

Postby Big » Thu Feb 12, 2015 2:52 pm

/usrdata/.wd_tv/theme is empty before "rm" so it's not theme that's the reason of loop. No I'll try to adopt "reset everything" script found earlier on this forum. Main action of this script is (excerpt from PHP):
Code: Select all
<?php

print 'WDLXTV WD TV Homebrew Kit v4 -- Modified by kad' . PHP_EOL;
print 'Resetting WD to default settings ...' . PHP_EOL;
shell_exec("rm -rf /conf/* && config_tool -s && config_tool -s");
$x = shell_exec("ls -1 /conf/ | wc -l");

if (trim($x) == "0")
  print 'Reset Success, Please Reboot' . PHP_EOL;
else
  print 'Reset Failure WTF!!! ' . PHP_EOL;
die();

?>
Big
Donor
 
Posts: 30
Joined: Sat Oct 02, 2010 9:19 am

Re: Bricked SMP   

Postby Big » Thu Feb 12, 2015 3:12 pm

First: /conf is symlink to /tmp/conf

Second: It seems that config is empty. Output from config_tool -s:
Code: Select all
F:mkconfig_translate_config_dir_to_file,75: [load config] ret_config=0


Maybe it's bad way of clearing configuration but now I'm only blindly guessing step by step since I don't have running SMB to check dirs, filenames etc. I'm totally unprepared for this disaster :-D
Big
Donor
 
Posts: 30
Joined: Sat Oct 02, 2010 9:19 am

Re: Bricked SMP   

Postby Big » Thu Feb 12, 2015 3:38 pm

SOLVED! :-D

We can think about reasons why previous attempts were not good, but here is what I've done.

1. I've commented all umounts in runsit.sh - to have full access to all filesystems
2. I've uncommented 2 very important lines, which configured network - "ifconfig eth0 up" and "dhcpcd -h WDTVLIVE420 eth0 &"
3. After this I had normal network connection to working SMP - I've connected using ssh
4. I've checked /usrdata/.wd_tv/theme and it had subdir with name as my new theme. Everything was untouched, also "font" subdir with my bad files. (why after so many "rm -rf"?)
5. I've removed whole "font" subdir (but only this), done reboot and BINGO! :-)

So now we can have something like recovery pendrive with such runsit.sh, which gives full access to running SMP. As long as there is problem with theme or anything not network-related, all checks and recovery can be done using ssh :-)

Thanks once again KAD for your help :-)
Last edited by Big on Fri Feb 13, 2015 5:21 am, edited 1 time in total.
Big
Donor
 
Posts: 30
Joined: Sat Oct 02, 2010 9:19 am

Re: [SOLVED] Bricked SMP   

Postby KAD » Thu Feb 12, 2015 3:52 pm

glad you figured it out

something interesting you can try

Code: Select all
cat /conf/config

this will output tons of config settings

then if you
Code: Select all
config_tool -s

you'll still get the same message
Code: Select all
F:mkconfig_translate_config_dir_to_file,75: [load config] ret_config=0
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: [SOLVED] Bricked SMP   

Postby Big » Fri Feb 13, 2015 5:26 am

Yes - "config_tool -s" really gives this result. But right now when I've checked it's options I think it's quite normal - "config_tool -s" saves to file /conf/config all changes done during last minutes. It compares settings in memory with these in file and applies all needed things to /conf/config. There were no changes so 0 lines to write/change.

Generally I thought (without checking - my fault) that "config_tool -s" shows current configuration. that's why I was surprised with 0 result.
Big
Donor
 
Posts: 30
Joined: Sat Oct 02, 2010 9:19 am

Re: [SOLVED] Bricked SMP   

Postby KAD » Wed Feb 18, 2015 2:41 pm

so a couple of questions,

we've already got another users wanting to use this

can you confirm, this is how runsit.sh should look

Code: Select all

#!/bin/sh
###############################
######      WDLXTV       ######
######   WDTV Firmware   ######
######    `unwinder`     ######
######                   ######
######     by b-rad      ######
######  http://b-rad.cc  ######
###############################

cd /

eval `egrep 'ROOT_TAG' /conf/config`
eval `egrep 'ROOT_FS' /conf/config`

rm /tmp/media/usb/boot.rootfs
rm /tmp/media/usb/boot.root-tag.*
rm /tmp/media/usb/boot.firmware

if [ ! -f /tmp/media/usb/2.02.32-WDLXTV_Gen3-0.1.5.bin ] && [ ! -f /tmp/media/usb/"$ROOT_TAG" ] && [ ! -d /tmp/media/usb/.rootfs ]] ; then
         date > /tmp/media/usb/No-Firmware-Found
         echo "No Firmware Found" >> /tmp/media/usb/No-Firmware-Found
         exit
fi

killall console_sniffer
killall dbus-daemon
killall config_tool

rmmod cifs
rmmod wdtv_rv_microp
rmmod i2c_hal
rmmod em8xxx
rmmod llad
rmmod proc_pipe
rmmod irkernel
rmmod ufsd
rmmod fctrl
rmmod 8192cu


if [ -d /tmp/media/usb/.rootfs ] && [ "$ROOT_FS" == "ON" ] ; then
         mount -o loop,nodiratime,noatime,rw /tmp/media/usb/.rootfs /mnt/
         touch /tmp/media/usb/boot.rootfs
elif [ -f /tmp/media/usb/"$ROOT_TAG" ] ; then
         mount -o loop,nodiratime,noatime,rw /tmp/media/usb/"$ROOT_TAG" /mnt/
         touch /tmp/media/usb/boot.root-tag."$ROOT_TAG"
else
         mount -o loop,nodiratime,noatime,rw /tmp/media/usb/2.02.32-WDLXTV_Gen3-0.1.5.bin /mnt/
         touch /tmp/media/usb/boot.firmware
         # NFS root does not work so well for whatever reason (probably dmaosd)
         ifconfig eth0 up
         dhcpcd -h WDTVLIVE420 eth0 &
         #sleep 5
         #mount -o soft,intr,nolock 192.168.1.115:/src/nfsroot /mnt/
fi

mount -o move /tmp/media/usb /mnt/share

#umount /tmp/static_config/
#umount /usrdata/
#umount /proc/bus/usb
#umount /proc/
#umount /sys
#umount /dev/pts
#umount /dev 2>/dev/null || umount -l /dev
#umount /tmp

pivot_root /mnt /mnt/mnt
#sed -e 's/export IS_DTCP=y/export IS_DTCP=n/' /sysconfig > /share/sysconfig.patched
sed -e 's/export SYSCONF_ROOTFS2=y/export SYSCONF_ROOTFS2=n/' /sysconfig > /share/sysconfig.patched
mount -o bind /share/sysconfig.patched /sysconfig
mount -o bind /dev/null /bin/console_sniffer

exec /init rootFS

echo "WTF AM I DOING HERE?!?"
reboot


also when you do this

is the gui working ?
was sshd running automatically ? or did you have to do anything to start it

I assume if it was automatic, then this actually went through to boot the firmware from usb
and completed WDLXTV init.d scripts
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: [SOLVED] Bricked SMP   

Postby Big » Thu Aug 13, 2015 5:34 am

Sorry KAD for loooong delay - I was so happy after finding solution that I haven't checked this thread again. As far as I remember your runsit.sh is OK - all umount are commented as they should.

Yes, after boot sshd started automatically (as with normal boot) - no other way to unbrick SMB from network ;-)
Big
Donor
 
Posts: 30
Joined: Sat Oct 02, 2010 9:19 am

Previous

Return to Look at Me!!!

Who is online

Users browsing this forum: No registered users and 2 guests