Page 1 of 1

invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Posted: Tue Dec 18, 2012 8:50 pm
by beatfreak
as i hacked my tv "the safe way" (not flashdisk-image, nor widget), my Extensions are called via run.sh script when tv detects usb-drive during boot...

from what i've seen it looked like with widget hack the extensions are placed to /mtd_rwcommon or somewhere but there still must be a point that calls rcSGO, is it the usb_mount procedure too?

what would be the alternate way of calling samygo-startscript during boot without the need of an usb-drive?

Re: invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Posted: Tue Apr 16, 2013 9:48 pm
by beatfreak
I had a bit time for further resaearch in this...

in /etc/rc.local i can see the mountings of mtd_exe, mtd_rocommon, mtd_rwarea...
but not mtd_rwcommon...

i could place samygo extensions in mtd_exe (as there are 85/88 MB free) and use /etc/rc.local to call rcSGO but i'd prefer to use rwcommon...

to find the script i tried:

Code: Select all

ls -alR /mtd* | cat | grep stl0
but no good results yet...

[EDIT:]
/etc/Scripts/rest_mount.sh looks interesting... but read only....

if i can find an editable Script i'd like to append:

Code: Select all

############### SamyGO extensions #################
if [ -f /mtd_rwcommon/SamyGO/rcSGO ]; then
	sh -x $1/SamyGO/rcSGO $1/SamyGO > $1/rcSGO_out 2>&1 &
else
	echo "oops, rcSGO not found"
fi
i am not sure if the $1 variable will work as expected ? should be no need to use it as usb_cmd doesn't get any usable arguments passed

and what does 2>&1 do?

------

i had a look at /sbin/usb_mount/usb_hotplug.sh / coldplug.sh.. whoever at samsung wrote these must have been a fan of samygo... why else would you first check for existing executables in rwarea and then in rootfs..
in mounted filesystems rootfs is listed as rw but all the files and folders in it are uid:gid 501:100 with -rwxr--r-- , may this cause "read-only filesystem" error?

------

for now i modified /mtd_rwarea/usb_mount/usb_cmd like this:

Code: Select all

 
#!/bin/sh
sh -x /mtd_rwarea/usb_mount/killself.sh &
/sbin/usb_mount/usb_cmd $1 $2 $3 $4 $5 $6 $7
if [ "$1" = "mount" ] ; then
    sleep 2
        if [ -f /mtd_rwcommon/SamyGO/rcSGO ] ; then
                sh -x /mtd_rwcommon/SamyGO/rcSGO /mtd_rwcommon/SamyGO > /mtd_rwcommon/rcSGO_out 2>&1 &
        else
                if [ -f /dtv/usb/$3/run.sh ] ; then
                        chmod 777 /dtv/usb/$3/run.sh
                        sh -x /dtv/usb/$3/run.sh /dtv/usb/$3
                fi
        fi
fi

but now rcSGO output is not complete anymore and looks like this

Code: Select all

# cat /mtd_rwcommon/rcSGO_out 
+ [ ! -e /dtv/SGO.env ]
+ S_SCRIPT=echo Skip >> /dev/kmsg
+ eval echo Skip >> /dev/kmsg
+ echo Skip
PVR on server 10.10.10.10 is now ready in localpath /dtv/usb/sdc
Thu Jan 1 00:01:04 UTC 1970
i have put some echo `date` lines into the .init scripts to check the timings..
can anyone help me with this?

Re: invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Posted: Thu Jan 09, 2014 11:38 pm
by beatfreak
some info or hint would still be appreciated :)

Re: invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Posted: Mon Jan 27, 2014 3:01 pm
by Mkò
Maybe you can try to modify the rc.local to execute script from tv-flash such as has been done with custom fw on c6000 c630.
Read here viewtopic.php?f=10&t=2255
you can modify rc.local to execute scripts from /mtd_rwcommon.
But for patch the firmware you need to dump partitions recalculate hash check hash and then put it on tv with bml.restore.
this procedure is dangerous and can brick your tv.
I dont know if is possible to modify rc.local without custom fw.
it wold be great if we can develop a widget that install samygo extension on tv flash and starts it from tv flash on c series