Unoffical empeg BBS

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

Topic Options
#120840 - 14/10/2002 11:13 Someone please please please do this.
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31575
Loc: Seattle, WA
Someone please invent code to add to the Hijack distribution that allows me to do the following (with absolutely no other steps and no other intervening software or modifications):

    1) Install the base player upgrade, from scratch, fresh formatted disk.

    2) Install Hijack, and Hijack only, nothing else, atop the fresh player installation.

    3) FTP user-land executable file(s) to the empeg and tag chmod +x.

    4) Add to config ini:

    [hijack]
    appname=path_to_executable


    5) And then magically I can run the executable from the Hijack menu.

No menu binding, no futzing with custom inits, no changing the default software boot up process, nothing. Just copy a file to the empeg, update config.ini, and I can run the file from the UI.

Please please please somebody invent this.
_________________________
Tony Fabris

Top
#120841 - 14/10/2002 11:16 Re: Someone please please please do this. [Re: tfabris]
genixia
Carpal Tunnel

Registered: 08/02/2002
Posts: 3411
LOL.....yeah, that'd be nice.
_________________________
Mk2a 60GB Blue. Serial 030102962 sig.mp3: File Format not Valid.

Top
#120842 - 14/10/2002 13:43 Re: Someone please please please do this. [Re: tfabris]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
I second that groveling...I'll debase myself to get that feature too. I would even donate to a "pot" to be rewarded to the first programmer that completes this .

Anyone want to set up the Hijack App fund? We could get good ol' fashioned capitalism working in our favor, eh komrades?


Edited by Meatballman (14/10/2002 13:46)
_________________________
~ John

Top
#120843 - 14/10/2002 14:11 Re: Someone please please please do this. [Re: tfabris]
DeadFire
addict

Registered: 30/05/2002
Posts: 695
Just to show how much we'd all like it, I'll add my voice to the list.

Top
#120844 - 14/10/2002 14:26 Re: Someone please please please do this. [Re: tfabris]
mcomb
pooh-bah

Registered: 31/08/1999
Posts: 1649
Loc: San Carlos, CA
Correct me if I am wrong, but hasn't this already been done? Assuming that code works, it just needs to become a standard part of hijack.

-Mike
_________________________
EmpMenuX - ext3 filesystem - Empeg iTunes integration

Top
#120845 - 14/10/2002 14:52 Re: Someone please please please do this. [Re: mcomb]
number6
old hand

Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
I don't think Kim ever released his source code
[or a compiled binary].
So, any work Kim did either has to be reinvented, or we ask Kim nicely to share parts of it with us - preferably under GPL.

Thats Kim's call to make.

I think the problem we came across was that config.ini is read very late in the piece by the kernel [after the player program starts],

