Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[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
Heart [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
VEIMAGE

Intel(R) Ethernet Flash Firmware Utility
BootUtil version 1.5.54.1
Copyright (C) 2003-2015 Intel Corporation

Saving flash firmware image on port 1 to file original.rom...saved

Port Network Address Location Series  WOL Flash Firmware                Version
==== =============== ======== ======= === ============================= =======
  1   6805CA378CC6     5:00.0 Gigabit YES PXE                           1.3.21

C:\Intel20.1\APPS\BootUtil\Winx64>BOOTUTILW64E.EXE -nic 1 -restoreimage -file 80
8610d3.rom

Intel(R) Ethernet Flash Firmware Utility
BootUtil version 1.5.54.1
Copyright (C) 2003-2015 Intel Corporation

Invalid image file 808610d3.rom

Port Network Address Location Series  WOL Flash Firmware                Version
==== =============== ======== ======= === ============================= =======
  1   6805CA378CC6     5:00.0 Gigabit YES PXE                           1.3.21

C:\Intel20.1\APPS\BootUtil\Winx64>

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
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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?
Visit this user's website Find all posts by this user
Quote this message in a reply
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
20140821-000848Z #ipxe: <mcb30> b) use flashrom (if it supports your NIC) instead of bootutil
20140821-000912Z #ipxe: <mcb30> c) try mouse's hint that "bootutil required FLB format only. Raw Option ROM is not accepted. To workaround just saveimage, cut the header and prepend it to the iPXE Option ROM. Then everything started to flash and work"

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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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

00000000  46 4C 42 33 97 00 00 00 2C A0 10 00 00 86 80 43  FLB3—..., ...†€C
00000010  6F 6D 62 6F 20 52 75 6C 65 73 00 00 00 00 00 00  ombo Rules......
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03  ................
00000060  61 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  a...............
00000070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000090  00 00 00 00 00 00 00 86 80 FB 10 86 80 77 35 73  .......†€û.†€w5s
000000A0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000000B0  00 00 00 00 00 00 00 86 80 14 15 86 80 0B 00 7B  .......†€..†€..{
000000C0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000000D0  00 00 00 00 00 00 00 86 80 F8 10 86 80 0C 00 7B  .......†€ø.†€..{
000000E0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000000F0  00 00 00 00 00 00 00 86 80 0D 15 86 80 0C A1 5B  .......†€..†€.¡[
00000100  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
00000110  00 00 00 00 00 00 00 86 80 FB 10 86 80 11 7A 7B  .......†€û.†€.z{
00000120  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
00000130  00 00 00 00 00 00 00 86 80 FB 10 28 10 72 1F 7B  .......†€û.(.r.{
00000140  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000150  00 00 00 00 00 00 00 86 80 FB 10 28 10 EE 06 7B  .......†€û.(.î.{
00000160  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000170  00 00 00 00 00 00 00 86 80 C9 10 86 80 4C A0 5B  .......†€É.†€L [
00000180  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
00000190  00 00 00 00 00 00 00 86 80 E8 10 86 80 2C A0 5B  .......†€è.†€, [
000001A0  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
000001B0  00 00 00 00 00 00 00 86 80 1C 15 86 80 3C A0 5B  .......†€..†€< [
000001C0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000001D0  00 00 00 00 00 00 00 86 80 4D 15 86 80 11 7B 7B  .......†€M.†€.{{
000001E0  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
000001F0  00 00 00 00 00 00 00 86 80 F8 10 28 10 63 1F 7B  .......†€ø.(.c.{
00000200  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000210  00 00 00 00 00 00 00 86 80 21 15 86 80 02 50 5B  .......†€!.†€.P[
00000220  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000230  00 00 00 00 00 00 00 86 80 21 15 86 80 01 50 5B  .......†€!.†€.P[
00000240  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000250  00 00 00 00 00 00 00 86 80 23 15 86 80 52 1F 5B  .......†€#.†€R.[
00000260  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000270  00 00 00 00 00 00 00 86 80 21 15 28 10 60 1F 5B  .......†€!.(.`.[
00000280  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
00000290  00 00 00 00 00 00 00 86 80 21 15 28 10 62 1F 5B  .......†€!.(.b.[
000002A0  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
000002B0  00 00 00 00 00 00 00 86 80 21 15 28 10 CF 04 5B  .......†€!.(.Ï.[
000002C0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000002D0  00 00 00 00 00 00 00 86 80 21 15 28 10 73 1F 5B  .......†€!.(.s.[
000002E0  00 00 00 00 00 00 00 12 00 00 00 00 00 00 00 00  ................
000002F0  00 00 00 00 00 00 00 86 80 28 15 28 10 61 1F 7B  .......†€(.(.a.{

rom-save-image:
Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000000  46 4C 42 33 97 00 00 00 00 40 00 00 00 86 80 43  FLB3—....@...†€C
00000010  6F 6D 62 6F 20 52 75 6C 65 73 00 00 00 00 00 00  ombo Rules......
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000060  00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00  ................
00000070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000090  00 00 00 00 00 00 00 86 80 D3 10 86 80 1F A0 03  .......†€Ó.†€. .
000000A0  00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 00  ................
000000B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
000000D0  00 00 00 00 00 00 00 46 4C 42 33 A3 00 00 00 B1  .......FLB3£...±
000000E0  00 E8 00 00 86 80 50 58 45 00 00 00 00 00 00 00  .è..†€PXE.......
000000F0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000130  00 00 00 00 00 00 01 03 15 00 03 00 00 00 00 00  ................
00000140  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000160  00 00 86 80 D3 10 86 80 1F A0 00 00 00 00 00 00  ..†€Ó.†€. ......
00000170  00 00 00 00 00 00 00 00 00 00 55 AA 1C E8 15 33  ..........Uª.è.3
00000180  CB 6D 26 03 00 00 00 00 00 00 00 00 00 00 00 00  Ëm&.............
00000190  20 00 40 00 60 00 10 01 34 01 55 4E 44 49 16 69   .@.`...4.UNDI.i
000001A0  00 00 01 02 E6 0B 00 08 90 63 F0 44 50 43 49 52  ....æ....cðDPCIR
000001B0  00 00 00 00 00 00 00 00 00 00 50 43 49 52 86 80  ..........PCIR†€
000001C0  D3 10 9E 20 1C 00 03 00 00 02 74 00 01 02 00 80  Ó.ž ......t....€
000001D0  08 00 00 00 00 00 8D 64 24 00 24 50 6E 50 01 02  .......d$.$PnP..
000001E0  00 00 00 42 00 00 00 00 9B 00 BC 00 02 00 00 E4  ...B....›.¼....ä
000001F0  00 00 00 00 41 0B 00 00 00 00 0D 0A 43 6F 70 79  ....A.......Copy
00000200  72 69 67 68 74 20 28 43 29 20 31 39 39 37 2D 32  right (C) 1997-2
00000210  30 30 38 2C 20 49 6E 74 65 6C 20 43 6F 72 70 6F  008, Intel Corpo
00000220  72 61 74 69 6F 6E 00 0D 0A 49 6E 69 74 69 61 6C  ration...Initial
00000230  69 7A 69 6E 67 20 49 6E 74 65 6C 28 52 29 20 42  izing Intel(R) B
00000240  6F 6F 74 20 41 67 65 6E 74 20 47 45 20 76 31 2E  oot Agent GE v1.
00000250  33 2E 32 31 00 49 42 41 20 47 45 20 53 6C 6F 74  3.21.IBA GE Slot
00000260  20 30 30 30 30 20 76 31 33 32 31 00 50 58 45 20   0000 v1321.PXE
00000270  32 2E 31 20 42 75 69 6C 64 20 30 38 36 20 28 57  2.1 Build 086 (W
00000280  66 4D 20 32 2E 30 29 0D 0A 00 52 50 4C 21 00 00  fM 2.0)...RPL!..
00000290  00 00 00 00 00 00 00 00 00 90 00 00 42 58 44 58  ............BXDX
000002A0  45 53 44 49 54 53 41 46 01 00 F2 E6 00 F0 01 03  ESDITSAF..òæ.ð..
000002B0  15 02 01 56 02 00 00 00 B4 00 CD 16 0A C0 74 02  ...V....´.Í..Àt.
000002C0  32 E4 C3 B4 01 CD 16 75 02 33 C0 0A C0 74 02 32  2äô.Í.u.3À.Àt.2
000002D0  E4 0B C0 C3 55 8B EC 66 60 8A 46 04 BB 07 00 B9  ä.ÀÃU‹ìf`ŠF.»..¹
000002E0  01 00 B4 0E CD 10 66 61 90 5D C2 02 00 6A 20 E8  ..´.Í.fa.]Â..j è
000002F0  E2 FF C3 6A 0D E8 DC FF 6A 0A E8 D7 FF C3 55 8B  âÿÃj.èÜÿj.è×ÿÃU‹

ipxe-rom:
Code:
00000000  55 AA 7A E9 9F 00 69 00 00 00 00 00 00 00 00 00  UªzéŸ.i.........
00000010  99 00 00 00 00 00 83 00 1C 00 40 00 50 43 49 52  ™.....ƒ...@.PCIR
00000020  86 80 D3 10 AF 04 1C 00 03 02 00 00 7A 00 01 00  †€Ó.¯.......z...
00000030  00 80 7A 00 00 00 00 00 8D B4 00 00 8D BD 00 00  .€z......´...½..
00000040  24 50 6E 50 01 02 00 00 00 A1 00 00 00 00 60 00  $PnP.....¡....`.
00000050  70 00 02 00 00 F4 00 00 00 00 61 03 00 00 00 00  p....ô....a.....
00000060  68 74 74 70 3A 2F 2F 69 70 78 65 2E 6F 72 67 00  http://ipxe.org.
00000070  69 50 58 45 00 28 50 43 49 20 78 78 3A 78 78 2E  iPXE.(PCI xx:xx.
00000080  78 29 00 55 4E 44 49 16 68 00 00 01 02 80 04 C8  x).UNDI.h....€.È
00000090  2C C8 2C AE 07 50 43 49 52 69 50 58 45 0C AA 07  ,È,®.PCIRiPXE.ª.
000000A0  00 81 B1 1B A0 60 1E 06 0F A0 0F A8 FC 0E 1F BE  ..±. `... .¨ü..¾
000000B0  03 03 31 FF E8 3F 04 8E EB 31 FF E8 30 04 A3 55  ..1ÿè?.Žë1ÿè0.£U
000000C0  03 E8 67 04 BF 7A 00 E8 61 04 C6 06 74 00 20 31  .èg.¿z.èa.Æ.t. 1
000000D0  FF E8 1A 04 8C C8 E8 35 04 66 53 66 52 66 57 F9  ÿè..ŒÈè5.fSfRfWù
000000E0  B8 01 B1 CD 1A 72 56 66 81 FA 50 43 49 20 75 4D  ¸.±Í.rVf.úPCI uM
000000F0  84 E4 75 49 BE 1C 03 31 FF E8 FA 03 88 F8 E8 1D  „äuI¾..1ÿèú.ˆøè.
00000100  04 B0 2E E8 C9 03 88 D8 E8 0A 04 80 FF 03 72 2D  .°.èÉ.ˆØè..€ÿ.r-
00000110  8C E8 3D 00 A0 72 1C 8C CB 39 D8 74 23 0F B6 0E  Œè=. r.ŒË9Øt#.¶.
00000120  02 00 C1 E1 05 01 CB 39 D8 73 15 8C CB 01 C8 39  ..Áá..Ë9Øs.ŒË.È9
00000130  D8 76 0D B0 21 E8 97 03 8C E8 E8 D1 03 0E 0F A9  Øv.°!è—.ŒèèÑ...©
00000140  66 5F 66 5A 66 5B BB FF EF 43 74 2A 8E C3 26 66  f_fZf[»ÿïCt*ŽÃ&f
00000150  81 3E 00 00 24 50 6E 50 75 EF 31 D2 31 F6 26 0F  .>..$PnPuï1Ò1ö&.
00000160  B6 0E 05 00 26 AC 00 C2 E2 FA 75 DD BE 21 03 31  ¶...&¬.Ââúuݾ!.1
00000170  FF E8 82 03 EB 00 BB FF DF 43 0F 84 9F 00 8E C3  ÿè‚.ë.»ÿßC.„Ÿ.ŽÃ
00000180  26 66 81 3E 00 00 24 50 4D 4D 75 ED 31 D2 31 F6  &f.>..$PMMuí1Ò1ö
00000190  26 0F B6 0E 05 00 26 AC 00 C2 E2 FA 75 DB BE 26  &.¶...&¬.ÂâúuÛ¾&
000001A0  03 31 FF E8 50 03 66 60 66 0F B6 0E 02 00 03 0E  .1ÿèP.f`f.¶.....
000001B0  5B 03 83 C1 07 83 E1 F8 66 C1 E1 05 66 BB 00 10  [.ƒÁ.ƒáøfÁá.f»..
000001C0  AE 18 BD EA 02 E8 CE 00 66 89 36 57 03 74 20 06  ®.½ê.èÎ.f‰6W.t .
000001D0  31 C0 8E C0 66 89 F7 66 31 F6 66 0F B6 0E 02 00  1ÀŽÀf‰÷f1öf.¶...
000001E0  66 C1 E1 07 67 66 F3 A5 07 A0 9F 00 A2 02 00 66  fÁá.gfó¥. Ÿ.¢..f
000001F0  B9 31 9C 00 00 66 81 C1 FF 1F 00 00 66 81 E1 00  ¹1œ..f.Áÿ...f.á.
00000200  E0 FF FF 66 89 CB C1 EB 0C 66 81 CB 00 20 AE 18  àÿÿf‰ËÁë.f.Ë. ®.
00000210  BD 01 03 E8 80 00 66 89 36 5D 03 66 61 31 DB 31  ½..è€.f‰6].fa1Û1
00000220  F6 0F B6 0E 02 00 C1 E1 09 AC 00 C3 E2 FB 28 1E  ö.¶...Áá.¬.Ãâû(.
00000230  06 00 31 FF E8 B7 02 8C E8 E8 D2 02 0F B6 0E 02  ..1ÿè·.ŒèèÒ..¶..
00000240  00 C1 E1 09 8E C0 31 F6 31 FF 2E F3 A4 F6 06 55  .Áá.ŽÀ1ö1ÿ.ó¤ö.U
00000250  03 07 75 30 BE 32 03 31 FF E8 9A 02 BE 70 00 E8  ..u0¾2.1ÿèš.¾p.è
00000260  94 02 BE 4E 03 E8 8E 02 BB 02 FF E8 C7 01 9C 31  ”.¾N.èŽ.».ÿèÇ.œ1
00000270  FF E8 D8 02 BE 52 03 E8 7C 02 9D 75 07 66 31 ED  ÿèØ.¾R.è|..u.f1í
00000280  0E E8 53 01 B0 0A 31 FF E8 44 02 0F A9 0F A1 07  .èS.°.1ÿèD..©.¡.
00000290  1F 61 B8 20 00 CB 66 50 57 BF 20 00 66 53 6A 01  .a¸ .ËfPW¿ .fSj.
000002A0  26 FF 1E 07 00 83 C4 06 52 50 66 5E 66 46 74 0C  &ÿ...ƒÄ.RPf^fFt.
000002B0  66 4E 74 08 FF D5 73 1B 66 43 EB E0 6A 02 66 53  fNt.ÿÕs.fCëàj.fS
000002C0  66 51 6A 00 26 FF 1E 07 00 83 C4 0C 52 50 66 5E  fQj.&ÿ...ƒÄ.RPf^
000002D0  BF 2B 00 89 F8 31 FF E8 F5 01 66 89 F0 E8 23 02  ¿+.‰ø1ÿèõ.f‰ðè#.
000002E0  66 46 74 02 66 4E 5F 66 58 C3 06 31 C0 8E C0 66  fFt.fN_fXÃ.1ÀŽÀf
000002F0  A1 A1 00 26 67 66 3B 86 A1 00 00 00 74 01 F9 07  ¡¡.&gf;†¡...t.ù.

but how to encapsulate the rom in the container is far from my knowledge (yet)
more information on FLB format:
Code:
IBABUILD EXAMPLES:
------------------
IBABuild is generally used in three different scenarios:

   - To create an image file or files to be programmed into flash, either as
     part of the NIC manufacturing process, or as part of the BIOS programming
     process for LOMs.
   - To create and program an image directly into a NIC.
   - To program an arbitrary image file into a NIC.

While it is possible (and perhaps even probable) that IBABuild will be used
in other ways, these three scenarios capture the vast majority of IBABuild
uses.

A few examples of each scenario are given in this section.  These examples
are not intended to be comprehensive and will not cover every possible
combination of IBABuild parameters.  They are simply intended to illustrate
how the various parameters are used.

To create an image file containing SETUP, UNDI, and BC for use in a NIC based
on the 82540EM Ethernet controller:

    IBABUILD -OF=NIC -IMAGE=SETUP,UNDI,BC -DEVID=100E

The output of this command is the file name BA????L2.NIC, where ???? is the
Intel Boot Agent version number for Gigabit adapters.

To create a minimum-size split ROM implementation for a LOM implementation of
the 82551QM Fast Ethernet controller:

    IBABUILD -OF=LOM -IMAGE=BC
    IBABUILD -OF=LOM -IMAGE=UNDI -DEVID=1229

These commands will create two files:  BA????BC.LOM and Ba????X2.LOM,
where ???? is the Intel Boot Agent version number for Fast Ethernet adapters.

To program an UNDI/SETUP/BC image into all NICs in the system:

    IBABUILD -ALL -IMAGE=UNDI,BC,SETUP

To program the file FOO.FLB into a NIC:

    IBABUILD -NIC=1 -UPDATE=FOO.FLB

APPLICATION NOTE:
-----------------

The FLB file format allows up to 16 supported device IDs to be included in
the FLB file header structure. In order to support more than 16 device IDs,
Windows PROSet allows FLB images to be concatenated together.  This is
accomplished by using IBABuild to generate two FLB images with support for
up to 16 devices each, and then concatenating the FLBs together using the
"copy" command as follows:

        ibabuild -of=FLB -image=bc,undi,setup -devid=1008,1009,100C,100E
        ren ba*l2.flb bal2-1.flb
        ibabuild -of=FLB -image=bc,undi,setup -devid=107C,108A
        ren ba*l2.flb bal2-2.flb
        copy /b bal2-1.flb+bal2-2.flb ba1226l2.flb

LEGAL FLASH IMAGE COMBINATIONS
------------------------------

The following rules are used to determine if a flash image is valid:

- SETUP may not be in an image alone.

- BC may be put in a LOM image alone.  (This is a split image.)

- UNDI may be put in a LOM image without BC.  (This is the other half of a
  split image.)

- Unless it is completely alone in a .LOM (split) image, BC must always be
  accompanied by UNDI.

- If the image is .NIC, .FLB, or .HEX, and UNDI is present, BC must be present.

IMAGE FILE NAMING CONVENTIONS:
------------------------------

In order to be able to easily identify various versions of the boot agent for
different adapters, the flash image file name contains information about its
contents. The file name has the following format:

    BAxyzztn.eee

where:  x   is the major version number of the agent in decimal
        y   is the minor version number of the agent in decimal
       zz   is the build number of the agent in decimal
        t   is the type of image
        n   is the adapter family the image supports
      eee   is the type of image file
    
Image types:    
        L  - Monolithic PXE (UNDI+BC) with setup menu
        Q  - Monolithic PXE (UNDI+BC) without setup menu
        T  - Split PXE UNDI driver with setup menu. LOM only.
        X  - Split PXE UNDI driver without setup menu. LOM only.
        BC - Split PXE Base Code image.  No family is specified.  LOM only.

Adapter families:
        1 - Fast Ethernet
        2 - Gigabit
        4 - 10 Gigabit

Image type extensions:
        FLB - Flash Library file supporting multiple NICs
        NIC - Image file for use with a NIC
        LOM - Image file for use with a LOM
        HEX - Image file (NIC format) for use with flash programming tools

For example, build 18 of version 1.2 of the monolithic PRO/1000 adapter boot
agent would be named BA1218L2.FLB.

good test:
Code:
Intel's burning tool accepts only FLB files. The simplest wat to obtain FLB
> header is to dump (backup) flash:
>
>      $ bootutil64e -nic X -saveimage -file backup.flb
>
> Then catch the header (first 0x17a bytes). Here is the significant offsets:
>
>
> Option ROM size is at offset 0x0E0 (e.g. 00 00 01 is 64k). For example, our
> Option ROM is 68608 (0x10C00) bytes. We need to change bytes to: "00 0C 01"
> @ 0x0E0.
> PXE version is at offset 0x136 (e.g. 02 03 0B is 2.2.11). For example, our
> Option ROM's version is 7.8.150. We need to change bytes to: "07 08 96" @
> 0x136.
>
>
> To obtain PXE version size just run
>
>      # bootutil64e -iv -file 808610fb.rom
>
> To burn image just cat fixed header and your custom Option ROM and run:
>
>      # bootutil64e -nic X -restoreimage -file 808610fb.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? :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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 Smile
i really need to learn offsets Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
[Image: success.png]
did everything right but after reboot the iba is gone and ipxe is not showing up anywhere.
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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).
Visit this user's website Find all posts by this user
Quote this message in a reply
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
Visit this user's website Find all posts by this user
Quote this message in a reply
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?
Visit this user's website Find all posts by this user
Quote this message in a reply
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
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!
Find all posts by this user
Quote this message in a reply
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.
Find all posts by this user
Quote this message in a reply
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 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.

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.
Find all posts by this user
Quote this message in a reply
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)