Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Nov 8, 2024
1 parent 43982b2 commit 4a474ba
Show file tree
Hide file tree
Showing 90 changed files with 466 additions and 801 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ jobs:
elif [ ${{matrix.target}} == "x86_generic" ]; then
echo "ARCH=linux/amd32" >> $GITHUB_ENV
echo "MTARGET=x86_generic" >> $GITHUB_ENV
elif [[ ${{matrix.target}} =~ (armsr_armv8|ipq807x_generic|mediatek_mt7622|mediatek_mt7981|mediatek_filogic|bcm27xx_bcm2710|qualcommax_ipq60xx|bcm4908_generic|sunxi_cortexa53) ]]; then
elif [[ ${{matrix.target}} =~ (armsr_armv8|qualcommax_ipq807x|mediatek_mt7622|mediatek_mt7981|mediatek_filogic|bcm27xx_bcm2710|qualcommax_ipq60xx|bcm4908_generic|sunxi_cortexa53) ]]; then
echo "MTARGET=aarch64_cortex-a53" >> $GITHUB_ENV
elif [[ ${{matrix.target}} =~ (ramips_mt7621|ramips_mt7620|ramips_mt76x8) ]]; then
echo "MTARGET=mipsel_24kc" >> $GITHUB_ENV
elif [[ ${{matrix.target}} == "ath79_nand" ]]; then
echo "MTARGET=mips_24kc" >> $GITHUB_ENV
elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7|ipq50xx_arm) ]]; then
elif [[ ${{matrix.target}} =~ (ipq40xx_generic|bcm27xx_bcm2709|sunxi_cortexa7|qualcommax_ipq50xx) ]]; then
echo "MTARGET=arm_cortex-a7_neon-vfpv4" >> $GITHUB_ENV
elif [[ ${{matrix.target}} == "amlogic_meson8b" ]]; then
echo "MTARGET=arm_cortex-a5_vfpv4" >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ 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": "ipq50xx_arm ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq50xx_arm"}}'
-d '{"event_type": "qualcommax_ipq50xx ${{ github.event.inputs.param }}", "client_payload": {"target": "qualcommax_ipq50xx"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
Expand All @@ -142,7 +142,7 @@ 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": "ipq807x_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "ipq807x_generic"}}'
-d '{"event_type": "qualcommax_ipq807x ${{ github.event.inputs.param }}", "client_payload": {"target": "qualcommax_ipq807x"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
Expand Down
5 changes: 1 addition & 4 deletions devices/amlogic_meson8b/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

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

git_clone_path main https://github.com/shiyu1314/openwrt-onecloud kernel/amlogic && mv -f kernel/amlogic target/linux/

sed -i "s/CPU_SUBTYPE:=neon-vfpv4/CPU_SUBTYPE:=vfpv4/" target/linux/amlogic/meson8b/target.mk
git_clone_path master https://github.com/coolsnowwolf/lede target/linux/amlogic

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


18 changes: 18 additions & 0 deletions devices/amlogic_meson8b/diy/target/linux/amlogic/image/boot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 设置环境变量
setenv condev "console=ttyAML0,115200n8 no_console_suspend consoleblank=0"
setenv kernel_loadaddr "0x00208000"
setenv dtb_loadaddr "0x21800000"
setenv initrd_loadaddr "0x22000000"
setenv dtb_name "dtb"
setenv boot_start "bootm ${kernel_loadaddr} - ${dtb_loadaddr}"

# 设置 bootargs_emmc 环境变量
setenv bootargs_emmc "root=/dev/mmcblk1p2 rootwait ro ${condev} fsck.repair=yes net.ifnames=0"

# 尝试加载并启动系统
if fatload mmc 1 ${initrd_loadaddr} uInitrd &&
setenv bootargs ${bootargs_emmc} &&
fatload mmc 1 ${kernel_loadaddr} uImage &&
fatload mmc 1 ${dtb_loadaddr} ${dtb_name}; then
run boot_start
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# 检查参数数量
if [ "$#" -ne 5 ]; then
echo "Usage: $0 <output_image> <boot_partition_image> <rootfs_image>"
exit 1
fi

OUTPUT_IMAGE=$1
BOOT_PARTITION_IMAGE=$2
ROOTFS_IMAGE=$3


