Unoffical empeg BBS

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

Page 1 of 2 1 2 >
Topic Options
#318628 - 30/01/2009 05:23 linux only hard drive upgrade?
ajayrockrock
journeyman

Registered: 29/12/2001
Posts: 99
Loc: Riverside, CA
Is there a way to use the drive builder image subsequently install the software using only linux? I don't have a windows machine at the house anymore.

I do have virtualbox and tried to setup the serial port but that's not working either. Then again, I'm trying to get *any* output from /dev/ttyS0 and it's not showing anything.

Before I go diving into my serial port issues, I was just wondering if it's even possible to upgrade the box using only linux.

Thanks,
Ajay

Top
#318634 - 30/01/2009 07:33 Re: linux only hard drive upgrade? [Re: ajayrockrock]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
I'm sure it is - I have to admit to having a large disk here and just not getting around to upgrading my unit.

You've been here: http://www.riocar.org/modules.php?op=modload&name=Drive_Upgrade&file=index

and found Mark's upgrader: http://rtr.ca/bigdisk/

yes?

You may want to add a page here: http://empegwiki.org/index.php?title=Main_Page

and follow up to this thread - I may do the same if the muse takes me smile
_________________________
LittleBlueThing Running twin 30's

Top
#318638 - 30/01/2009 11:36 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
The problem with my upgrader.c, is that it requires functioning ethernet on the empeg. Normally, the player software configures the networking after boot.

But if there is no player software yet (eg. building new disks), then the empeg cannot communicate with upgrader.c.

I really should fix that someday, using kernel ip autoconfig.

-ml

Top
#318649 - 30/01/2009 15:24 Re: linux only hard drive upgrade? [Re: ajayrockrock]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Originally Posted By: ajayrockrock
Is there a way to use the drive builder image subsequently install the software using only linux? I don't have a windows machine at the house anymore.


Currently, the first install of a new piece of ".upgrade" software on a fresh drive on the Empeg truly does require Windows.

Quote:
I do have virtualbox and tried to setup the serial port but that's not working either. Then again, I'm trying to get *any* output from /dev/ttyS0 and it's not showing anything.


I think others have successfully gotten the ugprader working through a virtual machine like that, so you're on the right track.

Your other option is to find a friend with Windows and a serial port.
_________________________
Tony Fabris

Top
#318653 - 30/01/2009 17:06 Re: linux only hard drive upgrade? [Re: tfabris]
ajayrockrock
journeyman

Registered: 29/12/2001
Posts: 99
Loc: Riverside, CA

@LittleBlueThing, yeah, I've read the hard drive upgrade guide, it's just applying the .upgrade files that I have issue with.

@tfafris, I think I'll try to mess with my virtualbox setup a little more to get it to work.

I have a question, if I plug in my empeg to the serial port and do, 'cat /dev/ttyS0', then power up the empeg, I should see some output right? I'm trying to confirm if my serial cable is still good. There's only one serial port on my machine and I confirmed that it's been setup in the dmesg output plus 'setserial -g /dev/ttyS0'

Right now I'm not seeing anything, I expected to see some garbage or something (y'know, like when you do cat /dev/mouse and move the mouse around it prints all this crap to the screen).

Top
#318656 - 30/01/2009 18:41 Re: linux only hard drive upgrade? [Re: ajayrockrock]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
I don't know if those are the correct Linux commands, but assuming they are, then yes, you should see something on the screen immediately if your serial port/cable is working properly and you boot the empeg. The empeg spends about 10 seconds spewing stuff to the serial port on every boot. Less if it doesn't have the player software installed yet, but you should see at least something on the serial cable even if the player doesn't have any disk drives attached or has just had the builder image installed.

Things I've seen that can cause the serial port to not work. Check each of these:

1. Serial port not correctly configured in the computer's BIOS.
2. Serial port not correctly configured in the computers operating system control panel.
3. A different software process is grabbing the serial port (such as PalmSync).
4. Bad/frayed cable.
5. Incorrect type of cable (see below).
6. COM port speed and settings on the computer are not set correctly to match the COM port speed and settings of the car player (see below).

Cable type and speed needed for the empeg:

1. If plugging into the empeg directly, you need a crossover serial cable, also called a NULL MODEM cable. This is a standard serial cable but with the TX and RX wires reversed. The computer's com port speed should be set to 115200, 8N1, No Flow Control.

2. If plugging into an empeg car docking sled, you need a "straight-through" serial cable (RX/TX are already swapped on the sled). Com port speed should be set to 4800, 8N1, No Flow Control. Also, if plugging into the sled, make sure the serial connector has a ground wire attached to the correct points; some older MK2 models were missing a ground wire on the sled serial connector.

