The reason hexdump fails is because of not using the hexdump "-v" parameter
-v
Cause hexdump to display all input data. Without the -v option, any number of groups of output lines, which would be identical to the immediately preceding group of output lines (except for the input offsets), are replaced with a line comprised of a single asterisk.
and therefor the c-style $(( )) arithmetic would fail if a group is replaced with a single asterisk
& 0xFEFFFFFFFFFF | 0x020000000000 should be replaced by & 0xFCFFFFFFFFFF as you want to zero the last two bits, namely Universal vs local (U/L bit) and the Unicast vs multicast (I/G bit), otherwise you will not generate a valid MAC address.
Regarding: https://misterfpga.org/viewtopic.php?t=3661
and therefor the c-style $(( )) arithmetic would fail if a group is replaced with a single asterisk
& 0xFEFFFFFFFFFF | 0x020000000000 should be replaced by & 0xFCFFFFFFFFFF as you want to zero the last two bits, namely Universal vs local (U/L bit) and the Unicast vs multicast (I/G bit), otherwise you will not generate a valid MAC address.
write MAC address in uppercase with the ^^