<Armbian-Discord>
<jkent> Interesting, this didnt' solve it in user land though
<Armbian-Discord>
<IgorPec> thank you. this is normal mo with this kind of development. not a problem.
<Armbian-Discord>
<IgorPec> u-boot interruption is not that critical problem and anyway i think we are changing this default behavior with a patch, so its not "space" but something else IIRC
<Armbian-Discord>
<IgorPec> i would propose to adjust patches that are broken, remove those that are obsolete and open a PR. This change has to be tested by more people anyway as it affects many boards.
<Armbian-Discord>
<jkent> Hahaha, I don't mind one bit
<Armbian-Discord>
<jkent> I do need some guidance, if at all possible, I'm digging through linux-5.15.y, trying to solve the ethernet MAC issue in userland... I'm not sure if i'm missing something or what, but I can't fingure out where the MAC registers are reset
<Armbian-Discord>
<jkent> i was hoping i'd find it in dwmac-sunxi.c
<Armbian-Discord>
<ManoftheSea> ethernet mac in userland, can you just have your networking setup write your desired MAC?
<Armbian-Discord>
<jkent> no, it needs to come from the H3's serial number, they way it works in U-Boot
<Armbian-Discord>
<jkent> or passed to the kernel some how
<Armbian-Discord>
<c0rnelius> I have two nanopi neos and both have a diff mac addr. not sure honestly whats going, on ur end.
<Armbian-Discord>
<c0rnelius> unless you mean something else other than the mac addr
<Armbian-Discord>
<jkent> if you swap the card, you'll find out the mac is cached on the card, not from hardware
<Armbian-Discord>
<c0rnelius> ah I see. I haven't tried that.
<Armbian-Discord>
<c0rnelius> you trying to create one img to rule them all or something?
<Armbian-Discord>
<ManoftheSea> well, having u-boot set ethaddr is a good thing.
<Armbian-Discord>
<jkent> no, its not convenient for the end-user or system integrator
<Armbian-Discord>
<jkent> when cloning a card
<Armbian-Discord>
<c0rnelius> tried forcing a new one with macchanger? if it works one could create a service that runs on firstboot.
<Armbian-Discord>
<jkent> it can't be random, thats the problem
<Armbian-Discord>
<c0rnelius> sounds like you have a cloning issue, really.
<Armbian-Discord>
<ManoftheSea> It is more correct for the MAC to go with the hardware, not the software.
<Armbian-Discord>
<ManoftheSea> but does allwinner keep u-boot and params on the card?
<Armbian-Discord>
<c0rnelius> I would also think that the MAC should just change upon booting from another board. But I haven't tested this. I have noticed this behavior with BT dongles where the address remains the same, but I assumed it was just the dongles I was using.
<Armbian-Discord>
<ManoftheSea> same dongle should mean same MAC, unless you're intentionally randomizing
<Armbian-Discord>
<jkent> @ManoftheSea on this particular board (nanopineo), yes, as it doesn't have an emmc. this is how its done in u-boot: https://pastebin.com/SCswiHP6
<Armbian-Discord>
<ManoftheSea> oh that's just gross. Sounds like you need a pre-up step in the userspace network configuration to read the serial number and generate the... is it a hash or is it just mush.
<Armbian-Discord>
<jkent> yeah, its generated as a locally administered mac
<Armbian-Discord>
<jkent> consistency is key though
<Armbian-Discord>
<jkent> I've done a little research and it looks like the best place to add this functionality is in of_net.c
<Armbian-Discord>
<jkent> well, maybe not
<Armbian-Discord>
<ManoftheSea> why in the kernel module?
<Armbian-Discord>
<jkent> I'm not really all that familiar with device tree, last time i really hacked on the kernel, it was all done with platform devices
<Armbian-Discord>
<jkent> gap in knowledge
<Armbian-Discord>
<ManoftheSea> can't you just write a script to call... I think it's ethtool, to write the MAC on boot?
<Armbian-Discord>
<jkent> that would be great, except for the needs of software licensing
<Armbian-Discord>
<ManoftheSea> Then, any of networking, Network-Manager, or systemd-networkd would just pick up the "default" mac from the interface
<Armbian-Discord>
<ManoftheSea> licensing?
<Armbian-Discord>
<ManoftheSea> ip link set dev interface address XX:XX:XX:XX:XX:XX
<Armbian-Discord>
<Notthix> Hi guys, I would like to ask if there is a xfce desktop variant for orange pi one, I can only find cli versions https://www.armbian.com/orange-pi-one/
<Armbian-Discord>
<jkent> I think i found a solution by creating an alias in the dts for ethernet0 -> &emac
<Armbian-Discord>
<jkent> building and testing now
<Armbian-Discord>
<ManoftheSea> so you'd need to overlay a compiled dtb per board?
<Armbian-Discord>
<ManoftheSea> how does that help you when cloning?
<Armbian-Discord>
<jkent> alias pulls from u-boot
<Armbian-Discord>
<jkent> if i understand what is going on with the orangepi boards
<Armbian-Discord>
<jkent> i'm testing this, it should be passed from u-boot properly
<Armbian-Discord>
<ManoftheSea> ah, as part of u-boot's fixup of the dtb?
<Armbian-Discord>
<jkent> yes
<Armbian-Discord>
<jkent> nope that didn't work, crap
<Armbian-Discord>
<c0rnelius> if uboot was the solution the mac address would change when pulling the card from one board to the other.
<Armbian-Discord>
<c0rnelius> well ur right. the mac address sticks when pulling the card from one to another. thats pretty lame.
<Armbian-Discord>
<TheBug> @Notthix they are not produced really anymore but what you can do is go to the archive here: https://xogium.performanceservers.nl/archive/orangepione/archive/ there are images there with xfce, you can find one which can work for you.
<Armbian-Discord>
<jkent> even more lame, i can't figure out where its cached at, i've looked at udev, systemd, network-manager...
<Armbian-Discord>
<TheBug> i am not 100 on what your trying to do but is is in /boot/armbianEnv.txt what your thinking or ?
<Armbian-Discord>
<jkent> Looked there too.
<Armbian-Discord>
<TheBug> add something like ethaddr=46:d5:67:c2:29:8e
<Armbian-Discord>
<c0rnelius> nah he wants the board to dictate the mac
<Armbian-Discord>
<TheBug> hmm
<Armbian-Discord>
<TheBug> I mean have it generate on first boot and write there?
<Armbian-Discord>
<TheBug> it wouldn't be out of box per se but you could script it generating something random
<Armbian-Discord>
<jkent> i'll just hacky patch allwinner,sun8i-h3-emac variant
<Armbian-Discord>
<jkent> its not the most elegant solution but it will work for now
<Armbian-Discord>
<jkent> i don't understand the device tree stuff enough to dig into why the ethernet0 to &emac alias did not work
<Armbian-Discord>
<jkent> thanks for trying to help though!
<Armbian-Discord>
<ManoftheSea> Does the driver assign the mac from the DT?
<Armbian-Discord>
<ManoftheSea> Does u-boot usually do this method to set it from ethaddr?
<Armbian-Discord>
<c0rnelius> @TheBug That works for sure. Having a fresh img installed to the board generates the proper mac. He is trying to then clone it, the problem is the clone all populates the same exact mac. I already suggested just have it regenerate the address at boot.
<Armbian-Discord>
<ManoftheSea> Because it sounds like you'd just want u-boot to generate it the way it currently does, and then use it if ethaddr isnt' otherwise set
<Armbian-Discord>
<c0rnelius> i compiled a new uboot and flashed it to the img and rebooted. Same mac addr as before..
<Armbian-Discord>
<TheBug> or do it on the host you are duplicating on and just have it loop mount and write the new random mac to the env file and then consider it complete, then just run the script and have ready image?
<Armbian-Discord>
<c0rnelius> Tome this doesn't seem like its a uboot thing. More like something getting stuck in cache.
<Armbian-Discord>
<jkent> they are two distinct issues
<Armbian-Discord>
<ManoftheSea> cornelius, u-boot would be generating from the serial number using the same algorithm, right? flashing u-boot wouldn't be expected to change something
<Armbian-Discord>
<jkent> u-boot generates a MAC as expected (it starts with a 02 octet, locally-administered MAC)
<Armbian-Discord>
<c0rnelius> well i'm not compiling it on the board. Just flashing it. But I guess I could pull the card and flash it else, but I still don't think that gonna auto-magic create a new mac.
<Armbian-Discord>
<jkent> hold tight, might have human error here... i have two kernels, 5.15 (sep 9) and 5.15.y, (aug 9) and i was working on the aug 9 kernel's device tree... gah.
<Armbian-Discord>
<TheBug> Can I let go yet, starting to lose circulation...
<Armbian-Discord>
<jkent> you may, but i hope you have a parachute!
<Armbian-Discord>
<jkent> okay, build in progress... i had some learning to do with patch management
<Armbian-Discord>
<jkent> probably would have been quicker to compile the dtb myself, but no pain no gain
Armbian-Discord has quit [Remote host closed the connection]