Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed May 14, 2024
1 parent cc0603b commit 7edf61c
Show file tree
Hide file tree
Showing 47 changed files with 2,957 additions and 125 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
sudo -E apt-get -qq install build-essential clang llvm flex g++ gawk gcc-multilib gettext \
git libncurses5-dev libssl-dev python3-distutils python3-pyelftools python3-setuptools \
libpython3-dev rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename \
libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev
libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev
sudo -E apt-get -qq purge azure-cli ghc* zulu* firefox powershell openjdk* dotnet* google* mysql* php* android*
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq autoremove --purge
Expand All @@ -139,7 +139,7 @@ jobs:
REPO_BRANCH="$((curl -gs -H 'Content-Type: application/json' \
-H "Authorization: Bearer ${{ secrets.TOKEN_KIDDIN9 }}" \
-X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v23 | tail -n 1)"
#REPO_BRANCH="openwrt-23.05"
REPO_BRANCH="openwrt-23.05"
#echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/`echo $REPO_BRANCH | cut -d . -f 1,2 | sed -e 's/^v//'`\"">>devices/common/.config
echo "CONFIG_VERSION_REPO=\"https://dl.openwrt.ai/23.05\"">>devices/common/.config
if [[ ! "${{ env.REPO_BRANCH }}" && "$REPO_URL" == "https://github.com/openwrt/openwrt" ]]; then
Expand All @@ -163,7 +163,8 @@ jobs:
- name: Load custom configuration
run: |
function git_clone_path() {
branch="$1" rurl="$2" localdir="gitemp" && shift 2
branch="$1" rurl="$2" localdir="gitemp" mv="$3"
[[ "$mv" != "mv" ]] && shift 2 || shift 3
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $localdir
if [ "$?" != 0 ]; then
echo "error on $rurl"
Expand All @@ -172,7 +173,7 @@ jobs:
cd $localdir
git sparse-checkout init --cone
git sparse-checkout set $@
cp -rn $@ ../$(dirname "$@")/
[[ "$mv" != "mv" ]] && cp -rn ./* ../ || mv -n $@/* ../$@/
cd ..
rm -rf gitemp
}
Expand Down
1 change: 0 additions & 1 deletion devices/bcm27xx_bcm2708/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile

sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile


2 changes: 2 additions & 0 deletions devices/bcm27xx_bcm2709/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ CONFIG_TARGET_bcm27xx_bcm2709_DEVICE_rpi-2=y
CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-pcie_mhi=m



1 change: 1 addition & 0 deletions devices/bcm27xx_bcm2710/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y
CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-pcie_mhi=m


2 changes: 0 additions & 2 deletions devices/bcm27xx_bcm2710/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

#bash $SHELL_FOLDER/../common/kernel_6.1.sh

sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile

mkdir -p files/lib/firmware/brcm
Expand Down
2 changes: 2 additions & 0 deletions devices/bcm27xx_bcm2711/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-of-mdio=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

2 changes: 1 addition & 1 deletion devices/bcm27xx_bcm2711/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))
#bash $SHELL_FOLDER/../common/kernel_6.1.sh

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile
sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile


2 changes: 2 additions & 0 deletions devices/bcm27xx_bcm2712/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-of-mdio=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

2 changes: 0 additions & 2 deletions devices/bcm27xx_bcm2712/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))
bash $SHELL_FOLDER/../common/kernel_6.1.sh

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile
sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile

4 changes: 4 additions & 0 deletions devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y
CONFIG_PACKAGE_kmod-sprd_pcie=n
CONFIG_PACKAGE_kmod-drm-nouveau=n

CONFIG_PACKAGE_kmod-pcie_mhi=n

CONFIG_PACKAGE_kmod-rtl8189es=n

CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y

Expand Down
9 changes: 4 additions & 5 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' pac
sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite --force-depends/' package/Makefile
sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-opkg luci-app-upnp luci-app-autoreboot \
luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs \
coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan /" include/target.mk
coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig luci-app-fan luci-app-filebrowser /" include/target.mk
sed -i "s/procd-ujail//" include/target.mk

sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk
Expand All @@ -32,7 +32,7 @@ while [[ "$status" == "in_progress" || "$status" == "queued" ]];do
done


mv -f feeds/kiddin9/{r81*} tmp/
mv -f feeds/kiddin9/r81* tmp/

sed -i "s/192.168.1/10.0.0/" package/feeds/kiddin9/base-files/files/bin/config_generate
sed -i "s/192.168.1/10.0.0/" package/base-files/files/bin/config_generate
Expand All @@ -54,19 +54,18 @@ curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/packa
}

cd feeds/packages
rm -rf libs/libpfring
rm -rf libs/libpfring
git_clone_path master https://github.com/openwrt/packages libs/libpfring
cd ../../

rm -rf package/network/utils/xdp-tools package/feeds/kiddin9/quectel_MHI package/feeds/packages/v4l2loopback
rm -rf package/network/utils/xdp-tools package/feeds/kiddin9/fibocom_MHI package/feeds/packages/v4l2loopback

grep -q 'PKG_RELEASE:=9' package/libs/openssl/Makefile && {
sh -c "curl -sfL https://github.com/openwrt/openwrt/commit/a48d0bdb77eb93f7fba6e055dace125c72755b6a.patch | patch -d './' -p1 --forward"
}

sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh || sed -i "/wireless.\${name}.disabled/d" package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh

sed -i "/BuildPackage,miniupnpd-iptables/d" feeds/packages/net/miniupnpd/Makefile
sed -i 's/Os/O2/g' include/target.mk
sed -i "/mediaurlbase/d" package/feeds/*/luci-theme*/root/etc/uci-defaults/*
sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf
Expand Down
15 changes: 8 additions & 7 deletions devices/common/kernel_6.1.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
#!/bin/bash

shopt -s extglob

rm -rf target/linux package/kernel package/boot package/firmware package/network/config/wifi-scripts

mkdir new; cp -rf .git new/.git
cd new
git reset --hard origin/master

cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* package/network/config/wifi-scripts config/Config-images.in include/image*.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils ../
cp -rf --parents target/linux package/kernel package/boot package/firmware include/kernel* package/network/config/wifi-scripts config/Config-images.in include/image*.mk include/trusted-firmware-a.mk scripts/ubinize-image.sh package/utils/bcm27xx-utils package/devel/perf ../
cd -

sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk

#sed -i "s/\$(PKG_VERSION)-\$(PKG_RELEASE)/\$(PKG_VERSION)-r\$(PKG_RELEASE)/" include/package-defaults.mk

cp -rf devices/common/patches/rootfstargz.patch.b devices/common/patches/rootfstargz.patch
cp -rf devices/common/patches/kernel6.1.patch.b devices/common/patches/kernel6.1.patch

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1

Expand All @@ -28,15 +31,13 @@ curl -sfL https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot.
mkdir package/kernel/mt76/patches
curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -o package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch

rm -rf package/feeds/kiddin9/quectel_Gobinet

cd feeds/packages
rm -rf libs/xr_usb_serial_common net/coova-chilli net/xtables-addons
git_clone_path master https://github.com/openwrt/packages libs/xr_usb_serial_common
git_clone_path master https://github.com/openwrt/packages net/coova-chilli
git_clone_path master https://github.com/openwrt/packages net/xtables-addons
rm -rf libs/!(pcre) net/coova-chilli net/xtables-addons net/jool kernel
git_clone_path master https://github.com/openwrt/packages libs net/coova-chilli net/xtables-addons net/jool kernel
cd ../../

rm -rf package/feeds/kiddin9/quectel_Gobinet package/feeds/kiddin9/fibocom_MHI package/feeds/packages/libpfring

sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf

sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab
Expand Down
12 changes: 12 additions & 0 deletions devices/common/kernel_6.6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

shopt -s extglob
SHELL_FOLDER=$(dirname $(readlink -f "$0"))

bash $SHELL_FOLDER/../common/kernel_6.1.sh

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6

curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch

rm -rf target/linux/generic/hack-6.6/{410-block-fit-partition-parser.patch,724-net-phy-aquantia*,720-net-phy-add-aqr-phys.patch}
2 changes: 1 addition & 1 deletion devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
echo
rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \
+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-4a-gigabit-v2|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_ht-jsh_0211|DEVICE_jdcloud_luban|DEVICE_zte_e8820v2) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \
+ echo "src/gz openwrt_smflash https://dl.openwrt.ai/packages/small_flash" >>$(TOPDIR)/repositories.conf; \
+ else \
+ sed -i "/smflash/d" $(TOPDIR)/repositories.conf; \
Expand Down
21 changes: 21 additions & 0 deletions devices/common/patches/kernel6.1.patch.b
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/package/kernel/qca-ssdk/Makefile
+++ b/package/kernel/qca-ssdk/Makefile
@@ -32,11 +32,17 @@ endef
GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
+ifdef CONFIG_TOOLCHAIN_BIN_PATH
+TOOLCHAIN_BIN_PATH=$(CONFIG_TOOLCHAIN_BIN_PATH)
+else
+TOOLCHAIN_BIN_PATH=$(TOOLCHAIN_DIR)/bin
+endif
+
LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' PRJ_PATH=$(PKG_BUILD_DIR) MODULE_TYPE=KSLIB modules
MAKE_FLAGS+= \
TARGET_NAME=$(CONFIG_TARGET_NAME) \
- TOOL_PATH=$(firstword $(TOOLCHAIN_BIN_DIRS)) \
+ TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \
SYS_PATH=$(LINUX_DIR) \
TOOLPREFIX=$(TARGET_CROSS) \
KVER=$(LINUX_VERSION) \
2 changes: 1 addition & 1 deletion devices/common/patches/usb-audio.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
CONFIG_SND_USB_AUDIO
$(call AddDepends/usb)
$(call AddDepends/sound)
+ DEPENDS += +LINUX_6_1:kmod-media-core
+ DEPENDS += +LINUX_6_1:kmod-media-core +LINUX_6_6:kmod-media-core
FILES:= \
$(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko \
$(LINUX_DIR)/sound/usb/snd-usb-audio.ko
5 changes: 5 additions & 0 deletions devices/mediatek_filogic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r3-mini=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_bananapi_bpi-r4=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-x3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y
CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

CONFIG_PACKAGE_kmod-pcie_mhi=m

2 changes: 1 addition & 1 deletion devices/mediatek_filogic/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
shopt -s extglob
SHELL_FOLDER=$(dirname $(readlink -f "$0"))

bash $SHELL_FOLDER/../common/kernel_6.1.sh
bash $SHELL_FOLDER/../common/kernel_6.6.sh

sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" package/boot/uboot-envtools/files/mediatek_filogic
sed -i "s/mi-router-wr30u-stock/mi-router-wr30u/" target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
Expand Down
Loading

0 comments on commit 7edf61c

Please sign in to comment.