Unoffical empeg BBS

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

Page 1 of 2 1 2 >
Topic Options
#181160 - 25/09/2003 18:14 mlord's upgrader, ported to cygwin
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
download the attached file. the dll is way too big, so you need to extract cygwin1.dll from here. its in /usr/bin. for some reason, cygwin wont recognize the current directory as part of the $path, so you're gonna have to do the following at the command prompt before it works:

set path=%path%;.

ported this really quick to mess with v3alpha3. still had to use the old emplode to recreate my database.


Attachments
179767-upgrader-win32.zip (50 downloads)


Top
#181161 - 25/09/2003 19:43 Re: mlord's upgrader, ported to cygwin [Re: image]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
For those who are wonderin', this is an ethernet UPGRADER for applying .upgrade files to an empeg very quickly and without wiiping out Hijack in the process.. no serial cables required to switch between v2-final and v3-alpha (and back again..).

Cheers

Top
#181162 - 25/09/2003 19:58 Re: mlord's upgrader, ported to cygwin [Re: mlord]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
old thread here, though it seems to be including a number of tangents.


This version is pretty simple to use, but not 100% complete.

--> requires Hijack v328 or newer.
--> you should manually "pause" your player first, or put it in stand-by mode.
--> after "upgrader" completes, you must manually reboot your player.
--> after the reboot, you should run emptool or emplode to rebuild the database


mark, can't you just modify the program to send a SITE command to the ftp daemon to make sure the player is off before uploading the upgrade? i.e.:

