diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index 3406c253fb89..4036c9f3a92f 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -107,6 +107,17 @@ jobs: --data '{"event_type": "update"}' fi + - name: Free disk space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + - name: Initialization environment env: DEBIAN_FRONTEND: noninteractive @@ -117,7 +128,6 @@ jobs: 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 @@ -364,6 +374,7 @@ jobs: uses: GitRML/delete-workflow-runs@main continue-on-error: true with: + token: ${{ secrets.TOKEN_KIDDIN9 }} retain_days: 100 keep_minimum_runs: 0 diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index 8faeac72bcf0..0b8554d51d02 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -27,7 +27,7 @@ env: jobs: build: - runs-on: Ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@main @@ -37,7 +37,7 @@ jobs: if: contains(github.event.inputs.param, 'cw') with: workflow_id: all - access_token: ${{ github.token }} + access_token: ${{ secrets.TOKEN_KIDDIN9 }} - name: Load Settings.ini run: | diff --git a/devices/amlogic_meson8b/.config b/devices/amlogic_meson8b/.config index 700d197a7798..023c3d196735 100644 --- a/devices/amlogic_meson8b/.config +++ b/devices/amlogic_meson8b/.config @@ -3,10 +3,6 @@ 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 diff --git a/devices/amlogic_meson8b/diy.sh b/devices/amlogic_meson8b/diy.sh index 3736d0cc0fda..8e549795439c 100644 --- a/devices/amlogic_meson8b/diy.sh +++ b/devices/amlogic_meson8b/diy.sh @@ -6,13 +6,14 @@ 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/amlogic package/boot/uboot-amlogic - 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 +git_clone_path main https://github.com/shiyu1314/openwrt-onecloud kernel/6.1/amlogic && mv -f kernel/6.1/amlogic target/linux/ + +sed -i "s/CPU_SUBTYPE:=neon-vfpv4/CPU_SUBTYPE:=vfpv4/" target/linux/amlogic/meson8b/target.mk + +sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/amlogic/image/Makefile -rm -rf package/kernel/r8125 package/kernel/r8126 package/kernel/r8168 diff --git a/devices/amlogic_meson8b/patches/onecloud.patch b/devices/amlogic_meson8b/patches/onecloud.patch index abd0c2203d5d..be2002cc4aad 100644 --- a/devices/amlogic_meson8b/patches/onecloud.patch +++ b/devices/amlogic_meson8b/patches/onecloud.patch @@ -1,6 +1,6 @@ ---- a/target/linux/amlogic/image/meson8b.mk -+++ b/target/linux/amlogic/image/meson8b.mk -@@ -11,7 +11,8 @@ endef +--- a/target/linux/amlogic/image/Makefile ++++ b/target/linux/amlogic/image/Makefile +@@ -49,7 +49,8 @@ endef define Device/thunder-onecloud DEVICE_DTS := meson8b-onecloud @@ -8,21 +8,5 @@ + DEVICE_TITLE := OneCloud 玩客云 + DEVICE_PACKAGES += kmod-usb-net-rtl8152 KERNEL_LOADADDR := 0x00208000 - IMAGE/emmc.img := boot-script onecloud | emmc-common $$(DEVICE_NAME) + IMAGE/emmc_burn.img := boot-script onecloud | emmc-common $$(DEVICE_NAME) endef - ---- a/target/linux/amlogic/image/Makefile -+++ b/target/linux/amlogic/image/Makefile -@@ -88,4 +88,12 @@ endef - - include $(SUBTARGET).mk - -+define Image/Build -+ if [ "$(PROFILE_SANITIZED)" == "thunder-onecloud" ]; then \ -+ export BIN_DIR=$(BIN_DIR); \ -+ cd /data/packit/openwrt-onecloud || true; \ -+ . ~/packit/packit_onecloud1.sh || true; \ -+ fi -+endef -+ - $(eval $(call BuildImage)) diff --git a/devices/common/diy.sh b/devices/common/diy.sh index c02d33e8c3d9..9c1dc13fed97 100644 --- a/devices/common/diy.sh +++ b/devices/common/diy.sh @@ -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 luci-app-autoreboot \ +sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-opkg luci-app-upnp \ 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 @@ -35,7 +35,7 @@ while [[ "$status" == "in_progress" || "$status" == "queued" ]];do status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status') done -rm -rf package/feeds/packages/v4l2loopback +rm -rf package/feeds/packages/v4l2loopback package/feeds/kiddin9/accel-ppp mv -f feeds/kiddin9/r81* tmp/ @@ -73,6 +73,8 @@ 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 @@ -83,4 +85,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 package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh || true diff --git a/devices/common/kernel_6.1.sh b/devices/common/kernel_6.1.sh index c1fa7bb107cc..f0b2fcb63d3a 100644 --- a/devices/common/kernel_6.1.sh +++ b/devices/common/kernel_6.1.sh @@ -44,4 +44,4 @@ sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/ 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 \ No newline at end of file +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 \ No newline at end of file diff --git a/devices/common/patches/imagebuilder.patch b/devices/common/patches/imagebuilder.patch index 67f8dc540c9b..9f3a4691c4de 100644 --- a/devices/common/patches/imagebuilder.patch +++ b/devices/common/patches/imagebuilder.patch @@ -1,5 +1,30 @@ --- a/include/image.mk +++ b/include/image.mk +@@ -504,7 +504,6 @@ define Device/Check + endif + endef + +-ifndef IB + define Device/Build/initramfs + $(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1)) + $$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) \ +@@ -557,7 +556,6 @@ define Device/Build/initramfs + SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \ + $(TOPDIR)/scripts/json_add_image_info.py $$@ + endef +-endif + + define Device/Build/compile + $$(_COMPILE_TARGET): $(KDIR)/$(1) +@@ -623,7 +621,7 @@ define Device/Build/kernel + endef + + define Device/Build/image +- GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) ++ GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(findstring img,$(2)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) + $$(_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 Target-Profile: DEVICE_$(1) Target-Profile-Name: $(DEVICE_DISPLAY) @@ -55,47 +80,34 @@ --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile -@@ -131,21 +131,47 @@ BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) +@@ -131,6 +131,26 @@ 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) -+IMAGE_SIZE:="$(shell echo $$(echo $($(USER_PROFILE)_IMAGE_SIZE) | cut -d k -f1))" -+BUILD_PACKAGES:=$(shell if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \ -+echo "$(BUILD_PACKAGES) -coremark -htop -bash -openssh-sftp-server "; \ -+else \ -+echo "$(BUILD_PACKAGES)"; \ -+fi \ -+) ++IMAGE_SIZE_VALUE := $(shell echo $($(USER_PROFILE)_IMAGE_SIZE) | sed 's/k$$//') ++ifdef IMAGE_SIZE_VALUE ++ ifeq ($(shell test $(IMAGE_SIZE_VALUE) -lt 20480 && echo true),true) ++ SMALL_FLASH := true ++ endif ++endif ++ifneq ($(findstring usb,$(BUILD_PACKAGES)),) ++ BUILD_PACKAGES += automount luci-app-diskman ++endif ++ifeq ($(SMALL_FLASH),true) ++ BUILD_PACKAGES += -coremark -htop -bash -openssh-sftp-server -luci-app-diskman ++ 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 ++else ++ $(shell sed -i "/small_flash/d" $(TOPDIR)/repositories.conf) ++endif ++define add_zh_cn_packages ++$(eval BUILD_PACKAGES += $(foreach pkg,$(BUILD_PACKAGES),$(if $(and $(filter luci-app-%,$(pkg)),$(shell $(OPKG) list | grep -q "^luci-i18n-$(patsubst luci-app-%,%,$(pkg))-zh-cn" && echo 1)),luci-i18n-$(patsubst luci-app-%,%,$(pkg))-zh-cn))) ++endef BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) PACKAGES:= - _call_image: staging_dir/host/.prereq-build -- echo 'Building images for $(BOARD)$(if $($(USER_PROFILE)_NAME), - $($(USER_PROFILE)_NAME))' -+ [ "$(DATE)" ] && DATE="$(DATE)" || DATE="`date +'%m.%d.%Y'`"; \ -+ mkdir -p $(USER_FILES)/etc/uci-defaults || true; \ -+ 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/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))'; \ - echo 'Packages: $(BUILD_PACKAGES)' - echo - rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG) - mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR) -+ 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 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; \ -+ fi \ -+ fi - $(MAKE) package_reload - $(MAKE) package_install - $(MAKE) -s prepare_rootfs +@@ -146,6 +166,8 @@ _call_image: staging_dir/host/.prereq-build $(MAKE) -s build_image $(MAKE) -s json_overview_image_info $(MAKE) -s checksum @@ -104,32 +116,32 @@ _call_manifest: FORCE rm -rf $(TARGET_DIR) -@@ -186,7 +212,17 @@ package_install: FORCE +@@ -184,9 +206,17 @@ package_list: FORCE + package_install: FORCE + @echo @echo Installing packages... ++ $(eval $(call add_zh_cn_packages)) $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk)) $(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk)) - $(OPKG) install $(BUILD_PACKAGES) -+ for p in $(BUILD_PACKAGES); do \ -+ if [[ $$p == luci-app-* && "`$(OPKG) list | grep luci-i18n-\`echo $$p | cut -d - -f 3-\`-zh-cn`" ]]; then \ -+ packages+="luci-i18n-`echo $$p | cut -d - -f 3-`-zh-cn "; \ -+ fi \ ++ $(OPKG) install $(BUILD_PACKAGES) luci-i18n-base-zh-cn || true ++ $(if $(USER_FILES), \ ++ find $(USER_FILES) -name "*.ipk" -print0 | \ ++ while IFS= read -r -d '' ipk; do \ ++ $(OPKG) install "$$ipk" && rm -f "$$ipk" || true; \ + done; \ -+ if [[ "`echo "$(BUILD_PACKAGES)" | grep "usb"`" ]]; then \ -+ packages+="automount "; \ -+ fi; \ -+ $(OPKG) install $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \ -+ $(OPKG) install $$packages || true ++ ) + $(OPKG) install --force-maintainer --force-reinstall my-default-settings prepare_rootfs: FORCE @echo -@@ -200,12 +236,15 @@ prepare_rootfs: FORCE +@@ -200,12 +230,15 @@ prepare_rootfs: FORCE ) \ ) $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES)) -+ if [[ "$(IMAGE_SIZE)" && ! "`echo "$(IMAGE_SIZE)" | grep "m"`" && $(IMAGE_SIZE) -lt 20480 ]]; then \ -+ echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf; \ -+ fi ++ $(if $(SMALL_FLASH), \ ++ $(shell echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(BUILD_DIR)/root-*/etc/opkg/distfeeds.conf) \ ++ ) build_image: FORCE @echo @@ -139,4 +151,4 @@ + nice -n 19 $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)") - $(BIN_DIR)/profiles.json: FORCE \ No newline at end of file + $(BIN_DIR)/profiles.json: FORCE diff --git a/devices/common/patches/rootfstargz.patch b/devices/common/patches/rootfstargz.patch deleted file mode 100644 index 7e7ed7857817..000000000000 --- a/devices/common/patches/rootfstargz.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- a/include/image.mk -+++ b/include/image.mk -@@ -300,6 +300,44 @@ ifdef CONFIG_TARGET_ROOTFS_TARGZ - endef - endif - -+define Device/Build/targz -+ $$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ -+ $(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json, \ -+ $(BIN_DIR)/$$(ROOTFSTZ)) -+ -+ $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json,$(1)) -+ -+ $(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json: $(BIN_DIR)/$$(ROOTFSTZ) -+ @mkdir -p $$(shell dirname $$@) -+ DEVICE_ID="$(1)" \ -+ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ -+ FILE_NAME="$$(notdir $$^)" \ -+ FILE_DIR="$(BIN_DIR)" \ -+ FILE_TYPE="rootfs" \ -+ FILE_FILESYSTEM="rootfs" \ -+ DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \ -+ DEVICE_VENDOR="$$(DEVICE_VENDOR)" \ -+ DEVICE_MODEL="$$(DEVICE_MODEL)" \ -+ DEVICE_VARIANT="$$(DEVICE_VARIANT)" \ -+ DEVICE_ALT0_VENDOR="$$(DEVICE_ALT0_VENDOR)" \ -+ DEVICE_ALT0_MODEL="$$(DEVICE_ALT0_MODEL)" \ -+ DEVICE_ALT0_VARIANT="$$(DEVICE_ALT0_VARIANT)" \ -+ DEVICE_ALT1_VENDOR="$$(DEVICE_ALT1_VENDOR)" \ -+ DEVICE_ALT1_MODEL="$$(DEVICE_ALT1_MODEL)" \ -+ DEVICE_ALT1_VARIANT="$$(DEVICE_ALT1_VARIANT)" \ -+ DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \ -+ DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \ -+ DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \ -+ DEVICE_TITLE="$$(DEVICE_TITLE)" \ -+ DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \ -+ TARGET="$(BOARD)" \ -+ SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ -+ VERSION_NUMBER="$(VERSION_NUMBER)" \ -+ VERSION_CODE="$(VERSION_CODE)" \ -+ SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \ -+ $(TOPDIR)/scripts/json_add_image_info.py $$@ -+endef -+ - ifdef CONFIG_TARGET_ROOTFS_CPIOGZ - define Image/Build/cpiogz - ( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz ) -@@ -367,6 +405,7 @@ define Device/Init - DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1) - DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2) - IMAGE_SIZE := -+ ROOTFSTZ = $$(DEVICE_IMG_PREFIX)-rootfs.tar.gz - KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX) - KERNEL_SUFFIX := -kernel.bin - KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX) -@@ -568,7 +607,7 @@ define Device/Build/kernel - endef - - define Device/Build/image -- GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) -+ GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(findstring img,$(2)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) - $$(_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)) -@@ -606,6 +645,7 @@ define Device/Build/image - FILE_TYPE=$(word 1,$(subst ., ,$(2))) \ - FILE_FILESYSTEM="$(1)" \ - DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \ -+ KERNEL_INITRAMFS_IMAGE="$(subst $(IMG_PREFIX_EXTRA),,$(KERNEL_INITRAMFS_IMAGE))" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ -@@ -678,6 +718,8 @@ define Device/Build - $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1))) - $(call Device/Build/kernel,$(1)) - -+ $(if $(CONFIG_TARGET_ROOTFS_TARGZ),$(call Device/Build/targz,$(PROFILE_SANITIZED))) -+ - $$(eval $$(foreach compile,$$(COMPILE), \ - $$(call Device/Build/compile,$$(compile),$(1)))) - diff --git a/devices/common/patches/rootfstargz.patch.main b/devices/common/patches/rootfstargz.patch.main deleted file mode 100644 index aec38df86944..000000000000 --- a/devices/common/patches/rootfstargz.patch.main +++ /dev/null @@ -1,92 +0,0 @@ -From 467ef0219a65a3dd63ce27f41e54f09bf1f2ad64 Mon Sep 17 00:00:00 2001 -From: kiddin9 <48883331+kiddin9@users.noreply.github.com> -Date: Mon, 4 Mar 2024 08:01:42 +0800 -Subject: [PATCH] Update image.mk - -Signed-off-by: kiddin9 <48883331+kiddin9@users.noreply.github.com> ---- - include/image.mk | 43 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - -diff --git a/include/image.mk b/include/image.mk -index 4b6acbe1aad6a..f307dea1ca9a3 100644 ---- a/include/image.mk -+++ b/include/image.mk -@@ -313,6 +313,44 @@ ifdef CONFIG_TARGET_ROOTFS_TARGZ - endef - endif - -+define Device/Build/targz -+ $$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ -+ $(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json, \ -+ $(BIN_DIR)/$$(ROOTFSTZ)) -+ -+ $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json,$(1)) -+ -+ $(BUILD_DIR)/json_info_files/$$(ROOTFSTZ).json: $(BIN_DIR)/$$(ROOTFSTZ) -+ @mkdir -p $$(shell dirname $$@) -+ DEVICE_ID="$(1)" \ -+ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ -+ FILE_NAME="$$(notdir $$^)" \ -+ FILE_DIR="$(BIN_DIR)" \ -+ FILE_TYPE="rootfs" \ -+ FILE_FILESYSTEM="rootfs" \ -+ DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \ -+ DEVICE_VENDOR="$$(DEVICE_VENDOR)" \ -+ DEVICE_MODEL="$$(DEVICE_MODEL)" \ -+ DEVICE_VARIANT="$$(DEVICE_VARIANT)" \ -+ DEVICE_ALT0_VENDOR="$$(DEVICE_ALT0_VENDOR)" \ -+ DEVICE_ALT0_MODEL="$$(DEVICE_ALT0_MODEL)" \ -+ DEVICE_ALT0_VARIANT="$$(DEVICE_ALT0_VARIANT)" \ -+ DEVICE_ALT1_VENDOR="$$(DEVICE_ALT1_VENDOR)" \ -+ DEVICE_ALT1_MODEL="$$(DEVICE_ALT1_MODEL)" \ -+ DEVICE_ALT1_VARIANT="$$(DEVICE_ALT1_VARIANT)" \ -+ DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \ -+ DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \ -+ DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \ -+ DEVICE_TITLE="$$(DEVICE_TITLE)" \ -+ DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \ -+ TARGET="$(BOARD)" \ -+ SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \ -+ VERSION_NUMBER="$(VERSION_NUMBER)" \ -+ VERSION_CODE="$(VERSION_CODE)" \ -+ SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \ -+ $(TOPDIR)/scripts/json_add_image_info.py $$@ -+endef -+ - ifdef CONFIG_TARGET_ROOTFS_CPIOGZ - define Image/Build/cpiogz - ( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 | gzip -9n >$(BIN_DIR)/$(IMG_ROOTFS).cpio.gz ) -@@ -394,6 +432,7 @@ define Device/Init - FACTORY_IMG_NAME := - IMAGE_SIZE := - NAND_SIZE := -+ ROOTFSTZ = $$(DEVICE_IMG_PREFIX)-rootfs.tar.gz - KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX) - KERNEL_SUFFIX := -kernel.bin - KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX) -@@ -631,6 +670,7 @@ endef - - define Device/Build/image - GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) -+ GZ_SUFFIX := $(if $(filter %dtb %gz,$(2)),,$(if $(and $(findstring ext4,$(1)),$(findstring img,$(2)),$(CONFIG_TARGET_IMAGES_GZIP)),.gz)) - $$(_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)) -@@ -667,6 +707,7 @@ define Device/Build/image - FILE_DIR="$(KDIR)/tmp" \ - FILE_TYPE=$(word 1,$(subst ., ,$(2))) \ - FILE_FILESYSTEM="$(1)" \ -+ KERNEL_INITRAMFS_IMAGE="$(subst $(IMG_PREFIX_EXTRA),,$(KERNEL_INITRAMFS_IMAGE))" \ - DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ -@@ -758,6 +799,8 @@ define Device/Build - $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1))) - $(call Device/Build/kernel,$(1)) - -+ $(if $(CONFIG_TARGET_ROOTFS_TARGZ),$(call Device/Build/targz,$(PROFILE_SANITIZED))) -+ - $$(eval $$(foreach compile,$$(COMPILE), \ - $$(call Device/Build/compile,$$(compile),$(1)))) - diff --git a/devices/mediatek_filogic/diy.sh b/devices/mediatek_filogic/diy.sh index 1dc100fd5613..022dc8fa5324 100644 --- a/devices/mediatek_filogic/diy.sh +++ b/devices/mediatek_filogic/diy.sh @@ -5,9 +5,13 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) bash $SHELL_FOLDER/../common/kernel_6.6.sh +sed -i '/bootargs-.* = " root=\/dev\/fit0 rootwait";/d' target/linux/mediatek/dts/* + sed -i "s/-stock//g" package/boot/uboot-envtools/files/mediatek_filogic sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/etc/board.d/01_leds sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/etc/board.d/02_network sed -i "s/-stock//g" target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh 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 + diff --git a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch index e9cc92d812c6..000ebce4b338 100644 --- a/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch +++ b/devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch @@ -9,6 +9,29 @@ h3c,magic-nx30-pro|\ nokia,ea0326gmp|\ zbtlink,zbt-z8103ax) +@@ -137,6 +137,11 @@ mediatek_setup_macs() + bananapi,bpi-r4) + wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1) + ;; ++ cmcc,rax3000m-emmc) ++ wan_mac=$(mmc_get_mac_binary factory 0x2a) ++ lan_mac=$(mmc_get_mac_binary factory 0x24) ++ label_mac=$wan_mac ++ ;; + h3c,magic-nx30-pro) + wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr) + lan_mac=$(macaddr_add "$wan_mac" 1) + +--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata ++++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +@@ -24,6 +24,7 @@ case "$FIRMWARE" in + ;; + "mediatek/mt7981_eeprom_mt7976_dbdc.bin") + case "$board" in ++ cmcc,rax3000m-emmc|\ + ubnt,unifi-6-plus) + caldata_extract_mmc "factory" 0x0 0x1000 + ;; --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -55,7 +78,7 @@ --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -@@ -119,6 +119,7 @@ platform_do_upgrade() { +@@ -112,6 +112,7 @@ platform_do_upgrade() { yuncore,ax835) default_do_upgrade "$1" ;; @@ -63,22 +86,11 @@ glinet,gl-mt2500|\ glinet,gl-mt6000|\ glinet,gl-x3000|\ -@@ -215,6 +216,7 @@ platform_copy_config() { - ;; - esac +@@ -201,6 +202,7 @@ platform_copy_config() { + fi ;; -+ cmcc,rax3000m-emmc|\ acer,predator-w6|\ ++ cmcc,rax3000m-emmc|\ glinet,gl-mt2500|\ glinet,gl-mt6000|\ - ---- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata -+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata -@@ -24,6 +24,7 @@ case "$FIRMWARE" in - ;; - "mediatek/mt7981_eeprom_mt7976_dbdc.bin") - case "$board" in -+ cmcc,rax3000m-emmc|\ - ubnt,unifi-6-plus) - caldata_extract_mmc "factory" 0x0 0x1000 - ;; + glinet,gl-x3000|\ diff --git a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch index e276992374f6..e878fcbdc3f1 100644 --- a/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch +++ b/devices/mediatek_filogic/patches/09-jcg_q30-pro.patch @@ -27,7 +27,7 @@ --- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts +++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts -@@ -101,6 +101,10 @@ +@@ -103,6 +101,10 @@ spi-tx-bus-width = <4>; spi-rx-bus-width = <4>; @@ -38,7 +38,7 @@ partitions { compatible = "fixed-partitions"; #address-cells = <1>; -@@ -140,12 +144,11 @@ +@@ -142,19 +144,11 @@ partition@380000 { label = "fip"; reg = <0x0380000 0x0200000>; @@ -48,6 +48,13 @@ partition@580000 { label = "ubi"; - reg = <0x0580000 0x7000000>; +- compatible = "linux,ubi"; +- +- volumes { +- ubi_rootdisk: ubi-volume-fit { +- volname = "fit"; +- }; +- }; + reg = <0x0580000 0x6e80000>; }; }; diff --git a/devices/mediatek_filogic/patches/10-re-cp-03.patch b/devices/mediatek_filogic/patches/10-re-cp-03.patch index e64140395bfe..d7ad631b4ceb 100644 --- a/devices/mediatek_filogic/patches/10-re-cp-03.patch +++ b/devices/mediatek_filogic/patches/10-re-cp-03.patch @@ -30,4 +30,22 @@ + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef TARGET_DEVICES += jdcloud_re-cp-03 - \ No newline at end of file + + +--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata ++++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata +@@ -51,6 +51,14 @@ case "$FIRMWARE" in + ;; + esac + ;; ++"mediatek/mt7986_eeprom_mt7976_dual.bin") ++ case "$board" in ++ glinet,gl-mt6000|\ ++ jdcloud,re-cp-03) ++ caldata_extract_mmc "factory" 0x0 0x1000 ++ ;; ++ esac ++ ;; + *) + exit 1 + ;; \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/16-komi-a31.patch b/devices/mediatek_filogic/patches/16-komi-a31.patch index e22fb34957f5..8b617cf9f4cb 100644 --- a/devices/mediatek_filogic/patches/16-komi-a31.patch +++ b/devices/mediatek_filogic/patches/16-komi-a31.patch @@ -284,9 +284,9 @@ diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11 index 794944d1aa918..2ca44b55c21fa 100644 --- 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 -@@ -109,6 +109,17 @@ case "$board" in - jdcloud,re-cp-03) - [ "$PHYNBR" = "1" ] && mmc_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress +@@ -121,6 +121,13 @@ case "$board" in + [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress ;; + imou,lc-hx3001) + addr=$(mtd_get_mac_ascii u-boot-env mac) @@ -294,11 +294,7 @@ index 794944d1aa918..2ca44b55c21fa 100644 + [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress + ;; -+ konka,komi-a31) -+ addr=$(cat /sys/class/net/eth0/address) -+ [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress -+ [ "$PHYNBR" = "1" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress -+ ;; - mercusys,mr90x-v1|\ - tplink,re6000xd) - addr=$(get_mac_binary "/tmp/tp_data/default-mac" 0) \ No newline at end of file ++ konka,komi-a31|\ + nokia,ea0326gmp) + addr=$(cat /sys/class/net/eth0/address) + [ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress \ No newline at end of file diff --git a/devices/mediatek_filogic/patches/17-lc-hx3001.patch b/devices/mediatek_filogic/patches/17-lc-hx3001.patch index 1a8285234f27..cdfa5723d770 100644 --- a/devices/mediatek_filogic/patches/17-lc-hx3001.patch +++ b/devices/mediatek_filogic/patches/17-lc-hx3001.patch @@ -297,7 +297,7 @@ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/imag index 83428f0d981e7..6d2e9d713be02 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk -@@ -589,6 +589,50 @@ endif +@@ -589,6 +589,52 @@ endif endef TARGET_DEVICES += h3c_magic-nx30-pro-nmbm @@ -324,24 +324,26 @@ index 83428f0d981e7..6d2e9d713be02 100644 +TARGET_DEVICES += imou_lc-hx3001 + +define Device/konka_komi-a31 -+ DEVICE_VENDOR := KONKA ++ DEVICE_VENDOR := Konka + DEVICE_MODEL := KOMI A31 ++ DEVICE_ALT0_VENDOR := E-Life ++ DEVICE_ALT0_MODEL := ETR631-T ++ DEVICE_ALT1_VENDOR := E-Life ++ DEVICE_ALT1_MODEL := ETR635-U + DEVICE_DTS := mt7981b-konka-komi-a31 + DEVICE_DTS_DIR := ../dts + DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware -+ SUPPORTED_DEVICES := konka,komi-a31 + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGE_SIZE := 114688k + KERNEL_IN_UBI := 1 ++ KERNEL := kernel-bin | gzip ++ KERNEL_INITRAMFS := kernel-bin | lzma | \ ++ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGES += factory.bin + IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -+ KERNEL = kernel-bin | lzma | \ -+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb -+ KERNEL_INITRAMFS = kernel-bin | lzma | \ -+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd +endef +TARGET_DEVICES += konka_komi-a31 + diff --git a/devices/mediatek_filogic/patches/nradio-c8-660.patch b/devices/mediatek_filogic/patches/nradio-c8-660.patch new file mode 100644 index 000000000000..f72853f4ad84 --- /dev/null +++ b/devices/mediatek_filogic/patches/nradio-c8-660.patch @@ -0,0 +1,359 @@ +From 3d31be189645a68591b59c855b885fdbca77c7af Mon Sep 17 00:00:00 2001 +From: Chen Minqiang +Date: Sun, 8 Sep 2024 15:16:16 +0800 +Subject: [PATCH] mediatek: init add NRadio C8-660 + +Signed-off-by: Chen Minqiang +--- + .../mediatek/dts/mt7981b-nradio-c8-660.dts | 283 ++++++++++++++++++ + .../filogic/base-files/etc/board.d/01_leds | 4 + + .../filogic/base-files/etc/board.d/02_network | 3 + + target/linux/mediatek/image/filogic.mk | 16 + + 4 files changed, 306 insertions(+) + create mode 100644 target/linux/mediatek/dts/mt7981b-nradio-c8-660.dts + +diff --git a/target/linux/mediatek/dts/mt7981b-nradio-c8-660.dts b/target/linux/mediatek/dts/mt7981b-nradio-c8-660.dts +new file mode 100644 +index 0000000000000..576456f2f6e7c +--- /dev/null ++++ b/target/linux/mediatek/dts/mt7981b-nradio-c8-660.dts +@@ -0,0 +1,283 @@ ++/dts-v1/; ++ ++#include "mt7981.dtsi" ++ ++/ { ++ model = "NRadio C8-660"; ++ compatible = "nradio,c8-660", "mediatek,mt7981"; ++ ++ aliases { ++ label-mac-device = &gmac0; ++ led-boot = &status_blue; ++ led-failsafe = &status_blue; ++ led-running = &status_blue; ++ led-upgrade = &status_blue; ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ ++ reset { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&pio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&pio 9 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ gpio-export { ++ compatible = "gpio-export"; ++ ++ cpepower { ++ gpio-export,name = "cpe-pwr"; ++ gpio-export,output = <0>; ++ gpios = <&pio 25 GPIO_ACTIVE_LOW>; ++ }; ++ ++ cpesel0 { ++ gpio-export,name = "cpe-sel0"; ++ gpio-export,output = <1>; ++ gpios = <&pio 24 GPIO_ACTIVE_HIGH>; ++ }; ++ }; ++ ++ gpio-leds { ++ compatible = "gpio-leds"; ++ ++ status_blue: status { ++ label = "blue:status"; ++ gpios = <&pio 10 GPIO_ACTIVE_LOW>; ++ }; ++ ++ cmode5 { ++ label = "blue:cmode5"; ++ gpios = <&pio 11 GPIO_ACTIVE_LOW>; ++ }; ++ ++ cmode4 { ++ label = "blue:cmode4"; ++ gpios = <&pio 12 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wifi { ++ label = "blue:wifi"; ++ gpios = <&pio 13 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ status = "okay"; ++}; ++ ++&watchdog { ++ status = "okay"; ++}; ++ ++ð { ++ status = "okay"; ++ ++ gmac0: mac@0 { ++ compatible = "mediatek,eth-mac"; ++ reg = <0>; ++ phy-mode = "2500base-x"; ++ nvmem-cells = <&macaddr_factory_4 (-1)>; ++ nvmem-cell-names = "mac-address"; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ pause; ++ }; ++ }; ++ ++ gmac1: mac@1 { ++ compatible = "mediatek,eth-mac"; ++ reg = <1>; ++ phy-mode = "2500base-x"; ++ phy-handle = <&phy21>; ++ nvmem-cells = <&macaddr_factory_4 (-2)>; ++ nvmem-cell-names = "mac-address"; ++ }; ++}; ++ ++&mdio_bus { ++ reset-gpios = <&pio 7 GPIO_ACTIVE_LOW>, <&pio 8 GPIO_ACTIVE_LOW>; ++ reset-delay-us = <600>; ++ reset-post-delay-us = <20000>; ++ ++ phy5: ethernet-phy@5 { ++ reg = <5>; ++ compatible = "ethernet-phy-ieee802.3-c45"; ++ }; ++ ++ phy21: ethernet-phy@21 { ++ reg = <21>; ++ compatible = "ethernet-phy-ieee802.3-c45"; ++ }; ++ ++ switch0: switch@1f { ++ compatible = "mediatek,mt7531"; ++ reg = <31>; ++ dsa,member = <0 0>; ++ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; ++ interrupt-controller; ++ #interrupt-cells = <1>; ++ interrupt-parent = <&pio>; ++ interrupts = <38 IRQ_TYPE_LEVEL_HIGH>; ++ }; ++}; ++ ++&switch0 { ++ ports { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ port@1 { ++ reg = <1>; ++ label = "lan1"; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ label = "lan2"; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ label = "lan3"; ++ }; ++ ++ port@5 { ++ reg = <5>; ++ label = "lan4"; ++ phy-mode = "2500base-x"; ++ phy-handle = <&phy5>; ++ }; ++ ++ port@6 { ++ reg = <6>; ++ ethernet = <&gmac0>; ++ phy-mode = "2500base-x"; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ pause; ++ }; ++ }; ++ }; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_flash_pins>; ++ status = "okay"; ++ ++ spi_nand: flash@0 { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ compatible = "spi-nand"; ++ reg = <0>; ++ spi-max-frequency = <52000000>; ++ ++ spi-cal-enable; ++ spi-cal-mode = "read-data"; ++ spi-cal-datalen = <7>; ++ spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>; ++ spi-cal-addrlen = <5>; ++ spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>; ++ ++ spi-tx-bus-width = <4>; ++ spi-rx-bus-width = <4>; ++ mediatek,nmbm; ++ mediatek,bmt-max-ratio = <1>; ++ mediatek,bmt-max-reserved-blocks = <64>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "BL2"; ++ reg = <0x00000 0x0100000>; ++ read-only; ++ }; ++ ++ partition@100000 { ++ label = "u-boot-env"; ++ reg = <0x0100000 0x0080000>; ++ }; ++ ++ factory: partition@180000 { ++ label = "Factory"; ++ reg = <0x180000 0x0180000>; ++ read-only; ++ ++ nvmem-layout { ++ compatible = "fixed-layout"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ macaddr_factory_4: macaddr@4 { ++ compatible = "mac-base"; ++ reg = <0x4 0x6>; ++ #nvmem-cell-cells = <1>; ++ }; ++ }; ++ }; ++ ++ partition@300000 { ++ label = "bdinfo"; ++ reg = <0x300000 0x0080000>; ++ }; ++ ++ partition@380000 { ++ label = "FIP"; ++ reg = <0x380000 0x0200000>; ++ read-only; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ //reg = <0x580000 0x7000000>; ++ reg = <0x580000 0x1f400000>; ++ compatible = "linux,ubi"; ++ }; ++ }; ++ }; ++}; ++ ++&pio { ++ spi0_flash_pins: spi0-pins { ++ mux { ++ function = "spi"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ }; ++}; ++ ++&usb_phy { ++ status = "okay"; ++}; ++ ++&xhci { ++ status = "okay"; ++}; ++ ++&wifi { ++ mediatek,mtd-eeprom = <&factory 0x0>; ++ ++ status = "okay"; ++}; +diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +index ad274ea08f2e1..b4ed153266441 100644 +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +@@ -75,6 +75,10 @@ nokia,ea0326gmp) + ucidef_set_led_netdev "lan" "LAN" "green:lan" "br-lan" "link" + ucidef_set_led_netdev "wlan" "WLAN" "green:wlan" "phy1-ap0" "link" + ;; ++nradio,c8-660) ++ ucidef_set_led_netdev "wifi" "WIFI" "blue:wifi" "phy0-ap0" ++ ucidef_set_led_netdev "5g" "5G" "blue:cmode5" "eth1" "link tx rx" ++ ;; + openembed,som7981) + ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx" + ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link" +diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +index 96d58db867a96..198a84da3192c 100644 +--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network ++++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +@@ -100,6 +100,9 @@ mediatek_setup_interfaces() + mercusys,mr90x-v1) + ucidef_set_interfaces_lan_wan "lan0 lan1 lan2" eth1 + ;; ++ nradio,c8-660) ++ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1 ++ ;; + cudy,ap3000outdoor-v1|\ + cudy,re3000-v1|\ + netgear,wax220|\ +diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk +index e99d944a8603c..0275e25b974db 100644 +--- a/target/linux/mediatek/image/filogic.mk ++++ b/target/linux/mediatek/image/filogic.mk +@@ -1237,6 +1237,22 @@ define Device/nokia_ea0326gmp + endef + TARGET_DEVICES += nokia_ea0326gmp + ++define Device/nradio_c8-660 ++ DEVICE_VENDOR := NRadio ++ DEVICE_MODEL := C8-660 ++ DEVICE_DTS := mt7981b-nradio-c8-660 ++ DEVICE_DTS_DIR := ../dts ++ UBINIZE_OPTS := -E 5 ++ BLOCKSIZE := 128k ++ PAGESIZE := 2048 ++ IMAGE_SIZE := 131072k ++ KERNEL_IN_UBI := 1 ++ IMAGES += factory.bin ++ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE) ++ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata ++endef ++TARGET_DEVICES += nradio_c8-660 ++ + define Device/openembed_som7981 + DEVICE_VENDOR := OpenEmbed + DEVICE_MODEL := SOM7981 diff --git a/devices/mediatek_filogic/patches/platform.patch b/devices/mediatek_filogic/patches/platform.patch new file mode 100644 index 000000000000..e6c12d2b362b --- /dev/null +++ b/devices/mediatek_filogic/patches/platform.patch @@ -0,0 +1,31 @@ +--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh ++++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +@@ -64,28 +64,17 @@ platform_do_upgrade() { + local board=$(board_name) + + case "$board" in +- abt,asr3000|\ + bananapi,bpi-r3|\ + bananapi,bpi-r3-mini|\ + bananapi,bpi-r4|\ + bananapi,bpi-r4-poe|\ +- cmcc,rax3000m|\ +- h3c,magic-nx30-pro|\ +- jcg,q30-pro|\ +- jdcloud,re-cp-03|\ + mediatek,mt7981-rfb|\ + mediatek,mt7988a-rfb|\ +- nokia,ea0326gmp|\ + openwrt,one|\ +- netcore,n60|\ +- qihoo,360t7|\ + tplink,tl-xdr4288|\ + tplink,tl-xdr6086|\ + tplink,tl-xdr6088|\ + tplink,tl-xtr8488|\ +- xiaomi,mi-router-ax3000t-ubootmod|\ +- xiaomi,redmi-router-ax6000-ubootmod|\ +- xiaomi,mi-router-wr30u-ubootmod|\ + zyxel,ex5601-t0-ubootmod) + fit_do_upgrade "$1" + ;; diff --git a/devices/mediatek_filogic/patches/rax3000m.revert.patch b/devices/mediatek_filogic/patches/rax3000m.revert.patch index f02d2250c72f..2bb29f340d38 100644 --- a/devices/mediatek_filogic/patches/rax3000m.revert.patch +++ b/devices/mediatek_filogic/patches/rax3000m.revert.patch @@ -205,54 +205,3 @@ index c8db5b58f5432..977a61333363c 100644 stdout-path = "serial0:115200n8"; }; -diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -index e059048d12952..3b1b2f7fa69ac 100755 ---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh -@@ -86,6 +86,7 @@ platform_do_upgrade() { - bananapi,bpi-r3-mini|\ - bananapi,bpi-r4|\ - bananapi,bpi-r4-poe|\ -+ cmcc,rax3000m|\ - jdcloud,re-cp-03|\ - mediatek,mt7988a-rfb|\ - nokia,ea0326gmp|\ -@@ -96,18 +97,6 @@ platform_do_upgrade() { - xiaomi,redmi-router-ax6000-ubootmod) - fit_do_upgrade "$1" - ;; -- cmcc,rax3000m) -- case "$(cmdline_get_var root)" in -- /dev/mmc*) -- CI_KERNPART="production" -- emmc_do_upgrade "$1" -- ;; -- *) -- CI_KERNPART="fit" -- nand_do_upgrade "$1" -- ;; -- esac -- ;; - cudy,re3000-v1|\ - cudy,wr3000-v1|\ - yuncore,ax835) -@@ -207,17 +196,11 @@ platform_check_image() { - - platform_copy_config() { - case "$(board_name)" in -- cmcc,rax3000m) -- case "$(cmdline_get_var root)" in -- /dev/mmc*) -- emmc_copy_config -- ;; -- esac -- ;; - bananapi,bpi-r3|\ - bananapi,bpi-r3-mini|\ - bananapi,bpi-r4|\ -- bananapi,bpi-r4-poe) -+ bananapi,bpi-r4-poe|\ -+ cmcc,rax3000m) - if [ "$CI_METHOD" = "emmc" ]; then - emmc_copy_config - fi diff --git a/devices/qualcommax_ipq60xx/diy.sh b/devices/qualcommax_ipq60xx/diy.sh index 973801e1d9b2..ed70522b8435 100644 --- a/devices/qualcommax_ipq60xx/diy.sh +++ b/devices/qualcommax_ipq60xx/diy.sh @@ -17,6 +17,7 @@ wget -N https://github.com/coolsnowwolf/lede/raw/master/include/kernel-6.1 -P in sed -i "s/wpad-openssl/wpad-basic-mbedtls/" target/linux/qualcommax/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 || true diff --git a/devices/ramips_mt7621/.config b/devices/ramips_mt7621/.config index 61a3b0382cee..bd40c8dd570c 100644 --- a/devices/ramips_mt7621/.config +++ b/devices/ramips_mt7621/.config @@ -2,7 +2,6 @@ CONFIG_TARGET_ramips=y CONFIG_TARGET_ramips_mt7621=y CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_ROOTFS_INITRAMFS=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-cr660x=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-3g=y CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_xiaomi_mi-router-3-pro=y diff --git a/devices/ramips_mt76x8/.config b/devices/ramips_mt76x8/.config index 70d6986076ba..ee2a1bc3f007 100644 --- a/devices/ramips_mt76x8/.config +++ b/devices/ramips_mt76x8/.config @@ -2,7 +2,6 @@ CONFIG_TARGET_ramips=y CONFIG_TARGET_ramips_mt76x8=y CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_ROOTFS_INITRAMFS=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_asus_rt-ac1200=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_asus_rt-ac1200-v2=y CONFIG_TARGET_DEVICE_ramips_mt76x8_DEVICE_glinet_gl-mt300n-v2=y diff --git a/devices/rockchip_armv8/diy.sh b/devices/rockchip_armv8/diy.sh index 1c50127c2f58..cccb9d9d9001 100644 --- a/devices/rockchip_armv8/diy.sh +++ b/devices/rockchip_armv8/diy.sh @@ -14,7 +14,6 @@ git_clone_path master https://github.com/immortalwrt/immortalwrt mv target/linux 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* -rm -rf target/linux/rockchip/patches-6.6/034-15-v6.8-drm-nouveau* 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/ diff --git a/devices/rockchip_armv8/patches/01-hinlink.patch b/devices/rockchip_armv8/patches/01-hinlink.patch index c125d714a3c0..eee8b92a34f0 100644 --- a/devices/rockchip_armv8/patches/01-hinlink.patch +++ b/devices/rockchip_armv8/patches/01-hinlink.patch @@ -45,14 +45,14 @@ @@ -1,6 +1,6 @@ --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile --@@ -96,6 +96,19 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ -+@@ -96,6 +96,22 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ +-@@ -96,6 +96,20 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ ++@@ -96,6 +96,23 @@ dtb-$(CONFIG_ROCKCHIP_RK3368) += \ rk3368-geekbox.dtb \ rk3368-px5-evb.dtb \ -@@ -10,6 +10,9 @@ - + +@@ -11,6 +11,9 @@ +dtb-$(CONFIG_ROCKCHIP_RK3568) += \ + + rk3568-armsom-sige3.dtb \ + rk3568-mrkaio-m68s.dtb \ ++ rk3568-opc-h66k.dtb \ ++ rk3568-opc-h68k.dtb \ diff --git a/devices/rockchip_armv8/patches/33-rk3568.patch b/devices/rockchip_armv8/patches/33-rk3568.patch index 9d3fc365f2a2..45cb5d3aa155 100644 --- a/devices/rockchip_armv8/patches/33-rk3568.patch +++ b/devices/rockchip_armv8/patches/33-rk3568.patch @@ -4,14 +4,14 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s-enterprise.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb --@@ -90,19 +92,24 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp -+@@ -90,19 +92,33 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r66s.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-fastrhino-r68s.dtb -@@ -25,6 +25,15 @@ - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb +-@@ -89,18 +91,22 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so ++@@ -89,18 +91,31 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-so + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-model-a.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-box-demo.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-lubancat-1.dtb +@@ -31,6 +31,15 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-photonicat.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h66k.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-opc-h68k.dtb @@ -22,14 +22,14 @@ ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-xgp-v3.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-mrkaio-m68s-plus.dtb - dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile -@@ -180,7 +180,14 @@ - radxa_cm3-io +@@ -208,6 +208,34 @@ define U-Boot/rk3568/Default + TPL:=$(RK3568_TPL) endef +define U-Boot/panther-x2-rk3566 @@ -38,16 +38,6 @@ + BUILD_DEVICES:= \ + panther_x2 +endef - -+ - # RK3568 boards - - define U-Boot/rk3568/Default -@@ -188,6 +195,27 @@ - DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568 - ATF:=$(RK3568_ATF) - TPL:=$(RK3568_TPL) -+endef + +define U-Boot/lyt-t68m-rk3568 + $(U-Boot/rk3568/Default) @@ -68,22 +58,22 @@ + NAME:=Seewo sv21-rk3568 + BUILD_DEVICES:= \ + seewo_sv21-rk3568 - endef - - define U-Boot/fastrhino-r66s-rk3568 -@@ -355,8 +376,12 @@ - rock64-rk3328 \ - radxa-cm3-io-rk3566 \ - bpi-r2-pro-rk3568 \ ++ endef ++ + define U-Boot/bpi-r2-pro-rk3568 + $(U-Boot/rk3568/Default) + NAME:=Bananapi-R2 Pro +@@ -402,6 +430,10 @@ UBOOT_TARGETS := \ + nanopi-r6c-rk3588s \ + nanopi-r6s-rk3588s \ + orangepi-5-rk3588s \ + panther-x2-rk3566 \ - fastrhino-r66s-rk3568 \ - fastrhino-r68s-rk3568 \ + lyt-t68m-rk3568 \ + nlnet-xgp-rk3568 \ + seewo-sv21-rk3568 \ - mrkaio-m68s-rk3568 \ - nanopi-r5c-rk3568 \ - nanopi-r5s-rk3568 \ + rock5a-rk3588s + + UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -140,23 +130,19 @@ --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network -@@ -31,6 +31,7 @@ - friendlyarm,nanopi-r5c|\ +@@ -28,9 +28,13 @@ rockchip_setup_interfaces() lunzn,fastrhino-r66s|\ radxa,e25|\ + radxa,rock-3b|\ + seewo,sv21-rk3568|\ xunlong,orangepi-5-plus) ucidef_set_interfaces_lan_wan 'eth0' 'eth1' ;; -@@ -44,6 +45,9 @@ - lunzn,fastrhino-r68s) - ucidef_set_interfaces_lan_wan 'eth0 eth1 eth2' 'eth3' - ;; + lyt,t68m) + ucidef_set_interfaces_lan_wan 'lan2 lan3 lan4' 'lan1' + ;; - *) - ucidef_set_interface_lan 'eth0' + friendlyarm,nanopc-t6) + ucidef_set_interfaces_lan_wan 'eth1' 'eth2' ;; @@ -75,9 +79,15 @@ sinovoip,rk3568-bpi-r2pro|\ diff --git a/devices/rockchip_rk35xx/diy.sh b/devices/rockchip_rk35xx/diy.sh index ee332328e1f8..41ac35a08a3c 100644 --- a/devices/rockchip_rk35xx/diy.sh +++ b/devices/rockchip_rk35xx/diy.sh @@ -3,7 +3,7 @@ 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 +rm -rf package/boot package/devel/perf package/devel/kselftests-bpf package/feeds/routing/batman-adv rm -rf target/linux/generic/!(*-5.15) target/linux/rockchip package/kernel devices/common/patches/usb-audio.patch diff --git a/devices/x86_64/diy.sh b/devices/x86_64/diy.sh index cbe4b767df20..fb6f191d160c 100644 --- a/devices/x86_64/diy.sh +++ b/devices/x86_64/diy.sh @@ -2,13 +2,15 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) -#bash $SHELL_FOLDER/../common/kernel_6.1.sh +bash $SHELL_FOLDER/../common/kernel_6.6.sh -git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-5.15 +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-6.6 wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -P target/linux/x86/base-files/etc/board.d/ -wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/64/config-5.15 -P target/linux/x86/64/ +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/64/config-6.6 -P target/linux/x86/64/ + +wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/package/firmware/linux-firmware/intel.mk -P package/firmware/linux-firmware/ sed -i 's/kmod-r8169/kmod-r8168/' target/linux/x86/image/64.mk @@ -31,7 +33,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ACPI=y CONFIG_MMC_SDHCI_PCI=y CONFIG_DRM_I915=y -' >> ./target/linux/x86/config-5.15 +' >> ./target/linux/x86/config-6.6 sed -i "s/enabled '0'/enabled '1'/g" feeds/packages/utils/irqbalance/files/irqbalance.config diff --git a/devices/x86_64/patches/Intel_gpu.patch b/devices/x86_64/patches/Intel_gpu.patch index 109f60effd4b..082ab07e71d3 100644 --- a/devices/x86_64/patches/Intel_gpu.patch +++ b/devices/x86_64/patches/Intel_gpu.patch @@ -1,117 +1,3 @@ -diff --git a/package/firmware/linux-firmware/intel.mk b/package/firmware/linux-firmware/intel.mk -index 0719e2b28c386..9f8ac874fe24b 100644 ---- a/package/firmware/linux-firmware/intel.mk -+++ b/package/firmware/linux-firmware/intel.mk -@@ -208,3 +208,108 @@ define Package/e100-firmware/install - $(INSTALL_DATA) $(PKG_BUILD_DIR)/e100/d102e_ucode.bin $(1)/lib/firmware/e100/ - endef - $(eval $(call BuildPackage,e100-firmware)) -+ -+Package/i915-firmware = $(call Package/firmware-default,Intel GPU firmware) -+define Package/i915-firmware/install -+ $(INSTALL_DIR) $(1)/lib/firmware/i915 -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_dmc_ver1_09.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_dmc_ver2_09.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_dmc_ver2_10.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_dmc_ver2_12.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_dmc_ver2_14.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_dmc_ver2_16.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_guc_62.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_guc_69.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_guc_70.1.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adlp_guc_70.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/adls_dmc_ver2_01.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_dmc_ver1_07.bin $(1)/lib/firmware/i915/ -+ ln -s /lib/firmware/i915/bxt_dmc_ver1_07.bin $(1)/lib/firmware/i915/bxt_dmc_ver1.bin -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_32.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_ver8_7.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_guc_ver9_29.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_huc_2.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_huc_ver01_07_1398.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/bxt_huc_ver01_8_2893.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cml_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cml_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cml_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cml_huc_4.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cnl_dmc_ver1_06.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/cnl_dmc_ver1_07.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/dg1_dmc_ver2_02.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/dg1_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/dg1_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/dg1_huc_7.7.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/dg1_huc_7.9.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_guc_33.0.4.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_guc_69.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_guc_70.1.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/ehl_huc_9.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_dmc_ver1_04.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_guc_32.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_guc_70.1.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_huc_4.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/glk_huc_ver03_01_2893.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_dmc_ver1_07.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_dmc_ver1_09.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_guc_32.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_huc_9.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/icl_huc_ver8_4_3238.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_dmc_ver1_01.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_dmc_ver1_04.bin $(1)/lib/firmware/i915/ -+ ln -s /lib/firmware/i915/kbl_dmc_ver1_04.bin $(1)/lib/firmware/i915/kbl_dmc_ver1.bin -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_32.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_70.1.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_ver9_14.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_guc_ver9_39.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_huc_4.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/kbl_huc_ver02_00_1810.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/rkl_dmc_ver2_02.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/rkl_dmc_ver2_03.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_dmc_ver1_23.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_dmc_ver1_26.bin $(1)/lib/firmware/i915/ -+ ln -s /lib/firmware/i915/skl_dmc_ver1_26.bin $(1)/lib/firmware/i915/skl_dmc_ver1.bin -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_dmc_ver1_27.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_32.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_33.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_ver1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_ver4.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_ver6_1.bin $(1)/lib/firmware/i915/ -+ ln -s /lib/firmware/i915/skl_guc_ver6_1.bin $(1)/lib/firmware/i915/skl_guc_ver6.bin -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_guc_ver9_33.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_huc_2.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/skl_huc_ver01_07_1398.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_dmc_ver2_04.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_dmc_ver2_06.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_dmc_ver2_08.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_dmc_ver2_12.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_35.2.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_49.0.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_62.0.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_69.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_70.1.1.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_guc_70.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_huc.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_huc_7.0.12.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_huc_7.0.3.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_huc_7.5.0.bin $(1)/lib/firmware/i915/ -+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/i915/tgl_huc_7.9.3.bin $(1)/lib/firmware/i915/ -+endef -+$(eval $(call BuildPackage,i915-firmware)) - diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk index 5ed0d5dbbf2..a853a8c7980 100644 --- a/package/kernel/linux/modules/virt.mk diff --git a/devices/x86_generic/diy.sh b/devices/x86_generic/diy.sh index 4b1ca58716d4..b23008efae56 100644 --- a/devices/x86_generic/diy.sh +++ b/devices/x86_generic/diy.sh @@ -2,13 +2,11 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0")) -#bash $SHELL_FOLDER/../common/kernel_6.1.sh +bash $SHELL_FOLDER/../common/kernel_6.6.sh -git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-5.15 +git_clone_path master https://github.com/coolsnowwolf/lede target/linux/x86/files target/linux/x86/patches-6.6 -wget -N https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/x86/base-files/etc/board.d/02_network -P target/linux/x86/base-files/etc/board.d/ - -sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-usb-hid kmod-mmc kmod-sdhci usbutils pciutils lm-sensors-detect kmod-alx kmod-vmxnet3 kmod-igbvf kmod-iavf kmod-bnx2x kmod-pcnet32 kmod-tulip kmod-r8125 kmod-r8126 kmod-r8101 kmod-8139cp kmod-8139too kmod-i40e kmod-drm-i915 kmod-drm-amdgpu kmod-mlx4-core kmod-mlx5-core fdisk lsblk/' target/linux/x86/Makefile +sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-usb-hid kmod-mmc kmod-sdhci usbutils pciutils lm-sensors-detect kmod-alx kmod-vmxnet3 kmod-igbvf kmod-iavf kmod-bnx2x kmod-pcnet32 kmod-tulip kmod-r8125 kmod-r8126 kmod-r8101 kmod-8139cp kmod-8139too kmod-i40e kmod-mlx4-core kmod-mlx5-core fdisk lsblk/' target/linux/x86/Makefile sed -i 's/kmod-r8169/kmod-r8168/' target/linux/x86/image/generic.mk @@ -29,7 +27,7 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ACPI=y CONFIG_MMC_SDHCI_PCI=y CONFIG_DRM_I915=y -' >> ./target/linux/x86/config-5.15 +' >> ./target/linux/x86/config-6.6 sed -i "s/DEVICE_MODEL := x86/DEVICE_MODEL := x86\/32/" target/linux/x86/image/generic.mk diff --git a/devices/x86_generic/patches/def_set_interfaces_lan_wan.patch b/devices/x86_generic/patches/def_set_interfaces_lan_wan.patch deleted file mode 100644 index 03662e70e7d8..000000000000 --- a/devices/x86_generic/patches/def_set_interfaces_lan_wan.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/target/linux/x86/base-files/etc/board.d/02_network -+++ b/target/linux/x86/base-files/etc/board.d/02_network -@@ -22,6 +22,9 @@ traverse-technologies-geos) - macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null - [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr" - ;; -+*) -+ [ "$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -cvE "(@|\.)")" -gt 2 ] && ucidef_set_interfaces_lan_wan "$(ip address | grep ^[0-9] | awk -F: '{print $2}' | sed "s/ //g" | grep '^[e]' | grep -vE "(@|\.|eth1)" | tr "\n" " " | sed "s/ $//")" "eth1" -+ ;; - esac - board_config_flush -