Rockbox Technical Forums

Installation / Removal => Manual Installation => Iriver - Installation/Removal/Flashing => Topic started by: Aikon on March 13, 2007, 03:28:21 PM

Title: iriver patchtool only working under windows (tm)
Post by: Aikon on March 13, 2007, 03:28:21 PM
Got an unusual prob here. All my comps are running linux, and the patchtool I downloaded doesn't work with wine.
As far I only can three possibilities working for me:

I guess that's all the possible solutions I can currently think of. Any others? Any takers?
Title: Re: iriver patchtool only working under windows (tm)
Post by: nls on March 13, 2007, 08:08:57 PM
There is the mkboot tool in the tools dir of the rocbox source, it is able to patch an iriver firmware with a rockbox bootloader, you will have to use the descramble (found in the same source dir) before mkboot to decrypt the firmware image. Get a bootloader from http://www.rockbox.org/twiki/bin/view/Main/WebHome?topic=IriverBoot
After you have patched the firmware with mkboot you'll have to encrypt it again with the scramble (found in the same source dir as descramble and mkboot) tool.
Title: Re: iriver patchtool only working under windows (tm)
Post by: bluebrother on March 14, 2007, 06:04:54 AM
AFAIK fwpatcher runs using wine. I simply used a windows PC at uni when I patched the firmware that days back ...
Title: Re: iriver patchtool only working under windows (tm)
Post by: Mr_Rabid_Teddybear on March 14, 2007, 09:17:09 AM

  • Anyone trustworthy out there that can patch me the boot loader for my iriver H300? ;)


If you PM me an e-mail adress I can send you what I got: H300 1.29 Korean firmware patched with Rockbox H300 V5 bootloader.

Title: Re: iriver patchtool only working under windows (tm)
Post by: Febs on March 14, 2007, 11:04:48 AM
Please don't use the Rockbox forums to discuss distribution of the iriver firmware or other copyrighted material.  If you need to have such discussions, please do them privately, not on the forums.
Title: Re: iriver patchtool only working under windows (tm)
Post by: Aikon on March 14, 2007, 02:04:40 PM
First of all (giving the answers from bottom to top):
Febs, it sure wasn't my intention to do something illegally or getting you guys in trouble. I was just listing options that I could think of and got a reply.
Bluebrother, I already did try wine. Maybe I have a rather old version of this thing here at my old SuSE box. It just didn't work.
Mr_Rabid_Teddybear: Thanks a lot for your offer. I guess I'll try out the very first suggestion first, or rather I already did. :)

nls: Thanks a lot for the suggestion. Building the tools was quite easy after I edited the Makefile slightly to have it use the right compiler. Using the tools at the original image H300.hex provided me finally with a new one. It just troubles me that the size is so much different:
-rw-r--r--   2626559 Mar 14 19:26 H300.hex (old)
-rw-r--r--   4189157 Mar 14 19:29 H300.hex (new)

That's over 1M more. The bootloader is only 50k in size. Is this a normal behaviour? Could I have made a mistake while compiling/using the tools?

Here's what I did and the output of the tools:
# ./descramble -iriver ../../H300.hex H300
Model H300 series
File decoded correctly and all checksums matched!
Output file contains all headers and checksums


# ./mkboot -h300 H300 ../../bootloader-h300.bin test
Wrote 0x3febe5 bytes in test

# ./scramble -iriver test H300.hex
Model H300 series
File encoded successfully and checksum table built!


By the way... I hacked the tool "romsizetest.pl" slightly to also give me a positive message. Here's what I got:
Added to the code:
Code: [Select]
else {
    printf "Everything in order. There still are %d bytes left.\n",$max-$file;
}


H300.hex (original version):
Everything in order. There still are 262144 bytes left.
H300.hex (patched version):
Everything in order. There still are 262144 bytes left.

Amazingly, there's no difference between the numbers.

Now I'm sitting here looking at that rather large file, not really knowing wether it's save to update the player with it.
Title: Re: iriver patchtool only working under windows (tm)
Post by: LinusN on March 14, 2007, 02:51:48 PM
The romsizetest.pl tool is not for the iriver ROM, it is for the Archos.

The large size is correct, because the bootloader is located at the end of the image, so there is a large chunk of unused space between the end of the original image and the start of the bootloader.
Title: Re: iriver patchtool only working under windows (tm)
Post by: Aikon on March 14, 2007, 02:55:26 PM
Thanks a bunch for the confirmation.
I guess within a few {days, hours, minutes} I'll have a dual-boot iriver, too. I'll report back in when it's done.
Title: Re: iriver patchtool only working under windows (tm)
Post by: Aikon on March 14, 2007, 06:09:31 PM
SUCCESS!

Thanks for all the support :D :D :D

First impression after boot: That's more likely I like a software to be than the original from iriver.
Title: Re: iriver patchtool only working under windows (tm)
Post by: bluebrother on March 15, 2007, 09:42:18 AM
Welcome to the fascinating world of Rockbox! ;)