_________________________
Tony Fabris

Top
#318662 - 31/01/2009 08:36 Re: linux only hard drive upgrade? [Re: tfabris]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
instead of cat, install picocom and run:
picocom -b 115200 /dev/ttyS0

Mark - would it make sense to put something (udhcpd) in your bigdisk upgrader image to configure the network?
What is in the bigdisk images and can they be rebuilt from source? (and maybe bblobs)

Tony - won't 'download' work from linux (a tiny .c program that installs a kernel image via serial at the "penguins" bootloader prompt?)
_________________________
LittleBlueThing Running twin 30's

Top
#318664 - 31/01/2009 11:01 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: LittleBlueThing
Mark - would it make sense to put something (udhcpd) in your bigdisk upgrader image to configure the network?

Maybe. But that still doesn't solve the problem of how to get the bigdisk .upgrade loaded on to a blank empeg. A better solution would be to enable/use the kernel's *built-in* IP-autoconfig feature.

Quote:
What is in the bigdisk images and can they be rebuilt from source? (and maybe bblobs)


I've got them quite automated here now. Hang on for a spell, and I'll post a tree with scripts.

Quote:
Tony - won't 'download' work from linux (a tiny .c program that installs a kernel image via serial at the "penguins" bootloader prompt?)

That program is only for kernels and other flash blobs, not for .upgrade files. And it still fails on some, but not all, USB serial ports as of the Linux 2.6.2x series of kernels (on the host side) -- it used to work with older kernels.

Cheers

Top
#318665 - 31/01/2009 11:28 Re: linux only hard drive upgrade? [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: mlord
That program is only for kernels and other flash blobs, not for .upgrade files.

There was a Linux-based upgrader, Upgclient; it was released in the binary (i386) releases of Emptool. For some reason, most likely an oversight, source releases of Emptool didn't contain the source of it. And then the binary releases must have have gone missing when the support pages were rejigged.

However, Upgclient itself was only a thin wrapper around class Upgrader from inside the Emptool source distribution. Probably not much more, in fact, than (untested):
Code:
SerialConnection conn("/dev/ttyS0", 115200);
Upgrader upg;
STATUS rc = upg.CheckUpgrade("foo.upgrade");
if (SUCCEEDED(rc)) rc = upg.DoUpgrade(&conn);
if (FAILED(rc)) printf("Upgrade failed: %x\n", rc);

Quote:
And it still fails on some, but not all, USB serial ports as of the Linux 2.6.2x series of kernels (on the host side) -- it used to work with older kernels.

Upgclient shared enough code with download.c that it too failed on most USB serial ports -- or, at least, on the one that we tried. In fact, I wasn't aware that there were any kernel versions on which USB serial upgrades worked more reliably than others... so far as we could tell, the problem wasn't in the kernel, it was to do with the regrettably low latency required by the player side of the upgrade protocol, latency which was exceeded by the USB overhead in some USB-to-serial implementations.

Peter

Top
#318667 - 31/01/2009 11:55 Re: linux only hard drive upgrade? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: mlord
[quote]What is in the bigdisk images and can they be rebuilt from source?

My upgrader.c program can be used to break up .upgrade files into their component blobs, each of which can then be identified by the Linux "file" command for further breakdown.

I've updated my bigdisk builder page to now include snapshots of the build directories/tools I use to respin the .upgrade files.

Things are pretty simple. There is an "hda5" subdirectory, which contains everything you want to put into the root filesystem. There is also a "_proc_empeg_kernel" symlink, which should point at whatever kernel zImage file you want.

Then just run the included "./respin_upgrade.sh" to update things.

Cheers

Top
#318668 - 31/01/2009 11:57 Re: linux only hard drive upgrade? [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: peter
There was a Linux-based upgrader, Upgclient; it was released in the binary (i386) releases of Emptool. For some reason, most likely an oversight, source releases of Emptool didn't contain the source of it. And then the binary releases must have have gone missing when the support pages were rejigged.

I have the upgclient binaries here, from v2beta12 and v2rc1. But they never really worked for me here, and I never bothered to try and understand why not.

Cheers

Top
#318669 - 31/01/2009 12:06 Re: linux only hard drive upgrade? [Re: peter]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: peter
There was a Linux-based upgrader, Upgclient; it was released in the binary (i386) releases of Emptool. For some reason, most likely an oversight, source releases of Emptool didn't contain the source of it. And then the binary releases must have have gone missing when the support pages were rejigged.

Aha: http://empeg.com/v3alpha/GPL-LGPL-compliance/empegcar-v3.00-alpha1.i386-linux.tar.gz

