Skip to content

Commit

Permalink
Merge pull request #1 from FUjr/work
Browse files Browse the repository at this point in the history
Work
  • Loading branch information
FUjr committed Feb 27, 2023
2 parents ae8ac2d + 1de46cd commit edc1871
Show file tree
Hide file tree
Showing 17 changed files with 6,483 additions and 3 deletions.
25 changes: 25 additions & 0 deletions patches-22.03.2/0031-modify-image-rootfs-size-to-512M.patch
@@ -0,0 +1,25 @@
From d9a02dfb7e3589f813ccb9f0508af2111db81f6d Mon Sep 17 00:00:00 2001
From: Weiping Yang <weiping.yang@gl-inet.com>
Date: Sun, 26 Feb 2023 23:29:38 -0500
Subject: [PATCH] modify image rootfs size to 512M

---
config/Config-images.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/Config-images.in b/config/Config-images.in
index dcd7575c3e..b676e0f018 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -297,7 +297,7 @@ menu "Target Images"
config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MiB)"
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
- default 104
+ default 512
help
Select the root filesystem partition size.

--
2.17.1

26 changes: 26 additions & 0 deletions patches-22.03.2/1001-add-mv1000-uboot-envtools-partition.patch
@@ -0,0 +1,26 @@
From 25f925b53c5c772a125b89b373b04a3e982ec422 Mon Sep 17 00:00:00 2001
From: Weiping Yang <weiping.yang@gl-inet.com>
Date: Sun, 26 Feb 2023 23:31:47 -0500
Subject: [PATCH] add mv1000 uboot-envtools

---
package/boot/uboot-envtools/files/mvebu | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu
index cffd396ae1..757b69779b 100644
--- a/package/boot/uboot-envtools/files/mvebu
+++ b/package/boot/uboot-envtools/files/mvebu
@@ -26,7 +26,8 @@ cznic,turris-omnia)
ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
fi
;;
-glinet,gl-mv1000)
+glinet,gl-mv1000|\
+gl-mv1000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x8000" "1"
;;
globalscale,espressobin|\
--
2.17.1

25 changes: 25 additions & 0 deletions patches-22.03.2/1002-adapt-to-mv1000-usb-devise.patch
@@ -0,0 +1,25 @@
From b8b39a3904c5b686b3ff3b5808459d608f46aec5 Mon Sep 17 00:00:00 2001
From: Weiping Yang <weiping.yang@gl-inet.com>
Date: Mon, 27 Feb 2023 01:22:07 -0500
Subject: [PATCH] adapt-to-mv1000-usb-devise

---
package/kernel/linux/modules/usb.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 1fc3541f10..763b6fced3 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -169,7 +169,7 @@ define KernelPackage/usb-gadget-eth
$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ecm_subset.ko \
$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_rndis.ko \
$(LINUX_DIR)/drivers/usb/gadget/legacy/g_ether.ko
- AUTOLOAD:=$(call AutoLoad,52,usb_f_ecm)
+ AUTOLOAD:=$(call AutoLoad,52,usb_f_ecm g_ether)
$(call AddDepends/usb)
endef

--
2.17.1

37 changes: 37 additions & 0 deletions patches-22.03.2/3005-mvebu-adjust-01-leds.patch
@@ -0,0 +1,37 @@
From 1592185f17d4f13518d95a24b9289aab374540af Mon Sep 17 00:00:00 2001
From: Weiping Yang <weiping.yang@gl-inet.com>
Date: Sat, 25 Feb 2023 04:16:01 -0500
Subject: [PATCH] mvebu-adjust-01-leds

---
.../linux/mvebu/cortexa53/base-files/etc/board.d/01_leds | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
mode change 100644 => 100755 target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds

diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds
old mode 100644
new mode 100755
index 4dce204f14..0f7b53a8dd
--- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds
+++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/01_leds
@@ -1,3 +1,5 @@
+#!/bin/sh
+#
# SPDX-License-Identifier: GPL-2.0-only

. /lib/functions/uci-defaults.sh
@@ -7,8 +9,9 @@ board_config_update
board=$(board_name)

case "$board" in
-glinet,gl-mv1000)
- ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
+glinet,gl-mv1000|\
+gl-mv1000)
+ ucidef_set_led_netdev "wan" "WAN" "gl-mv1000:white:wan" "wan"
;;
esac

--
2.17.1

72 changes: 72 additions & 0 deletions patches-22.03.2/3006-mvebu-adjust-02_network.patch
@@ -0,0 +1,72 @@
From a70578eadae572187daab68d6e7318f10daeb140 Mon Sep 17 00:00:00 2001
From: Weiping Yang <weiping.yang@gl-inet.com>
Date: Sun, 26 Feb 2023 22:44:41 -0500
Subject: [PATCH] mvebu-adjust-02_network

---
.../base-files/etc/board.d/02_network | 25 ++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
mode change 100644 => 100755 target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network

diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network
old mode 100644
new mode 100755
index 7da9de58c7..441fc286e8
--- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network
@@ -1,9 +1,12 @@
+#!/bin/sh
#
# Copyright (C) 2014-2016 OpenWrt.org
# Copyright (C) 2016 LEDE-Project.org
#

+. /lib/functions.sh
. /lib/functions/uci-defaults.sh
+. /lib/functions/system.sh

board_config_update

@@ -11,11 +14,12 @@ board=$(board_name)

case "$board" in
glinet,gl-mv1000|\
+gl-mv1000|\
globalscale,espressobin|\
globalscale,espressobin-emmc|\
globalscale,espressobin-v7|\
globalscale,espressobin-v7-emmc)
- ucidef_set_interfaces_lan_wan "lan0 lan1" "wan"
+ ucidef_set_interfaces_lan_wan "lan0 lan1 usb0" "wan"
;;
globalscale,espressobin-ultra)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
@@ -29,6 +33,25 @@ methode,udpu)
;;
esac

+mvebu_setup_macs()
+{
+ local board="$1"
+ local lan_mac=""
+ local wan_mac=""
+
+ case "$board" in
+ glinet,gl-mv1000|\
+ gl-mv1000)
+ wan_mac=$(mtd_get_mac_binary "factory" 0)
+ lan_mac=$(macaddr_add "$wan_mac" 1)
+ ;;
+ esac
+
+ [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
+ [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+}
+
+mvebu_setup_macs $board
board_config_flush

exit 0
--
2.17.1

0 comments on commit edc1871

Please sign in to comment.