Author Topic: PhatPatch - Firmware Patcher!!!!!!!!!!!!  (Read 32250 times)

0 Members and 2 Guests are viewing this topic.

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
PhatPatch - Firmware Patcher!!!!!!!!!!!!
« on: July 24, 2005, 06:36:42 am »
Rob, Sam, Jud + I got together on IRC tonight, and somehow were able to hammer something out.

We are having trouble writing to the flash chip on the PhatBox -- we can get out a few bytes at a time, and then the box hangs.  This is okay, because I wrote a program that can make a 1-byte change to the bootloader, which is enough to bypass the drive signature check and allow you to use any drive you want.

It should go without saying that this at your own risk...

Bushings manual method for people with serial access

Scripts to do this for you

-b

(edit by jud to link to scripts, change name of thread some and sticky this bad boy..)
« Last Edit: July 27, 2005, 01:07:20 am by judb »

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: phatpatch
« Reply #1 on: July 24, 2005, 01:32:29 pm »
sweet, I just finished reflashing mine over about 300 kernel panics.... and it works beautifully now w/ sig or without... I wouldnt reccomend that method to anybody though, it requires the serial port.  We may want to make a flash writer for loading a new flash off hdd using boot_rom and serial port, or even just having the code to flash the rom loaded in place of linux... the actual flashing works fine its just that the kernel gets pissy.   We could even take what you did here to get the loader to load a flasher instead of a kernel :)

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: phatpatch
« Reply #2 on: July 24, 2005, 01:57:32 pm »
I am going to test this out on one of my phatboxes using the serial port to watch it, then I'll write some scripts that can be used to run all this stuff and add to the wiki the info on it.

Be back shortly.

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: phatpatch
« Reply #3 on: July 24, 2005, 02:55:03 pm »
Okay it works! WAY TO GO GUYS!  

I need somone to test the scripts that I built to do this.  They seem to work on my box but it is already flash patched from the command line to make sure I had all the commands for my scripts correct.

Any testers?


ALSO -- To be specific about what this patch acomplishes, YOU CAN RUN ANY DRIVE YOU WANT IN YOUR PHATBOX OR KEG!!!!  You cannot run modified code yet.  This patch disables the drive signature check but NOT the .sig file checks of the boot loader of files in the phatsys partition or the fact that phatd checks them as well.

I am sure in due time we'll put together a method to do those too if there is demand for it.

As it stands right now though I think this may be the safe method to go with to keep phatnoise from playing whack-a-mole on us... You cant steal audible music like this I think.  The hdparm will still return the real serial number of your drive so you cant play back music that was written to another drive.

This may break new audible content from being written to the new drive as well but I don't know how PMM does its encryption to the drive serial in windows.  So just have it safe to say that Audible will likely not work at all on a modified drive.  

If you do this patch you can still you an old valid DMS (if the sig is intact) and play audible content off it just fine...
« Last Edit: July 24, 2005, 02:59:18 pm by judb »

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: phatpatch
« Reply #4 on: July 24, 2005, 03:51:06 pm »
http://wiki.phathack.com/Script_to_run_firmware_patch

Enjoy.. let me know if you have trouble with this or have suggestions on how to change it. :)

Also if anyone wants to host the file on their own site, I highly suggest that you do in case somehow mine gets removed.

Thanks!

Offline A543

  • Senior Member
  • Veteran.
  • *****
  • Posts: 214
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #5 on: July 24, 2005, 04:08:44 pm »
Congratulations guys! Great work!! Awesome effort!
I predict NewEgg will soon be out of stock on large notebook harddrives.
I saw in the WIKI that drives larger than 127gb haven't been tested but has anyone actually tried something larger than 80gb?  I can't see any reason it wouldn't work, but I figured I ask before placing my order.
BTW, $160 for a 100gb Toshiba sure beats $400.00+ for an 80gb.

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #6 on: July 24, 2005, 04:13:43 pm »
I'll be headed to frys shortly to buy as big of a drive as I can there.. I'll post a trip report in a few hours. :)

Offline A543

  • Senior Member
  • Veteran.
  • *****
  • Posts: 214
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #7 on: July 24, 2005, 08:35:11 pm »
Hmm, it didn't work for me.
Here is my bootload.log:

BOOT0-1: OK
BOOT0-2: Failed

It still seems to be checking the sig against the serial number.  Does this require NO sig on the drive?  I'm attempting to get my non-phatnoise but keyed (wrong key of course) drive to work.  The original drive seems fine.

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #8 on: July 24, 2005, 08:37:01 pm »
when you tried to use the utility did it log anything into /log ?  perhaps the script i gave you is hosed somehow and it didnt really run the phatpatch flash utility?

hit me on IM or on the IRC channel I'll be around all day.

Offline Terry_Kennedy

  • Senior Member
  • Veteran.
  • *****
  • Posts: 253
  • There and back again
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #9 on: July 24, 2005, 09:44:18 pm »
Quote
I saw in the WIKI that drives larger than 127gb haven't been tested but has anyone actually tried something larger than 80gb?

