Autoloader for custom "Game" plug-ins

Here are software that related with Samsung B series TVs. Like hex editors, new version of BusyBox or internal software, app programs that will run in your TV hardware.:!:This forum is NOT FOR USER QUESTIONS or Problems.

geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: Autoloader for custom "Game" plug-ins

Post by geo650 »

bmwskead wrote:...i think, if we put this LD_PRELOAD thing at the very first beginning of the samygo script it should executed before the startup procedure reaches the point where exeDSP is started, if so it should (hopefully) work...
I hope you're right. Please tell us if it worked or not.
User avatar
erdem_ua
SamyGO Admin
Posts: 3126
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: Autoloader for custom "Game" plug-ins

Post by erdem_ua »

I think problem is that using ampersand on rc.local, that forks the script at another thread.
If you remove ampersand from rc.local, than exeDSP must wait to SamyGO.sh execution that makes your life easy.
And it's quite safe if you put lines that prevent bootloop if USB is connected...
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: Autoloader for custom "Game" plug-ins

Post by geo650 »

Killing exeDSP is not a good idea. I tried to kill exeDSP and revoke it for testing purposes: it rotates the picture, tries to load already loaded modules etc. There are probably more commands needed than 'kill -...' to re-run exeDSP second time.

However, I think, you must edit your firmware (i.e. /mtd_exe/rc.local script): by removing ampersand sign (&), as erdem_ua wrote before. Then in SamyGO.sh script you could execute any "background" sub-script to keep your SamyGO.sh safe. For example:

example /mtd_rwarea/SamyGO.sh script for that method (not tested!):

Code: Select all

#!/bin/sh
# execute sub-script in the background
/mtd_rwarea/SamyGO2.sh &
# then run "altered" exeDSP (If you want, this can be run from another sub-script, too)
export LD_LIBRARY_PATH="/mtd_rwarea/SamyGO/exe/lib:$LD_LIBRARY_PATH"
cd /mtd_exe
./exeDSP
Don't forget to chmod +x your new script(s).
P.S. Don't put too big sleep command in your script because boot-loop situation may occur due to watchdog (if enabled).
goaskin
Posts: 69
Joined: Sat Nov 28, 2009 9:33 pm

Re: Autoloader for custom "Game" plug-ins

Post by goaskin »

Isn't it also possible to compile game plugins like usual applications and use them so? If so, it would be easier to bundle executables and shell scripts into a game plugin and to probe the GGAME folder beside the USB devices for startscripts too on startup.
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: Autoloader for custom "Game" plug-ins

Post by geo650 »

goaskin wrote:Isn't it also possible... ...on startup.
I'm not sure if I can understand you, but if you compile "game" plug-in as executable (not a library module), you cannot use it because it cannot see exeDSP symbols (functions, variables). That's why I am using libusb "proxy". Maybe there is a way to make it easier, but I don't know how.
If I didn't understand your idea, please give an example to make it clear.
Last edited by geo650 on Tue Apr 27, 2010 10:36 am, edited 1 time in total.
geo650
Official SamyGO Developer
Posts: 303
Joined: Wed Oct 07, 2009 12:03 pm

Re: Autoloader for custom "Game" plug-ins

Post by geo650 »

Here are updated files for this project: full source code and compiled modified libusb.so. Example plugins - later.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “[B] Software”