mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-26 22:29:33 +00:00
7eda44f536
Add u-boot support based on the kernel dts introduced in d1016446 and the GL-MT6000 u-boot support in fe10f974. The pcie-mediatek-gen3 kernel driver doesn't like hotplug, so to work in PCIe mode, the 5G modem on this device needs to be switched on by u-boot before starting the kernel. Include an init_modem step in the boot_system action to set the relevant gpios. (The factory bootloader does the same, using Mediatek SDK-specific gpio_power_clr and gpio_pull_up.) Ideally the modem would be started using gpio-hog in the device tree, but this will need to wait until mediatek gpio-hog support is fixed upstream: https://lore.kernel.org/u-boot/6ef2583e85eea60560d7776377d662779e7c44e5.1722419839.git.chris@arachsys.com/ The bootloader can be replaced using the built-in web interface of the factory bootloader. Hold the reset button for five seconds while powering on the device and it will boot into a recovery http server. http://192.168.1.1/uboot.html and http://192.168.1.1/bl2.html can then be used to upload openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin respectively. Alternatively, from a root shell on the running system, unlock the boot partition with echo 0 >/sys/block/mmcblk0boot0/force_ro then write openwrt-mediatek-filogic-glinet_gl-x3000-bl31-uboot.fip to /dev/mmcblk0p4 and openwrt-mediatek-filogic-glinet_gl-x3000-preloader.bin to /dev/mmcblk0boot0. Signed-off-by: Chris Webb <chris@arachsys.com> Link: https://github.com/openwrt/openwrt/pull/15645 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>