invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Support for C series TVs that all user could ask. Please do not ask a questions at other forums.
Post Reply

User avatar
beatfreak
SamyGO Project Donor
Posts: 598
Joined: Tue Aug 23, 2011 9:03 am
Location: Hamburg
Contact:

invoking rcSGO earlier / SamyGO Extensions from TV-Flash

Post 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?
//UE40C6500 @ T-VALDEUC 3011 // rooted manual HotelMode style // PVR to NFS via 18MB on-the-fly sparse XFS // >> decommissioned due to tuner death
//UE46F8090 @ T-FXPDEUC 1136 // rooted by new Widget // root starting with empty usb drive
FYI: you can close your ssh session with SamyGO with

Code: Select all

~.
If you can't fix it using dvct tape, you are not using enough dvct tape.
User avatar
beatfreak
SamyGO Project Donor
Posts: 598
Joined: Tue Aug 23, 2011 9:03 am
Location: Hamburg
Contact:

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

Post 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?
//UE40C6500 @ T-VALDEUC 3011 // rooted manual HotelMode style // PVR to NFS via 18MB on-the-fly sparse XFS // >> decommissioned due to tuner death
//UE46F8090 @ T-FXPDEUC 1136 // rooted by new Widget // root starting with empty usb drive
FYI: you can close your ssh session with SamyGO with

Code: Select all

~.
If you can't fix it using dvct tape, you are not using enough dvct tape.
User avatar
beatfreak
SamyGO Project Donor
Posts: 598
Joined: Tue Aug 23, 2011 9:03 am
Location: Hamburg
Contact:

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

Post by beatfreak »

some info or hint would still be appreciated :)
//UE40C6500 @ T-VALDEUC 3011 // rooted manual HotelMode style // PVR to NFS via 18MB on-the-fly sparse XFS // >> decommissioned due to tuner death
//UE46F8090 @ T-FXPDEUC 1136 // rooted by new Widget // root starting with empty usb drive
FYI: you can close your ssh session with SamyGO with

Code: Select all

~.
If you can't fix it using dvct tape, you are not using enough dvct tape.
Mkò
Posts: 199
Joined: Fri Jul 29, 2011 2:34 pm

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

Post 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

Post Reply

Return to “[C] Support”