# 下载并准备工具
ver="v0.3.1"
curl -L -o ./AmlImg https://github.com/hzyitc/AmlImg/releases/download/$ver/AmlImg_${ver}_linux_amd64
chmod +x ./AmlImg
curl -L -o ./uboot.img https://github.com/shiyu1314/u-boot-onecloud/releases/download/build-20230901-0443/eMMC.burn.img
./AmlImg unpack ./uboot.img burn/

# 转换镜像格式
img2simg ${BOOT_PARTITION_IMAGE} burn/boot.simg
img2simg ${ROOTFS_IMAGE} burn/rootfs.simg

# 创建命令文件
cat <<EOF >>burn/commands.txt
PARTITION:boot:sparse:boot.simg
PARTITION:rootfs:sparse:rootfs.simg
EOF

# 打包生成最终镜像
./AmlImg pack ${OUTPUT_IMAGE} burn/

# 清理临时文件夹
rm -rf burn
17 changes: 13 additions & 4 deletions devices/amlogic_meson8b/patches/onecloud.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
--- a/target/linux/amlogic/image/Makefile
+++ b/target/linux/amlogic/image/Makefile
@@ -49,7 +49,8 @@ endef
--- a/target/linux/amlogic/image/meson8b.mk
+++ b/target/linux/amlogic/image/meson8b.mk
@@ -1,7 +1,7 @@

define Device/Default
FILESYSTEMS := ext4
- IMAGES := emmc.img
+ IMAGES := emmc_burn.img
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
KERNEL_LOADADDR := 0x01080000
KERNEL_NAME := Image
@@ -11,7 +11,8 @@ endef

define Device/thunder-onecloud
DEVICE_DTS := meson8b-onecloud
- DEVICE_TITLE := Thunder OneCloud
+ DEVICE_TITLE := OneCloud 玩客云
+ DEVICE_PACKAGES += kmod-usb-net-rtl8152
KERNEL_LOADADDR := 0x00208000
IMAGE/emmc_burn.img := boot-script onecloud | emmc-common $$(DEVICE_NAME)
IMAGE/emmc.img := boot-script onecloud | emmc-common $$(DEVICE_NAME)
endef
2 changes: 1 addition & 1 deletion devices/amlogic_mesongx/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ shopt -s extglob

SHELL_FOLDER=$(dirname $(readlink -f "$0"))

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

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

Expand Down
3 changes: 0 additions & 3 deletions devices/armsr_armv8/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ CONFIG_TARGET_ROOTFS_TARGZ=y
CONFIG_TARGET_ROOTFS_EXT4FS=y
CONFIG_TARGET_ROOTFS_SQUASHFS=n

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-switch-ar8xxx=n


9 changes: 0 additions & 9 deletions devices/armsr_armv8/patches/enable_wifi.patch

This file was deleted.

1 change: 0 additions & 1 deletion devices/ath79_nand/.config
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_zte_mf286=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_zte_mf281=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_domywifi_dw33d=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务



5 changes: 0 additions & 5 deletions devices/ath79_nand/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,3 @@
shopt -s extglob

SHELL_FOLDER=$(dirname $(readlink -f "$0"))





3 changes: 1 addition & 2 deletions devices/bcm27xx_bcm2708/.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ CONFIG_TARGET_bcm27xx_bcm2708=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_bcm27xx_bcm2708_DEVICE_rpi=y

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx
CONFIG_PACKAGE_kmod-codec-bcm2835=n



8 changes: 1 addition & 7 deletions devices/bcm27xx_bcm2709/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,4 @@ CONFIG_TARGET_bcm27xx=y
CONFIG_TARGET_bcm27xx_bcm2709=y
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



CONFIG_PACKAGE_kmod-codec-bcm2835=n
3 changes: 1 addition & 2 deletions devices/bcm27xx_bcm2710/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ CONFIG_TARGET_bcm27xx=y
CONFIG_TARGET_bcm27xx_bcm2710=y
CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx
CONFIG_PACKAGE_kmod-codec-bcm2835=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

Expand Down
5 changes: 1 addition & 4 deletions devices/bcm27xx_bcm2711/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ CONFIG_TARGET_bcm27xx=y
CONFIG_TARGET_bcm27xx_bcm2711=y
CONFIG_TARGET_bcm27xx_bcm2711_DEVICE_rpi-4=y

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-of-mdio=n
CONFIG_PACKAGE_kmod-codec-bcm2835=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

3 changes: 0 additions & 3 deletions devices/bcm27xx_bcm2712/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ CONFIG_TARGET_bcm27xx=y
CONFIG_TARGET_bcm27xx_bcm2712=y
CONFIG_TARGET_bcm27xx_bcm2712_DEVICE_rpi-5=y

CONFIG_PACKAGE_luci-ssl=n # uhttpd服务
CONFIG_PACKAGE_luci-ssl-nginx=y # nginx

CONFIG_PACKAGE_kmod-of-mdio=n

CONFIG_PACKAGE_kmod-pcie_mhi=m
Expand Down
2 changes: 1 addition & 1 deletion devices/bcm27xx_bcm2712/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

SHELL_FOLDER=$(dirname $(readlink -f "$0"))

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

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile
3 changes: 0 additions & 3 deletions devices/bcm53xx/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ CONFIG_TARGET_DEVICE_bcm53xx_generic_DEVICE_phicomm_k3=y
CONFIG_TARGET_DEVICE_bcm53xx_generic_DEVICE_asus_rt-ac88u=y
CONFIG_TARGET_DEVICE_bcm53xx_generic_DEVICE_dlink_dir-885l=y

CONFIG_PACKAGE_perf=n

CONFIG_KERNEL_DEVMEM=y
CONFIG_BUSYBOX_CONFIG_ARPING=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务



23 changes: 5 additions & 18 deletions devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ CONFIG_LUCI_CSSTIDY=n
CONFIG_SIGNED_PACKAGES=n
CONFIG_SIGNATURE_CHECK=n

CONFIG_PACKAGE_kmod-switch-rtl8367b=n
CONFIG_PACKAGE_kmod-aic8800=n

# 设置固件大小:
CONFIG_TARGET_ROOTFS_PARTSIZE=1004

Expand Down Expand Up @@ -74,24 +71,14 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG_INFO=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

CONFIG_PACKAGE_bash=y
CONFIG_PACKAGE_ca-bundle=y

CONFIG_KERNEL_CGROUP_DEVICE=y
CONFIG_KERNEL_CGROUP_FREEZER=y
CONFIG_KERNEL_NET_CLS_CGROUP=y
CONFIG_KERNEL_CGROUP_NET_PRIO=y
CONFIG_KERNEL_MEMCG_SWAP_ENABLED=y
CONFIG_KERNEL_CFQ_GROUP_IOSCHED=y
CONFIG_KERNEL_CGROUP_PERF=y
CONFIG_KERNEL_CGROUP_HUGETLB=y
CONFIG_KERNEL_EXT4_FS_POSIX_ACL=y
CONFIG_KERNEL_EXT4_FS_SECURITY=y
CONFIG_KERNEL_BTRFS_FS_POSIX_ACL=y


CONFIG_PACKAGE_kmod-sprd_pcie=n
CONFIG_PACKAGE_kmod-drm-nouveau=n
CONFIG_PACKAGE_dockerd=m

CONFIG_PACKAGE_wifi-scripts=m

CONFIG_PACKAGE_kmod-pcie_mhi=n

Expand Down
26 changes: 5 additions & 21 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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 \
sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-package-manager luci-app-upnp luci-app-syscontrol \
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 luci-app-fileassistant /" include/target.mk

Expand All @@ -35,8 +35,6 @@ while [[ "$status" == "in_progress" || "$status" == "queued" ]];do
status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/kwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')
done

rm -rf package/feeds/packages/v4l2loopback package/feeds/kiddin9/accel-ppp

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/
Expand All @@ -47,24 +45,10 @@ sed -i "s/192.168.1/10.0.0/" package/base-files/files/bin/config_generate

wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/kernel/linux/modules/video.mk -P package/kernel/linux/modules/

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

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 ] && {
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/
}

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
git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.6
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}
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/

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 All @@ -85,4 +69,4 @@ sed -i \
-e 's?../../lang?$(TOPDIR)/feeds/packages/lang?' \
package/feeds/kiddin9/*/Makefile

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
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 || true
Loading

0 comments on commit 4a474ba

Please sign in to comment.