Sounds like the original behaviour, where the original unique hardware MAC is stored in the OEM-written serialnumber/MAC/wifipassword/wificalibrationdata partition, from which OpenWrt reads it at boot.
If you are risk-taking, you might even consider reading, modifying and re-writing that partition (with a firmware with a modified DTS that enables writing to that normally read-only mtd partition).
Otherwise, if the new MAC is stored in OpenWrt uci config, it should be preserved if you sysupgrade with settings kept.
But none of that can be done with imagebuilder, which just glues together already-compiled standard items.
I was messing around with setting the MAC using rc.local etc but the problem is, I'd have to keep track of which devices have which MAC when writing a new fw to them.
The only way I can think of that would be permanent is to use sd card or partition.
I've been told there is no way to poke around using openwrt itself to discover what the original factory MAC would have been, is that true?
If that's not true, then that would be the best option, find the original and write that to the network file after firmware update.
NanoPi 5rc router.
From what I'm reading, there is no point in using hexdump after the router is up and running because that's only showing runtime info.
I need to find a way to get deeper into the hardware but from the openwrt command line so I could dig that MAC's out and set those in the network file and do this automatically if I re-flash the device.
Who's great idea is it to constantly change MAC? Is this the future? What a mess it causes.
The behavior of constantly changing MAC devices is extremely frustrating.
I use the MAC to identify all devices on my networks but this one keeps changing, repeatedly even once the router is up and running.
I decided to hard code MAC addresses into the network file but now I found a new problem. I re-built my firmware using ImageBuilder which I transfer to /tmp. Openwrt is running on the eMMC now, not an sd card.
However, as mentioned in another post, I just found another weird thing about this router or something I'm not aware of.
When running sysupgrade -n myfile.bin.gz, the console implies that it's doing the upgrade but when I log back into the router, it's the same as it was. In fact, even on reboots, the things I left in /tmp are still there.
I'm wondering if perhaps it's not possible to upgrade the firmware using sysupgrade when the OS is on eMMC.
# sysupgrade -n ID58-nanopi-r5c-2024-02-13.bin.gz
Tue Feb 13 22:55:45 UTC 2024 upgrade: Reading partition table from bootdisk...
Tue Feb 13 22:55:45 UTC 2024 upgrade: Reading partition table from image...
Tue Feb 13 22:55:45 UTC 2024 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
If I were to use sysupgrade to flash my own image, assuming it would work, would it end up being installed on partition9?
And if it were, would that mean I would end up with partition9 becoming a couple of partitions and openwrt would not see any more storage than 8GB again? I don't know how it picked 8GB but the only thing I can think of is that perhaps the original sd card I used was an 8GB one?
I really don't know, I'm just guessing at this point and no idea how to move forward.
Yes, I can set the MAC addresses but what I was after was finding the factory ones so they would be truly unique and not my own. Now I know these devices do not come with a fixed MAC so it's unlikely there is any info in the hardware.
My real problem at this point is not being able to use the full eMMC which is likely why I cannot upgrade the OS using sysupgrade.
I've yet to find information on how I can fix this. I was wondering if maybe I need to boot from sd card, wipe the partition from the eMMC, then run eflasher to flash back to eMMC then upgrade. Maybe at that point, I get more space or it's the eflasher that's partitioning the eMMC as it is and it means I need to put my own openwrt image for eflasher to flash.
Is there a bug in the ImageBuilder?
I just found this out. I'm using files/ to store my own custom settings etc and I've noticed that when I build, a new file I put there gets removed if I run make clean and make dirclean before building a profile.
I don't recall any files in files/ being removed when running those commands first and I've used IB hundreds of times.