<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Paul,</p>
    <p>I opened a pull request on GitHub to support the Mi Router 4A
      Gigabit Edition, which is essentially the same device. You can
      find it at <a class="moz-txt-link-freetext" href="https://github.com/openwrt/openwrt/pull/2486">https://github.com/openwrt/openwrt/pull/2486</a></p>
    <p>There are a few differences you may want to address:</p>
    <blockquote type="cite"
      cite="mid:20190901073349.ekh6zvtuovseshoq@home.paul.comp">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">+        xiaomi,mir3g-v2)
+               wan_mac=$(mtd_get_mac_binary factory 0xe006)
+               ;;</pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <p>You may want to add "label_mac=$wan_mac" there, if the MAC
      address on the back label matches the WAN interface (on the R4G it
      does).</p>
    <p>Also, it looks like a newline should be added at the end of the
      .dts file.</p>
    <pre class="content"><span class="p_add">
</span><span class="p_add"></span></pre>
    <blockquote type="cite"
      cite="mid:20190901073349.ekh6zvtuovseshoq@home.paul.comp">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap=""><span class="p_add">+define Device/xiaomi_mir3g-v2</span>
<span class="p_add">+  MTK_SOC := mt7621</span>
<span class="p_add">+  IMAGE_SIZE := 14848k</span>
<span class="p_add">+  DEVICE_VENDOR := Xiaomi</span>
<span class="p_add">+  DEVICE_MODEL := Mi Router 3G</span>
<span class="p_add">+  DEVICE_VARIANT := v2</span>
<span class="p_add">+  DEVICE_ALT0_VENDOR := Xiaomi</span>
<span class="p_add">+  DEVICE_ALT0_MODEL := Mi Router 4A Gigabit Edition</span>
<span class="p_add">+  DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 wpad-basic</span>
<span class="p_add">+endef</span>
<span class="p_add">+TARGET_DEVICES += xiaomi_mir3g-v2</span></pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <p>Since there are two Xiaomi Router 4A variants, the 100m and the
      Gigabit Edition, you may want to use:<br>
    </p>
    <pre class="moz-quote-pre" wrap=""><span class="p_add">+  DEVICE_ALT0_VENDOR := Xiaomi</span>
<span class="p_add">+  DEVICE_ALT0_MODEL := Mi Router 4A
</span><span class="p_add">+  DEVICE_ALT0_VARIANT := Gigabit Edition</span>
</pre>
    <p><br>
    </p>
    <p>Last, I added the device to uboot-envtools. Feel free to copy it:
<a class="moz-txt-link-freetext" href="https://github.com/openwrt/openwrt/pull/2486/commits/2625499ca554449e7a19bb5f6f61acdefb5a69e1">https://github.com/openwrt/openwrt/pull/2486/commits/2625499ca554449e7a19bb5f6f61acdefb5a69e1</a></p>
    <p>Best,</p>
    <p>Roger<br>
    </p>
  </body>
</html>