Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Aug 19, 2024
1 parent f8565db commit 379cc16
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 24 deletions.
9 changes: 7 additions & 2 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 Down Expand Up @@ -220,9 +221,13 @@ 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
sed -n '/# Video Support/,/# end of Video Support/p' .config | sed -e 's/=m/=n/' >>.config
fi
make defconfig
fi
cat .config
Expand Down
2 changes: 2 additions & 0 deletions devices/amlogic_meson8b/.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CONFIG_TARGET_amlogic=y
CONFIG_TARGET_amlogic_meson8b=y
CONFIG_TARGET_amlogic_meson8b_DEVICE_thunder-onecloud=y

CONFIG_PACKAGE_kmod-rt2x00-pci=n

CONFIG_TARGET_ROOTFS_SQUASHFS=n
CONFIG_TARGET_ROOTFS_EXT4FS=y

Expand Down
19 changes: 1 addition & 18 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,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 +52,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 +80,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" feeds/kiddin9/base-files/files/bin/config_generate feeds/kiddin9/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
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" feeds/kiddin9/base-files/files/bin/config_generate feeds/kiddin9/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
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
18 changes: 18 additions & 0 deletions devices/rockchip_rk35xx/.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

CONFIG_TARGET_rockchip=y
CONFIG_TARGET_rockchip_rk35xx=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_ALL_PROFILES=y

CONFIG_TARGET_KERNEL_PARTSIZE=32

CONFIG_PACKAGE_kmod-pcie_mhi=m

CONFIG_PACKAGE_kmod-dma-buf=n

CONFIG_PACKAGE_kmod-fs-virtiofs=n

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


1 change: 1 addition & 0 deletions devices/rockchip_rk35xx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kernel等部分源码来源 https://github.com/coolsnowwolf/lede 感谢
34 changes: 34 additions & 0 deletions devices/rockchip_rk35xx/diy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

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

rm -rf package/boot package/feeds/kiddin9/accel-ppp package/devel/perf package/devel/kselftests-bpf package/feeds/routing/batman-adv package/kernel/ksmbd

rm -rf target/linux/generic/!(*-5.15) target/linux/rockchip package/kernel devices/common/patches/usb-audio.patch

git_clone_path master https://github.com/coolsnowwolf/lede package/boot target/linux/rockchip package/kernel

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

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

sed -i "/KernelPackage,ptp/d" package/kernel/linux/modules/other.mk

mv -f tmp/r8125 feeds/kiddin9/

sed -i -e 's,kmod-r8168,kmod-r8169,g' target/linux/rockchip/image/rk35xx.mk
sed -i -e 's,wpad-openssl,wpad-basic-mbedtls,g' target/linux/rockchip/image/rk35xx.mk

wget -N https://github.com/coolsnowwolf/lede/raw/master/include/netfilter.mk -P include/


sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk/' target/linux/rockchip/Makefile

cp -Rf $SHELL_FOLDER/diy/* ./

echo '
CONFIG_SENSORS_PWM_FAN=y
' >> ./target/linux/rockchip/rk35xx/config-5.10
22 changes: 22 additions & 0 deletions devices/rockchip_rk35xx/patches/add_extra_CPU_FLAGS.b
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- a/include/target.mk
+++ b/include/target.mk
@@ -259,9 +259,18 @@ ifeq ($(DUMP),1)
CPU_CFLAGS_arc700 = -mcpu=arc700
CPU_CFLAGS_archs = -mcpu=archs
endif
+ ifeq ($(BOARD),rockchip)
+ CPU_CFLAGS = -O3 -pipe
+ CPU_CFLAGS_cortex-a53 = -mcpu=cortex-a53
+ CPU_CFLAGS_cortex-a55 = -march=armv8-a+crypto+crc -mcpu=cortex-a55+crypto+crc -mtune=cortex-a55
+ CPU_CFLAGS_cortex-a73 = -march=armv8-a+crypto+crc -mcpu=cortex-a73.cortex-a53+crypto+crc -mtune=cortex-a73.cortex-a53
+ ifneq ($(SOC_CFLAGS),)
+ CPU_CFLAGS_generic = $(SOC_CFLAGS)
+ endif
+ endif
ifneq ($(CPU_TYPE),)
ifndef CPU_CFLAGS_$(CPU_TYPE)
- $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
+ $(warning CPU_TYPE "$(CPU_TYPE)" "doesn't correspond to a known type")
endif
endif
DEFAULT_CFLAGS=$(strip $(CPU_CFLAGS) $(CPU_CFLAGS_$(CPU_TYPE)) $(CPU_CFLAGS_$(CPU_SUBTYPE)))
19 changes: 19 additions & 0 deletions devices/rockchip_rk35xx/patches/h28k.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- a/target/linux/rockchip/image/rk35xx.mk
+++ b/target/linux/rockchip/image/rk35xx.mk
@@ -78,6 +78,16 @@ $(call Device/rk3528)
endef
TARGET_DEVICES += radxa_e20c

+define Device/hlink_h28k
+$(call Device/rk3528)
+ DEVICE_VENDOR := Hlink
+ DEVICE_MODEL := H28K
+ SUPPORTED_DEVICES += hlink,h28k
+ DEVICE_DTS := rk3528-h28k
+ DEVICE_PACKAGES := kmod-r8169 kmod-r8125 kmod-thermal
+endef
+TARGET_DEVICES += hlink_h28k
+
define Device/radxa_rock-5c
$(call Device/rk3588)
DEVICE_VENDOR := Radxa

0 comments on commit 379cc16

Please sign in to comment.