Not yet - let us know. I expect that a new kernel will be needed to support drives > 127GB. Somebody could probably test that now on the bench using a 3.5" drive.

I think PhatNoise published the diffs from the stock kernel that they use to build their kernel, so it should be possible to build a newer kernel with 48-bit LBA support. The only sticking point might be whether anybody bothered to add 48-bit LBA support to the IDE controller used in the PhatBox - is it integrated in the ARM, or a PC-style component?

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #10 on: July 24, 2005, 09:53:30 pm »
its a XILINK XC9572XL, its some CPLD chip.. dunno if we can update it or not.
« Last Edit: July 24, 2005, 09:55:31 pm by judb »

Offline Oaf

  • Newbie
  • Posts: 11
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #11 on: July 24, 2005, 10:08:54 pm »
Great work everyone! :-)

Is this going to work with all versions of the Phatbox then (I've got the VW/Audi one). Anyone tried it yet/got any ideas?

Congrats on a good hack!

Offline Terry_Kennedy

  • Senior Member
  • Veteran.
  • *****
  • Posts: 253
  • There and back again
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #12 on: July 24, 2005, 10:21:24 pm »
Quote
its a XILINK XC9572XL, its some CPLD chip.. dunno if we can update it or not.

Hmmm. I wonder if it is just being used as a glorified parallel port to talk to the drive? Do we have the PhatNoise-supplied kernel change file around here somewhere? It would be interesting to see if the kernel config references a "stock" Linux IDE driver or if they wrote their own...

Offline RobM

  • Senior Member
  • A few posts under my belt.
  • *****
  • Posts: 48
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #13 on: July 24, 2005, 11:20:33 pm »
The second Xilinx chip is only present on some of the PhatBox boards (check the pictures in the Wiki's Hardware FAQ).  Mine doesn't have it, and the kernel is configured to access the IDE drive with the stock Linux IDE driver as a regular memory-mapped device.

It appears to have been replaced with a pair of 74245 ICs (and some other general-purpose logic chips) in the later board revisions, probably to reduce cost.

http://downloads.phathack.com/sbingner/images/c710-front.jpg
http://downloads.phathack.com/sbingner/images/cx910-front.jpg
« Last Edit: July 24, 2005, 11:36:53 pm by RobM »

Offline sbingner

  • Administrator
  • Veteran.
  • *****
  • Posts: 1301
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #14 on: July 24, 2005, 11:49:55 pm »
Quote
Hmmm. I wonder if it is just being used as a glorified parallel port to talk to the drive? Do we have the PhatNoise-supplied kernel change file around here somewhere? It would be interesting to see if the kernel config references a "stock" Linux IDE driver or if they wrote their own...


http://downloads.phathack.com/sbingner/linux-2.4.18-phatbox-req.patch

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #15 on: July 25, 2005, 04:02:36 am »
Okay, its verified, I have a 100 gig seagate 5400 rpm 8 meg buffer drive from Frys (179.99 (20 bucks off normal price) in my DMS now.

I'll post the exact steps I used..  

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #16 on: July 25, 2005, 04:44:06 am »
Quote
Hmm, it didn't work for me.
Here is my bootload.log:

BOOT0-1: OK
BOOT0-2: Failed


As far as I understand my own hack, the only way the code can possibly generate the message "BOOT0-2: Failed" is if the patch didn't successfully execute i.e. your bootloader is unmodified.  

It looks like judb's sweet script logs the output of the phatpatch utility -- would you mind posting the contents of your PHTSYS\log\phatpatch.log file?  Also, feel free to try repeating the whole process-- it won't hurt anything, and in fact, it will generate output that can prove whether or not it sucessfully patched the firmware last time, as well as give us helpful info about your model of flash chip, etc.

-b

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #17 on: July 25, 2005, 05:15:20 am »
We got it fixed.  there was a problem with the way the files got extracted.

big updates to http://wiki.phathack.com/Script_to_run_firmware_patch

Goes over how I got the new drive to work.  its a bit more involved that I expected but its really not as hard as it may sound on the first glance over that wiki entry.

Offline todd1010

  • Veteran.
  • ****
  • Posts: 346
  • 2005 Audi S4
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #18 on: July 25, 2005, 05:19:41 am »
So not being a programmer and having some basic computer skills. How & where do I start with adding a non-OEM DMS to my Phatbox?

Is there a complete write up with step by step? I've already got a Fujitsu 60gb HD that I've been wanting to use.
todd1010 AT gmail DOT com

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: PhatPatch - Firmware Patcher!!!!!!!!!!!!
« Reply #19 on: July 25, 2005, 05:27:50 am »
Quote
So not being a programmer and having some basic computer skills. How & where do I start with adding a non-OEM DMS to my Phatbox?

Is there a complete write up with step by step? I've already got a Fujitsu 60gb HD that I've been wanting to use.


See my post above.  Follow the link to the wiki.. and read over the whole thing at least one time BEFORE starting.  Print it out if you dont have two computers because you'll be rebooting your PC to do it.

Anyone should be able to do these things without having any programming or computer repair skills.  Knowledge of a screwdriver is required. :)
« Last Edit: July 25, 2005, 05:28:50 am by judb »