Open matsbror opened 1 year ago
Add MAC address to the ethernet portion of the dts file then recompile.
"local-mac-address = [00 0a 35 00 00 01];"
Thanks but I think I still need more info on this. As far as I know, the dts file is generated by vivado. I am using make.py
as the only step to compile, but that would overwrite the dts file.
Then, I am still wondering what determines the mac-address as it is? Is it random?
linux-on-litex-vexriscv generates the dts automatically and places it itn the ./build/
There are "locally administered mac addresses" and manufacturer administered mac addresses. You need to pick based on your application.
I'm guessing this is the Ethernet section:
mac0: mac@f0002000 {
compatible = "litex,liteeth";
reg = <0xf0002000 0x7c>,
<0xf0002800 0x0a>,
<0x80000000 0x2000>;
reg-names = "mac", "mdio", "buffer";
litex,rx-slots = <2>;
litex,tx-slots = <2>;
litex,slot-size = <2048>;
interrupts = <2>;
status = "okay";
};
There's nothing else that it could be (I have attached the full dts here).
However, if I add a mac-address to this section, how do I then recompile to use it as I only know how to run the make.py
command which will overwrite this file with a new .dts-file.
@matsbror: In you case, you are using the LiteEth MAC attached to the CPU, that lets the CPU handle the MAC address by software. I haven't tried myself @jeremy-heath's change, but to add this, you can either:
.dts
and compile the .dts
manually.make.py
is calling this tool, this would avoid any other manual overwrite.
Is the MAC address of the Ethernet interface determined when the FPGA bitstream is generated or is it determined in code? I have built two different versions with different MAC-addresses but I need the MAC address to be fixed because of university network rules.