#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: flashrom | Version: v2 Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------ I've tried updating the BIOS of a Tomcat n3400B (S2925-E). The update itself worked fine, but the MAC addresses of the onboard NVidia-Gigabit Ethernet chips were set to bogus values (66:55:44:33:22:11 or something like that) afterwards. Restoring the old flash backup worked. This does not happen with the official update tool from Tyan.
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: flashrom | Version: v2 Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------
Comment(by hailfinger):
Some Nvidia chipsets store the MAC address in the mainboard flash ROM instead of a separate chip. Unfortunately, there is no standard specifying where the MAC address ends up, so flashrom does not know how to extract the MAC address, nor how to patch it in.
flashrom does exactly what you ask it to do: Overwrite the old BIOS image with the new image. If the new image contains a garbage MAC address, flashrom will write the new image anyway because it doesn't know about that.
Of course, that might not be what you expected. If you have any docs on where exactly the MAC address is stored in the ROM image, I'm all ears and will probably add support to change the image accordingly.
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: flashrom | Version: v2 Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------
Comment(by Jan@…):
Replying to [comment:1 hailfinger]:
I've opened a support request at Tyan with number 28091, maybe they will comment on this.
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Owner: Type: defect | Status: new Priority: major | Milestone: Component: toolchain | Version: v2 Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------ Changes (by rminnich):
* owner: somebody => * component: flashrom => toolchain
Comment:
This is a problem with any BIOS that stores MAC in the FLASH. What is needed is a tool that, given a BIOS image and a mac address sets the MAC address into the FLASH image.
Call it setmac.
The sequence would be something like this:
make a coreboot.rom
mac1=`cat /sys/class/net/eth1/address`
mac0=`cat /sys/class/net/eth0/address`
setmac coreboot.rom mac0 mac1
flashrom -w coreboot.rom
Scripting is easy given a setmac tool. It will differ for each mainboard.
The location of the MAC address will likely interact with cbfs and other coreboot image properties in unforeseen ways.
This is not really a flashrom issue. ron
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Type: defect Status: new | Priority: major Milestone: | Component: toolchain Version: v2 | Keywords: Dependencies: | Patchstatus: there is no patch ---------------------------------+------------------------------------------
Comment(by ward):
I've attached an example setmac script to this ticket. It works for mcp55 (tested on m57sli only). Not tested with cbfs images yet.
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ---------------------------------+------------------------------------------ Reporter: Jan@… | Type: defect Status: new | Priority: major Milestone: | Component: flashrom (please use trac on flashrom.org) Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------ Changes (by stepan):
* component: toolchain => flashrom (please use trac on flashrom.org)
Comment:
Since flashrom knows the board _and_ chipset it's flashing to, maybe it should take care of such issues?
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) -----------------------------------------------------------+---------------- Reporter: Jan@… | Owner: hailfinger Type: defect | Status: new Priority: major | Milestone: Component: flashrom (please use trac on flashrom.org) | Keywords: Dependencies: | Patchstatus: there is no patch -----------------------------------------------------------+---------------- Changes (by stepan):
* owner: => hailfinger
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) -----------------------------------------------------------+---------------- Reporter: Jan@… | Owner: hailfinger Type: defect | Status: new Priority: major | Milestone: Component: flashrom (please use trac on flashrom.org) | Keywords: Dependencies: | Patchstatus: there is no patch -----------------------------------------------------------+----------------
Comment(by hailfinger):
I think flashrom is not the right tool to handle this. There are lots of vendor specific flash image locations which have to be kept on update, and building that intelligence into flashrom is IMHO a path that will lead to suffering.
However, adding one or more separate apps to the flashrom svn repository would allow people to extend flashrom with image related features as they see fit. The first such app could be Ward's change-mcp55-mac.pl
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) -----------------------------------------------------------+---------------- Reporter: Jan@… | Owner: hailfinger Type: defect | Status: new Priority: major | Milestone: flashrom v1.0 Component: flashrom (please use trac on flashrom.org) | Resolution: Keywords: | Dependencies: Patch Status: there is no patch | -----------------------------------------------------------+---------------- Changes (by stepan):
* milestone: => flashrom v1.0
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ----------------------------------+----------------------------------------- Reporter: Jan@… | Owner: ward Type: defect | Status: new Priority: major | Milestone: Component: coreboot | Resolution: Keywords: | Dependencies: Patch Status: there is no patch | ----------------------------------+----------------------------------------- Changes (by stepan):
* owner: hailfinger => ward * component: flashrom (please use trac on flashrom.org) => coreboot * milestone: flashrom v1.0 =>
Comment:
So, should we check change-mcp55-mac.pl into the coreboot tree so we can close this one?
It's certainly {{{ Acked-by: Stefan Reinauer stepan@coresystems.de }}}
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ----------------------------------+----------------------------------------- Reporter: Jan@… | Owner: ward Type: defect | Status: new Priority: major | Milestone: Component: coreboot | Resolution: Keywords: | Dependencies: Patch Status: there is no patch | ----------------------------------+-----------------------------------------
Comment (by hailfinger):
We have two related issues here: - Not preserving the current MAC address on BIOS/coreboot updates. Can be fixed with a tool which generates a layout file for flashrom which excludes the region where the MAC address is stored. Such a utility may cause other problems (e.g. incorrect checksum), though. - Setting a MAC address in a coreboot image. This is what Ward's change- mcp55-mac.pl does, and as such I believe it definitely belongs in the coreboot tree.
#135: Flashrom deletes MAC addresses on Tyan Tomcat n3400B (S2925-E) ----------------------------------+--------------------- Reporter: Jan@… | Owner: ward Type: defect | Status: new Priority: major | Milestone: Component: coreboot | Resolution: Keywords: | Dependencies: Patch Status: there is no patch | ----------------------------------+---------------------
Comment (by alex@…):
I had the same problem with a Supermicro H8DM8-2 and a ASUS M4A88T-V EVO/USB3
Any hint on how to permanently flash a new MAC address on these systems would be very, very welcome