I hope you're right. Please tell us if it worked or not.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...
Autoloader for custom "Game" plug-ins
Re: Autoloader for custom "Game" plug-ins
- 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
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...
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
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!):
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).
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
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
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
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.goaskin wrote:Isn't it also possible... ...on startup.
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.
Re: Autoloader for custom "Game" plug-ins
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.