ts-7000
[Top] [All Lists]

Re: [ts-7000] autostarting an application in initd/busybox

To:
Subject: Re: [ts-7000] autostarting an application in initd/busybox
From: Mark Featherston <>
Date: Wed, 22 Feb 2012 08:28:54 -0700


Roko,

The SD card or XNAND are mounted in parallel to the /bin/sh process where shinit is called.  This shell script is run before the /mnt/root/ directory is mounted with the Debian partition.  The error 'not fount' in this case is referring to the glibc library in Debian under /mnt/root/.  There are 4 options for dealing with this.

1) Move your application startup below the nbd-client startups to wait for Debian to be mounted:
  /yourapphere < $CONSOLE > $CONSOLE 2>&1
  # Software auto-update  
  if [ -x /mnt/root/tsinit ]; then
    /mnt/root/tsinit $XCONSOLE < $CONSOLE > $CONSOLE 2>&1
  fi
  
) </dev/null >/dev/null 2>&1 &
2) You can compile your application with the uclibc toolchain.  This is what we do with our own ctl applications in the initrd:
ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/cross-toolchains/crosstool-linux-arm-uclibc-3.4.6.tar.gz

3) You can compile your application statically to remove the dependency on the external glibc library.

4) As you suggest you can wait in a loop until the Debian partition becomes available.  Keep testing for the existence of the /mnt/root/notrootfs file, and as soon as it is gone the Debian partition has mounted.
Best Regards, 
________________________________________________________________
 Mark Featherston, Technologic Systems | voice: (480) 837-5200
 16525 East Laser Drive                | fax: (480) 837-5300
 Fountain Hills, AZ 85268              | web: www.embeddedARM.com 

On 02/21/2012 10:41 AM, roko2ko wrote:
 

Hello!
I'm using TS 7553 and want to autostart my application in initd/busybox environment. I boot from mSD.

At the end of './shinit' script I've put the following code:
sleep 10
/root/myApp

If I use a shorter sleep period, most of the time I get "sh: /root/myApp not found" error - probably because partition isn't fully loaded into the RAM?? If it's important, I have extended my initd partition from default 2 MB to 4 MB - but this problem occurred in a similar fashion when partition was only 2 MB.

Anyway, the problem is that sometimes everything is ready after 5 s of sleep, and sometimes not. Is there a way to make this init process shorter? Or at least a way to contionously try to execute application in a loop until it succeeds?

Thank you,
Roko



__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<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