• ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
  • ×
    Information
    Need Windows 11 help?
    Check documents on compatibility, FAQs, upgrade information and available fixes.
    Windows 11 Support Center.
  • post a message
Guidelines
Are you having HotKey issues? Click here for tips and tricks.
HP Recommended

For some reason my original post was deleted. Here it is if anyone still needs it:

 

After half a week of trying, I've finally got the system up and running again!

 

After countless hours of googling, piecing information together and nail-biting experimentation, I was able to successfully flash the latest BIOS using a similar method to PhoenixForce. Here's exactly what I did:

 

What I tried:

- Removing CMOS battery overnight

- Changed CMOS reset jumper as per instructions around 35-40 times (left overnight to dissipate charge)

 

None of these solutions worked, so I went with drastic measures and attempted a BIOS reflash using the ROM_RECOVERY SPI header. The following is what worked for me, however YMMV - attempt at your own risk and only as a last resort.

 

Hardware required:

- A broken HP system (ours is a HP ENVY 23-d113a TouchSmart All-in-One Desktop PC)

- Arduino Uno R3 (I used a Freetronics Eleven R3)

- Jumper leads to attach to the Arduino and SPI header like these

- A working PC

 

Software:

- Ubuntu Linux latest

- VirtualBox

- Download the latest BIOS for your PC by googling HP drivers and your PC model (eg. v8.17 for me) and after double clicking the exe, find the extracted .ROM file (usually under c:\SWSetup\ )and copy to a USB

 

Steps:

1. On working system, install Ubuntu through VirtualBox using this guide BUT also install USB drivers where it says not to!

2. Close Ubuntu down and go to the USB settings in VirtualBox

3. Connect the Arduino via USB

3. Check Enable USB Controller, select the speed of your USB port (1.0,2.0 or 3.0) and Add a new USB filter for the connected Arduino

4. Start Ubuntu

 

5. To get the necessary software (flashrom, frser-duino) required for flashing the new bios, press the top icon on the taskbar, type "Terminal" and click the Terminal icon

6. Type "sudo apt-get install flashrom gcc-avr binutils-avr gdb-avr avr-libc avrdude git" without quotations and press enter

7. Type "git clone --recursive git://github.com/urjaman/frser-duino" without quotations and press enter

8. Type "ls -l /dev/ttyACM*" (without quotation marks, press enter) to check your Arduino is connected

9. Type "sudo usermod -a -G dialout <your username>" to add yourself to the dialout group

10. Reboot/logout from Ubuntu

 

11. When restarted or logged back in, open up Terminal again

12. Type "cd frser-duino" (without quotes/press enter)

13. Type "make u2 && make flash-u2" (as above) to write the program to your Arduino and close terminal once complete

 

14. On your HP, unplug power cord and remove the backplate

15. Remove the casing above where the memory/CMOS battery and jumpers sit

16. Remove your CMOS battery and place it to the side

17. Use a screwdriver to remove the 5 screws holding the metal casing above the motherboard and remove casing

18. Locate the ROM_RECOVERY header. It looks like this:

 

original.png

19. Remove the jumper connecting SPI_CS# and SPI_CS# and put it aside

20. If there's a jumper directly above the ROM_RECOVERY header, shift it to the right hand pins (closest to the SPI_CS# headers). Not sure what this does, but it worked for me.

21. The fun stuff. Connecting the Arduino. First, unplug the Arduino USB

22. Connect the arduino and ROM_RECOVERY SPI header:

Connect Arduino Pin 10 --> the BOTTOM SPI_CS# (ie. NOT the one next to SPI_MOSI)

Connect Arduino Pin 11 --> SPI_MOSI

Connect Arduino Pin 12 --> SPI_MISO

Connect Arduino Pin 13 --> SPI_CLK

Connect Arduino GND --> GND

Connect Arduino 5V* --> 3VSB

 

*Originally I tried connecting Arduino 3.3V --> 3VSB, however erasing/writing to the BIOS would fail every single time. As soon as I switched to 5V as a last ditch effort, it worked for me. YMMV.

 

23. Plug your Arduino back into the working PC

24. To create a copy of your old BIOS file, open Terminal and type "flashrom -p serprog:dev=/dev/ttyACM0:115200 -r old.ROM"

25. If all is correct, you should see your BIOS chip detected (my Spansion S25FL064K was detected as a Winbond W25Q64.V) and the process will start. sit tight until it's complete.

 

26. To write the latest HP BIOS, copy the *.ROM file downloaded and extracted onto the working PC to the Home folder in Ubuntu and rename to "new.ROM"

27. In Terminal, type "flashrom -p serprog:dev=/dev/ttyACM0:115200 -w new.ROM"

28. Bite nails for 15-20 mins

29. Wait for the verification to complete - the lights on my Arduino stopped flashing during verification so I actually pulled the USB out here. Probably don't do that - only if you have to.

30. Unplug the Arduino from USB and ROM_RECOVERY headers. Put jumper back over SPI_CS# headers and move other jumper back to left hand side.

31. Reinsert CMOS battery

32. Plug power back in and press ON button

33. System should start and then restart quickly. Let it do it's thing.

34. CELEBRATE!

35. When booted into windows, update BIOS the official way (run the exe file)

36. Leave system on for around 30-60 minutes.

 

I used these excellent resources in order of usefulness:

- http://systats.or8.net/hpspi/

- http://tomvanveen.eu/flashing-bios-chip-arduino/

- http://www.informaticanapoli.it/hp-envy-23-touchsmart-non-si-accende/

 

And of course a massive thanks to PhoenixForce who kickstarted the whole idea.

 

Good luck! If you have any questions, feel free to post them here.

HP Recommended

I deleted my ubuntu and installed a fresh version and followed your instructions and at step 13 i still get this at the end underlined and bold.

 

megiddo@megiddo-VirtualBox:~/frser-duino$ make u2 && make flash-u2
make clean
make[1]: Entering directory '/home/megiddo/frser-duino'
rm -f frser-duino.bin
rm -f frser-duino.out
rm -f frser-duino.hex
rm -f frser-duino.s
rm -f *.o
make[1]: Leaving directory '/home/megiddo/frser-duino'
DFLAGS= FRBAUD=115200 make all
make[1]: Entering directory '/home/megiddo/frser-duino'
avr-gcc -mmcu=atmega328p -DBAUD=115200 -Os -Wl,--relax -fno-inline-small-functions -fno-tree-switch-conversion -frename-registers -g -Wall -W -pipe -flto -fwhole-program -std=gnu99 -Ilibfrser -I. -o frser-duino.out main.c uart.c spihw.c libfrser/frser.c libfrser/udelay.c libfrser/spilib.c libfrser/spihw_avrspi.c
avr-size frser-duino.out
text data bss dec hex filename
1364 0 1036 2400 960 frser-duino.out
make[1]: Leaving directory '/home/megiddo/frser-duino'
BLBAUD=115200 SERIAL_DEV=/dev/ttyACM0 make program
make[1]: Entering directory '/home/megiddo/frser-duino'
avr-objcopy -j .text -j .data -O ihex frser-duino.out frser-duino.hex
avrdude -c arduino -p m328p -P /dev/ttyACM0 -b 115200 -U flash:w:frser-duino.hex
avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy

avrdude done. Thank you.

Makefile:69: recipe for target 'program' failed
make[1]: *** [program] Error 1
make[1]: Leaving directory '/home/megiddo/frser-duino'
Makefile:89: recipe for target 'flash-u2' failed
make: *** [flash-u2] Error 2
megiddo@megiddo-VirtualBox:~/frser-duino$

HP Recommended

Megiddo,

 

Try installing the Aduino IDE and also making sure you're added to the dialout user group. Make sure to sign out / sign in after adding yourself to the dialout group.

 

Can you tell me what the result of typing "ls -l /dev/ttyACM*" is?

HP Recommended

This Arduino IDE?

 

https://www.arduino.cc/en/Main/Software

 

The result of the devtty is

 

crw-rw---- 1 root dialout 166, 0 Aug 6 08:37 /dev/ttyACM0

 

I will install the ide after I confirm I have the correct link as above.

HP Recommended

I also went back through the process and now I get this.  I did sign out logoff and restarted the VM with Ubuntu after adding myself to the dialout.

 

megiddo@megiddo-VirtualBox:~/frser-duino$ make u2 && make flash-u2
make clean
make[1]: Entering directory '/home/megiddo/frser-duino'
rm -f frser-duino.bin
rm -f frser-duino.out
rm -f frser-duino.hex
rm -f frser-duino.s
rm -f *.o
make[1]: Leaving directory '/home/megiddo/frser-duino'
DFLAGS= FRBAUD=115200 make all
make[1]: Entering directory '/home/megiddo/frser-duino'
avr-gcc -mmcu=atmega328p -DBAUD=115200 -Os -Wl,--relax -fno-inline-small-functions -fno-tree-switch-conversion -frename-registers -g -Wall -W -pipe -flto -fwhole-program -std=gnu99 -Ilibfrser -I. -o frser-duino.out main.c uart.c spihw.c libfrser/frser.c libfrser/udelay.c libfrser/spilib.c libfrser/spihw_avrspi.c
avr-size frser-duino.out
text data bss dec hex filename
1364 0 1036 2400 960 frser-duino.out
make[1]: Leaving directory '/home/megiddo/frser-duino'
BLBAUD=115200 SERIAL_DEV=/dev/ttyACM0 make program
make[1]: Entering directory '/home/megiddo/frser-duino'
avr-objcopy -j .text -j .data -O ihex frser-duino.out frser-duino.hex
avrdude -c arduino -p m328p -P /dev/ttyACM0 -b 115200 -U flash:w:frser-duino.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "frser-duino.hex"
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: writing flash (1364 bytes):

Writing | ################################################## | 100% 0.28s

avrdude: 1364 bytes of flash written
avrdude: verifying flash memory against frser-duino.hex:
avrdude: load data flash data from input file frser-duino.hex:
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: input file frser-duino.hex contains 1364 bytes
avrdude: reading on-chip flash data:

Reading | ##### | 9% 0.02savrdude: stk500_recv(): programmer is not responding
Reading | ######### | 18% 5.03savrdude: stk500_recv(): programmer is not responding
avr_read(): error reading address 0x0000
read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: safemode: Sorry, reading back fuses was unreliable. I have given up and exited programming mode

HP Recommended

Ok everything worked now.  I was changing usb ports before and then changed to one on the back of the computer (desktop) and it worked.  Apparently, the ports on the front when run through those ports on the board did not work.  The USB ports on the back are directly soldered onto the motherboard and the ones on the front are not.  They run via wires through another black box inside the computer.

HP Recommended

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "frser-duino.hex"
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: writing flash (1364 bytes):

Writing | ################################################## | 100% 0.28s

avrdude: 1364 bytes of flash written
avrdude: verifying flash memory against frser-duino.hex:
avrdude: load data flash data from input file frser-duino.hex:
avrdude: input file frser-duino.hex auto detected as Intel Hex
avrdude: input file frser-duino.hex contains 1364 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.23s

avrdude: verifying ...
avrdude: 1364 bytes of flash verified

avrdude: safemode: Fuses OK (E:00, H:00, L:00)

avrdude done. Thank you.

make[1]: Leaving directory '/home/megiddo/frser-duino'
megiddo@megiddo-VirtualBox:~/frser-duino$

 

 

Hallelujah!!!!!!!!!!!!!

HP Recommended

Well maybe not Hallelujah just yet.

 

I hooked up the arduino to the HP and then plugged in the USB to my computer and tried to get the old rom copied using the command

 

flashrom -p serprog:dev=/dev/ttyACM0:115200 -r old.ROM

 

This is what I got.

 

megiddo@megiddo-VirtualBox:~$ ls -l /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Aug 6 09:53 /dev/ttyACM0
megiddo@megiddo-VirtualBox:~$ flashrom -p serprog:dev=/dev/ttyACM0:115200 -r old.ROM
flashrom v0.9.9-rc1-r1942 on Linux 4.4.0-31-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop... delay loop is unreliable, trying to continue OK.
serprog: Programmer name is "frser-duino"
serprog: requested mapping AT45CS1282 is incompatible: 0x1080000 bytes at 0x00000000fef80000.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

HP Recommended

I also used a post card to see if any codes pop up.  The bios code was "no" and the post code was 04F3

 

04 - POST card didn’t detect resetting signal, Reset Led always on or never flash on.  Term 12

 

F3 – POST card didn’t receive BIOS code / Have CLK signal, No IRDY and FRAME signal.  Term 3 & 5

 

The bios chip is 25Q064A 13E40 99chn with possibly 216003 at the end.

 

I am not sure but I think everything is telling me that I have to actually replace the bios chip.

HP Recommended

Hi Megiddo,

 

I did run into the same issue where the BIOS chip wasn't detected at one stage. Don't give up hope yet. Those little bastards are quite resilient. I seem to remember it having something to do with the arduino not powering the chip correctly. Make sure your rainbow leads aren't too long. Double check the connections. Are you sure your HP is completely unplugged and charge dissipated?

 

Keep at it, mate. You'll crack it.

 

Also maybe try with the 3.3v and see if you get a different result.

 

Which model HP are you trying this with? There's a possibility it's got a different SPI header layout...

 

Have a read of the flashrom manual here and try putting -V at the end of the flashrom command to give you more information about what is happening.

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.