# Custom OpenWrt Image for GL.iNet GL-MT6000 I have a [GL.iNet GL-MT6000](https://openwrt.org/toh/gl.inet/gl-mt6000) WiFi 6 router. Here are some notes for building a custom OpenWrt 23.05 image via [this service](https://firmware-selector.openwrt.org) for it. OpenWrt images can be flashed to replace the vendor firmware directly. ## Build Request 1. Default packages Custom selection of packages should start from this list, which is parsed from [this file](https://downloads.openwrt.org/releases/23.05-SNAPSHOT/targets/mediatek/filogic/profiles.json). ``` base-files busybox ca-bundle dnsmasq dropbear e2fsprogs f2fsck firewall4 fstools kmod-crypto-hw-safexcel kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7915e kmod-mt7986-firmware kmod-nft-offload kmod-phy-aquantia kmod-usb3 libc libgcc libustream-mbedtls logd mkf2fs mt7986-wo-firmware mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls ``` 2. ~~Revert `firewall4` back to `firewall` for now~~ (**No longer needed**) ~~Currently the `nftables`-based `firewall4` is too bugged for daily use. It became [the default](https://github.com/openwrt/openwrt/commit/08d9f6e3020b4a149b2007b6ed7d684c49af9bbf) just before the release of OpenWrt 22.03.~~ This was the case for OpenWrt 22.03, but it is no longer needed now. ``` -firewall4 -kmod-nft-offload firewall ip6tables-legacy iptables-legacy kmod-ipt-offload ``` 3. Replace `wpad-basic-mbedtls` with `wpad-mbedtls` Install `wpad-mbedtls` instead for full feature set related to wireless authentication. ``` -wpad-basic-mbedtls wpad-mbedtls ``` 4. USB flash drive support GL.iNet GL-MT6000 has a USB 3.0 port. Install applications and kernel modules for USB flash drive support. The `Btrfs`, `exFAT`, `ext4`, `F2FS`, `FAT`-family, `XFS` and `NTFS` file systems are supported. ``` block-mount blockd kmod-fs-btrfs kmod-fs-exfat kmod-fs-ext4 kmod-fs-f2fs kmod-fs-vfat kmod-fs-xfs kmod-usb-storage kmod-usb-storage-uas ntfs-3g usbutils ``` 5. LuCI web interface Install LuCI web interface for easy administration. ``` luci luci-ssl luci-theme-bootstrap luci-theme-openwrt-2020 ``` 6. Additional packages Personal choices here. ``` auc curl ip6tables-nft iptables-nft kmod-tun luci-app-adblock luci-app-attendedsysupgrade luci-app-bcp38 luci-app-firewall luci-app-opkg luci-app-sqm luci-app-uhttpd luci-app-wireguard luci-app-wol nano qrencode stubby tcpdump wget-ssl ``` ## Build Result The final package list will be: ``` -wpad-basic-mbedtls auc base-files block-mount blockd busybox ca-bundle curl dnsmasq dropbear e2fsprogs f2fsck firewall4 fstools ip6tables-nft iptables-nft kmod-crypto-hw-safexcel kmod-fs-btrfs kmod-fs-exfat kmod-fs-ext4 kmod-fs-f2fs kmod-fs-vfat kmod-fs-xfs kmod-gpio-button-hotplug kmod-leds-gpio kmod-mt7915e kmod-mt7986-firmware kmod-nft-offload kmod-phy-aquantia kmod-tun kmod-usb-storage kmod-usb-storage-uas kmod-usb3 libc libgcc libustream-mbedtls logd luci luci-app-adblock luci-app-attendedsysupgrade luci-app-bcp38 luci-app-firewall luci-app-opkg luci-app-sqm luci-app-uhttpd luci-app-wireguard luci-app-wol luci-ssl luci-theme-bootstrap luci-theme-openwrt-2020 mkf2fs mt7986-wo-firmware mtd nano netifd nftables ntfs-3g odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail qrencode stubby tcpdump uboot-envtools uci uclient-fetch urandom-seed urngd usbutils wget-ssl wpad-mbedtls ``` Submit the build request. If it is successful, download and flash the resulting `sysupgrade` image. Tested and confirmed to work on `23.05.5 r24106-10cc5fcd00`. ## To do * ~~Decide if `luci-app-upnp` is needed.~~ Nope. * ~~Once the `nftables`-based `firewall4` becomes stable enough in OpenWrt, migrate to it by removing Step 2. Add `iptables-nft` and `ip6tables-nft` as drop-in replacements like [what Red Hat did](https://www.redhat.com/en/blog/using-iptables-nft-hybrid-linux-firewall).~~ Done.