Unoffical empeg BBS

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

Page 2 of 2 < 1 2
Topic Options
#55418 - 06/01/2002 12:40 Re: Display Server [Re: AlphaWolf]
beaker
addict

Registered: 19/08/2000
Posts: 588
Loc: England
If you use version 1 of DS it starts automatically when the player boots up. DS2 doesn't do this and is a retrograde step IMHO.
_________________________
Marcus 32 gig MKII (various colours) & 30gig MKIIa

Top
#55419 - 06/01/2002 13:14 Re: Display Server [Re: mlord]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Yes, I see mention of a replacement kernel for DS, but there doesn't appear to be one on that site for 2.0.

IIRC the irtrans patch on his site includes support for DS2/2.0b3 as well as the IR remapping stuff. The relevant parts appear to be within the #if USE_IRSEND blocks.

So.. has anyone already run DS on top of Hijack?
Did you patch the kernel to make it run, or is that entirely unnecessary?


Yeah, I used to. It patched in cleanly until you added your IR remapping stuff. All Franks patch did was provide a way to pass IR codes sent from his java applet into the kernel. DS runs fine without the kernel patch, but you lose the ability to control the empeg from the applet (which was pretty cool).

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#55420 - 06/01/2002 14:42 Re: Display Server [Re: mcomb]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Ok...so who has experience with program loading in Linux. It's been 4 years since I've done it and can't quite remember everything anymore.

Programs, etc, get loaded from /sbin/init correct? Init is ovbiously a binary file. Is there a shell script that gets run before the init script? Or maybe after the init script?

After looking though some stuff on the empeg.dyndns.org/empeg web site, it appears there is a suggestion to move /sbin/init to /sbin/init.empeg. Then create a new init shell script file which loads, in my case, programs, then have the script execute /sbin/init.empeg The only problem with this is that it doesn't work. When you try this, and reboot, it'll get to the point where in the initscript is supposed to run and it sits there at an init prompt. If you type in /sbin/init, it'll say teh file doesn't exist. If you type init.empeg it'll load normally.

So is there anywhere else that I can run a personal init script file to load prsonal programs, like Dispaly Server 2.0?

_________________________
~Max

Top
#55421 - 06/01/2002 14:58 Re: Display Server [Re: AlphaWolf]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Did you remember to chmod +x your new /sbin/init? It soulds like thats the problem.

If you want to add somethign to the startup, going the route of boot->your init->init.empeg tends to work best. But if you want to add stuff to have run after the player (like a menu if you quit the player), then things get a bit trickier, and you need to ensure you do all the steps the init.empeg does. Check the init that comes with Displayserver, or Smu's Stupid FTP for ideas here.

Top
#55422 - 06/01/2002 15:25 Re: Display Server [Re: AlphaWolf]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
Did you remember to start whatever you are starting from custom init script in background, e.g.:

/drive0/mybin/myprog &
exec /sbin/init.empeg

The first line starts your program without waiting for it to return (it should not use stdin, stdout nor stderr). Second one starts stock init, but instead starting it 'on top' of shell (by fork() - exec()) it overwrites shell process, as we won't need it any more. I chose a location within music partition for example program since it doesn't get overwritten during updrade. I don't remember, but it might be necessary to mount it first.

Search a bit around, there are numerous examples on the board.

Hey, it chomped (actually, failed to wrap) most of my message. I will try removing pre tags... Yes, better! Another bug in the board SW....


Edited by bonzi (06/01/2002 15:28)
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#55423 - 08/01/2002 16:23 Re: Display Server [Re: bonzi]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Ok, I must be doing something wrong, because nothing is working.

Here's the steps I took. I have display server installed on drive0.

I mounted the drive RW. Then I moved init -> init.empeg
I created the following init file:
----------------------------
#!/bin/bash
mount -n -o remount,ro /
mount -n -o nocheck,rw /proc
mount -n -o nocheck,ro /dev/hda4 /drive0
echo "Starting Display Server"
/drive0/opt/ds2b2/ds2 &
echo "Starting Empeg Player"
exec /sbin/init.empeg
-----------------------------------------
I then uploaded the file to the Empeg.
I did a "chmod +x init"
I check it doing
------------------------------------------
init-2.03# ls -la init
-rwx--x--x 1 0 0 219 Jan 8 23:13 init
------------------------------------------
Now I try to execute the new init by doing ./init
and i get "./init: No such file or directory"

