Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Jan 4, 2025
1 parent 169343f commit 15d7aba
Show file tree
Hide file tree
Showing 20 changed files with 168 additions and 104 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,14 @@ jobs:
DEBIAN_FRONTEND: noninteractive
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 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
pip3 install --user -U pylibfdt
sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \
python3-setuptools rsync swig unzip zlib1g-dev file wget \
llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \
libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev
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 @@ -153,7 +152,8 @@ jobs:
-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("v24")) | .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 v24 | head -n 1)"
#REPO_BRANCH="$( echo ${TAG_INFO} | jq -r '.data.repository.refs.nodes[].name' | grep v24 | head -n 1)"
REPO_BRANCH="openwrt-24.10"
else
REPO_BRANCH="openwrt-24.10"
fi
Expand Down Expand Up @@ -298,19 +298,12 @@ jobs:
continue-on-error: true
run: |
shopt -s extglob
mkdir -p firmware/${{matrix.target}}
cp -rf openwrt/bin/targets/*/*/*{combined,sysupgrade}* ./firmware/${{matrix.target}}/ || true
cd openwrt/bin/targets/*/*/
cp $GITHUB_WORKSPACE/openwrt/.config ${{matrix.target}}.config || true
cp $GITHUB_WORKSPACE/openwrt/build_dir/target-*/linux-*/linux-*/.config ${{matrix.target}}_kernel.config || true
cd -
rename -v "s/openwrt-/${{ env.VERSION }}-openwrt-/" ./firmware/*/* || true
rm -rf kwrt-!(*imagebuilder*)
Emoji=("🎉" "🤞" "✨" "🎁" "🎈" "🎄" "🎨" "💋" "🍓" "🍕" "🍉" "💐" "🌴" "🚀" "🛸" "🗽" "⛅" "🌈" "🔥" "⛄" "🐶" "🏅" "🦄" "🐤")
echo "EMOJI=${Emoji[$[$RANDOM % ${#Emoji[@]}]]}" >> $GITHUB_ENV
if [ ${{matrix.target}} == "x86_64" ]; then
echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-nginx:latest" >> $GITHUB_ENV
echo "NOTICE=请分配不少于1G的存储容量" >> $GITHUB_ENV
fi
- name: Deploy imagebuilder to server
uses: easingthemes/ssh-deploy@main
Expand Down
3 changes: 2 additions & 1 deletion devices/armsr_armv8/.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONFIG_TARGET_armsr=y
CONFIG_TARGET_armsr_armv8=y
CONFIG_TARGET_armsr_armv8_DEVICE_generic=y
CCONFIG_TARGET_DEVICE_armsr_armv8_DEVICE_generic=y
CONFIG_TARGET_DEVICE_armsr_armv8_DEVICE_box=y
CONFIG_PACKAGE_kmod-brcmfmac=y
CONFIG_BRCMFMAC_SDIO=y
CONFIG_TARGET_ROOTFS_TARGZ=y
Expand Down
30 changes: 4 additions & 26 deletions devices/armsr_armv8/patches/rootfs.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -728,8 +769,10 @@ endef
define Device
$(call Device/InitProfile,$(1))
$(call Device/Init,$(1))
+ $(call Device/Init,$(PROFILE_SANITIZED))
$(call Device/Default,$(1))
$(call Device/$(1),$(1))
+ $(call Device/$(PROFILE_SANITIZED),$(1))
$(call Device/Check,$(1))
$(call Device/$(if $(DUMP),Dump,Build),$(1))

--- a/include/image.mk
+++ b/include/image.mk
@@ -599,7 +599,7 @@ define Device/Build/kernel
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
$(call Device/Export,$$(KDIR_KERNEL_IMAGE),$(1))
$(BIN_DIR)/$$(KERNEL_IMAGE): $$(KDIR_KERNEL_IMAGE)
- cp $$^ $$@
+ cp $(KDIR)/generic-kernel.bin $$@
ifndef IB
ifdef CONFIG_IB
install: $$(KDIR_KERNEL_IMAGE)

--- a/target/linux/armsr/image/Makefile
+++ b/target/linux/armsr/image/Makefile
@@ -81,10 +81,8 @@ define Device/efi-default
Expand All @@ -36,13 +11,16 @@
IMAGES-y += combined.img
endif
ifeq ($(CONFIG_VMDK_IMAGES),y)
@@ -116,4 +114,21 @@ define Device/generic
@@ -116,4 +114,24 @@ define Device/generic
endef
TARGET_DEVICES += generic

+define Device/box
+ DEVICE_TITLE := 电视盒子全系列 / N1
+ DEVICE_PACKAGES := perlbase-base perlbase-utf8 perlbase-time perlbase-xsloader perlbase-file btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-mbedtls iw fdisk lsblk automount
+ IMAGE/rootfs.tar.gz := append-rootfs | gzip
+ IMAGES := rootfs.tar.gz
+ KERNEL := kernel-bin
+endef
+TARGET_DEVICES += box
+
Expand Down
2 changes: 1 addition & 1 deletion devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CONFIG_LUCI_LANG_zh_Hans=y
CONFIG_LUCI_LANG_en=y
CONFIG_PACKAGE_coremark=y
CONFIG_DEVEL=y
CONFIG_CCACHE=n
CONFIG_CCACHE=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_COREMARK_OPTIMIZE_O3=y
CONFIG_COREMARK_ENABLE_MULTITHREADING=y
Expand Down
4 changes: 1 addition & 3 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ sed -i 's/max_requests 3/max_requests 20/g' package/network/services/uhttpd/file
#rm -rf ./feeds/packages/lang/{golang,node}
sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab

sed -i 's/$$(call concat_cmd,$$(KERNEL_INITRAMFS))/-$$(call concat_cmd,$$(KERNEL_INITRAMFS))/' include/image.mk

date=`date +%m.%d.%Y`
sed -i -e "/\(# \)\?REVISION:=/c\REVISION:=$date" -e '/VERSION_CODE:=/c\VERSION_CODE:=$(REVISION)' include/version.mk

Expand All @@ -81,4 +79,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 || true
sed -i "s/OpenWrt/Kwrt/g" package/base-files/files/bin/config_generate package/base-files/image-config.in package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc config/Config-images.in Config.in include/u-boot.mk include/version.mk || true
30 changes: 23 additions & 7 deletions devices/common/patches/imagebuilder.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/include/image.mk
+++ b/include/image.mk
@@ -623,7 +621,7 @@ define Device/Build/kernel
@@ -717,7 +717,7 @@ define Device/Build/kernel
endef

define Device/Build/image
Expand All @@ -9,7 +9,15 @@
$$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json, \
$(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX))
@@ -761,6 +761,7 @@ define Device/DumpInfo
@@ -755,6 +755,7 @@ define Device/Build/image
FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
FILE_FILESYSTEM="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
+ IMAGE_SIZE="$(shell echo $$(($(call exp_units,$(IMAGE_SIZE)))))" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
@@ -861,6 +862,7 @@ define Device/DumpInfo
Target-Profile: DEVICE_$(1)
Target-Profile-Name: $(DEVICE_DISPLAY)
Target-Profile-Packages: $(DEVICE_PACKAGES)
Expand All @@ -18,6 +26,17 @@
Target-Profile-SupportedDevices: $(SUPPORTED_DEVICES)
$(if $(BROKEN),Target-Profile-Broken: $(BROKEN))

--- a/scripts/json_add_image_info.py
+++ b/scripts/json_add_image_info.py
@@ -72,6 +72,7 @@ def get_titles():
"device_packages": getenv("DEVICE_PACKAGES").split(),
"supported_devices": getenv("SUPPORTED_DEVICES").split(),
"titles": get_titles(),
+ "image_size": getenv("IMAGE_SIZE"),
}
},
}

--- a/scripts/target-metadata.pl
+++ b/scripts/target-metadata.pl
@@ -437,6 +437,7 @@ ()
Expand Down Expand Up @@ -71,7 +90,7 @@

--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -142,6 +142,36 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
@@ -142,6 +142,33 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))
BUILD_PACKAGES:=$(USER_PACKAGES) $(BUILD_PACKAGES)
Expand All @@ -90,14 +109,11 @@
+ endif
+endif
+ifeq ($(SMALL_FLASH),true)
+ ifeq ($(XSMALL_FLASH),true)
+ BUILD_PACKAGES += -coremark -htop -bash -openssh-sftp-server
+ endif
+ ifeq ($(shell grep -q small_flash $(TOPDIR)/repositories.conf || echo "not_found"),not_found)
+ $(shell echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf)
+ endif
+ ifneq ($(findstring /data/bcache/,$(BIN_DIR)),)
+ BUILD_PACKAGES += -luci-app-homeproxy -luci-app-istorex -luci-theme-argon
+ BUILD_PACKAGES += -luci-app-homeproxy -luci-app-istorex -luci-theme-argon -htop -bash -openssh-sftp-server -luci-ssl-nginx luci-ssl
+ endif
+else
+ $(shell sed -i "/small_flash/d" $(TOPDIR)/repositories.conf)
Expand Down
7 changes: 0 additions & 7 deletions devices/common/patches/wifi-scripts.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@

set ${si}=wifi-iface
set ${si}.device='${name}'
set ${si}.network='lan'
set ${si}.mode='ap'
-set ${si}.ssid='${defaults?.ssid || "OpenWrt"}'
+set ${si}.ssid='${defaults?.ssid || "Kwrt"}'
set ${si}.encryption='${defaults?.encryption || "none"}'
set ${si}.key='${defaults?.key || ""}'

1 change: 1 addition & 0 deletions devices/ipq806x_generic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_ad7200=n
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=n
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_ubnt_unifi-ac-hd=n


CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
Expand Down
1 change: 1 addition & 0 deletions devices/mediatek_filogic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CONFIG_TARGET_ALL_PROFILES=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cudy_re3000-v1=n
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cudy_wr3000-v1=n
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_yuncore_ax835=n
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_xiaomi_redmi-router-ax6000-stock=n

CONFIG_PACKAGE_kmod-pcie_mhi=m

1 change: 1 addition & 0 deletions devices/mediatek_filogic/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/etc/board.d/02_net
sed -i "s/-stock//g" target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface

sed -i "s/openwrt-mediatek-filogic/kwrt-mediatek-filogic/g" target/linux/mediatek/image/filogic.mk
sed -i "s/ fitblk / /g" target/linux/mediatek/image/filogic.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;
#include "mt7981b-cudy-tr3000-v1.dts"

/ {
model = "Cudy TR3000 (U-Boot mod)";
compatible = "cudy,tr3000-mod", "mediatek,mt7981-spim-snand-rfb";
};

&spi0 {
flash@0 {
partitions {
partition@580000 {
label = "ubi";
reg = <0x5C0000 0x7000000>;
};
};
};
};
38 changes: 1 addition & 37 deletions devices/mediatek_filogic/patches/27-tplink-tl-xdr.patch
Original file line number Diff line number Diff line change
@@ -1,39 +1,3 @@
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
@@ -202,25 +202,25 @@

factory: partition@160000 {
label = "factory";
- reg = <0x160000 0x0060000>;
+ reg = <0x160000 0x00a0000>;
read-only;
};

- partition@1c0000 {
+ partition@200000 {
label = "reserved";
- reg = <0x1c0000 0x01c0000>;
+ reg = <0x200000 0x0180000>;
read-only;
};

partition@380000 {
label = "fip";
- reg = <0x380000 0x0200000>;
- read-only;
+ reg = <0x380000 0x0180000>;
+ // read-only;
};

- partition@580000 {
+ partition@500000 {
compatible = "linux,ubi";
- reg = <0x580000 0x7800000>;
+ reg = <0x500000 0x7300000>;
label = "ubi";

volumes {

--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1130,23 +1130,13 @@ define Device/tplink_tl-xdr-common
Expand All @@ -48,7 +12,7 @@
- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
- IMAGE/sysupgrade.itb := append-kernel | \
- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | append-metadata
DEVICE_PACKAGES := fitblk kmod-usb3 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
- ARTIFACTS := preloader.bin bl31-uboot.fip
- ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
Expand Down
60 changes: 60 additions & 0 deletions devices/mediatek_filogic/patches/tr3000-mod.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -633,6 +633,21 @@ define Device/cudy_re3000-v1
endef
TARGET_DEVICES += cudy_re3000-v1

+define Device/cudy_tr3000-mod
+ DEVICE_VENDOR := Cudy
+ DEVICE_MODEL := TR3000
+ DEVICE_VARIANT := (U-Boot mod)
+ DEVICE_DTS := mt7981b-cudy-tr3000-mod
+ DEVICE_DTS_DIR := ../dts
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ KERNEL_IN_UBI := 1
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+ DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += cudy_tr3000-mod
+
define Device/cudy_tr3000-v1
DEVICE_VENDOR := Cudy
DEVICE_MODEL := TR3000

--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -78,7 +78,7 @@ mediatek_setup_interfaces()
ucidef_set_interface_lan "eth0"
;;
cudy,m3000-v1|\
- cudy,tr3000-v1|\
+ cudy,tr3000*|\
glinet,gl-mt2500|\
glinet,gl-mt3000|\
glinet,gl-x3000|\

--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -1,7 +1,7 @@
set_preinit_iface() {
case $(board_name) in
cudy,m3000-v1|\
- cudy,tr3000-v1|\
+ cudy,tr3000*|\
glinet,gl-mt3000|\
openembed,som7981)
ip link set eth1 up

--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -73,7 +73,7 @@ case "$board" in
addr=$(mtd_get_mac_binary "Factory" 0x8000)
[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
;;
- cudy,tr3000-v1|\
+ cudy,tr3000*|\
cudy,re3000-v1)
addr=$(mtd_get_mac_binary bdinfo 0xde00)
[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
3 changes: 1 addition & 2 deletions devices/qualcommax_ipq50xx/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ shopt -s extglob

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

rm -rf target/linux/qualcommax package/firmware/ath11k-firmware package/firmware/ipq-wifi package/kernel/mac80211 package/kernel/qca-nss-dp package/kernel/qca-ssdk package/boot/uboot-envtools package/network/utils/iwinfo
git_clone_path main https://github.com/georgemoussalem/openwrt-fork target/linux/qualcommax package/firmware/ath11k-firmware package/firmware/ipq-wifi package/kernel/mac80211 package/kernel/qca-nss-dp package/kernel/qca-ssdk package/boot/uboot-envtools package/network/utils/iwinfo
wget -N https://raw.githubusercontent.com/openwrt/openwrt/refs/heads/openwrt-24.10/target/imagebuilder/files/Makefile -P target/imagebuilder/files/
4 changes: 4 additions & 0 deletions devices/qualcommax_ipq50xx/feeds.conf.default
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src-git packages https://git.openwrt.org/feed/packages.git;openwrt-24.10
src-git luci https://git.openwrt.org/project/luci.git;openwrt-24.10
src-git routing https://git.openwrt.org/feed/routing.git;openwrt-24.10
src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-24.10
10 changes: 10 additions & 0 deletions devices/qualcommax_ipq50xx/settings.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
REPO_URL="https://github.com/georgemoussalem/openwrt-fork"
REPO_BRANCH="main"
CONFIG_FILE=".config"
DIY_SH="diy.sh"
FREE_UP_DISK="false"
UPLOAD_BIN_DIR_FOR_ARTIFACT="false"
UPLOAD_FIRMWARE_FOR_ARTIFACT="true"
UPLOAD_FIRMWARE_FOR_RELEASE="false"
UPLOAD_FIRMWARE_TO_COWTRANSFER="false"
UPLOAD_FIRMWARE_TO_WETRANSFER="true"
Loading

0 comments on commit 15d7aba

Please sign in to comment.