Looking for D-Link Aquila users (E30, M30, M60, R32, M32)

Hi everyone,

I'm looking for users who use one of the devices mentioned in the subject, especially if you bought them in a 2-pack.

Background is this PR:

OpenWrt must be updated to support the TLV layout of the D-Link ODM partition. Would be great if you can a provide a dump of the ODM partition to have some test data for the changes.

Thanks

Roland

Hi. I have M60-2 (aka dual pack M60) and also MAC is shifted. If we need two .dts to one device it's better to move MAC handling to user space. Then we can check for if '-' is presents after device code name then pull MAC from valid offset. I'll look into it after the weekend.

There was a comment from @Djfe in the PR:

I'm interested in the NVMEM layout kernel module and will have a look at it in parallel.

So I came up with such code. It search for hex 0x2d (minus sign) like in M60-2 at 0x4d offset if it is match.
in regular M60 0x4d should have hex 0x00 value (space)

if [ $(hexdump -n 1 -v -s 0x4d -e '1 "%02x"' /dev/mtd6) = 2d ];then get_mac_binary /dev/mtd6 0x83 ;else get_mac_binary /dev/mtd6 0x81 ;fi

Then it will jump between two offsets clean and simple. R32 M30 and M60 use 0x81 as base...
M32 has 0x83 as base but this might be just M32-2 (or 3) ported.
Then we need entries in:

/etc/hotplug.d/ieee80211/11_fix_wifi_mac
/etc/board.d/02_network

On the 2nd tough new set of *.dtsi + *.dts can also work since device name is clearly different.

So without editing .dts entries I've modified user space mac setup (via OpenWrt Image Builder so it's land in /rom). WiFi part worked but ethernet part did not. So no quick workaround for this.

/etc/hotplug.d/ieee80211/11_fix_wifi_mac

        dlink,aquila-pro-ai-m60-a1)
                addr=$(if [ $(hexdump -n 1 -v -s 0x4d -e '1 "%02x"' /dev/mtd6) = 2d ];then get_mac_binary /dev/mtd6 0x83 ;else get_mac_binary /dev/mtd6 0x81 ;fi)
                [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" = "1" ] && macaddr_add $addr 5 > /sys${DEVPATH}/macaddress
                ;;

/etc/board.d/02_network

        dlink,aquila-pro-ai-m60-a1)
                wan_mac=$(if [ $(hexdump -n 1 -v -s 0x4d -e '1 "%02x"' /dev/mtd6) = 2d ];then get_mac_binary /dev/mtd6 0x83 ;else get_mac_binary /dev/mtd6 0x81 ;fi)
                label_mac=$(macaddr_add "$wan_mac" 1)
                lan_mac=$label_mac
                ;;