make_ftp_cmd(cmd, ftp_user, ftp_passwd, "-Y \"site button top.L"", empeg_host, "/dev/null");

though i'm not sure what the effects would be if the player was off already

Top
#181163 - 25/09/2003 20:41 Re: mlord's upgrader, ported to cygwin [Re: image]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
I have a port to MacOS; I should also post it.

Top
#181164 - 25/09/2003 20:52 mlord's upgrader, ported to MacOS [Re: image]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Diff in a moment, I need to fetch pristine source to diff against.


Attachments
179798-upgrader (244 downloads)


Top
#181165 - 25/09/2003 20:55 Re: mlord's upgrader, ported to MacOS [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Simple diff.

--- upgrader/upgrader.c Sat Apr 5 09:56:20 2003
+++ upgrader.c Fri Sep 19 15:10:39 2003
@@ -12,7 +12,12 @@
#include <unistd.h>
#include <errno.h>
#include <sys/mman.h>
+#ifdef linux
#include <linux/types.h>
+#else
+typedef unsigned int __u32;
+typedef unsigned char __u8;
+#endif

//
// Chunk ID definitions from "defines.h", part of a GPL'd UpgradeSplitter package by [email protected]

Top
#181166 - 26/09/2003 07:40 Re: mlord's upgrader, ported to cygwin [Re: image]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Hey image, send me any diffs you needed to get upgrader.c to build for cygwin, and I'll incorporate them into the next release.

Thanks

Top
#181167 - 26/09/2003 10:29 Re: mlord's upgrader, ported to cygwin [Re: image]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
can't you just modify the program to send a SITE command to the ftp daemon to make sure the player is off before uploading the upgrade?


Yup. Except the command is "site button=top.L".

Version 0.3 attached -- I used this to apply the v3alpha3 .upgrade without any problems. It also does the auto reboot at the end.

Cheers


Attachments
179919-upgrader.tar.gz (43 downloads)


Top
#181168 - 26/09/2003 16:51 Re: mlord's upgrader, ported to cygwin [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
This compiles with no changes under a fresh cygwin install (needed an excuse to get it on the new harddrive anyway), there is a cast warning on line 399, though.

And of course the strip command doesn't work 'cause there's a ".exe" added, but that's not a problem.

Experimentation later.

--Nathan


Top
#181169 - 26/09/2003 17:00 Re: mlord's upgrader, ported to cygwin [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Okay thanks.

I'll turn on -Wall in the next version and fix all of the trivial warnings and stuff.

Cheers

Top
#181170 - 26/09/2003 17:08 Re: mlord's upgrader, ported to cygwin [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
Oh, well since you're interested:

$ gcc -O -Wall upgrader.c -o upgraderWall
upgrader.c: In function `process_chunk':
upgrader.c:139: warning: implicit declaration of function `strcmp'
upgrader.c:220: warning: unused variable `count'
upgrader.c: In function `main':
upgrader.c:363: warning: implicit declaration of function `exit'
upgrader.c:399: warning: comparison of distinct pointer types lacks a cast
upgrader.c:407: warning: unsigned int format, different type arg (arg 4)
upgrader.c:432: warning: implicit declaration of function `strcat'
upgrader.c:434: warning: implicit declaration of function `system'
upgrader.c:446: warning: unsigned int format, different type arg (arg 4)
upgrader.c:458: warning: unsigned int format, different type arg (arg 4)
upgrader.c:351: warning: unused variable `crc'
upgrader.c:355: warning: unused variable `p'

--Nathan

Top
#181171 - 26/09/2003 17:11 Re: mlord's upgrader, ported to cygwin [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Yeah, I already captured all of those.

Newest version attached.

Cheers


Attachments
180085-upgrader.tgz (43 downloads)


Top
#181172 - 26/09/2003 17:25 Re: mlord's upgrader, ported to cygwin [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
$ make
gcc -Wall -O upgrader.c -o upgrader && strip upgrader
upgrader.c: In function `main':
upgrader.c:445: warning: long unsigned int format, different type arg (arg 4)
upgrader.c:457: warning: long unsigned int format, different type arg (arg 4)

--Nathan

Top
#181173 - 26/09/2003 17:30 Re: mlord's upgrader, ported to cygwin [Re: Mataglap]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
I'll post a cygwin compile of v0.4 or newer either later tonight or tomorrow for everyone who doesn't want to bother with installing cygwin itself.

(Thanks Mark!)

--Nathan

Top
#181174 - 26/09/2003 17:40 Re: mlord's upgrader, ported to cygwin [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Mmm.. odd, no such warning with Linux. No big deal, I'll just add some casting to the next version to eliminate it.

Cheers

Top
#181175 - 26/09/2003 17:46 Re: mlord's upgrader, ported to cygwin [Re: mlord]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Different GCC version probably. I tried to compile this with MinGW so you don't need to have the huge Cygwin library but can't because of mmap. Could add code to use the native Win32 equivalent but don't have time at the moment but if anybody else wants to I'll tell them how to do it.

Top
#181176 - 26/09/2003 17:52 Re: mlord's upgrader, ported to cygwin [Re: tman]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Well, I suppose the simple mmap() could be replaced with an fstat() malloc() read() sequence instead..

Cheers

Top
#181177 - 26/09/2003 18:10 Re: mlord's upgrader, ported to cygwin [Re: tman]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
The current gcc for cygwin is: gcc version 3.3.1 (cygming special)

--Nathan

Top
#181178 - 27/09/2003 10:51 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: Mataglap]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
Here's updater v0.4, compiled for cygwin. I used it about a dozen times to flip back and forth between 2.00final and 3.00alpha3, with no problems.

--Nathan


Attachments
180185-upgraderV0_4.zip (38 downloads)


Top
#181179 - 01/10/2003 22:43 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: Mataglap]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
Try as I might this doesn't work for me. The upgrader flips the player into standy and then skips by everything else really fast. I even tried downloading cygwin in it's entirety and still no luck. It's probably some weird path problem but I have no idea what it could be. What exactly is the upgrader doing when it's doing the pumping partitions? The script does make the zImage file BTW but doesn't get past that.

Top
#181180 - 02/10/2003 00:01 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: siberia37]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
try this. its everything u need, even findempeg. just use the up.bat script. there are quirks tho. since you're not in a cygwin bash shell, /dev/null isn't avaliable, so you wont auto-standby nor reboot. i probably can change it to ^Z but i'm lazy. also, findempeg has trouble when you have two empegs. modify the up.bat to accept a serial# if thats the case. put latest cygwin1.dll in the unzipped folder.

Top
#181181 - 02/10/2003 00:02 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: image]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
didn't seem to upload the attachment. here it is again


Attachments
181060-upgrader-v04.exe (93 downloads)


Top
#181182 - 02/10/2003 07:10 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: image]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
Thanks I'll try it again.. I was running from the cygwin bash shell when trying it last time btw, but it could be it wasn't working right. I'll let you how it works out know thanks!

Top
#181183 - 02/10/2003 08:57 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: siberia37]
image
old hand

Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
thinking about it, you most likely didnt have the ncftput (sp?) package downloaded.

Top
#181184 - 02/10/2003 12:09 v.04 (Re: mlord's upgrader, ported to cygwin) [Re: image]
siberia37
old hand

Registered: 09/01/2002
Posts: 702
Loc: Tacoma,WA
I had ncftpput, downloaded about three different version of it.. at least one of which was compiled with cygwin, same thing with gunzip. Very weird.

Top
#181185 - 24/12/2003 13:07 mlord's upgrader, ported to MacOS, works now [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Here's the revised diff


Attachments
193869-diff (204 downloads)


Top
#181186 - 24/12/2003 13:09 Re: mlord's upgrader, ported to MacOS, works now [Re: Daria]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
And the revised binary


Attachments
193870-upgrader (248 downloads)


Top
#181187 - 24/12/2003 14:07 Re: mlord's upgrader, ported to MacOS, works now [Re: Daria]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Hi

Your diffs don't apply cleanly to my current souce -- could you post the entire upgrader.c file that you have now, please.

Thanks

Top
#181188 - 24/12/2003 14:26 Re: mlord's upgrader, ported to MacOS, works now [Re: mlord]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Absolutely


Attachments
193888-upgrader.c (142 downloads)


Top
#181189 - 24/12/2003 15:49 Re: mlord's upgrader, ported to MacOS, works now [Re: Daria]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Okay, here is upgrader.c version 0.6 -- my latest with your latest sync'd in.

Cheers


Attachments
193910-upgrader.c (180 downloads)


Top
#181190 - 24/12/2003 16:01 Re: mlord's upgrader, ported to MacOS, works now [Re: mlord]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
Just a FYI:

bash-2.05b$ gcc -Wall -o upgrader_0.6.exe ./193910-upgrader_0.6.c
193910-upgrader_0.6.c: In function `main':
193910-upgrader_0.6.c:466: warning: long unsigned int format, different type arg (arg 4)

A current cygwin install using:
bash-2.05b$ gcc --version
gcc (GCC) 3.3.1 (cygming special)

--Nathan

Top
#181191 - 24/12/2003 16:02 Re: mlord's upgrader, ported to MacOS, works now [Re: Mataglap]
Mataglap
enthusiast

Registered: 11/06/2003
Posts: 384
And here's the binary.

--Nathan


Attachments
193915-upgrader_0.6_cygwin.exe (73 downloads)


Top
#181192 - 24/12/2003 16:04 Re: mlord's upgrader, ported to MacOS, works now [Re: Mataglap]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14493
Loc: Canada
Ah.. cygwin must be using unsigned int instead of the more correct (?) unsigned long type for "off_t" (part of the struct returned by stat(2)).

I'll add a cast to the printf to eliminate the warning for v0.7 (someday).

Thanks

Top
#181193 - 17/01/2004 12:58 Re: mlord's upgrader, ported to cygwin [Re: Daria]
jdandrea
member

Registered: 07/11/2001
Posts: 188
Loc: New Jersey
Did you ever post the upgrader as ported to MacOS (X, I presume)? Inquiring minds ...

Ahh, I see it now - I missed the "Attachment" link tucked away on the left.
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)

Top
#181194 - 17/01/2004 13:58 Re: mlord's upgrader, ported to cygwin [Re: Daria]
jdandrea
member

Registered: 07/11/2001
Posts: 188
Loc: New Jersey
OK - trying updater now on MacOS X (with Hijack, gunzip and ncftpput at the ready). When I try to apply a certain 3.0 alpha I get this:

Error, size mismatch: 3334488576 vs 0

Clues, anyone?
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)

Top
#181195 - 17/01/2004 14:05 Re: mlord's upgrader, ported to cygwin [Re: jdandrea]
jdandrea
member

Registered: 07/11/2001
Posts: 188
Loc: New Jersey
Recompiled it. For some reason fstat() wasn't returning anything useful. Working now.
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)

Top
#181196 - 17/01/2004 15:22 Re: mlord's upgrader, ported to cygwin [Re: jdandrea]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
You probably had the wrong binary, the first one I posted was useless

Top
#181197 - 17/01/2004 16:20 Re: mlord's upgrader, ported to cygwin [Re: Daria]
jdandrea
member

Registered: 07/11/2001
Posts: 188
Loc: New Jersey
No problem at all. Looks like all is well now.

I wasn't getting any playlists in 3.0a5, and going back to 3.0a3 wasn't helping 'cause I still couldn't make it into jEmplode to do the rebuild. I went back to 2.0, then forward to 3.0a5 and the playlists were there <!>.

Of course now, hindsight's 20/15, so I'm running the command line rebuild database in jemplode v51 (which is probably what I should have run in the first place <LOL>).
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)

Top
#181198 - 17/01/2004 18:22 Re: mlord's upgrader, ported to cygwin [Re: jdandrea]
Daria
carpal tunnel

Registered: 24/01/2002
Posts: 3937
Loc: Providence, RI
Oh. Hm. I wonder if 3.0a5 can deal with the old (2.0) databases directly.

I guess I should steal a player binary off my spare player.

Top
#181199 - 17/01/2004 18:43 Re: mlord's upgrader, ported to cygwin [Re: Daria]
jdandrea
member

Registered: 07/11/2001
Posts: 188
Loc: New Jersey
Yeah, it seemed odd to me, actually. But that's how it went down. Meanwhile, I'm back on 2.0 after all - I've got some more CDs to upload. Holiday backlog ... yule gotta love it <groan>.
_________________________
-- JD - SN# 040104008 (120GB Blue, Digital Out)

Top
Page 1 of 2 1 2 >