have you modified the ethernet mac address in a libreboot rom?

1 reply [Last post]
tonlee
Offline
Joined: 09/08/2014

I installed libreboot.rom externally on a thinkpad t400 having the
generic ethernet mac address. Now I want to internally flash
the actual ethernet mac address of the computer on
the flashrom.

https://libreboot.org/docs/gnulinux/grub_cbfs.html#changeMAC
Move t400_8mb_usqwerty_vesafb.rom to folder
/libreboot_r20160907_util/ich9deblob/x86_64. Cd to
/libreboot_r20160907_util/ich9deblob/x86_64
Run ./ich9gen --macaddress XX:XX:XX:XX:XX:XX entering the actual ethernet mac address. Should it
be sudo ./ich9gen? Run
dd if=ich9fdgbe_8m.bin of=t400_8mb_usqwerty_vesafb.rom bs=1 count=12k conv=notrunc. It
returns 12288+0 records in
12288+0 records out
12288 bytes (12 kB, 12 KiB) copied, 0.0423558 s, 290 kB/s
Should it be sudo dd if=ich9fdgbe_8m.bin of=t400_8mb_usqwerty_vesafb.rom bs=1 count=12k conv=notrunc?

On the libreboot computer I edited computer -> etc -> default -> grub
to GRUB_CMDLINE_LINUX_DEFAULT="iomem=relaxed quiet"

Then run
sudo flashrom -p internal --ifd -i bios -c MX25L6405D -w t400_8mb_usqwerty_vesafb.rom -V -N It
returns Chip content is identical to the requested image. Erase/write done. And the
ethernet mac address has not changed.
How do I know if the t400_8mb_usqwerty_vesafb.rom's ethernet
mac address got changed? Or if it is sudo flashrom -p internal --ifd -i bios -c MX25L6405D -w t400_8mb_usqwerty_vesafb.rom -V -N that
does not work. Thanks.

koszkonutek
Offline
Joined: 03/19/2020

>Run ./ich9gen --macaddress XX:XX:XX:XX:XX:XX entering the actual ethernet mac address. Should it be sudo ./ich9gen?

No. In the libreboot guide You linked, the command is given as:
$ ./ich9gen --macaddress XX:XX:XX:XX:XX:XX

There's a convention - when there's '$' before the command, it is to be run as normal user (without sudo). If there's '#' instead of '$', it is to be run as root (with sudo).

> returns Chip content is identical to the requested image.

Maybe You ran it more than once and all subsequent runs return this? Sorry if it looks like I'm not treating You seriously, just can't think of another simple explanation :)

> On the libreboot computer I edited computer -> etc -> default -> grub to GRUB_CMDLINE_LINUX_DEFAULT="iomem=relaxed quiet"

Well, Idk what iomem does, but changing grub configuration in filesystem might be a mistake, since on libreboot/coreboot grub (and other payloads) run from rom...

> And the ethernet mac address has not changed.

How do You check this? Using ifconfig? You might need to reload some module or even reboot for MAC change to take effect :)

> How do I know if the t400_8mb_usqwerty_vesafb.rom's ethernet mac address got changed?

Maybe try searching for the bytes of desired mac address inside the rom (You'll surely find a way to do that in the net)... Also, well, You *could* check if the data file from ich9gen got properly placed in rom with sth like:
$ dd if=t400_8mb_usqwerty_vesafb.rom of=data_from_rom.bin bs=1 count=12k
$ diff data_from_rom.bin ich9fdgbe_8m.bin
I wrote this off the head, might have made a mistake.
Having said this, I don't see much point in checking if dd worked properly (I'd assume it did...)