Unoffical empeg BBS

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

Page 2 of 3 < 1 2 3 >
Topic Options
#106435 - 25/07/2002 02:07 Re: /programs and preinit - the easy way. [Re: wfaulk]
mandiola
enthusiast

Registered: 26/12/2001
Posts: 386
Loc: Miami, FL - Sioux Falls, SD
Cool. I used the -s- switch in N20Mount right at the end to load the player... now all the programs seem to play nice. I am testing it more now... im sure something will come up.. hehe

[edit]: Now the only problems seem to be that the programs unbind themselves from hijack after they are run and another program is run after them.. hrmmm....

Thanks,
Greg


Edited by mandiola (25/07/2002 02:13)

Top
#106436 - 25/07/2002 10:45 Re: /programs and preinit - the easy way. [Re: tms13]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
It actually runs /sbin/init as its last function.

I don't know that that default init only starts the player. In fact, I'm pretty sure that it also mounts filesystems. It might do other things, as well. I don't want to bypass it by default. That doesn't make it any more difficult to create a script that does, though. Maybe I should just point that out in some docs somewhere.
_________________________
Bitt Faulk

Top
#106437 - 25/07/2002 11:49 Re: /programs and preinit - the easy way. [Re: wfaulk]
tonyc
carpal tunnel

Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
I always thought Frank van Gestel's modified init was pretty cool. It's the one I use. It calls a shell script (/sbin/userinit I believe) to do init type stuff. You manually call the player when you want to in that script rather than being at the mercy of how init handles it. It lets you get pretty fancy with how you set things up, and if it can't find /sbin/userinit, it just calls the stock init, or if something fails, it drops to a shell so you can fix things.

Too bad it's not on the Empeg distribution. That'd be nice.
_________________________
- Tony C
my empeg stuff

Top
#106438 - 26/07/2002 15:54 Re: /programs and preinit - the easy way. [Re: genixia]
Mitsu7374
new poster

Registered: 21/07/2002
Posts: 9
Loc: Oak Harbor, WA
I am having trouble with this program. I have it loaded and running on the serial port. At home it runs fine from the Hijack menu but in my car it gets all funky. It switches from Aux to Player back and forth making it impossible to play. I tried switching to Aux mode then playing from hijack menu but same results. Any ideas?

Top
#106439 - 26/07/2002 16:24 Re: /programs and preinit - the easy way. [Re: Mitsu7374]
AndrewT
old hand

Registered: 16/02/2002
Posts: 867
Loc: Oxford, UK
I configured empeg-preinit v3 etc. manually and also had this problem in-car so it's probably not a problem with genixia's shell script as such. FWIW, at the time I would have been running 2.0b11, pre-init v3 & Hijack 276.

It only occured during one 'sitting'. Pulling the player from the sled didn't make any difference and (AFAICR) I had to select Player as the music source to get rid of it.

That was earlier this week and was the first (and last) time it happened.

Top
#106440 - 26/07/2002 16:51 Re: /programs and preinit - the easy way. [Re: AndrewT]
Mitsu7374
new poster

Registered: 21/07/2002
Posts: 9
Loc: Oak Harbor, WA
I pulled mine from the car. Deleted empacan. Put it back on player and it is working fine now. Must have been an freaky thing. Oh well, all is good now.

Top
#106441 - 26/07/2002 17:32 Re: /programs and preinit - the easy way. [Re: genixia]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Okay. I'll give it a go tommorow when I've got some spare time

- Trevor

Top
#106442 - 27/07/2002 03:02 Re: /programs and preinit - the easy way. [Re: Mitsu7374]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
I got exactly the same thing with my GPS code, it runs fine when plugged in at home but when it's in the car, it just goes apesh*t and the only way to stop it is by pulling the player out of the dash and popping it back in. I've so far not been able to fix this problem.
_________________________
Cheers,

Andy M

Top
#106443 - 28/07/2002 15:42 Re: /programs and preinit - the easy way. [Re: wfaulk]
FlibblE
journeyman

Registered: 16/02/2000
Posts: 94
Loc: UK - NE Wales
I've been trying out running the player from a preinit script but I can't seem to get it working! The script I made basically calls /empeg/bin/player -s-

The error I get looks like this (on the serial port):

! empeg_id.cpp : 49:Unable to open /proc/empeg_id
player.cpp : 385:empeg-car 2.00-beta13 2002/07/24.
! player.cpp : 291:MainThread::Init failed!
bin dev drive0 drive1 empeg etc lib lost+found mnt proc sbin swapfile tmp usr va
r

dunno if that last line is relavent! but it seems to me that /proc isn't mounted yet. Does this get mounted by the stock init? If so, what's everyone doing to get round this?