Yes, it's the release from v3 alpha 1, but none of that stuff had changed for ages. Unpack it and look at upgclient (or upgclient.static) and the README.

Peter

Top
#318670 - 31/01/2009 12:25 Re: linux only hard drive upgrade? [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Mmm.. When I run that here, it just loops and says "ERROR: 5 empeg unit not found". Probably because I only have one empeg unit connected rather than 5 of them? smile

With strace, I see it opening/closing the serial port lockfile (and the .upgrade file, too) over and over and over and .. but NEVER opening the serial port itself. That might explain the failure. smile

-ml


Edited by mlord (31/01/2009 12:27)

Top
#318671 - 31/01/2009 12:30 Re: linux only hard drive upgrade? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Yup, if I had to guess what the non-existant source code is doing, I'd say it has a bug where it tries to open the .upgrade file as a serial port, rather than the actual serial port.

-ml

Top
#318672 - 31/01/2009 12:37 Re: linux only hard drive upgrade? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Mmm.. the .static version works a little better, trying to open the serial port and getting "EPROTO" back. Now that is curious..

Top
#318673 - 31/01/2009 12:39 Re: linux only hard drive upgrade? [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: mlord
Yup, if I had to guess what the non-existant source code is doing, I'd say it has a bug where it tries to open the .upgrade file as a serial port, rather than the actual serial port.

What's your command-line? I don't have an attached Empeg here, but it's certainly opening and ioctl'ing the correct device when I strace it.

Peter

Top
#318674 - 31/01/2009 12:39 Re: linux only hard drive upgrade? [Re: peter]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
Peter, I think you meant: http://empeg.com/v3alpha/emptool-v3.00-alpha1.src.tar.gz

Thanks - that helps, I'll take a look.

I still use normal serial ports so it's not an issue yet (he says, remembering that the empeg port is now being used to monitor the satellite box... hmmm)
_________________________
LittleBlueThing Running twin 30's

Top
#318675 - 31/01/2009 12:41 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: LittleBlueThing

That's the source of Emptool but not Upgclient, though it does contain the bits you'd need to write a new Upgclient if the old one can't be made to work on modern kernels. The thing I linked to included binaries of both Emptool and Upgclient.

Peter

Top
#318676 - 31/01/2009 12:45 Re: linux only hard drive upgrade? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Ahh.. I get it. upgclient.static works only with the default "/dev/ttyS0", not when using the "-p" parameter to supply a different path. I can create symlinks in /dev/ to get around that, though.

Like download.c, it fails on the wired USB serial ports I have here. But it does seem to be doing *something* over the bluetooth AIR-cable serial port I have, which normally does work okay with (my modified version of) download.c

But it's very slow right now, whatever it's doing..


Edited by mlord (31/01/2009 13:55)

Top
#318677 - 31/01/2009 12:49 Re: linux only hard drive upgrade? [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: mlord
Ahh.. I get it. upgclient.static works only with the default "/dev/ttyS0", not when using the "-p" parameter to supply a different path. I can create symlinks in /dev/ to get around that, though.

Sorry, can't reproduce that either, though in a rather non-Unixy move it does require the space between "-p" and "/dev/ttyS1".

Peter

Top
#318679 - 31/01/2009 12:51 Re: linux only hard drive upgrade? [Re: tfabris]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
Originally Posted By: tfabris
truly does require Windows.


Think carefully before saying things like that Tony - you know what they're like wink
_________________________
LittleBlueThing Running twin 30's

Top
#318680 - 31/01/2009 12:54 Re: linux only hard drive upgrade? [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Code:
 rm /var/lock/LCK..tty* ; ./upgclient.static  -r  car2_v3a11_hijack.upgrade
empeg-car Upgrade client.
empegupgrade: Using upgrade file 'car2_v3a11_hijack.upgrade' to device '/dev/ttyS0' (115200 baud)
 Checking upgrade file integrity                                        [100%]
Pumping player software
 Finding unit                                                           [  3%]
Upgrading flash (bootloader)
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...
0x8a414b5: 0d 0a 30 30.39 61 32 33|35 61 0d 0a.33 61 37 39    ..009a235a..3a79
0x8a414c5: 39 36 35 62.0d 0a 38 33|62 31 31 33.35 63 2d 62    965b..83b1135c-b
0x8a414d5: 62 37 63 38.64 62 38 2d|33 32 30 37.33 30 31 31    b7c8db8-32073011
0x8a414e5: 2d 64 35 36.64 36 34 63|37 0d 0a 30.30 0d 0a 30    -d56d64c7..00..0
0x8a414f5: 30 0d 0a 3f.                                       0..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?

