<div>IB for integrated NIC? What server's model do you have?</div><div> </div><div>21.05.2014, 23:41, "Vasiliy Tolstov" <v.tolstov@selfip.ru>:</div><blockquote type="cite"><p>does it possible to replace intel boot agent with ipxe on supermicro server?<br /><br /><span>2014-05-21 23</span>:00 GMT+04:00 Anton D. Kachalov <<a href="mailto:mouse@yandex-team.ru">mouse@yandex-team.ru</a>>:</p><blockquote> Hello.<br /><br /> I would like to share my Option ROM's embedding experience.<br /><br /><br /> == AMIBIOS8 ==<br /> Tested server platforms:<br /><br /> Asus: KGNE-D16, KGP(M)E-D16, Z8NR-D12 and Z8PG-D18<br /> Supermicro: all mobos series X7, X8 and H8 (X8DTU, X8DTT, X8DT3, H8DGU)<br /> Huawei: Tecal RH1285<br /> HP: Proliant DL160 G6 and DL165 G7<br /><br /> There is a trick with AMI BIOS image to replace original Option ROM with<br /> iPXE. Every BIOS image contains two Option ROMs: iSCSI and PXE. It might be<br /> choosen from BIOS settings. Meanwhile AMI MMTool allows to replace only one<br /> module with specific ModuleID/VendorID/DeviceID. In case of the platforms<br /> above we always have two records with identical IDs. Therefore, we need to<br /> workaround this in HEX-editor:<br /><br /> Look for requested LAN vendor/product IDs in RunLoc column (e.g. 8086:10C9)<br /> column. Write down RomLoc value.<br /> There is a DeviceID at offset "RomLoc - 2" in BIOS image. Change it to some<br /> value (e.g. C9 -> CD). Save.<br /> Run MMTool and replace module with our original VendorID/DeviceID.<br /> Look for changed VID/PID (i.e. 8086:10CD) in RunLoc column and revert back<br /> our change at offset "RomLoc - 2".<br /> For the second module repeat steps 1-4.<br /> To correct CRCs just replace first module again.<br /><br /> Now we are ready to update BIOS in the standard way: using flashrom or via<br /> AFU{WIN,LNX,DOS}.<br /><br /> NOTE: Use MMtool version 3.22+ only.<br /><br /><br /> == UEFI (APTIO) ==<br /> Tested server platforms:<br /><br /> Asus: Z9PE and Z9PG series<br /> Supermicro: X9DRW, X9DRFF, X9DRT<br /> Gigabyte: GA-7PPSH, GA-7PTSH<br /> Quanta: R210-MB2MS<br /><br /> AMI APTIO (UEFI enabled) much is much easier to update rather tan AMIBIOS8.<br /> To update Option ROM we need AMI MMTool-APTIO tool:<br /><br /> Choose "Replace" tab and select our Option ROM.<br /> Check "Link Present" in "For Option ROM only" group.<br /> Select requested VID/PID in the list and click "Replace".<br /> Profit :)<br /><br /> Now we are ready to update BIOS in the standard way.<br /><br /><br /> == HP Proliant360 G5 ==<br /> It's a special case with a very proprietary BIOS. BIOS packed by 64k chunks<br /> by old-school PKWare. The BIOS tool might be found within the same BIOS ROM<br /> bundle.<br /> To unpack BIOS it's required to:<br /><br />     C:\> rompaq /d cpqp5802.49a cpqp5802.rom<br /><br /> To pack BIOS back (chunk size is mandatory!):<br /><br />     C:\> rompaq /c cpqp5802.rom CPQP580 249A 08/20/2012 64<br /><br /> When unpacked (CPQP5802.ROM) PXE Option ROM has offset 0x<span>00171800</span>. Next<br /> Video Option ROM at offset 0x<span>00183800</span>. That means we have only 0x12_000<br /> bytes for our iPXE Option ROM. Not so much. To replace a chunk we can use<br /> standard "dd" util. Then pack everything back:<br /><br />     C:\> rompaq /t /u CPQSRVR2.CPU CPQP5802.49A<br /><br /> and ready to burn.<br /><br /><br /> == Intel 82599 (X520-DA2) ==<br /> Intel's burning tool accepts only FLB files. The simplest wat to obtain FLB<br /> header is to dump (backup) flash:<br /><br />      $ bootutil64e -nic X -saveimage -file backup.flb<br /><br /> Then catch the header (first 0x17a bytes). Here is the significant offsets:<br /><br /><br /> Option ROM size is at offset 0x0E0 (e.g. 00 00 01 is 64k). For example, our<br /> Option ROM is 68608 (0x10C00) bytes. We need to change bytes to: "00 0C 01"<br /> @ 0x0E0.<br /> PXE version is at offset 0x136 (e.g. 02 03 0B is 2.2.11). For example, our<br /> Option ROM's version is 7.8.150. We need to change bytes to: "07 08 96" @<br /> 0x136.<br /><br /><br /> To obtain PXE version size just run<br /><br />      # bootutil64e -iv -file 808610fb.rom<br /><br /> To burn image just cat fixed header and your custom Option ROM and run:<br /><br />      # bootutil64e -nic X -restoreimage -file 808610fb.flb<br /><br /> Current BootUtil could be downloaded from Intel Download Center<br /><br />     <a href="https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=19186">https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=19186</a><br /><br /><br /> == Mellanox MCX311A-XCAT (to be completed) ==<br /> Upstream iPXE modification could be obtains from<br /> <a href="http://www.mellanox.com/downloads/Drivers/PXE/gpxe_3.4.225.tgz">http://www.mellanox.com/downloads/Drivers/PXE/gpxe_3.4.225.tgz</a><br /> Burning tool: <a href="http://www.mellanox.com/downloads/MFT/mft-3.6.0-24.tgz">http://www.mellanox.com/downloads/MFT/mft-3.6.0-24.tgz</a> To burn<br /> Option ROM we need "flint" (or flint_oem) and "minit" tools.<br /> Current adapter (15b3:1003, ConnectX3) have not supported in iPXE upstream.<br /><br /> Requirements:<br /><br /> Build and insmod kernel modules mst_pci and mst_pciconf (sources could be<br /> found in mft.tar.gz).<br /> Create character devices:<br />    mknod /dev/mst/mt27500_pciconf_cr0 c 245 0<br />    mknod /dev/mst/mt27500_pci_cr0 c 246 0<br /> Initialize MLX:<br />     minit /dev/mst/mt27500_pci_cr0 07:00.0 0  (07:00.0 is a PCI bus address<br /> and function. Get it from "lspci -n").<br /> Burn ROM:<br />     flint -d /dev/mst/mt27500_pci_cr0 bbrom 15b31003.rom<br /><br /> FLINT expects a header with PXE version that is lack in iPXE ROM. Just<br /> warning. Ignore it.<br /><br /> To be continued…<br /><br /> _______________________________________________<br /> ipxe-devel mailing list<br /> <a href="mailto:ipxe-devel@lists.ipxe.org">ipxe-devel@lists.ipxe.org</a><br /> <a href="https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel">https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel</a></blockquote><p>-- <br />Vasiliy Tolstov,<br />e-mail: <a href="mailto:v.tolstov@selfip.ru">v.tolstov@selfip.ru</a><br />jabber: <a href="mailto:vase@selfip.ru">vase@selfip.ru</a></p></blockquote><div> </div><div> </div><div>-- <br />Anton D. Kachalov<br /><br />ITO, System Architect<br />Tel: 7 (495) 739-70-00 ext.7613</div><div> </div>