Another thing that I can't get my head round is if it doesn't return, doesn't pre-init time out, quit and carry on anyway, running the stock init?

Cheers.

Top
#106444 - 28/07/2002 19:20 Re: /programs and preinit - the easy way. [Re: FlibblE]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
    Another thing that I can't get my head round is if it doesn't return, doesn't pre-init time out, quit and carry on anyway, running the stock init?
Ummm. Yeah. I forgot I put that in there. In v5, I plan to put in the facility for there to be a single `B' script that will prevent that from happening.

And I imagine that the stock init mounts pretty much everything except the root filesystem (already mounted) and the /drive0 and /drive1 filesystems (as it remounts them during syncs, so I figure it just retains control over them altogether). Just place a ``mount /proc'' in your script somewhere before it blocks. Of course, you'll need to wait for v5 before it'll be useful, huh?
_________________________
Bitt Faulk

Top
#106445 - 29/07/2002 01:39 Re: /programs and preinit - the easy way. [Re: wfaulk]
FlibblE
journeyman

Registered: 16/02/2000
Posts: 94
Loc: UK - NE Wales
Ah, that's ok then! Roll on v5!

Does the stock init just mount /proc before running the player? or is there more to it than that? Just a thought: perhaps there could be a sample 'B' script that includes stuff that the stock init does - if it's more than just mounting /proc!

I'll give it a try later, mounting /proc first and see if it complains any more. Just gotta knock together a power supply - i'll see what I can rob around work!

Cheers.

Top
#106446 - 29/07/2002 01:57 Re: /programs and preinit - the easy way. [Re: FlibblE]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I don't honestly know. I'm just making assumptions.
_________________________
Bitt Faulk

Top
#106447 - 29/07/2002 02:38 Re: /programs and preinit - the easy way. [Re: genixia]
anti
member

Registered: 10/07/2000
Posts: 117
Loc: BaWue, Germany, Europe
I have sshd running for quite a while now (~01/2001),
but the disk with the toolchain on it died.

Since the crosscompile was super simple (just follow the manual) I never bothered with writing a howto.

One drawback:
If you log in via pub/priv-key while playing a tune, it can take a while to have that key calculated
_________________________
-------------------- MKII 08000073 40GB BLUE

Top
#106448 - 29/07/2002 07:41 Re: /programs and preinit - the easy way. [Re: anti]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Since the crosscompile was super simple (just follow the manual) I never bothered with writing a howto.

Hmm, Looks like I missed that manual somehow. zlib and openssl have compiled easily, but openssh is being a PITA.
/me goes off a hunting.

Did you compile statically? Do you still have the binaries? That is all we really need
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#106449 - 29/07/2002 13:19 Re: /programs and preinit - the easy way. [Re: genixia]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Maybe he compiled up the non-open ssh.... It is more monolithic, at least....
_________________________
Bitt Faulk

Top
#106450 - 29/07/2002 17:20 Re: /programs and preinit - the easy way. [Re: wfaulk]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
I've got OpenSSH 3.4p1 working on the empeg but the install instructions are a little long so I need to write a nice simple install script for it. I'll do it tommorow because I'm really sleepy at the moment.

Oh yeah. Key generation on the empeg takes AGES...

- Trevor


Edited by tman (29/07/2002 17:21)

Top
#106451 - 30/07/2002 02:21 Re: /programs and preinit - the easy way. [Re: genixia]
anti
member

Registered: 10/07/2000
Posts: 117
Loc: BaWue, Germany, Europe
hmmm ... looks my self compiled ssh is gone,
but:
# dpkg -l|grep ssh
ii ssh 3.4p1-1 Secure rlogin/rsh/rcp replacement (OpenSSH)

I guess installing debian might solve your problem ... as usual.

I'll skim through my old backups anyway, maybe I find the static binary somewhere.
_________________________
-------------------- MKII 08000073 40GB BLUE

Top
#106452 - 30/07/2002 05:09 Re: /programs and preinit - the easy way. [Re: FlibblE]
FlibblE
journeyman

Registered: 16/02/2000
Posts: 94
Loc: UK - NE Wales
Mounting /proc and /drive0 seems ok but I still get this error after the player starts:

! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 3471
990, error=0xc0044000

When pre-init times out and runs the stock init, I don't get that error.

Oh well, anyone know where I can get the modified init by Frank van Gestel's mentioned earlier on?

Edit: Found it: http://empeg.comms.net/php/showthreaded.php?Cat=&Board=empeg_tech&Number=20407&Search=true&Forum=All_Forums&Words=modified%20init%20%2Fsbin%2Fuserinit&Match=And&Searchpage=0&Limit=25&Old=allposts&Main=18016


Edited by FlibblE (30/07/2002 05:24)

Top
#106453 - 30/07/2002 08:15 Re: /programs and preinit - the easy way. [Re: FlibblE]
frog51
pooh-bah

Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
>>! mp3_decoder.cpp :1049:Failed to find valid sync after seeking to offset 3471
990, error=0xc0044000

I can't remember which thread it was discussed in, but isn't that error merely caused by the player starting mid song?? And as such, pretty much a non-error.
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock

Top
#106454 - 30/07/2002 11:57 Re: /programs and preinit - the easy way. [Re: frog51]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Yeah. It definitely happens occasionally to very often, with or without any additional software. IIRC, it has something to do with the player not quite jumping to the right spot in VBR files, but I could easily not be RC.

Sigh. I guess I'll spend the ten minutes and hack up a blocking version. Gimme a few.
_________________________
Bitt Faulk

Top
#106455 - 30/07/2002 12:35 empeg-preinit.v5-beta [Re: wfaulk]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Okay, for those of you that want to block the normal init sequence, I've put out an empeg-preinit.v5-beta. It's just the binary. It's not been tested. But you should be able to create scripts that start with a `B' and expect them to be run in order after the `N' scripts, but the timeout has been defeated while they run. The idea is to just have one `B' script, but you can have multiple ones if you want, for some reason.

Make absolutely sure that your `B' script works properly. Otherwise you'll have to reflash the whole system to get it back to a working state. I'd suggest not putting it in a loop to begin with, so that if it fails it can exit and go back to the normal init.

