Page 1 of 5 123 ... LastLast
Results 1 to 15 of 67

Thread: Does Homieflash work on a modified THD?

  1. #1
    Join Date
    Jul 2005
    Posts
    504

    Does Homieflash work on a modified THD?

    I have a few chips at my disposal, some of which are 12volt erase and some are 5volt erase. I would much rather use a 12v part because of my flashing hardware but if homieflash works on the THD I can be persuaded to stick with a 5v part.

    So does anyone know?

  2. #2
    Join Date
    Jun 2006
    Location
    Dougal County
    Posts
    1,007
    I've ripped a good image off of a THD PROM using bcc's modified version of homieflash before. I haven't tested the image, but others have successfully used it. I don't know if they used homieflash to write the image to the chip or not though.

  3. #3
    Join Date
    Nov 2002
    Posts
    1,076
    I've read&written sst39 proms with my modification to homieflash.
    For sst37 proms, reading works, but I think you'd have to do some hardware hacking to get the higher voltage required for flash writing.
    I haven't actually played with tivo-hd hardware, I'm of the opinion it's the same as s3 hardware as far as this is concerned.

    I've also been able to read&write tivo eproms with intel eepro100 pci cards as well. Under linux even.

  4. #4
    Join Date
    Jul 2005
    Posts
    504
    Quote Originally Posted by bcc View Post
    I've also been able to read&write tivo eproms with intel eepro100 pci cards as well. Under linux even.
    I am having trouble reading from the prom when inserted into an Intel NIC. I am using the Fboot tool and when I choose to update it tries to read the chip and save the file but it never gets passed 0% and after about five minutes it says error writing to drive C"

    If I put a random intel flash chip into the same nic I can easily read / write using the same tools.

    Any advice? Perhaps a Linux LiveCD exists which has the tool for reading/writing to the Intel NIC?

  5. #5
    Join Date
    Nov 2002
    Posts
    1,076
    I never got sst37s to work on the eepro cards, just sst39s. See:
    http://dealdatabase.com/forum/showpo...8&postcount=38

    You would need to compile homieflash & the antique eepro diagnostic code yourself. Probably could use a livecd and thumb drive for the custom software. I don't have all my notes, just the following, where I did the flash from my desktop:
    Code:
    % cc -o eepro100-diag eepro100-diag.c libflash.c
    % ./eepro100-diag -B
    eepro100-diag.c:v2.12 4/15/2003 Donald Becker (becker@scyld.com)
     http://www.scyld.com/diag/index.html
    Index #1: Found a Intel i82557/8/9 EtherExpressPro100 adapter at 0xcc00.
    Unknown BIOS ROM ID 55 90.
    0x000: 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 U.U.U.U.U.U.U.U.
    ...
    
    BIOS ROM dump done.
     Use '-a' or '-aa' to show device registers,
         '-e' to show EEPROM contents, -ee for parsed contents,
      or '-m' or '-mm' to show MII management registers.
    % ./homieflash -w s3-hacked.bin
    flash id bfd5: SST39VF010
    erasing...
    programming...
    verifying...
    success!

  6. #6
    Join Date
    Jul 2005
    Posts
    504
    For farks sake this is annoying. I tried to compile eepro-diag under an Ubuntu LiveCD and I kept getting piles of "error: format not a string literal and no format arguments"
    I had to modify the source of the eepro to add %s, to about 8 different spots. After I did that I then instead got the error "cannot open output file eepro100-diag read-only file system" because of an issue with the livecd.

    edit: I used a VMWare image to compile the file. I then rebooted back into the livecd so that I would have direct access to the hardware. The application runs and says the nic is active and to use the -f flag. I then use the -f and -B flag and it says flash operations aren't configured into the program. How can I configure them?

    I am also trying to compile Homieflash and I received many "incompatible implicit declaration of built-in function X" where x is exit, memset, malloc and bcopy. Also "passing argument 1 of 'bcopy' discards qualifiers from pointer target type"
    I added "#include <stdlib.h>" to the source of homieflash and it got rid of the exit and malloc. I then added "#include <strings.h>" to get rid of memset and bcopy. Now on to the third problem.

    You sure learn alot when shit doesn't work!
    Last edited by ciper; 12-17-2008 at 08:28 AM.

  7. #7
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by ciper View Post
    For farks sake this is annoying. I tried to compile eepro-diag under an Ubuntu LiveCD and I kept getting piles of "error: format not a string literal and no format arguments"
    I had to modify the source of the eepro to add %s, to about 8 different spots. After I did that I then instead got the error "cannot open output file eepro100-diag read-only file system"
    Oy, that's just a trivial compiler problem, and the read-only error sounds like pilot error. Anyways, here you go, I:
    • Grabbed newer version of eepro-diag that fixes trivial compiler problem with usage string.
    • Hook flash_pci_rom_show() to libflash library.
    • libflash library tweaked to set flash state to enabled
    • Thus eepro100-diag -B will enable flash write, at which point homieflash can be used to do the writing from user space without any kernel extension like the eepro100 code claims is required.
    • Wrote trivial makefile
    • Included pre-compiled linux binary (dynamically linked)
    Enjoy,
    bcc, 12/15/08

    Disclaimer: I have NOT re-tested this since 1/2007

    From:
    ftp://ftp.scyld.com/pub/diag/eepro100-diag.c
    http://ftp.bspu.unibel.by/pub/HardWa...iag/libflash.c

  8. #8
    Join Date
    Jul 2005
    Posts
    504
    Quote Originally Posted by bcc View Post
    Oy, that's just a trivial compiler problem, and the read-only error sounds like pilot error. Anyways, here you go, I:[LIST][*]Grabbed newer version of eepro-diag that fixes trivial compiler problem with usage string.[*]Hook flash_pci_rom_show() to libflash library.[*]libflash library tweaked to set flash state to enabled[*]Thus eepro100-diag -B will enable flash write, at which point homieflash can be used to do the writing from user space without any kernel extension like the eepro100 code claims is required.
    Thanks for the help. I was able to eventually solve the read only file system issue but I am curious what you did to enable writing in eepro? I couldn't find any comments in the code showing how to re-enable it.

    I think that frustration is clouding my judgement. One of the tools I tried to use against my original flash chip (instead of keeping it safe and using a stand in) wrote the first 64k of code to the chip over and over until it was full. The Tivo HD rom is about 74k so it essentially corrupted it. Using a blank flash chip or no flash in the THD gives no front panel lights but a corrupted prom will cause the green power LED to blink about 2 times per second.

    This thread is related - http://www.dealdatabase.com/forum/sh...ewpost&t=60311

  9. #9
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by ciper View Post
    what you did to enable writing in eepro? I couldn't find any comments in the code showing how to re-enable it.

    ...
    This thread is related - http://www.dealdatabase.com/forum/sh...ewpost&t=60311
    Seems like it should be part of the same thread. Anyways I posted a usability fix to homieflash over there, precompiled too, so you should be all set.

    Oh, and the change to libflash is as follows.
    Code:
    *** libflash.c     2006-07-11 19:22:27.0000
    00000 -0700
    --- libflash.c  2007-01-28 21:55:12.000000000 -0800
    ***************
    *** 67,72 ****
    --- 67,76 ----
      */
      #define RD_PAGE_SIZE 4096
      
    + enum SCBflash_states {
    +       FlashDisable=2, FlashEnable=1,
    + };
    + 
      enum flash_flags { ERASE_FIRST=1, };
      struct flash_id_table {
            unsigned char vendor_id, device_id;
    ***************
    *** 274,279 ****
    --- 278,285 ----
            int addr, did_dots = 0;
            int i, part_id, mem_size;
      
    + #define SCBflash 12
    +       outw(FlashEnable, addr_ioaddr + SCBflash);
            part_id = get_part_id(addr_ioaddr, data_ioaddr);
            mem_size = (part_id < 0) ? 64*1024 : flash_id[part_id].mem_size;

  10. #10
    Join Date
    Jul 2005
    Posts
    504
    While trying to compile your newest version of homieflash I see the following -

    homieflash.c:209 warning: format '%x' expects type 'unsigned int', but argument 2 has type of 'off_t'
    Line 209 reads
    printf("Setting FLASH_START=%x\n", flash_start);
    Line 37 reads
    off_t flash_start = FLASH_START;
    I am running a 32 bit CPU if it helps.

    I changed line 37 to
    unsigned int flash_start = FLASH_START;
    and it compiled without error. Is that an appropriate change?

    The program seems to run but doesn't function properly.
    ./homieflash -f 30100000 -w /media/disk-1/256k
    Setting FLASH_START=30100000
    flash id ffff: unknown
    erasing...
    programming...
    Fatal: error writing to 00000000: wrote 0b, got ff
    That makes me think the parameter is somehow not getting passed properly. Running it with the option to dump the prom results in a file full of "ff"
    Last edited by ciper; 12-15-2008 at 11:39 PM.

  11. #11
    Join Date
    Jul 2005
    Posts
    504
    Now on to eepro
    Trying to compile it gave me multiple "format not a string literal and no format arguments" which I solved by added "%s", to the offending lines. Once that change was made I can use your make file without error.
    Running it gives me an output just like yours did as listed in post 5 of this thread except that I had to use the force -f option and one line stating flash operations are not included.
    ./eepro100-diag -f -B
    eepro100-diag.c:v2.13 3/28/2005 Donald Becker (becker@scyld.com)
    http://www.scyld.com/diag/index.html
    Index #1: Found a Intel i82557/8/9 EtherExpressPro100 adapter at 0x2000.
    Unknown BIOS ROM ID 55 90.
    0x000: 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 55 f0 U.U.U.U.U.U.U.U.
    ...

    BIOS ROM dump done.
    Flash operations not configured into this program.
    Use '-a' or '-aa' to show device registers,
    '-e' to show EEPROM contents, -ee for parsed contents,
    or '-m' or '-mm' to show MII management registers.
    I assume eepro100-diag is working and that message can be ignored.

    On a side note I tried to run the command without the path specified and my system notified me that
    The program 'eepro100-diag' is currently not installed. You can install it by typing:
    apt-get install nictools-pci
    You will have to enable the component called 'universe'
    Last edited by ciper; 12-15-2008 at 11:17 PM.

  12. #12
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by ciper View Post
    I changed line 37 to

    and it compiled without error. Is that an appropriate change?
    It's OK for a 32 bit system; not really a generally correct fix as the data type for the variable really should be off_t. The program should work either way (just a warning not a functional error).
    Running it with the option to dump the prom results in a file full of "ff"
    You've initialized things with eepro-diag? Is the chip blank?

  13. #13
    Join Date
    Nov 2002
    Posts
    1,076
    Quote Originally Posted by ciper View Post
    I assume eepro100-diag is working and that message can be ignored.

    On a side note I tried to run the command without the path specified and my system notified me that
    Right, I should have deleted that message from the stub routine; it's calling the libflash code to enable flash writing on the chip. So, have you tried homieflash after running eepro100-diag?

  14. #14
    Join Date
    Jul 2005
    Posts
    504
    I tried running it afterwards and the results were pasted above. I do not believe the chip is blank since I used both my original flash chip and an officially supported (by the nic) intel flash chip. They both have the same output. I'm beginning to think I should try to get your precompiled versions and a suitable OS so I can get the Tivo working again and then continue to work on the problem offline. She hasn't said anything yet but I'm sure my girlfriend doesn't like her shows to not be recorded.

    Can you advise a good livecd that your precompiled versions would run under? DSL perhaps?

  15. #15
    Join Date
    Jul 2005
    Posts
    504
    Bcc I tried your precompiled versions of Homieflash and eepro100-diag under MFSLive 1.3b, Ubuntu 7.1, Ubuntu 8.04 and Damn Small Linux 4.4.10 but they will not run...

    I'm now officially going through Tivo withdrawal hahaha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •