Hi, First the good news - you don't need to modify the kernel ;-) The easiest way of automating a program startup is to add the required command into /etc/rc.d/rc.local. This should be executed after all the runlevel scripts have been processed but before the login. However on the MV LSP they seem to have broken it in that 'rc.local' runs after rc.S has happened but before the rc3.d (active runlevel) happens. (This article walks through the basics of runlevels http://www.linux.com/articles/114107) - and gets this point about rc.local executing after the init scripts wrong (gets raised by a reader comment). The upshot of this is that your program should not block - otherwise the sytem will not complete its start up. The program should really 'daemonize' into the background (such as other services do). This means it has no controlling terminal so if the program requires user input then this method is not going to work. There was a method of doing an 'auto login' posted yesterday - here the requirement was to automatically run 'startx' to bring up the GUI (replacing 'startx' with the command you need should do the trick)..... -----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] On Behalf Of Maupin, Chase Sent: 23 June 2008 14:09 To: Preetham Soundararajan; [email protected] Subject: RE: Autologin into Davinci Preetham, I did the following and it worked for me (although maybe someone else can give you a better/alternative solution). This solution is based on the howto at http://ubuntuforums.org/showthread.php?t=152274 <http://ubuntuforums.org/showthread.php?t=152274> 1. Create a file autologin.c and add the following line of code to it: int main() { execlp( "login", "login", "-f", "root", 0); } 2. Compile the autologin.c file. This can be done either on the host system with cross-compile or the target system natively. For the target system do: gcc autologin.c -o autologin 3. Copy the autologin executable to /usr/local/sbin 4. Open /etc/inittab on the target file system and change the line "con:2345:respawn:/sbin/getty console" to "con:2345:respawn:/sbin/getty -n -l /usr/local/sbin/autologin console" 5. Change directory on the target file system to /root and create a .bash_profile file with the following line: startx & I hope this helps. Let me know if it does and I'll add this information to the DaVinci Wiki. Sincerely, Chase Maupin Software Applications Catalog DSP Products e-mail: [EMAIL PROTECTED] phone: (281) 274-3285 Regards Phil Q Phil Quiney, Senior Software Engineer Trinity Convergence Cambridge Business Park Cowley Road Cambridge CB4 0WZ, UK T: +44(0)1223-435536 F: +44(0)1223-435560 www.trinityconvergence.com <http://www.trinityconvergence.com/> ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Tarter Sent: 24 June 2008 08:53 To: [email protected] Subject: Init scripts/auto login This is a very newbie question but how do I modify the kernel or add an initialization script etc so that when I turn on the dvevm it automatically logins in and runs a program (i.e. so I don't keep on having to use the serial interface to run the program). I'm sure this is very obvious but I haven't been able to find an answer anywhere. Thanks, Alex ________________________________ This e-mail from Ultra Electronics Limited and any attachments to it are confidential to the intended recipient and may also be privileged. If you have received it in error please notify the sender and delete it from your system. If you are not the intended recipient you must not copy it or use it for any purpose nor disclose or distribute its contents to any other person. All communications may be subject to interception or monitoring for operational and/or security purposes. Please rely on your own virus checking as the sender cannot accept any liability for any damage arising from any bug or virus infection. Ultra Electronics Limited is a company registered in England and Wales, registration number 2830644. The address of its registered office is 417 Bridport Road, Greenford, Middlesex, UB6 8UA.
_______________________________________________ Davinci-linux-open-source mailing list [email protected] http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
