-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for GainStrong Oolite-MT7981B V1
- Loading branch information
1 parent
566058d
commit 84b5503
Showing
28 changed files
with
898 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ | |
/logs | ||
/feeds | ||
/feeds.conf | ||
/files | ||
/overlay | ||
/package/feeds | ||
/package/openwrt-packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
CONFIG_TARGET_mediatek=y | ||
CONFIG_TARGET_mediatek_filogic=y | ||
CONFIG_TARGET_MULTI_PROFILE=y | ||
|
||
CONFIG_IMAGEOPT=y | ||
CONFIG_VERSIONOPT=y | ||
CONFIG_VERSION_FILENAMES=y | ||
CONFIG_VERSION_CODE_FILENAMES=y | ||
|
||
CONFIG_PACKAGE_kmod-mmc=y | ||
CONFIG_PACKAGE_kmod-usb3=y | ||
CONFIG_PACKAGE_kmod-usb-storage=y | ||
|
||
CONFIG_PACKAGE_kmod-oolite-v7=y | ||
CONFIG_PACKAGE_oolite-v7-tools=y | ||
|
||
CONFIG_PACKAGE_luci=y | ||
CONFIG_LUCI_LANG_en=y | ||
CONFIG_LUCI_LANG_zh_Hans=y | ||
CONFIG_PACKAGE_luci-app-ttyd=y | ||
CONFIG_PACKAGE_luci-app-ser2net=y | ||
|
||
CONFIG_PACKAGE_uboot-envtools=y | ||
|
||
CONFIG_PACKAGE_mdio-tools=y | ||
CONFIG_PACKAGE_ethtool=y | ||
CONFIG_PACKAGE_pciutils=y | ||
CONFIG_PACKAGE_usbutils=y | ||
|
||
CONFIG_PACKAGE_nand-utils=y | ||
CONFIG_PACKAGE_ubi-utils=y | ||
CONFIG_PACKAGE_mmc-utils=y | ||
|
||
CONFIG_PACKAGE_parted=y | ||
CONFIG_PACKAGE_cgdisk=y | ||
CONFIG_PACKAGE_gdisk=y | ||
CONFIG_PACKAGE_sgdisk=y | ||
CONFIG_PACKAGE_cfdisk=y | ||
CONFIG_PACKAGE_fdisk=y | ||
CONFIG_PACKAGE_sfdisk=y | ||
|
||
CONFIG_PACKAGE_lsblk=y | ||
CONFIG_PACKAGE_losetup=y | ||
CONFIG_PACKAGE_blkid=y | ||
CONFIG_PACKAGE_blockdev=y | ||
|
||
CONFIG_PACKAGE_kmod-fs-ext4=y | ||
CONFIG_PACKAGE_kmod-fs-exfat=y | ||
CONFIG_PACKAGE_kmod-fs-ntfs3=y | ||
CONFIG_PACKAGE_kmod-fs-vfat=y | ||
CONFIG_PACKAGE_e2fsprogs=y | ||
|
||
CONFIG_PACKAGE_iperf3=y | ||
CONFIG_PACKAGE_memtester=y | ||
|
||
CONFIG_PACKAGE_coreutils=y | ||
CONFIG_PACKAGE_coreutils-dd=y | ||
CONFIG_PACKAGE_coreutils-stty=y | ||
CONFIG_PACKAGE_diffutils=y | ||
|
||
CONFIG_PACKAGE_lsof=y | ||
CONFIG_PACKAGE_dmesg=y | ||
|
||
############### 4G LTE/5G support start ############### | ||
CONFIG_PACKAGE_luci-proto-qmi=y | ||
CONFIG_PACKAGE_luci-proto-3g=y | ||
CONFIG_PACKAGE_luci-proto-ncm=y | ||
CONFIG_PACKAGE_qmi-utils=y | ||
CONFIG_PACKAGE_mbim-utils=y | ||
CONFIG_PACKAGE_umbim=y | ||
|
||
CONFIG_PACKAGE_luci-app-3ginfo-lite=y | ||
CONFIG_PACKAGE_luci-app-sms-tool=y | ||
CONFIG_PACKAGE_luci-compat=y | ||
############### 4G LTE/5G support end ############### | ||
|
||
############### I2C support start ############### | ||
CONFIG_PACKAGE_i2c-tools=y | ||
CONFIG_PACKAGE_kmod-i2c-gpio=y | ||
CONFIG_PACKAGE_kmod-gpio-pca953x=y | ||
############### I2C support end ############### | ||
|
||
CONFIG_KERNEL_FTRACE=y | ||
CONFIG_KERNEL_FTRACE_SYSCALLS=y | ||
CONFIG_KERNEL_ENABLE_DEFAULT_TRACERS=y | ||
CONFIG_KERNEL_FUNCTION_TRACER=y | ||
CONFIG_KERNEL_FUNCTION_GRAPH_TRACER=y | ||
CONFIG_KERNEL_DYNAMIC_FTRACE=y | ||
CONFIG_KERNEL_FUNCTION_PROFILER=y | ||
CONFIG_KERNEL_IRQSOFF_TRACER=y | ||
CONFIG_KERNEL_PREEMPT_TRACER=y | ||
CONFIG_KERNEL_HIST_TRIGGERS=y | ||
CONFIG_KERNEL_DEBUG_KERNEL=y | ||
CONFIG_KERNEL_DEBUG_INFO=y | ||
CONFIG_KERNEL_DEBUG_INFO_REDUCED=y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
|
||
# Constants | ||
PRODUCT_NAME="Oolite-MT7981B" | ||
|
||
if [ -z "$(grep 21.02 include/version.mk)" ]; then | ||
TARGET_NAME="filogic" | ||
else | ||
TARGET_NAME="mt7981" | ||
fi | ||
|
||
DEVICE_PREFIX="CONFIG_TARGET_DEVICE_mediatek_${TARGET_NAME}_DEVICE_gainstrong_oolite-mt7981b" | ||
FLASH_TYPES=("nand" "emmc" "sdcard" "nor" "all") | ||
|
||
# Function to validate the user input | ||
validate_input() { | ||
local input=$1 | ||
for flash_type in "${FLASH_TYPES[@]}"; do | ||
if [ "$input" == "$flash_type" ]; then | ||
return 0 | ||
fi | ||
done | ||
return 1 | ||
} | ||
|
||
# Check if the argument is valid | ||
if [[ $# -eq 1 ]]; then | ||
if validate_input "$1"; then | ||
user_input=$1 | ||
else | ||
echo "Error: The input must be a valid flash type (nand, emmc, sdcard, nor, all)" | ||
exit 1 | ||
fi | ||
else | ||
# Prompt user to choose flash_type | ||
echo "Please choose a flash type:" | ||
PS3="Enter the corresponding number (1-5) and press Enter: " | ||
select choice in "${FLASH_TYPES[@]}"; do | ||
if [ -n "$choice" ]; then | ||
user_input=$choice | ||
break | ||
else | ||
echo "Invalid selection, please try again." | ||
fi | ||
done | ||
fi | ||
|
||
# Function to build for each flash type | ||
build_for_flash_type() { | ||
local flash_type=$1 | ||
|
||
cp MT7981.config .config | ||
|
||
VERSION=$(./scripts/getver.sh) | ||
|
||
cat << EOF >> .config | ||
# Add an empty line | ||
CONFIG_KERNEL_BUILD_DOMAIN="$VERSION" | ||
CONFIG_KERNEL_BUILD_USER="$PRODUCT_NAME" | ||
CONFIG_VERSION_DIST="$PRODUCT_NAME" | ||
EOF | ||
|
||
if [ "$flash_type" == "all" ]; then | ||
for flash_type_option in nand emmc sdcard nor; do | ||
echo "$DEVICE_PREFIX-dev-board-${flash_type_option}-boot=y" >> .config | ||
# echo "$DEVICE_PREFIX-module-${flash_type_option}-boot=y" >> .config | ||
done | ||
else | ||
echo "$DEVICE_PREFIX-dev-board-${flash_type}-boot=y" >> .config | ||
# echo "$DEVICE_PREFIX-module-${flash_type}-boot=y" >> .config | ||
fi | ||
|
||
# Execute the build commands | ||
make package/symlinks | ||
make defconfig | ||
make -j8 V=sc | ||
} | ||
|
||
build_for_flash_type "$user_input" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Put your custom commands here that should be executed once | ||
# the system init finished. By default this file does nothing. | ||
|
||
iperf3 -s -D --logfile /tmp/iperf3.log | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
target/linux/mediatek/dts/mt7981b-gainstrong-oolite-mt7981b-dev-board-emmc-boot.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/dts-v1/; | ||
|
||
#include "mt7981b-gainstrong-oolite-mt7981b.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-dev-board.dtsi" | ||
|
||
/ { | ||
model = "GainStrong Oolite-MT7981B V1 Dev Board (emmc boot)"; | ||
compatible = "gainstrong,oolite-mt7981b-dev-board-emmc-boot", "mediatek,mt7981"; | ||
|
||
chosen { | ||
bootargs = "rootwait root=PARTLABEL=rootfs"; | ||
}; | ||
}; |
11 changes: 11 additions & 0 deletions
11
target/linux/mediatek/dts/mt7981b-gainstrong-oolite-mt7981b-dev-board-nand-boot.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/dts-v1/; | ||
|
||
#include "mt7981b-gainstrong-oolite-mt7981b.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-nand-boot.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-dev-board.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-mtd-macaddr.dtsi" | ||
|
||
/ { | ||
model = "GainStrong Oolite-MT7981B V1 Dev Board (nand boot)"; | ||
compatible = "gainstrong,oolite-mt7981b-dev-board-nand-boot", "mediatek,mt7981"; | ||
}; |
12 changes: 12 additions & 0 deletions
12
target/linux/mediatek/dts/mt7981b-gainstrong-oolite-mt7981b-dev-board-nor-boot.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/dts-v1/; | ||
|
||
#include "mt7981b-gainstrong-oolite-mt7981b.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-nor-boot.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-dev-board.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-mtd-macaddr.dtsi" | ||
|
||
/ { | ||
model = "GainStrong Oolite-MT7981B V1 Dev Board (nor boot)"; | ||
compatible = "gainstrong,oolite-mt7981b-dev-board-nor-boot", "mediatek,mt7981"; | ||
|
||
}; |
18 changes: 18 additions & 0 deletions
18
target/linux/mediatek/dts/mt7981b-gainstrong-oolite-mt7981b-dev-board-sdcard-boot.dts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/dts-v1/; | ||
|
||
#include "mt7981b-gainstrong-oolite-mt7981b.dtsi" | ||
#include "mt7981b-gainstrong-oolite-mt7981b-dev-board.dtsi" | ||
|
||
/ { | ||
model = "GainStrong Oolite-MT7981B V1 Dev Board (sd card boot)"; | ||
compatible = "gainstrong,oolite-mt7981b-dev-board-sdcard-boot", "mediatek,mt7981"; | ||
|
||
chosen { | ||
bootargs = "rootwait root=PARTLABEL=rootfs"; | ||
}; | ||
}; | ||
|
||
&mmc0 { | ||
bus-width = <4>; | ||
/delete-property/ non-removable; | ||
}; |
Oops, something went wrong.
84b5503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ptpt52 可以参考修改clk-mt7981-infracfg.c解决eMMC问题
84b5503
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guoxiaoqiao
ok, 怎么发现是这个的?