mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
117 lines
3.3 KiB
Diff
117 lines
3.3 KiB
Diff
From ad36a7e3d5f0fb614db377dbe9ca523fc0b6cca2 Mon Sep 17 00:00:00 2001
|
|
From: gl-dengxinfa <xinfa.deng@gl-inet.com>
|
|
Date: Tue, 27 Sep 2022 12:15:27 +0800
|
|
Subject: [PATCH] GL-MT1300: adapted to GL.iNet SDK 4.x
|
|
|
|
---
|
|
package/boot/uboot-envtools/files/ramips | 1 +
|
|
.../ramips/dts/mt7621_glinet_gl-mt1300.dts | 40 ++++++++++++++++---
|
|
target/linux/ramips/image/mt7621.mk | 4 +-
|
|
3 files changed, 38 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
|
|
index 2ed394ef40..da966c38d3 100644
|
|
--- a/package/boot/uboot-envtools/files/ramips
|
|
+++ b/package/boot/uboot-envtools/files/ramips
|
|
@@ -24,6 +24,7 @@ sitecom,wlr-4100-v1-002)
|
|
allnet,all0256n-4m|\
|
|
allnet,all0256n-8m|\
|
|
allnet,all5002|\
|
|
+glinet,gl-mt1300|\
|
|
glinet,gl-mt300n-v2|\
|
|
yuncore,ax820)
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
|
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
|
index 7e3dc8cc03..4b5e629c40 100644
|
|
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
|
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
|
|
@@ -10,13 +10,35 @@
|
|
model = "GL.iNet GL-MT1300";
|
|
|
|
aliases {
|
|
- led-boot = &led_run;
|
|
- led-failsafe = &led_run;
|
|
- led-running = &led_run;
|
|
- led-upgrade = &led_run;
|
|
+ //led-boot = &led_run;
|
|
+ //led-failsafe = &led_run;
|
|
+ //led-running = &led_run;
|
|
+ //led-upgrade = &led_run;
|
|
label-mac-device = &wan;
|
|
};
|
|
|
|
+ gl_hw {
|
|
+ compatible = "gl-hw-info";
|
|
+
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ model = "mt1300";
|
|
+ wan = "wan";
|
|
+ lan = "lan1 lan2";
|
|
+ reset-button = "gpio-18";
|
|
+ flash_size = <32>;
|
|
+ switch-button = "gpio-16";
|
|
+ radio = "radio0";
|
|
+ usb-port = "1-1";
|
|
+ factory_data {
|
|
+ device_mac = "factory", "0x4000";
|
|
+ device_ddns = "factory", "0x4010";
|
|
+ device_sn_bak = "factory", "0x4020";
|
|
+ device_sn = "factory", "0x4030";
|
|
+ country_code = "factory", "0x4048";
|
|
+ };
|
|
+ };
|
|
+
|
|
chosen {
|
|
bootargs = "console=ttyS0,115200";
|
|
};
|
|
@@ -33,7 +55,7 @@
|
|
switch {
|
|
label = "switch";
|
|
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
|
- linux,code = <BTN_0>;
|
|
+ linux,code = <KEY_SETUP>;
|
|
linux,input-type = <EV_SW>;
|
|
};
|
|
};
|
|
@@ -96,7 +118,12 @@
|
|
partition@50000 {
|
|
compatible = "denx,uimage";
|
|
label = "firmware";
|
|
- reg = <0x50000 0x1fb0000>;
|
|
+ reg = <0x50000 0x1f90000>;
|
|
+ };
|
|
+
|
|
+ partition@1ff0000 {
|
|
+ label = "log";
|
|
+ reg = <0x1fe0000 0x20000>;
|
|
};
|
|
};
|
|
};
|
|
@@ -111,6 +138,7 @@
|
|
compatible = "mediatek,mt76";
|
|
reg = <0x0000 0 0 0 0>;
|
|
mediatek,mtd-eeprom = <&factory 0x0>;
|
|
+ dbdc;
|
|
};
|
|
};
|
|
|
|
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
|
|
index c3e2291a9d..5468df83c6 100644
|
|
--- a/target/linux/ramips/image/mt7621.mk
|
|
+++ b/target/linux/ramips/image/mt7621.mk
|
|
@@ -721,7 +721,9 @@ define Device/glinet_gl-mt1300
|
|
IMAGE_SIZE := 32448k
|
|
DEVICE_VENDOR := GL.iNet
|
|
DEVICE_MODEL := GL-MT1300
|
|
- DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3
|
|
+ OLD_SUPPORTED_DEVICES := gl-mt1300
|
|
+ DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 kmod-sdhci-mt7620
|
|
+ IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-gl-metadata
|
|
endef
|
|
TARGET_DEVICES += glinet_gl-mt1300
|
|
|
|
--
|
|
2.34.1
|
|
|