|
本帖最后由 laomao9000 于 2023-3-27 16:18 编辑
水星D26G pro MT7621AT+ MT7615N+MT7615N,DDR3ram128M,8M spi nor 闪存,支持2.4G 4*4,800M,5G也是4*4,1733M,
参数:reset按钮:GPIO 8,LED:gpio 25 ,TTL:57600
选用了LEAN的源码,经过反复测试,还是选取了MT7615的闭源驱动,开源驱动不成熟,非常卡。
具体过程:
增加DTS文件 /openwrt/target/linux/ramips/dts/mt7621_mercury_d26g.dts
- /dts-v1/;
- #include "mt7621.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
- / {
- compatible = "mercury,d26g", "mediatek,mt7621-soc";
- model = "Mercury D26G";
- aliases {
- led-boot = &led_status;
- led-failsafe = &led_status;
- led-running = &led_status;
- led-upgrade = &led_status;
- };
- chosen {
- bootargs = "console=ttyS0,57600";
- };
- leds {
- compatible = "gpio-leds";
- led_status: status {
- label = "d26g:white:status";
- gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
- };
- };
- keys {
- compatible = "gpio-keys";
- reset {
- label = "reset";
- gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
- linux,code = <KEY_RESTART>;
- };
- };
- };
- &spi0 {
- status = "okay";
- m25p80@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <1000000>;
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
- partition@0 {
- label = "factory_boot";
- reg = <0x0 0x1d800>;
- read-only;
- };
- factory_info: partition@1d800 {
- label = "factory_info";
- reg = <0x1d800 0x800>;
- read-only;
- };
- art: partition@1e000 {
- label = "art";
- reg = <0x1e000 0x2000>;
- read-only;
- };
- partition@20000 {
- label = "config";
- reg = <0x20000 0x10000>;
- read-only;
- };
- partition@30000 {
- label = "normal_boot";
- reg = <0x30000 0x20000>;
- read-only;
- };
- partition[url=home.php?mod=space&uid=485662]@50000[/url] {
- compatible = "denx,uimage";
- label = "firmware";
- reg = <0x50000 0xfb0000>;
- };
- };
- };
- };
- &pcie {
- status = "okay";
- };
- &pcie0 {
- mt76@0,0 {
- reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&art 0>;
- mtd-mac-address = <&factory_info 0xd>;
- ieee80211-freq-limit = <2400000 2500000>;
- };
- };
- &pcie1 {
- mt76@0,0 {
- reg = <0x0000 0 0 0 0>;
- mediatek,mtd-eeprom = <&art 0x1000>;
- mtd-mac-address = <&factory_info 0xd>;
- mtd-mac-address-increment = <2>;
- ieee80211-freq-limit = <5000000 6000000>;
- };
- };
- &gmac0 {
- mtd-mac-address = <&factory_info 0xd>;
- };
- &switch0 {
- ports {
- port@0 {
- status = "okay";
- label = "wan";
- mtd-mac-address = <&factory_info 0xd>;
- mtd-mac-address-increment = <1>;
- };
- port@2 {
- status = "okay";
- label = "lan1";
- };
- port@3 {
- status = "okay";
- label = "lan2";
- };
- port@4 {
- status = "okay";
- label = "lan3";
- };
- };
- };
- &state_default {
- gpio {
- groups = "jtag", "uart2", "uart3", "wdt";
- function = "gpio";
- };
- };
复制代码 修改/openwrt/target/linux/ramips/image/mt7621.mk
- define Device/mercury_d26g
- $(Device/uimage-lzma-loader)
- IMAGE_SIZE := 16064k
- DEVICE_MODEL := D26G Pro
- DEVICE_VENDOR := Mercury
- DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 wpad-basic uboot-envtools
- endef
- TARGET_DEVICES += mercury_d26g
复制代码
配置端口,修改/openwrt/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
- xiaomi,mir3p|\
- mercury,d26g|\
- xiaomi,redmi-router-ac2100)
- ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
- ;;
复制代码
然后make menuconfig,再编译,生成固件,刷机:
测试无线信号,正常。LANto5G 开启160M,速度能达到90MB.
固件布局:
0.638635] Creating 4 MTD partitions on "spi0.0":
[ 0.648191] 0x000000000000-0x000000030000 : "u-boot"
[ 0.659436] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.671183] 0x000000040000-0x000000050000 : "factory"
[ 0.682406] 0x000000050000-0x000001000000 : "firmware"
固件:
链接: https://pan.baidu.com/s/1nWNVGKJ8oc1bTo3NY_AH7g 提取码: 7tam
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|