So one problem we run up against is that the player is already started (and in most cases is talking to the serial port as it wasn't started with -s-)
So, for GPS type apps this won't do.

There are several options to deal with this such as:

1. Persuade the empeg guys to put something into to source code for /bin/init to actually allow for a [simple] /etc/initab type functionality.
Then we can control what processes get started in what order on our players.

2. Or maybe if the /bin/init program (modified by the empeg guys) looks for a "alternative" init program in /empeg/user_init or some other filesystem (maybe /programs0/user_init) .
If the regular init process it finds such a binary, it then exec's it and lets it do the starting/running of the player bunary - if its not present/found or the exec fails, then it does what it does now and starts the player binary itself.

That way we can have our own "custom" init process that can read config.ini or do whatever it likes and its the responsibility of that program to start the real player software in whatever mode it determines is best.

Some of you may ask, why get the empeg guys to modify /bin/init - well that way, the next release(s) of software they make will automatically preserve whatever settings and init procedures we have in place without trashing them.

With a fallback mode to allow the player to always start if the user init program is not found or won't run, so we always get music on our players - unless user_init screws up big time.


3. A third option, is that we use a single bit in Flash RAM to somehow tell the player whether or not its to open the serial port and dump out song info on to this port and/or monitor the port for serial data used to control the player app via serial.

This would require either a mod to the player software and the kernel or the init process looks for this RAM bit being set and when it is, starts the player in silent mode, while I dislike wasting precious flash ram bits - this would let us (users) control the interaction of the player software with the serial port from within Hijack via the hijack menu. Lack of control over how the player binary interacts with the serial port is a major issue to using it with GPS and other apps.

Once we solve that problem, we can then start other apps via hijack menus or whatever as required, knowing that the serial port is free and not being read/written by the player.


Top
#120846 - 14/10/2002 15:05 Re: Someone please please please do this. [Re: number6]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31575
Loc: Seattle, WA
So one problem we run up against is that the player is already started (and in most cases is talking to the serial port as it wasn't started with -s-)
So, for GPS type apps this won't do.


Surely the Kernel controls all low-level I/O and can intercept calls to files on the hard disk at any point in time. It could, for example, say "every time someone tries to execute empeg/player, add the -s- parameter".
_________________________
Tony Fabris

Top
#120847 - 14/10/2002 15:13 Re: Someone please please please do this. [Re: number6]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
Ehh, the patch is attached to the first message in the linked thread. And it looks usable, the code is based off of the in-kernel module loader. I'm starting most applications in the preinit 'M" scripts, which are run after the player has started as well.

The only thing I don't like is the in-kernel processing of config.ini whenever the player reads it, but that's a hijack thing. Yes, the player still has to be started with -s-, but if we're hacking the players view on it's environment with hijack anyways, why not modify sys_exec to add that flag when we're on DC.

The best method would probably be to 'virtualize' the serial port, so that when gpsapp opens the serial port it would make the player's bits end up in the bitbucket (while still allowing notify=1 to work).
_________________________
40GB - serial #40104051 gpsapp

Top
#120848 - 14/10/2002 15:51 Re: Someone please please please do this. [Re: jaharkes]
number6
old hand

Registered: 30/04/2001
Posts: 745
Loc: In The Village or sometimes: A...
In reply to:


Ehh, the patch is attached to the first message in the linked thread. And it looks usable, the code is based off of the in-kernel module loader. I'm starting most applications in the preinit 'M" scripts, which are run after the player has started as well.




I didn't notice the attachement to that thread, so I stand corrected.
But did Kim release it under GPL?

In reply to:



The only thing I don't like is the in-kernel processing of config.ini whenever the player reads it, but that's a hijack thing. Yes, the player still has to be started with -s-, but if we're hacking the players view on it's environment with hijack anyways, why not modify sys_exec to add that flag when we're on DC.



I have no problem with that - Mark Lord might [its kind of kludgy and certainly not elegant, but it would be effective].

It would however affect the ability to be able to remotely control the player as the player won't then respond to fake keystrokes sent to it from the kernel - which are delivered to the player via the serial port (it thinks it has open).

This may make it a non-starter for some.

In reply to:


The best method would probably be to 'virtualize' the serial port, so that when gpsapp opens the serial port it would make the player's bits end up in the bitbucket (while still allowing notify=1 to work).




I agree, I had thought about making all open requests work/succeed on the serial port, but only some (privileged) reads would ever return data from the real serial port, others would block and never return like they would if no data ever showed up.

You would need a special IOCTL (or special device name say /proc/empeg_serial0 - ala the /proc/empeg_kernel special device) to let the kernel know that you were "privileged" to open the real physical serial port for real IO rather than virutalised IO in that case. So that you could talk to the real serial port though.

One thing is that we do want the player binary to output "stuff" to [what it thinks of as] the serial port as thats how the kernel populates the current track, title and other info on the /proc/empeg_xxx special file (can't recall what xxx is called for now but its there).
So if we start the player with -s- it won't do this.

All we want to do is to be able to stop actual physical "reads" of the serial port ever getting data from the serial ports buffer - we still want the player to see the serial "commands" we send it via the httpd process or via "injected" commands - like append/insert/enqueue fid### to current playlist.

So that control of the player via web interface is still supported, even with a GPS connected

Of course the real answer is some kind of "multiplex" IO capability on a single real serial port, but thats way too complicated I think to implement easily and would require external hardware (and software) support.

Maybe one day, thats something Patricks tuner module could support - the serial protocol between the tuner module and the player is multplexed now between stalk commands, tuner commands and other "io" stuff, adding one or 2 low speed serial (receive only) channels to that multiplexed stream would probably be doable with some minor changes to Patricks PIC code and a small add on board to provide the serial IO pins.

[either that or Patricks board is modified to support using one or more of the ADC pins as serial IO pins - not sure the PIC chip has the grunt to handle all that serial io cleanly though].

Could you use a ADC port as a low-speed Receive only "RS232 leve" interface without a transceiver chip?

Top
#120849 - 14/10/2002 15:59 Re: Someone please please please do this. [Re: number6]
jaharkes
enthusiast

Registered: 20/08/2002
Posts: 340
Loc: Pittsburgh, PA
Kernel is GPL, it's a patch against the kernel and it was publicly released. So yes, it is GPL'd.

That's the viral property, you cannot release anything derived from GPL code under a closed license.
_________________________
40GB - serial #40104051 gpsapp

Top
#120850 - 14/10/2002 21:23 Re: Someone please please please do this. [Re: tfabris]
jets
enthusiast

Registered: 08/07/2002
Posts: 237
Loc: Toronto, Canada
Please please please somebody invent this.

AOL
_________________________
It seemed like a good idea at the time.

Top