I'd like to ask you (especially developers) if we could change some things in our way of patching the firmware. Until now, we edit /mtd_exe/rc.local script using patching script to add /mtd_rwarea/SamyGO.sh& line before exeDSP is called. This is working well, of course. But...
But there must be SamyGO.sh script placed in /mtd_rwarea directory, where many important files are stored.
My proposal is to create one (root) direcotry for all SamyGO scripts, including starting one. For example, it could be /mtd_rwarea/SamyGO. Then inside this directory we could put all our scripts, make subdirs etc.
Then it would be easier to make backups of our patched environment. You would copy /mtd_rwarea/SamyGO directory with its contents only. Nothing more.
To achieve this, new /mtd_exe/rc.local script should be written. I have prepared such script:
Code: Select all
#!/bin/sh
export MAPLE_DEFAULT_PATH=/mtd_cmmlib/InfoLink/lib
export MAPLE_MANAGER_WIDGET_PATH=/mtd_down/widgets/manager
export MAPLE_NORMAL_WIDGET_PATH=/mtd_down/widgets/normal
export MAPLE_WIDGET_DATA_PATH=/mtd_down
export MAPLE_WIDGET_INCLUDE_PATH=/mtd_down/widgets/inc
export MAPLE_PLUGIN_DATA_PATH=/mtd_cmmlib/InfoLink/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mtd_cmmlib/YWidget_LIB
export KF_SLEEP_READ=-2
echo 30000 > /mtd_rwarea/DelayValue.txt
#touch /mtd_rwarea/DoPrintYahoo.txt
export KF_NO_INTERACTIVE=1
export KF_LOG=/dev/null
# set SamyGO root directory export
export SamyGOpath="/mtd_rwarea/SamyGO"
# run autorun script in the background (if exists)
if [ -f "$SamyGOpath/autorun.sh" ]; then
$SamyGOpath/autorun.sh&
else
# no autorun script? run telnet
mount -t devpts devpts /dev/pts
telnetd
fi
# run exeDSP.sh script if exists
if [ -f "$SamyGOpath/exeDSP.sh" ]; then
$SamyGOpath/exeDSP.sh
fi
# and run original exeDSP
cd /mtd_exe
./exeDSP
As you can see, I created an export variable called $SamyGOpath pointing to the root directory of SamyGO files, which could be used in the scripts called later. There is also one more thing: starting script will be located in /mtd_rwarea/SamyGO/autorun.sh. Finally, there is a way to run exeDSP by script (/mtd_rwarea/SamyGO/exeDSP.sh) giving even more possibilites. This rc.local script should work also without any user-scripts: in such case it runs telnet, then exeDSP.
What do you think? Is it too late for such (drastic) modification? Are we ready for changing /mtd_rwarea/SamyGO.sh to $SamyGOpath/autorun.sh ?