Page 2 of 13
Re: Autoloader for custom "Game" plug-ins
Posted: Fri Apr 23, 2010 8:50 am
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.
Re: Autoloader for custom "Game" plug-ins
Posted: Sat Apr 24, 2010 4:29 pm
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...
Re: Autoloader for custom "Game" plug-ins
Posted: Sun Apr 25, 2010 8:25 pm
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).
Re: Autoloader for custom "Game" plug-ins
Posted: Sun Apr 25, 2010 10:00 pm
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.
Re: Autoloader for custom "Game" plug-ins
Posted: Mon Apr 26, 2010 8:34 am
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.
Re: Autoloader for custom "Game" plug-ins
Posted: Fri May 07, 2010 12:40 pm
by geo650
Here are updated files for this project: full source code and compiled modified libusb.so. Example plugins - later.