Emptriv & userinit

Posted by: Nodge

Emptriv & userinit - 28/05/2002 06:42

Hi, I'm trying to get Emptriv to run on my Empeg. I've installed it onto my player and it runs fine when I launch it from the serial console.

I've replaced my init with Franks modified init, and created a userinit in the sbin directory, but my Empeg halts booting on the logo and I'm left at the shell.

Has anyone got an example userinit so I can see where I'm going wrong? I only want to run Emptriv at this stage.

Many thanks!
Posted by: tonyc

Re: Emptriv & userinit - 28/05/2002 07:27

Well, I also use Frank's userinit, but I don't have my Empeg handy. A couple things to check though... Make sure it's got this on the first line:


#!/bin/sh

.
Also, make sure it's got read and execute permissions (chmod u+rx /sbin/userinit).

If that doesn't help, let me know and I'll send you my userinit script when I get home.
Posted by: Nodge

Re: Emptriv & userinit - 28/05/2002 08:29

Hi, thanks for this but still no go! If you could send me your userinit that would be great. I have very little Linux experience I'm afraid so I'm a bit lost!

[email protected]

Many thanks!
Posted by: johnmcd3

Re: Emptriv & userinit - 28/05/2002 11:17

ok,

The script should look something like (off the top of my head):

#!/bin/bash
/drive0/files/emptriv/emptriv

The file need to be saved with unix style line breaks! (Common pitfall) On my windows machine a use a program called Ultraedit32 which has the option to do line break convertions (File->Convertions->Dos to Unix), but there are tons of other ways to do that.

The script should named with an M as the first letter (you probably put it on the music partition because the files are pretty large) and it should be set to be executable:

cd /etc/preinit.d
chmod 755 Mscriptname

At this point running the script from the command line should run emptriv:

cd /etc/preinit.d
./Mscriptname

If that doesn't work you've probably done something wrong from above. If it does work but still freezes on boot then you need to investigate how the preinit has been installed. Check to see if the /sbin/hijack file is executable as well.

Hope this helps!

John
Posted by: tonyc

Re: Emptriv & userinit - 28/05/2002 11:42

Nonono he's not talking about a preinit script, he's talking about Frank van Gestel's replacement for the init daemon which calls a user shell script. It's another approach that's less modular but still servicable. I actually use both for different reasons (my userinit calls the picker app which lets me choose certain things to run if I want them to.)
Posted by: johnmcd3

Re: Emptriv & userinit - 28/05/2002 11:46

oh hey, my bad. I'll have to check out this other init package too...
Posted by: tonyc

Re: Emptriv & userinit - 28/05/2002 11:52

Okay, hop to it then!
Posted by: Nodge

Re: Emptriv & userinit - 29/05/2002 03:45

Okay I've redone my userinit using UltraEdit32, converted it to UNIX format and set the file permissions. If I type sbin/userinit at the shell it now executes Emptriv fine, but my Empeg still doesn't boot when I change the init to the custom one.

I've attached my userinit here, what am I missing? Many thanks for your help so far!
Posted by: tonyc

Re: Emptriv & userinit - 29/05/2002 07:48

You need to start the player app at the end. I wasn't able to get my userinit from my player last night but I'll try to remember tonight.
Posted by: lectric

Re: Emptriv & userinit - 01/06/2002 20:12

My emptriv is locking up fairly often. Is this normal, or am I a special case?

btw, no errors in hyperterm. Just stops responding to button presses. And I have no idea whether the music is still going as I don't have an amp to plug into right now.
Posted by: tonyc

Re: Emptriv & userinit - 01/06/2002 20:31

Nobody else has reported lockups... Having said that, I wouldn't be terribly surprised. Maybe it's running out of memory? I think you might have to add a ReserveCache entry to your config.ini to save some RAM for 3rd party apps, depending on what else you've got running.

Actually, I haven't tested any of my apps with the newer Hijack versions (I'm still on 269 I think) so I dunno what's happening. The other fellas tell me that the changes shouldn't cause any problems with the "old way" of binding to menus, but I haven't had a chance to test it.

If you keep getting lockups and it's not a memory issue, let me know. Anything special you were doing when you were playing? There is a bug where if you narrow down the questions a lot (like you choose a very narrow difficulty range and/or enable a small number of categories) it won't be able to find any questions that fit those parameters. It's not smart enough to give up if there are no questions that match.. Maybe I should add something to fix that.
Posted by: lectric

Re: Emptriv & userinit - 01/06/2002 21:17

Unfortunately I was running everything as default (0-100 difficulty, etc). I'll try reserving more memory. Didn't know about that one.

BTW, VERY cool program. I wonder how long it's going to be before I hit somebody.
Posted by: tonyc

Re: Emptriv & userinit - 01/06/2002 21:50

Great, now I'm going to have to add a disclaimer for people who play emptriv while driving...

Actually that was the reason I wanted to get a text-to-speech engine working. Hopefully one of these new budding empeg hackers we've been seeing will go visit the thread I posted a month or so ago on that topic...
Posted by: johnmcd3

Re: Emptriv & userinit - 01/06/2002 23:41

Actually, I also have expirienced lockups. They don't not appear to be particular to any hijack vertion. They also always happen in the same place, but I haven't had time to diagnose them. As I remember, after you finish a question, there is a small menu at the bottom to got to the next one, and it doesn't respond to any user input. I was thinking maybe it had something do do with my playing around with the source code, so I didn't mention it, but I really didn't think I did anything that could cause this. It'll be interesting to see if the these are the same type of lockup.

John
Posted by: Rufus

Re: Emptriv & userinit - 02/06/2002 10:16

In the short time I have been using Emptriv I have also had a couple of lock ups at the same point going to the next question.

Mark.
Posted by: johnmcd3

Re: Emptriv & userinit - 02/06/2002 12:46

Hmmm. Smells like a bug.
Posted by: tonyc

Re: Emptriv & userinit - 02/06/2002 14:54

Hmm, not sure what it could be looking at the code. I don't have my Empeg handy right now but the menu between questions (Next, Done) is built and displayed the same way as the main menu and the other menus throughout the game. When I have my Empeg on hand, I'll try to reproduce this one and figure out what's happening.
Posted by: lectric

Re: Emptriv & userinit - 02/06/2002 18:26

That is exactly when it locks. When I try to hit next to go to the next question. Unfortunately, not all the time.
Posted by: lectric

Re: Emptriv & userinit - 02/06/2002 18:28

Mayhaps it simply is trying to load a question that does not exist? (Would explain why it happens when it happens, and why it happens randomly.)