Enable TF card reader, reorganizing things as follows: 1 - Create three DTS overlays: the "default" one (selected by U-Boot) allowing GPS access via /dev/ttyS1, a second one allowing access to the MMC controller (which shares some PINs with the UART) and a third that permits booting from an SD card. 2 - Adapt U-Boot support accordingly: it now offers a boot firmware media feature, allowing to switch easily from NOR to SD booting and back. Note that the device will always boot BL2 + BL31+U-Boot from NOR; U-Boot environment remains there as well.
Why this cover letter --------------------- To explain the reasons behind some choices I've made. a - I introduced a new "Build/simplefit" recipe in target/linux/mediatek/image/filogic.mk since I needed a simpler partition scheme. Infact, here I am storing only the firmware, and not all of the rest used by Mediatek devices when booting from SD card (BL2 + BL31...). b - In boot media selection logic, I preferred to use patterns like: if test ...; then do_something; else if test ...; then do_something_different; fi; fi rather than if test ...; then do_something; else do_something_else; fi to make it easier to extend things, for me or someone who may find themlselves in the need to implement something similar but with more firmware loading options. c - Choosing to create three overlays instead of two (leaving GPS UART access possible in the base DTS) makes it necessary to upgrade U-Boot if sysupgrading past this commit. Still, I deviced to go this way because it seemed more elegant. Enrico Mioso (2): mediatek: filogic: add SD card support to GatoNetworks GDSP uboot-mediatek: GatoNetworks GDSP support fixes and updates .../patches/458-add-GatoNetworks-GDSP.patch | 83 +++++++++++++++---- .../dts/mt7981b-gatonetworks-gdsp-gps.dtso | 15 ++++ .../mt7981b-gatonetworks-gdsp-sd-boot.dtso | 30 +++++++ .../dts/mt7981b-gatonetworks-gdsp-sd.dtso | 15 ++++ .../dts/mt7981b-gatonetworks-gdsp.dts | 69 ++++++++++++++- .../base-files/lib/upgrade/platform.sh | 3 +- target/linux/mediatek/image/filogic.mk | 20 ++++- 7 files changed, 214 insertions(+), 21 deletions(-) create mode 100644 target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-gps.dtso create mode 100644 target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso create mode 100644 target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd.dtso -- 2.49.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel