Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Aug 22, 2024
1 parent f8565db commit d9c59ab
Show file tree
Hide file tree
Showing 23 changed files with 170 additions and 757 deletions.
32 changes: 25 additions & 7 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@ jobs:
run: |
sudo -E apt-get -qq update
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 \
git libncurses5-dev libssl-dev python2.7 python3-distutils python3-pyelftools python3-setuptools \
python3-dev python3-pip rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename \
libelf-dev device-tree-compiler libgnutls28-dev coccinelle libgmp3-dev libmpc-dev libfuse-dev gcc-multilib
pip3 install --user -U pylibfdt
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
sudo -E apt-get -qq clean
sudo ln -sf /usr/bin/python2.7 /usr/bin/python2
sudo timedatectl set-timezone "$TZ"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
Expand All @@ -135,10 +136,15 @@ jobs:
- name: Clone source code
run: |
REPO_BRANCH="$((curl -gs -H 'Content-Type: application/json' \
TAG_INFO="$(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"
-X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", first: 4, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {nodes {name target { ... on Tag {tagger {date}}}}}}}"}' https://api.github.com/graphql)"
TAG_DATE="$( echo ${TAG_INFO} | jq -r '.data.repository.refs.nodes[] | select(.name | startswith("v23")) | .target.tagger.date' | head -n 1)"
if [[ $(( $(date +%s) - ($(date -d "$TAG_DATE" +%s)) / 86400 )) -lt 30 ]]; then
REPO_BRANCH="$( echo ${TAG_INFO} | jq -r '.data.repository.refs.nodes[].name' | grep v23 | head -n 1)"
else
REPO_BRANCH="openwrt-23.05"
fi
#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 Down Expand Up @@ -167,12 +173,18 @@ jobs:
[[ "$mv" != "mv" ]] && shift 2 || shift 3
rootdir="$PWD"
tmpdir="$(mktemp -d)" || exit 1
git clone -b $branch --depth 1 --filter=blob:none --sparse $rurl $tmpdir
if [ ${#branch} -lt 10 ]; then
git clone -b "$branch" --depth 1 --filter=blob:none --sparse "$rurl" "$tmpdir"
cd "$tmpdir"
else
git clone --filter=blob:none --sparse "$rurl" "$tmpdir"
cd "$tmpdir"
git checkout $branch
fi
if [ "$?" != 0 ]; then
echo "error on $rurl"
exit 1
fi
cd $tmpdir
git sparse-checkout init --cone
git sparse-checkout set $@
[[ "$mv" != "mv" ]] && cp -rn ./* $rootdir/ || mv -n $@/* $rootdir/$@/
Expand Down Expand Up @@ -220,9 +232,15 @@ jobs:
run: |
cd openwrt
make defconfig
if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_*|sunxi_*|x86_*) ]]; then
if [[ ! "${{matrix.target}}" =~ (armsr_armv8|bcm27xx_*|rockchip_armv8|sunxi_*|x86_*) ]]; then
sed -n '/# Wireless Drivers/,/# end of Wireless Drivers/p' .config | sed -e 's/=m/=n/' >>.config
sed -i "s/\(kmod-qca.*\)=m/\1=n/" .config
if [[ "${{matrix.target}}" =~ (amlogic_*|rockchip_rk35xx) ]]; then
sed -i "s/CONFIG_PACKAGE_kmod-\(.*u|.*-usb\)=n/CONFIG_PACKAGE_kmod-\1=m/g" .config
fi
if [[ "${{matrix.target}}" == "rockchip_rk35xx" ]]; then
sed -n '/# Video Support/,/# end of Video Support/p' .config | sed -e 's/=m/=n/' >>.config
fi
make defconfig
fi
cat .config
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ jobs:
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
-d '{"event_type": "rockchip_rk35xx ${{ github.event.inputs.param }}", "client_payload": {"target": "rockchip_rk35xx"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.TOKEN_KIDDIN9 }}" \
-d '{"event_type": "bcm27xx_bcm2712 ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm27xx_bcm2712"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
Expand Down
5 changes: 3 additions & 2 deletions devices/amlogic_meson8b/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ CONFIG_TARGET_amlogic=y
CONFIG_TARGET_amlogic_meson8b=y
CONFIG_TARGET_amlogic_meson8b_DEVICE_thunder-onecloud=y

CONFIG_PACKAGE_kmod-rt2x00-pci=n
CONFIG_PACKAGE_kmod-r8101=n

CONFIG_TARGET_ROOTFS_SQUASHFS=n
CONFIG_TARGET_ROOTFS_EXT4FS=y

CONFIG_PACKAGE_perf=n

CONFIG_PACKAGE_kmod-rt2x00-pci=n
6 changes: 5 additions & 1 deletion devices/amlogic_meson8b/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ bash $SHELL_FOLDER/../common/kernel_6.1.sh

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic package/boot/uboot-amlogic

sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/meson8b.mk
rm -rf package/kernel/mac80211

git_clone_path c640f7b93736621b4d56627e4f6ab824093f9c3d https://github.com/openwrt/openwrt package/kernel/mac80211

sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/meson8b.mk

rm -rf package/kernel/r8125 package/kernel/r8126 package/kernel/r8168

22 changes: 4 additions & 18 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ sed -i '/ refresh_config();/d' scripts/feeds
./scripts/feeds install -a -p kiddin9 -f
./scripts/feeds install -a

rm -rf package/base-files
mv -f feeds/kiddin9/base-files package/

echo "$(date +"%s")" >version.date
sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' package/Makefile
sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-opkg luci-app-upnp luci-app-autoreboot \
Expand All @@ -38,7 +41,6 @@ mv -f feeds/kiddin9/r81* tmp/

wget -N https://raw.githubusercontent.com/openwrt/packages/master/lang/golang/golang/Makefile -P feeds/packages/lang/golang/golang/

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

#sed -i "/call Build\/check-size,\$\$(KERNEL_SIZE)/d" include/image.mk
Expand All @@ -53,7 +55,6 @@ sed -i "s/CONFIG_WERROR=y/CONFIG_WERROR=n/" target/linux/generic/config-5.15
sed -i "s/no-lto,$/no-lto no-mold,$/" include/package.mk

[ -d package/kernel/mt76 ] && {
mkdir package/kernel/mt76/patches
wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -P package/kernel/mt76/patches/
}

Expand Down Expand Up @@ -82,19 +83,4 @@ sed -i \
-e 's?../../lang?$(TOPDIR)/feeds/packages/lang?' \
package/feeds/kiddin9/*/Makefile

(
if [ -f sdk.tar.xz ]; then
sed -i 's,$(STAGING_DIR_HOST)/bin/upx,upx,' package/feeds/kiddin9/*/Makefile
mkdir sdk
tar -xJf sdk.tar.xz -C sdk
cp -rf sdk/*/staging_dir/* ./staging_dir/
rm -rf sdk.tar.xz sdk
sed -i '/\(tools\|toolchain\)\/Makefile/d' Makefile
if [ -f /usr/bin/python ]; then
ln -sf /usr/bin/python staging_dir/host/bin/python
else
ln -sf /usr/bin/python3 staging_dir/host/bin/python
fi
ln -sf /usr/bin/python3 staging_dir/host/bin/python3
fi
) &
sed -i "s/OpenWrt/KWrt/g" package/base-files/files/bin/config_generate package/base-files/image-config.in config/Config-images.in Config.in include/u-boot.mk include/version.mk package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh || true
3 changes: 2 additions & 1 deletion devices/common/kernel_6.1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ rm -rf target/linux/generic/hack-6.1/{410-block-fit-partition-parser.patch,724-n

wget -N https://raw.githubusercontent.com/openwrt/openwrt/main/include/u-boot.mk -P include/

mkdir package/kernel/mt76/patches
wget -N https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -P package/kernel/mt76/patches/

cd feeds/packages
Expand All @@ -44,3 +43,5 @@ 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

sed -i "s/no-lto,/no-lto no-mold,/" include/package.mk

sed -i "s/OpenWrt/KWrt/g" package/base-files/files/bin/config_generate package/base-files/image-config.in config/Config-images.in Config.in include/u-boot.mk include/version.mk package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh || true
1 change: 1 addition & 0 deletions devices/common/kernel_6.6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ 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
rm -rf target/linux/generic/hack-6.6/767-net-phy-realtek*

wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-6.6/613-netfilter_optional_tcp_window_check.patch -P target/linux/generic/pending-6.6/

Expand Down
6 changes: 3 additions & 3 deletions devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
+ echo -e " \
+ sed -i \"s/[0-9]\+.[0-9]\+.[0-9]\{4\}/$$DATE/\" /etc/openwrt_release \n \
+ sed -i \"s/DISTRIB_ID=.*/DISTRIB_ID='$(ROOTFS_PARTSIZE)'/\" /etc/openwrt_release \n \
+ sed -i \"s/OpenWrt .* by/OpenWrt $$DATE by/\" /etc/banner \n \
+ sed -i \"s/KWrt .* by/Kwrt $$DATE by/\" /etc/banner \n \
+ echo \"$$DATE\" >/etc/openwrt_version \n \
+ "> $(USER_FILES)/etc/uci-defaults/99-version; \
+ echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))'; \
Expand All @@ -87,7 +87,7 @@
+ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" ]]; then \
+ if [[ $(IMAGE_SIZE) -lt 20480 ]]; then \
+ if [[ ! "`grep "small_flash" $(TOPDIR)/repositories.conf`" ]]; then \
+ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf; \
+ echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf; \
+ fi \
+ else \
+ sed -i "/small_flash/d" $(TOPDIR)/repositories.conf; \
Expand Down Expand Up @@ -128,7 +128,7 @@
)
$(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES))
+ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \
+ echo "`grep openwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf; \
+ echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf; \
+ fi

build_image: FORCE
Expand Down
2 changes: 2 additions & 0 deletions devices/qualcommax_ipq60xx/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ CONFIG_TARGET_qualcommax_ipq60xx=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y

CONFIG_PACKAGE_kmod-mtdtests=n

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
8 changes: 7 additions & 1 deletion devices/qualcommax_ipq60xx/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

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

rm -rf target/linux/qualcommax package/kernel/qca-* devices/common/patches/qca-ssdk.patch package/boot/uboot-envtools package/firmware/ipq-wifi
rm -rf target/linux/qualcommax target/linux/generic/!(*-5.15) package/kernel/qca-* package/kernel/mac80211 devices/common/patches/qca-ssdk.patch package/boot/uboot-envtools package/firmware/ipq-wifi
git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax package/firmware/ipq-wifi package/boot/uboot-envtools package/qca

git_clone_path master https://github.com/coolsnowwolf/lede mv target/linux/generic

git_clone_path c640f7b93736621b4d56627e4f6ab824093f9c3d https://github.com/openwrt/openwrt package/kernel/mac80211

wget -N https://github.com/coolsnowwolf/lede/raw/master/include/kernel-6.1 -P include/

sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/qualcommax/Makefile


Expand Down
Loading

0 comments on commit d9c59ab

Please sign in to comment.