Upgrading flash (kernel)
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414bb: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?
   connection_all.cpp: 155 (18530): Connection::FlushReceiveBuffer throwing away...0x8a414b2: 0d 0a 3f ..?


Edited by mlord (31/01/2009 12:55)

Top
#318681 - 31/01/2009 12:58 Re: linux only hard drive upgrade? [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: mlord
Mmm.. When I run that here, it just loops and says "ERROR: 5 empeg unit not found". Probably because I only have one empeg unit connected rather than 5 of them?

FWIW, the idea was to make it easy for scripting languages to pick out error codes textually. (Someone had probably been reading http://c2.com/cgi/wiki?AlternateHardAndSoftLayers .) The same reasoning was behind the odd verbosity of Emptool itself.

In practice I don't think anyone ever wrote any scripts that drove Emptool or Upgclient directly, which is fortunate as I also don't think we put any real effort into stability of that "API" between releases. It appears that anyone smart enough to script something like Emptool, is also smart enough to just link against lib/protocol directly -- or, indeed, rewrite the whole shooting-match in Java.

Peter

Top
#318682 - 31/01/2009 13:00 Re: linux only hard drive upgrade? [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: peter
Originally Posted By: mlord
Ahh.. I get it. upgclient.static works only with the default "/dev/ttyS0", not when using the "-p" parameter to supply a different path. I can create symlinks in /dev/ to get around that, though.

Sorry, can't reproduce that either, though in a rather non-Unixy move it does require the space between "-p" and "/dev/ttyS1".


I've fiddled some more, and the behaviour is not consistent. Sometimes it works with a "-p otherdevice" parameter, and sometimes it does not. But it never seems to work unless /dev/ttyS0 is a real device. But that could also be inconsistent over a longer trial period. smile

So.. uninitialized variables somewhere, I guess.

Cheers


Edited by mlord (31/01/2009 13:01)

Top
#318685 - 31/01/2009 13:21 Re: linux only hard drive upgrade? [Re: mlord]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
Originally Posted By: mlord
0x8a414bb: 0d 0a 3f ..?

No, you're quite right, that version of upgclient is hosed, even on real serial ports. I wonder how we managed that!

Fortuitously, it turns out I do still have an older version installed on a machine here. I've tested it (on /dev/ttyS1 no less) and it does work. It doesn't report a version number, but note that it should be 441,024 bytes long as opposed to the 453,828 bytes of the v3alpha1 release.

Peter


Attachments
upgclient-441024 (182 downloads)
Description: upgclient "version" 441024



Top
#318688 - 31/01/2009 13:51 Re: linux only hard drive upgrade? [Re: peter]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
I have emptool src from v2.00-final here if that's of any use.
_________________________
LittleBlueThing Running twin 30's

Top
#318689 - 31/01/2009 13:53 Re: linux only hard drive upgrade? [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: peter
It doesn't report a version number, but note that it should be 441,024 bytes long...

That would be the same one that shipped with v2final, and possibly also with earlier versions.

Cheers

Top
#318690 - 31/01/2009 13:55 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
I have that 441,024 upgclient too - it has the same dl date as the 2.00-final src so I'm guessing it's the same version
_________________________
LittleBlueThing Running twin 30's

Top
#318691 - 31/01/2009 13:59 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14491
Loc: Canada
Originally Posted By: LittleBlueThing
I have emptool src from v2.00-final here if that's of any use.

I've got it too. What you could try with it, is taking Peter's pseudocode wrapper (earlier in this thread) and trying to recreate upgclient from sources.

If you can achieve that, then I can fix the serial port stuff to work better over USB/bluetooth style ports.

EDIT: or maybe I'll just enable kernel IP-autoconfig (CONFIG_IP_PNP, CONFIG_IP_PNP_DHCP) in Hijack, so that my ethernet upgrader.c can always work with any unit that has a Hijack kernel in flash. Some other tweaks would also be necessary, I suppose, to let ftpd run without a rootfs or /proc

Cheers


Edited by mlord (31/01/2009 14:05)

Top
#318699 - 31/01/2009 17:59 Re: linux only hard drive upgrade? [Re: LittleBlueThing]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31596
Loc: Seattle, WA
Originally Posted By: LittleBlueThing
Originally Posted By: tfabris
truly does require Windows.


Think carefully before saying things like that Tony - you know what they're like wink


What's awesome is that now you're all doing a full development effort to make that statement wrong. I love you guys. smile
_________________________
Tony Fabris

Top
Page 1 of 2 1 2 >