#111615 - 18/08/2002 18:43
UpgradeSplitter
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
I was just using Sven's UpgradeSplitter to check out some stuff in the upgrade files, and it appears that beta13 (perhaps amongst others) breaks it. There's a new chunk, 0x04, that appears that UpgradeSplitter doesn't know about.
First off, it doesn't handle it very gracefully. It just immediately bombs out. Removing the ``return 1'' line in the default: case solved that.
Second, I was wondering if anyone could help me verify that it is what I think it is. It appears to be an indicator of upon which models the upgrade can be applied. The ``car2'' upgrade's chunk contains ``7\n9\n'', which seems to match the /proc/empeg_id codes for the Mk2 and Mk2a, which seems just right. But the ``car1'' upgrade's chunk contains ``1\n'', which makes intuitive sense, but doesn't match the /proc/empeg_id ID for the Mk1 of 4.
Does anyone have any more insight into this?
_________________________
Bitt Faulk
|
Top
|
|
|
|
#111616 - 19/08/2002 08:20
Re: UpgradeSplitter
[Re: wfaulk]
|
journeyman
Registered: 18/02/2000
Posts: 51
Loc: UK
|
I think your guess is probably correct, but only the empeg people
can answer definitvely.
There's also an interesting new type 0x05, CHUNK_UNTARDRIVE0.
I keep meaning to try it out but haven't got around to doing so yet.
I hadn't seen Sven's upgrade splitter when I wrote mine, which
knows how to handle both these types, and, indeed, any other type.
See http://empeg.org.uk/up.html
|
Top
|
|
|
|
#111617 - 19/08/2002 08:28
Re: UpgradeSplitter
[Re: wfaulk]
|
carpal tunnel
Registered: 13/07/2000
Posts: 4180
Loc: Cambridge, England
|
It appears to be an indicator of upon which models the upgrade can be applied.
Yup.
But the ``car1'' upgrade's chunk contains ``1\n'', which makes intuitive sense, but doesn't match the /proc/empeg_id ID for the Mk1 of 4.
In order to cover various prototypes and halfway-house development units, some of which didn't have empeg_id's at all, "1" means "none, or anything less than 7".
As you can see for yourselves in lib/protocol/upgrader.cpp, CHUNK_UNTARDRIVE0 was never implemented.
Peter
|
Top
|
|
|
|
#111618 - 19/08/2002 08:36
Re: UpgradeSplitter
[Re: peter]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
I didn't even think to check the emptool source. Duh.
Thanks for the info.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#111619 - 19/08/2002 14:46
Re: UpgradeSplitter
[Re: wfaulk]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
In theory, the UpgradeSplitter on my homepage should be able to handle type 0x04 chunks, at least I did update my sources and I seem to remember putting it up on my page. Also, I think it also handles type 0x05 chunks.
The type 0x04 chunk is the HWREV(ision) chunk, enumerating the hardware revisions the named update file may be applied to (one HWrev per line). Why the MkI updates only state "1", and not 1 and 4 is beyond my knowledge however.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111620 - 19/08/2002 14:56
Re: UpgradeSplitter
[Re: caederus]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
The data part of a type 0x05 chunk really is a tar archive which gets extracted to /drive0. The only thing about it that I didn't check yet is wether /drive0 is formated or erased before this happens, but I _think_ it isn't.
EDIT: To clarify this, as it is easily mistaken: I know that it is _intended_ behaviour to untar that chunks data part to /drive0, but (like Peter said) was never implemented. I did think however, that it was implemented in the 2.0 betas somehow.
Also, I want to note that it was a conscious decision to only allow known chunk types in upgrade files. This way I wanted to prevent the user from unintentionally creating an upgrade file in an unsupported (by empeg) format.
I also tried to sum as much information in the "index" file as possible. Therefore I don't read single lined texts from external files but from the index itself. I loosened that approach for the 0x04 and 0x05 chunk types though, because I didn't have the time to do it right.
That being said, I would choose a different approach today, allowing the user to override the default behaviour and thus allowing for unknown chunk types.
cu,
sven
Edited by smu (19/08/2002 15:07)
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111621 - 19/08/2002 16:20
Re: UpgradeSplitter
[Re: smu]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
The sources on your web page didn't seem to reflect that change.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#111622 - 20/08/2002 12:21
Re: UpgradeSplitter
[Re: wfaulk]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
Oh well, I will have the following weekend almost completely free and to myself. I planned on cleaning up that source and creating a preliminary version of a custom upgrade file (with boot from /dev/hda2, with quite a bit of extra software preinstalled). These tasks just got an increased priority on my todo list.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111623 - 20/08/2002 12:29
Re: UpgradeSplitter
[Re: smu]
|
carpal tunnel
Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
|
Rob has explicitly stated that SonicBlue are the only ones allowed to distribute empeg software. Which means that no one else can distribute a .upgrade file, as it contains their copyrighted software.
The best thing we can do is write a program that will take a SonicBlue-distributed .upgrade file, pop it open, insert new software, then stitch it back up.
However, if you want to make a new .upgrade file for your own benefit, go ahead.
_________________________
Bitt Faulk
|
Top
|
|
|
|
#111624 - 20/08/2002 12:46
Re: UpgradeSplitter
[Re: wfaulk]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Bitt,
you are only partly right. The .upgrade file I am talking about won't touch the originals software partition and won't include it either. It will just be applied on top of a "classic" upgrade file. Also my hda2 image won't include the customized init executable that is included with the empeg's original .upgrade files.
In addition to this, I plan to provide a shell script / batch file along with it that takes - a patched hijack kernel,
- an original .upgrade file and
- my upgrade file,
unpacks the upgrade files and merges their pieces with the hijack kernel and creates a new upgrade file. As I won't be distributing any software that is copyrighted by empeg/sonicblue, they obviously can't object to it.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111626 - 20/08/2002 13:02
Re: UpgradeSplitter
[Re: tonyc]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
I know, I know, and worst thing is I promissed to create that beast months ago, if not years. kimbotha once said he would take that project over, but he never released anything either.
I plan to integrate the original or modified versions of: - telnetd
- preinit
- rsync or rsyncd
- find
- HiJack (obviously I need a modified kernel anyway to boot from /dev/hda2)
Any other ideas? I don't want to put too much on the base system, as I plan to integrate some sort of package management which installs new software on the music partition (after the package itself is uploaded by the user using ftp).
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111627 - 20/08/2002 16:37
Re: UpgradeSplitter
[Re: smu]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
Well... A way way back I installed a whole slew of standard UNIX utils from a debian tarball that had been posted on this BBS... I think those basics (things like tee, join, cut, gawk, etc) should be there in addition to what you've mentioned. Basically all the important UNIX stuff that the standard developer image leaves out.
I agree, everything else should be set up as an add-on package. Your strategy sounds good.
Here's my concern though... Your strategy seems to be to use an alternate root partition on /dev/hda2 and chrooting to it. If this is done, the standard root partition (/dev/hda5) is wasted, right?
I always thought the best solution would be to install a standard linux setup on the regular root partition and use /dev/hda2 for the user apps (packages) that people want to install. This would keep the apps OFF the music partition, where they tend to cause problems with synchronization. I don't think there's more than 16mb of things we really need on the root partition, is there? Everything else would seem to be package-able, and reside on /dev/hda2. At least in my mind..
The way I would imagine it working, when I go to upgrade, I would take the empeg-supplied .upgrade file, along with a 3rd-party upgrade file with the user stuff, and feed them into some kind program which combines them and sends them over to the Empeg. The root partition from the empeg-supplied upgrade file would be ignored, and instead we'd use the stuff that's in the 3rd-party upgrade file. We'd just use the stuff under the /empeg directory from the official upgrade file. User packages (which could be selected during this mythical upgrade-building process) would all go to /dev/hda2.
This would make sure we're not wasting /dev/hda5, and as I said, avoid problems with apps running on the music drive and causing fsck's and syncs to fail.
Would this work?
|
Top
|
|
|
|
#111628 - 21/08/2002 07:01
Re: UpgradeSplitter
[Re: smu]
|
journeyman
Registered: 18/02/2000
Posts: 51
Loc: UK
|
Have you managed to get stuff to install on hda2? Is there some trick
to it? When I try to upload an upgrade I've made containing an ext2
image as CHUNK_PUMPHDA2, it goes funny. The player just re-starts part
of the way through the upgrade sequence and then gets understandably
confused as it sees the hda2 image data as serial commands.
If I use CHUNK_PUMPHDA5 instead, it works.
|
Top
|
|
|
|
#111629 - 21/08/2002 14:11
Re: UpgradeSplitter
[Re: tonyc]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
Well... A way way back I installed a whole slew of standard UNIX utils from a debian tarball that had been posted on this BBS... I think those basics (things like tee, join, cut, gawk, etc) should be there in addition to what you've mentioned. Basically all the important UNIX stuff that the standard developer image leaves out.
Agreed.
Here's my concern though... Your strategy seems to be to use an alternate root partition on /dev/hda2 and chrooting to it. If this is done, the standard root partition (/dev/hda5) is wasted, right?
No. My approach is different from that, for copyright and technical reasons. - For copyright reasons, I can't integrate the original software into my partition images. Therefore, my partition image needs to be modified before upload, copying the original binaries in, or it needs to access the original software on the empeg from a different (the original) software partition.
- I can't create a software that integrates the original binaries into my image for a simple reason: Those who will benefit the most from my upgrade file are those that are _not_ Unix guys but want additional software on their empegs. And those people most certainly use Windows, which is not capable of writing to an ext2 image.
I always thought the best solution would be to install a standard linux setup on the regular root partition and use /dev/hda2 for the user apps (packages) that people want to install. This would keep the apps OFF the music partition, where they tend to cause problems with synchronization. I don't think there's more than 16mb of things we really need on the root partition, is there? Everything else would seem to be package-able, and reside on /dev/hda2. At least in my mind..
Well, like said above, I need to use two partitions, one for my root image and one for the original software. and I don't see how installing additional software on the music partition could affect synchronization (apart from using up space). As long as it isn't installed in the "fids" subdirectory of the music partition.
Installing the packages on the music partition has the additional benefit of not being affected by any update to the empeg software or my image.
This would make sure we're not wasting /dev/hda5, and as I said, avoid problems with apps running on the music drive and causing fsck's and syncs to fail.
I currently have telnetd running from the music partition, and no sync or fsck failed yet. Are there any verified incidents where that happened?
Ciao,
Sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111630 - 21/08/2002 14:28
Re: UpgradeSplitter
[Re: caederus]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
Hi.
I didn't have much time to check if/how good it works. But there would be a way around that problem if needed. I would really like to hear about this from the empeg people.
Regards,
Sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111631 - 21/08/2002 14:30
Re: UpgradeSplitter
[Re: smu]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
I can't create a software that integrates the original binaries into my image for a simple reason: Those who will benefit the most from my upgrade file are those that are _not_ Unix guys but want additional software on their empegs. And those people most certainly use Windows, which is not capable of writing to an ext2 image.
Hm there has been some talk of getting e2tools compiled for win32 to do just this... I think this would be beneficial because the stuff from /empeg/ on the empeg-distributed upgrade could be merged with your stuff from your upgrade file (/bin, /usr, etc) and put onto /dev/hda5 (the default root partition.) This leaves /dev/hda2 free for user apps. And it'd be legit. If e2tools was working on win32, wouldn't it be theoretically possible to combine the files onto one partition?
I currently have telnetd running from the music partition, and no sync or fsck failed yet. Are there any verified incidents where that happened?
Yeah, I think so...
http://empeg.comms.net/php/showthreaded.php?Cat=&Board=empeg_tech&Number=96153
http://empeg.comms.net/php/showflat.php?Cat=&Board=empeg_tech&Number=101269
|
Top
|
|
|
|
#111632 - 21/08/2002 14:55
Re: UpgradeSplitter
[Re: tonyc]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
I currently have telnetd running from the music partition, and no sync or fsck failed yet. Are there any verified incidents where that happened?
Yeah, I think so...
The first thread you mentioned isn't really related, but the second one got me on track:
Running an application from the music partition is not the problem, but the application in question must not have a file from the music partition open (which my telnetd hasn't) and its current working directory must not be on the music partition (my telnetd is running with cwd=/sbin IIRC). emptriv on the other hand probably keeps its trivia files open (which I think are stored with the binary) and
it is probably running with cwd=<path of emptriv>.
So what I need to implement is a way to install the software on one of the possible program partitions (hda2 or hda5) automatically if needed.
The only problem to decide on is wether I want to install all packages on one of the program partitions or to install only those that might interfere with sync/fsck. If I did the later, the package author would be required to indicate if the package might interfere with them.
It is probably easiest to just install all packages on the software partition(s).
Regarding the e2fs tools on win32: If they really where available and functioning reliably, that would certainly be interesting.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111633 - 21/08/2002 15:02
Re: UpgradeSplitter
[Re: smu]
|
carpal tunnel
Registered: 27/06/1999
Posts: 7058
Loc: Pittsburgh, PA
|
The emptriv questions are stored in a "questions" subdirectory. It does run with cwd=<path to emptriv> but that's probably just my sloppy coding.
It is probably easiest to just install all packages on the software partition(s).
Right, which is why I was hoping that hda5 could be used for the "standard" stuff (the /empeg stuff plus /bin, /usr/bin, etc) and hda2 could hold all the user apps. But I guess you're right in that it doesn't make much sense to have it only available for Linux, which, without e2fstools on Win32, would be the case. I still think it's the ideal solution though.
|
Top
|
|
|
|
#111634 - 21/08/2002 15:30
Re: UpgradeSplitter
[Re: tonyc]
|
old hand
Registered: 30/07/2000
Posts: 879
Loc: Germany (Ruhrgebiet)
|
But I guess you're right in that it doesn't make much sense to have it only available for Linux, which, without e2fstools on Win32, would be the case. I still think it's the ideal solution though.
yes, it would be ideal. It would also be a way to circumvent the (unverified) problem that PUMP_HDA2 does not work as expected.
cu,
sven
_________________________
proud owner of MkII 40GB & MkIIa 60GB both lit by God and HiJacked by Lord
|
Top
|
|
|
|
#111635 - 21/08/2002 18:28
Re: UpgradeSplitter
[Re: smu]
|
journeyman
Registered: 18/02/2000
Posts: 51
Loc: UK
|
Ah, false alarm. I had forgotton to gzip the new filing system image.
Once I did that, it all worked perfectly!
I used only my upc utility and upgclient with filesystem images I built myself---I needed
nothing from empeg's upgrade.
I created a mini-debian installation by picking apart the packages from
http://www.uk.debian.org/debian/dists/potato/main/binary-arm/
but it's really hard to get a useful subset in 16Mb. Even 32Mb isn't
enough for the basic C development tools. So I ended up using both hda5
for / and hda2 for /usr.
I can do hda5 and hda2 together or separately. You don't need to do a
separate CHUNK_PUMPHDA for each partition---indeed, you don't seem to
need this at all.
|
Top
|
|
|
|
#111636 - 22/08/2002 02:16
Re: UpgradeSplitter
[Re: smu]
|
journeyman
Registered: 18/02/2000
Posts: 51
Loc: UK
|
That was a false alarm---I hadn't compressed my disk image.
|
Top
|
|
|
|
#111637 - 23/08/2002 06:56
Re: UpgradeSplitter
[Re: smu]
|
Carpal Tunnel
Registered: 08/02/2002
Posts: 3411
|
Feel free to integrate any/all of the shell script I wrote for setting up /dev/hda2 as a /programs0 mount
_________________________
Mk2a 60GB Blue. Serial 030102962
sig.mp3: File Format not Valid.
|
Top
|
|
|
|
#111638 - 08/01/2004 02:41
Re: UpgradeSplitter
[Re: genixia]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
Apologies for bumping this thread back up with a silly question -
To create my own upgrade file containing the apps I currently have installed (basically to make a reinstall much easier if I mess anything up) am I correct in thinking that as long as my apps are all on hda5 I just need to replace the pumphda5 compressed image in the official empeg released upgrade file with a gzipped copy of my hda5?
And if that is the case, does that also take into account the hijack kernel? Or is it just in flash?
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#111639 - 08/01/2004 08:28
Re: UpgradeSplitter
[Re: frog51]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
The .upgrade files usually have a replacement kernel within them. If you are making your own .upgrade file, then you could stick a Hijack kernel into it in place of the vanilla one.
When using my upgrader utility to upgrade a player over ethernet, the tool ignores the replacement kernel in the .upgrade file.
Cheers
|
Top
|
|
|
|
#111640 - 08/01/2004 10:21
Re: UpgradeSplitter
[Re: mlord]
|
old hand
Registered: 28/04/2002
Posts: 770
Loc: Los Angeles, CA
|
the tool ignores the replacement kernel in the .upgrade file. can you change the upgrader utility so that you can override this with a switch, for those times when you want vanilla kernel for troubleshooting? will it cause problems to overwrite hijack while using one of hijack's functions? just stinks how i have to revert back to the slow serial way when i do need a stock kernel.
|
Top
|
|
|
|
#111641 - 08/01/2004 10:41
Re: UpgradeSplitter
[Re: image]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
upgrader dumps the kernel from the .upgrade file into the current working directory, so you can install it separately if you really want to blow away Hijack.
-ml
|
Top
|
|
|
|
#111642 - 08/01/2004 10:43
Re: UpgradeSplitter
[Re: image]
|
carpal tunnel
Registered: 29/08/2000
Posts: 14496
Loc: Canada
|
No need for a slow serial connection to install a non-Hijack kernel: just FTP it to /proc/empeg_kernel on the player, and then reboot.
Of course, after discarding Hijack, you're stuck with slow serial for the next kernel installed..
-ml
|
Top
|
|
|
|
#111643 - 12/01/2004 05:11
UpgradeSplitter - technical question (simple)
[Re: mlord]
|
pooh-bah
Registered: 09/08/2000
Posts: 2091
Loc: Edinburgh, Scotland
|
For just flashing kernels I tried Upgrader a few times but had cygwin1.dll issues every time so I gave up. If I can get that sorted I will definitely use it, as ftp-ing to /dev/flash_kernel only works intermittently.
What I really want to do with upgradesplitter/builder is use it as a backup of my system and make a build which includes the hijacked kernel, emphatic, tts, telnetd and anything else which I have installed after the last upgrade.
So if I'm reading correctly, all I need to be able to do is create the disk image which goes into pumphda5?
How do I do this? Anyone able to help me? I know it should be simple, but I can't figure it out, and I don't see any info anywhere.
(oh, and in trying to get the latest hijack kernel, it appears the sourceforge hijack site is down just now)
_________________________
Rory MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi MkII, 240Gb in Mark Lord dock MkII, 80Gb SSD in dock
|
Top
|
|
|
|
#111644 - 12/01/2004 05:17
Re: UpgradeSplitter - technical question (simple)
[Re: frog51]
|
carpal tunnel
Registered: 24/12/2001
Posts: 5528
|
Huh? What cygwin1.dll issues?
Also why does FTP the kernel to /dev/flash_kernel (/proc/kernel_flash) only work sometimes? I do it all the time and it works perfectly for me.
To create the disk image you need a Linux machine or something that understands Ext2.
|
Top
|
|
|
|
|
|