ts-7000
[Top] [All Lists]

[ts-7000] Re: can i start my appliction without logging in?

To:
Subject: [ts-7000] Re: can i start my appliction without logging in?
From: "PeterElliot" <>
Date: Tue, 09 Dec 2008 13:07:54 -0000
--- In  "anadigpune" <> wrote:
>
> Hello,
> can you brief me on what modifications will be needed in the boot up 
> file to start the application directly?
> or if you can tell me how to start my application file directly in 
> Linux without user interaction, it will be of great help.
> 
> Regards.
> 

Hi,

I simply added the commands needed to start my application after the 
'exec /bin/sh -i < $CONSOLE > $CONSOLE 2>&1' line in the linuxrc-
fastboot file, which was linked to the linuxrc startup script as 
described in the documentation that came with the board.

In my case the lines I added were:

  cd /mnt/root  # Set initial directory
  ./pje/R2 &    # Invoke program & still allows console access

I had previously set up the ip address for the ethernet.

Here's a complete copy of my linuxrc-fastboot file:

#!/bin/sh
# Copyright (c) 2007, Technologic Systems.
# All rights reserved.
#
# Uses initrd as root filesystem and drops to shell-- on exit of 
serial shell,
# real Linux is booted.  Ethernet is configured as 192.168.0.50 and 
telnet
# server is run.  If a USB device is present, it is checked for the 
presence
# of an auto-update script "/tsinit", which is then run.

export 
PATH=/bin:/sbin:/lbin:/mnt/root/bin:/mnt/root/sbin:/mnt/root/usr/bin:/
mnt/root/usr/sbin:/mnt/root/usr/local/bin:/mnt/root/usr/local/sbin
export LD_LIBRARY_PATH=/lib:/usr/lib
export CONSOLE=/dev/ttyAM0
export DISPLAY=:0.0

ts7390-init >/dev/null 2>&1 </dev/null &
setconsole $CONSOLE
stty -F $CONSOLE ospeed 115200 > /dev/null 2>&1
check-usb-update >/dev/null 2>&1 </dev/null &

export BOOTTIME=`eptime`

(
  peekpoke 16 0x600ff0d6 0x3

  insmod /ts7000_nand.ko
  insmod /tssdcard.ko
  insmod /tsuart1.ko
  insmod /tsuart7350.ko
 
  mount -t proc none /proc
  mount -t sysfs none /sys
  mount -t tmpfs none /dev
  mkdir /dev/pts /dev/shm
  mount -t devpts none /dev/pts
  mount -t tmpfs none /dev/shm

  mdev -s

#  if [ -e /dev/tssdcarda4 -a -e /mnt/root/notrootfs ]; then
#    mount -o ro /dev/tssdcarda4 /mnt/root
#    fsck /dev/tssdcarda4
#  fi
  if [ -e /dev/mtdblock3 -a -e /mnt/root/notrootfs ]; then
    mount -t yaffs2 -o rw /dev/mtdblock3 /mnt/root
  fi

  hostname ts7000
  ifconfig lo 127.0.0.1 up
  route add -net 127.0.0.0 netmask 255.0.0.0 lo
  ifconfig eth0 10.10.50.195 up
  #route add default gateway 10.10.50.1 eth0
  /sbin/telnetd

) > /dev/null 2>&1 &

(
  export ENV=/shinit
  exec /bin/sh -i < $CONSOLE > $CONSOLE 2>&1

  # START APPLICATION HERE
  cd /mnt/root
  ./pje/R2 &
        
)

if [ -e /mnt/root/sbin/init ]; then
  killall busybox telnetd Xorg > /dev/null 2>&1
 
  grep -e '/dev/mtdblock3 /mnt/root' /proc/mounts > /dev/null 2>&1
  if [ "$?" -eq 0 ]; then echo ">> Booting Linux (using onboard 
Flash)..." > $CONSOLE; fi
  grep -e '/dev/tssdcarda4 /mnt/root' /proc/mounts > /dev/null 2>&1
  if [ "$?" -eq 0 ]; then echo ">> Booting Linux (using SD Card)..." > 
$CONSOLE; fi

  fsck /dev/tssdcarda4 > /dev/null 2>&1
  cd /mnt/root
  pivot_root . ./initrd
  ./bin/mount -n --move ./initrd/sys ./sys
  ./bin/mount -n --move ./initrd/proc ./proc
  exec ./usr/sbin/chroot . ./sbin/init < .$CONSOLE > .$CONSOLE 2>&1
fi







------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU