[SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
|
2015-07-11, 12:38
(This post was last modified: 2015-07-17 18:43 by jrsmile.)
Post: #1
|
|||
|
|||
[SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
i get an error when using: BOOTUTILW64E.EXE for flashing iPXE into an Intel® Gigabit-Ethernet-Controller 82574L EXPI9301CT 8086:10d3
with a winbond 25x40 CLING SPI Flash Chip 4M-bit/512K-byte (524,288) did a git clone today and without modification "make bin/808610d3.rom" and got the following error: Code: C:\Intel20.1\APPS\BootUtil\Winx64>BOOTUTILW64E.EXE -nic 1 -File=original.rom -SA i have searched for the error and came across some padding tips i tried them even the filesize is correct now. i tried renaming the file from rom to IBA/iba/flb/FLB. no success so far. do i have to use ibautil? http://lists.ipxe.org/pipermail/ipxe-dev...01980.html or even a raspberry pi? http://satxhackers.org/wp/hack-content/u...ashrom.pdf |
|||
2015-07-12, 18:43
Post: #2
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
Did you follow the method outlined in http://ipxe.org/howto/romburning/intel to the point, or is that not possible with your NIC? You might also try to use an older version of the Intel flash utility and see if that works better. If neither of that works, you could also try to use the open-source flashrom utility which is described here: http://ipxe.org/howto/romburning/flashrom
I do recall vaguely the message on the mailing-list you refer to above, but the details have eluded me. Hopefully the information above combined with all the information in that ML thread above should help. I do recall some hex-editing of the header was required to make it work properly. |
|||
2015-07-13, 17:53
(This post was last modified: 2015-07-14 06:15 by jrsmile.)
Post: #3
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
thank you for the tips.
unfortunately i had no luck. using ubuntu 14.04.2 x64 i used flashrom and the card was not supported. then i updated to flashrom 0.9.8-daily and got the following error: mint # lspci -b 05:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection mint # flashrom -p nicintel_spi:pci=05:00.0 --output logfile.txt flashrom v0.9.8-unknown on Linux 3.13.0-37-generic (x86_64) flashrom was built with libpci 3.2.1, GCC 4.8.4, little endian Command line (4 args): flashrom -p nicintel_spi:pci=05:00.0 --output logfile.txt Calibrating delay loop... OS timer resolution is 1 usecs, 3570M loops per second, 10 myus = 9 us, 100 myus = 92 us, 1000 myus = 916 us, 10000 myus = 9393 us, 4 myus = 4 us, OK. Initializing nicintel_spi programmer Found "Intel 82574L Gigabit Ethernet Controller" (8086:10d3, BDF 05:00.0). Requested BAR is of type MEM, 32bit, not prefetchable Requested BAR is of type MEM, 32bit, not prefetchable Error accessing Intel Gigabit NIC w/ SPI flash, 0x1000 bytes at 0x00000000f7ac0000 /dev/mem mmap failed: Operation not permitted Error: Programmer initialization failed. mint mint # i am root but it does not allow me to even read. i have looked up this tip> The kernel itself has protections enabled to make it more difficult to become compromised. 0-address protection Since the kernel and userspace share virtual memory addresses, the "NULL" memory space needs to be protected so that userspace mmap'd memory cannot start at address 0, stopping "NULL dereference" kernel attacks. This is possible with 2.6.22 kernels, and was implemented with the "mmap_min_addr" sysctl setting. Since Ubuntu 9.04, the mmap_min_addr setting is built into the kernel. (64k for x86, 32k for ARM.) but dont know how to prevent it switch to dos used bootutil.exe >> Invalid image file 808610d3.rom used ibautil.exe >> No Supported Network Adapters found. i will try: http://www.win-raid.com/t58f16-Guide-Rec...ry-PI.html _______________________ can somebody have a look why bootutil does not accept the ipxe generated rom as input file? |
|||
2015-07-14, 09:33
Post: #4
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
I went searching in my #ipxe IRC logs, and found this line from mouse in 2014:
Quote:20140519-075533Z #ipxe: <mouse> BTW, do you have spec / tool to create FLB file from Option ROM to flash it via bootutil? current bootutil doesn't accept option rom as is. I've made a workaround by saveimage, cut the FLB header and glue it with iPXE option rom. and again reiterated by mcb30 a while later Quote:20140821-000836Z #ipxe: <mcb30> a) use an older version of bootutil So maybe you should try option C and see how that works out for you. I'm not sure what the format of the FLB header is, but you'll have to compare the raw option rom with the .flb file generated by saveimage, and then you'll hopefully figure out which byte index the raw option rom image starts and the FLB header ends. Best of luck! Please document how you did it here if you actually figure it out. |
|||
2015-07-14, 18:46
(This post was last modified: 2015-07-14 19:46 by jrsmile.)
Post: #5
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
ok then i start to figure it out.
the new FLB format is a container which can include more then one image. i saved one directly from the card and compared it to the one which comes with the bootutil: update-container: Code: Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F rom-save-image: Code: Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ipxe-rom: Code: 00000000 55 AA 7A E9 9F 00 69 00 00 00 00 00 00 00 00 00 UªzéŸ.i......... but how to encapsulate the rom in the container is far from my knowledge (yet) more information on FLB format: Code: IBABUILD EXAMPLES: good test: Code: Intel's burning tool accepts only FLB files. The simplest wat to obtain FLB im not that skilled with scripting that i can add a flb header to the rom, could someone with more hex knowledge have a look? :-) |
|||
2015-07-14, 20:09
Post: #6
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
Good research you've done there. Using dd you should be able to easily rip the FLB header out of the backup.flb file. Then you just take note of the size of the ipxe rom and use cat to glue the two files together (cat header.flb 80861503.rom >80861503.flb). Then you finally open that FLB file open in a hex editor and change those bytes you need to change (size and version). Once you've done this manually and verified that it actually works then we can look into automating this.
Why do you need to change the version number? None of the documentation you've pasted explains why you need to do that. |
|||
2015-07-14, 20:18
(This post was last modified: 2015-07-14 20:48 by jrsmile.)
Post: #7
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
(2015-07-14 20:09)robinsmidsrod Wrote: Why do you need to change the version number? None of the documentation you've pasted explains why you need to do that. i don't know if it is necessary. just copied from the thread i found. i will try this tomorrow. lets see if we can get it to work. after just adding the header without modification the tool accepts the file but raises cpu to 100% and hangs i really need to learn offsets |
|||
2015-07-15, 17:42
(This post was last modified: 2015-07-17 18:33 by jrsmile.)
Post: #8
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
SUCCESS.... sort of.
did everything right but after reboot the iba is gone and ipxe is not showing up anywhere. |
|||
2015-07-17, 17:57
(This post was last modified: 2015-07-17 18:41 by jrsmile.)
Post: #9
|
|||
|
|||
RE: Problem Flashing with BOOTUTILW64E
[SOLVED]
save rom in container and raw rom from card: BOOTUTILW64E.EXE -nic=1 -SAVEIMAGE -FILE=backup.FLB BOOTUTILW64E.EXE -nic=1 -SAVEIMAGE -FILE=backup.NIC note down size of backup.nic extract header: dd if=BACKUP.FLB bs=1 count=378 of=header.flb make bin/808610d3.mrom (You have to use Mrom format) utils/./padimg.pl --blksize=(size of backup.nic) --byte=0x00 808610d3.mrom cat header.flb 808610d3.mrom > 808610d3.flb BOOTUTILW64E.EXE -nic=1 -RESTOREIMAGE -FILE=808610d3.flb sample file can be downloaded from http://www.behead.de/808610d3.flb sample header: http://www.behead.de/header.flb i used this method because i was not able to correctly modify the header so i padded the file to be the exact same size as the original image and just added the header. in theory this should work without the size limitation of the original file. |
|||
2015-07-17, 22:05
Post: #10
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
Good testing! At least this gives us the option of making an iPXE ROM that is the same size as the Intel ROM. What was the size of backup.nic in bytes? I guess the next step is to actually figure out how to add a ROM with arbitrary size (within padding and max restrictions).
|
|||
2015-07-17, 22:31
Post: #11
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
(2015-07-17 22:05)robinsmidsrod Wrote: Good testing! At least this gives us the option of making an iPXE ROM that is the same size as the Intel ROM. What was the size of backup.nic in bytes? I guess the next step is to actually figure out how to add a ROM with arbitrary size (within padding and max restrictions). It was 69632 byte |
|||
2015-07-21, 06:27
(This post was last modified: 2015-07-21 06:28 by jrsmile.)
Post: #12
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
it was not possible for me to do the same with a little embed script (fits of course still into the size of backup.nic). the application hangs again. do you know how embed scripts are handled internally?
|
|||
2015-07-25, 11:14
Post: #13
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
Well, 69632 = 65536 + 4096, so 68KB. That's an odd size for a ROM, but at least it is aligned on a 4K boundary, which I'm guessing is the requirement. Using util/padimg.pl with a blocksize of 4096 should give you a viable ROM, I'm guessing. But if you end up with something larger, then you'll still need to modify the size value in the header.
|
|||
2015-11-15, 08:47
(This post was last modified: 2015-12-03 04:35 by cottsay.)
Post: #14
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
I just stumbled upon this thread while trying to flash my 82574L, and I thought I'd report my findings for anyone else that makes their way here.
Unfortunately, when I was trying to use the directions that jrsmile posted, BOOTUTILW64E.EXE just ended up hanging. In retrospect, this was probably because the new image was larger than the old one and I didn't bother to change the size in the .flb header. In any case, instead of investigating the .flb problems, I tried to troubleshoot why flashrom wasn't working correctly (I was getting the same error that jrsmile mentioned on Mint). It turns out that if your kernel is configured with CONFIG_STRICT_DEVMEM=y, flashrom won't work. So I ended up re-compiling my kernel with it disabled, and flashrom lit up. I had to use a pretty recent build of flashrom to get support for the 82574L, by the way. From there, I read the ROM contents (total of 512K) and looked around for PXE code using "cat backup.bin | xxd | less". I found that the PXE code started at offset 0x2000, so I dumped the contents of 808610d3.mrom at that point (which overwrote all of the original PXE code) using some "dd" shenanigans. After I wrote it back to the card with flashrom, everything lit up! iPXE briefly shows up during BIOS initialization (where IBA used to initialize), and I have an iPXE entry in my BIOS boot menu, which works as expected. Thanks to robinsmidsrod and jrsmile for sharing this conversation! |
|||
2016-12-30, 08:42
Post: #15
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
I know it has been a while but any update on automating this. It appears the new versions of bootutil don't accept .rom images and creating the .flb with the header + mrom seems very error prone.
I just tried doing this on my system and ran into 2 problems. 1) backing up the nic's .flb and .nic files was "unsupported" according to bootutil 2) After creating the .flb file and attempting to flash the rom bootutil just hangs. I'm not sure if it's working or broken yet. Would be great if the wiki could be updated and hopefully a make target for .flb files for intel nics. |
|||
2017-11-08, 17:59
Post: #16
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
(2016-12-30 08:42)jgarr Wrote: I know it has been a while but any update on automating this. It appears the new versions of bootutil don't accept .rom images and creating the .flb with the header + mrom seems very error prone. I know that it has been awhile since this topic has been looked at, but as it is the first result when you search for some of these errors, I thought I would share my experiences. I also was getting the same errors and jgarr and found that the dos utility in FreeDOS was unable to do anything with the NICs in one of my machines. I was unable to saveimage the ROM (Unsupported) nor was I able to flash the ROM. However if you boot into the EFI shell and then use the x64-EFI version of bootutil from the current preboot.exe from INTEL, everything works as expected. |
|||
2018-11-08, 20:27
Post: #17
|
|||
|
|||
RE: [SOLVED] Problem Flashing with BOOTUTILW64E [FLB File]
Hey.
I know that this topic is very, very old, but I think I should share my experience. Background: my network card, based on the NIC 82574L, built into the Intel D2500NN motherboard, died for an unknown reason after changing OS from Windows to Linux Ubuntu Desktop. The BIOS did not show the mac address of the network card and Windows Device Manager showed "error code 10". I came to the conclusion that the memory was somehow damaged by the EEB. Fortunately, I had another exactly the same motherboard, so I was able to dump the EEBOOM memory image from the working motherboard and flash it into a non-working one. Since I spent a large amount of my free time on this, I want to help people who will follow my path. I'll attach the utility for flashing Intel NIC's and the EEPROM image for 82574L. I have replaced the MAC address with zeros (Its the first three bytes of EEPROM image). You can put there your own, or flash EEPROM without affecting yours with special command on EEUPDATE tool. Wish you good luck. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)