Lemme know how it turns out.
_________________________
Bitt Faulk

Top
#106456 - 30/07/2002 18:31 Re: /programs and preinit - the easy way. [Re: tman]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Still messing about trying to get this to run with reasonable speed. It's excruciatingly slow at the moment...

- Trevor

Top
#106457 - 30/07/2002 20:48 Re: empeg-preinit.v5-beta [Re: wfaulk]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411

Make absolutely sure that your `B' script works properly. Otherwise you'll have to reflash the whole system to get it back to a working state.


Couldn't you nuke a bad B script via ftp?
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#106458 - 30/07/2002 22:38 Re: empeg-preinit.v5-beta [Re: genixia]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
IIRC, Hijack's FTP server is not running at that point in the startup process.
_________________________
Bitt Faulk

Top
#106459 - 30/07/2002 22:57 Re: empeg-preinit.v5-beta [Re: wfaulk]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
Hmm, Hadn't thought about that - you might be right though. It's a good idea to install telnetd to /bin then
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#106460 - 30/07/2002 23:18 Re: empeg-preinit.v5-beta [Re: genixia]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Now that's a good idea.
_________________________
Bitt Faulk

Top
#106461 - 31/07/2002 04:15 Re: empeg-preinit.v5-beta [Re: wfaulk]
tms13
old hand

Registered: 30/07/2001
Posts: 1115
Loc: Lochcarron and Edinburgh
In reply to:

Make absolutely sure that your `B' script works properly. Otherwise you'll have to reflash the whole system to get it back to a working state.


Is kftpd not active by then? I thought it was possible to (re)move your B scripts by FTP, then reboot.
_________________________
Toby Speight
030103016 (80GB Mk2a, blue)
030102806 (0GB Mk2a, blue)

Top
#106462 - 31/07/2002 14:21 Re: empeg-preinit.v5-beta [Re: tms13]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
See above.
_________________________
Bitt Faulk

Top
#106463 - 05/08/2002 22:57 Re: /programs and preinit - the easy way. [Re: genixia]
durden
journeyman

Registered: 18/07/2002
Posts: 75
Loc: Texas
Thanks for the script and the instructions, worked great for getting me set up with telnetd and getting empacman bound to the hijack menu. One question though.... And I think this was mentioned somewhere (maybe in another thread) dealing with empacman and emptriv I think..

I had empacman working great, it would bind everytime I started up and be in the hijack menu and work fine. I decided to add empsoko, but found out that it would not bind automatically (just by putting it in the /programs0 directory, I figured that out, you just dont have an empsoko entry in the preinit.d directory ).. Well I *thought* I had it figured out, I would just need to add it as something like M70empsoko and put the necessery lines in the file..

Sure enough, after I made that file and rebooted, they were both in the Hijack menu. I started up empsoko, and it worked great. But unfortunately, now the empacman menu entry *also* loads empsoko.. So.. where do I go from here?

_________________________
- durden -

Top
#106464 - 06/08/2002 08:48 Re: /programs and preinit - the easy way. [Re: durden]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
There is a bug in Hijack which for some reason prevents you from having two user apps. I'll have a look at the kernel code later on but I can't guarantee anything because I'm quite busy. So if anybody else wants to fix it in the mean time...

- Trevor

Top
Page 2 of 3 < 1 2 3 >