Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#329661 - 02/02/2010 11:07 Struggling to start userland app
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
Hi all,

I've compiled a userland app from some code which was posted on here. I'm trying to get it to start up.
it's supposed to hook into the hijack menu but I'm stuck on how exactly to do that.

I've got hijack 488 running at present.

I've installed the preinit.d from Bitt's website using his dos FTP script. I've followed the README file and have marked my script, the app and the hijack file in /bin all as 755.
Looking at the serial port on boot I see no mention of hijack trying to start he preinit or the preinit trying to start the apps.

Am I doing something fundamentally stupid?
I assume that if the app didn't compile correctly I would still have seen something mentioning it in the debug?

I'm running 2.00-beta11

Top
#329662 - 02/02/2010 11:58 Re: Struggling to start userland app [Re: thenominous]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
OK, reading a little more I hear about @EXEC. I'm still trying to find a post which explains it all. I see it's not in the riocar FAQ ?

Reading further about "literal site exec" so I gave that a go and I got the error similar to this post:

http://empegbbs.com/ubbthreads.php/topics/275901

But I've double checked the path to the app is correct. It's in /programs0/empeg-wideband which is what I'm trying to call.

I've put the app up here: http://www.nominous.com/empeg-wideband if someone could please verify that it's working ok ?

It's the complied version of the Innovate wideband reader/display source which was posted quite a while ago.

Top
#329663 - 02/02/2010 12:36 Re: Struggling to start userland app [Re: thenominous]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: thenominous
I've put the app up here: http://www.nominous.com/empeg-wideband if someone could please verify that it's working ok ?

It's the complied version of the Innovate wideband reader/display source which was posted quite a while ago.

I think you've used the wrong compiler. That file appears to be EABI (ABIv5) (judging from arm-linux-readelf -e), whereas the car-player is "old ABI".

You're getting a "exec failed" sort of error because it requires the EABI dynamic loader (/lib/ld-linux.so.3), which isn't present; an old-ABI program uses the old-ABI dynamic loader (/lib/ld-linux.so.2).

Where did you get your ARM compiler? Mark Lord's page has binaries of a suitable cross-compiler from x86 Linux (search for "armtools-empeg").

Peter

Top
#329666 - 02/02/2010 12:48 Re: Struggling to start userland app [Re: peter]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
A guy at work who does all the ARM programming and said to give it a go after compling it in that environment.

I'll grab your post and forward it to him.
However we run under windows. Is there a complier for that?
Thanks Peter!!

On the @EXEC front I found these posts:
http://empegbbs.com/ubbthreads.php/topics/161314
http://empegbbs.com/ubbthreads.php/topics/142509
Which go a long way to helping out a n00b with getting apps executing! (if not failing)
So once it's built correctly I'll at least be able to run it !


Edited by thenominous (02/02/2010 12:49)

Top
#329669 - 02/02/2010 13:02 Re: Struggling to start userland app [Re: thenominous]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: thenominous
A guy at work who does all the ARM programming and said to give it a go after compling it in that environment.

I'll grab your post and forward it to him.
However we run under windows. Is there a complier for that?

In theory GCC can be built to compile for any supported target, on any supported host. In practice, it doesn't always work, especially in old versions or with non-mainstream platforms. Unfortunately for you, 2.95.3 is an old version, and (in GCC land at least) ARM and Windows are non-mainstream platforms.

Apparently this chap once got it working under Cygwin with some tweaking, but his link no longer works. By far your best plan would be to make friends with a nearby Linux user.

Peter

Top
#329672 - 02/02/2010 13:13 Re: Struggling to start userland app [Re: peter]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
We have a build server running under linux and a backup. I'll see if I can persuade him to give it a try on that.
Possibly achieved by trying to do it myself smile

I've emailed Mark to see if he still has the file available.

If anyone is feeling extra friendly, here is the source for the app:

http://empegbbs.com/ubbthreads.php/ubb/download/Number/5758/filename/empeg_wb.tar.gz


Edited by thenominous (02/02/2010 13:15)

Top
#329674 - 02/02/2010 13:48 Re: Struggling to start userland app [Re: thenominous]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
Mark replied. He no longer has the file unfortunately.

My friend said it shouldn't be a problem (famous last words!). He's now devoting resources to building a new windows environment. Bless !

Top
#329678 - 02/02/2010 15:01 Re: Struggling to start userland app [Re: thenominous]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
Ha ! We admit defeat.
Going to go the linux route. Having trouble with some libs which seem hard coded to linux paths.
Fairly understandable.

Top
#329742 - 03/02/2010 10:50 Re: Struggling to start userland app [Re: thenominous]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
Got it !!
Installed ubuntu in a VM last night and manged to build the source into a working app.

It runs from a telnet session and binds to hijack but seems to take over the whole player. I can't do HTTP to the empeg for example.
If emtris is bound to hijack it also seems to run that instead of itself! Remove emptrisand it's ok again. Wierd.

if I use EXEC or EXEC_ONCE it hangs the whole player at the custom boot logo screen hence running it via telent for now.

So I've got a job to do but at least I can compile stuff now and I've learnt quite a bit about the player in the process. Good job all in smile

Thanks for the pointers Peter, wouldn't have got anywhere without you.

Top
#329743 - 03/02/2010 11:08 Re: Struggling to start userland app [Re: thenominous]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
It needs to fork, and then return from the main process.

Top
#329744 - 03/02/2010 11:58 Re: Struggling to start userland app [Re: mlord]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
If I run it from a telnet prompt it will add t the hijack menu and I can run it.

If I run it from the config.ini then it doesn't appear in hijack and I see no mention of it in the serial output.
My config.ini shows:

;@EXEC=/usr/local/bin/empeg-wideband

or have tried:
;@EXEC_ONCE=/usr/local/bin/empeg-wideband

The paths are correct and it's 755 for permissions on the file.
But telnet in again and I can run it !!

Top
#329747 - 03/02/2010 12:10 Re: Struggling to start userland app [Re: thenominous]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
Ditch the equal (=) signs ?

Top
#329748 - 03/02/2010 12:26 Re: Struggling to start userland app [Re: mlord]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
Ah...

That will be the difference between reading this post:

http://empegbbs.com/ubbthreads.php/topics/137069/Hijack_v303_exec_exec_once#Post137069

and this post:

http://empegbbs.com/ubbthreads.php/topics/208112/Re_Has_hijack_EXEC_changed_Can#Post208112

Doh!

Yep, that's running now from conifg.ini but the app locks the player up.
I had PM'd Jag and he's added more code to the orignal thread so I'll pop back and take a further look!


As ever, using the search tool is useful to find info but it's finding the _right_ info which helps. smile
Thanks Mark.

Top
#329753 - 03/02/2010 14:53 Re: Struggling to start userland app [Re: thenominous]
thenominous
member

Registered: 22/12/2001
Posts: 189
Loc: UK
I see what you were saying now about forking Mark, thanks to a prod from Jag.
Works fine now smile

Top
#329754 - 03/02/2010 15:11 Re: Struggling to start userland app [Re: thenominous]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14496
Loc: Canada
You're doing well with the search.

I only rarely am able to find anything with it. Google works better for me. That's probably because I'm somewhat abnormal, or have never learned to use "search" dialogs properly. smile

Cheers

Top