If I reboot, I get to:
------------------------------
Freeing unused kernel memory: 4k initinit-2.03#
-----------------------------
And I get stuck at this prompt.

If I type ./init, I get the No such file error.

I can type /sbin/init.empeg and it will run.
But by doing this it bypasses my init file.

Anyone know what I'm doing wrong here?
_________________________
~Max

Top
#55424 - 08/01/2002 17:39 Re: Display Server [Re: AlphaWolf]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Make the init readable for group and other. Scripts have to be readable in order to run. I realize that it's user readable, but without am /etc/passwd file, I bet there's something funny going on.
_________________________
Bitt Faulk

Top
#55425 - 08/01/2002 21:31 Re: Display Server [Re: wfaulk]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Damn, I knew I forgot to mention something, I also did a
"chmod 755 init" which makes the permissions
-rwxr-xr-x

Any other suggestions
_________________________
~Max

Top
#55426 - 09/01/2002 00:15 Re: Display Server [Re: AlphaWolf]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Any other suggestions

One of the programs in the script is not in your PATH or is not where you think it is. Make all the executables (exec,echo,etc) full paths. Your script is running, but something within the script is not getting found.

Also, make sure your linefeeds are correct. After you transfer the file to the empeg type

cat /sbin/init

and make sure there are no gibberish characters

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#55427 - 09/01/2002 07:55 Re: Display Server [Re: mcomb]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Ha, didn't work. Everything is in my path just fine, because at the "initinit-2.03#" I can type the file names for everything and they'll all work. echo, exec, init.sbin, mount.

But I still get the "init: /sbin/init: No such file or directory" error. This is really starting to tick me off.
_________________________
~Max

Top
#55428 - 09/01/2002 08:04 Re: Display Server [Re: AlphaWolf]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Check your linefeeds. This message is generally produced when the first line says #!/bin/bashCRLF, 'cos it's trying to run /bin/bashCR

_________________________
-- roger

Top
#55429 - 09/01/2002 15:55 Re: Display Server [Re: Roger]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Once again. I'm not a Linux newbie. I've used linux for about 5 years, but have been away for 3 or so. The uploaded file is 100% clean.
_________________________
~Max

Top
#55430 - 09/01/2002 15:58 Re: Display Server [Re: AlphaWolf]
ClownBurner
member

Registered: 05/09/2000
Posts: 174
Loc: Irvine, CA USA
If you've been away for a bit, be careful.. Some of the newer editors automatically convert CR/LF to CR for display purposes but leave the LF's in the file... Ewwwww.
_________________________
_____________ James Mancini

Top
#55431 - 09/01/2002 16:06 Re: Display Server [Re: ClownBurner]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Well, I don't have any visible junk in the file when more'ing or cat'ing the file.
_________________________
~Max

Top
#55432 - 09/01/2002 18:00 Re: Display Server [Re: AlphaWolf]
bonzi
pooh-bah

Registered: 13/09/1999
Posts: 2401
Loc: Croatia
CR's don't show as junk on cat. Depending on stty settings, they either don't show at all or show as extra line feeds.

Try /bin/od -bc init | /bin/more to see whether you have just LFs or also CRs.

Also note that path at the prompt is not necessarily the same as the one with which init runs (I have no idea whether it actually is the same or not).
_________________________
Dragi "Bonzi" Raos Q#5196 MkII #080000376, 18GB green MkIIa #040103247, 60GB blue

Top
#55433 - 09/01/2002 21:58 Re: Display Server [Re: bonzi]
AlphaWolf
stranger

Registered: 01/01/2002
Posts: 46
Thank you for knocking some sense into me. I totally forgot that LFs and CRs don't show up. That was the problem. Edited it with UltraEdit and removed the darn things.

_________________________
~Max

Top
Page 2 of 2 < 1 2