diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index b4982ddc74fb..484be7dc8228 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -127,11 +127,6 @@ jobs: -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ - -d '{"event_type": "mediatek_gl_mt7981 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_gl_mt7981"}}' - curl \ - -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ -d '{"event_type": "ramips_mt7621 ${{ github.event.inputs.param }}", "client_payload": {"target": "ramips_mt7621"}}' curl \ -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ @@ -157,11 +152,6 @@ jobs: -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ -H "Accept: application/vnd.github.everest-preview+json" \ -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ - -d '{"event_type": "bcm4908_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "bcm4908_generic"}}' - curl \ - -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ secrets.REPO_TOKEN }}" \ -d '{"event_type": "kirkwood_generic ${{ github.event.inputs.param }}", "client_payload": {"target": "kirkwood_generic"}}' curl \ -X POST https://api.github.com/repos/${{ github.repository }}/dispatches \ diff --git a/devices/armvirt_64/.config b/devices/armvirt_64/.config index d640a1a9f7a3..fcd9a788e5da 100644 --- a/devices/armvirt_64/.config +++ b/devices/armvirt_64/.config @@ -7,6 +7,8 @@ CONFIG_PACKAGE_kmod-brcmfmac=y CONFIG_BRCMFMAC_SDIO=y CONFIG_TARGET_ROOTFS_TARGZ=y +CONFIG_TARGET_ROOTFS_INITRAMFS=n + CONFIG_PACKAGE_luci-ssl=n # uhttpd服务 CONFIG_PACKAGE_luci-ssl-nginx=y # nginx diff --git a/devices/bcm4908_generic/.config b/devices/bcm4908_generic/.config deleted file mode 100644 index c17e03f2610f..000000000000 --- a/devices/bcm4908_generic/.config +++ /dev/null @@ -1,11 +0,0 @@ - -CONFIG_TARGET_bcm4908=y -CONFIG_TARGET_bcm4908_generic=y -CONFIG_TARGET_MULTI_PROFILE=y -CONFIG_TARGET_DEVICE_bcm4908_generic_DEVICE_asus_gt-ac5300=y -CONFIG_TARGET_DEVICE_bcm4908_generic_DEVICE_netgear_r8000p=y - -CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 - - - diff --git a/devices/bcm4908_generic/diy.sh b/devices/bcm4908_generic/diy.sh deleted file mode 100644 index d9c171c273a4..000000000000 --- a/devices/bcm4908_generic/diy.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -shopt -s extglob - -SHELL_FOLDER=$(dirname $(readlink -f "$0")) -#bash $SHELL_FOLDER/../common/kernel_5.15.sh - -rm -rf package/boot/uboot-bcm4908 -svn co https://github.com/openwrt/openwrt/trunk/package/boot/uboot-bcm4908 package/boot/uboot-bcm4908 - diff --git a/devices/common/kernel_5.15.sh b/devices/common/kernel_5.15.sh index 2b9f47f19212..fbba9b8eb44b 100644 --- a/devices/common/kernel_5.15.sh +++ b/devices/common/kernel_5.15.sh @@ -24,7 +24,7 @@ svn export --force https://github.com/openwrt/packages/trunk/net/xtables-addons svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/hack-5.15 target/linux/generic/hack-5.15 svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/backport-5.15 target/linux/generic/backport-5.15 find target/linux/generic/backport-5.15 -name "[0-9][0-9][0-9]-[a-z][a-z]*" -exec rm -f {} \; -rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,730-11-v6.3-net-ethernet-mtk_eth*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*} +rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*,730-11-v6.3-net-ethernet-mtk_eth*,775-v5.16-net-phylink*,776-v5.16-net-ethernet-*,612-v6.3-skbuff-Fix*} curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab diff --git a/devices/common/patches/fix.patch b/devices/common/patches/fix.patch index 109e7b9c980b..3305811a15c8 100644 --- a/devices/common/patches/fix.patch +++ b/devices/common/patches/fix.patch @@ -45,7 +45,7 @@ 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 +@@ -367,12 +405,13 @@ define Device/Init DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1) DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2) IMAGE_SIZE := @@ -53,6 +53,41 @@ KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX) KERNEL_SUFFIX := -kernel.bin KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX) + KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX) + KERNEL_INITRAMFS_PREFIX = $$(DEVICE_IMG_PREFIX)-initramfs +- KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX) ++ KERNEL_INITRAMFS_IMAGE = $(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(1)-initramfs$$(KERNEL_INITRAMFS_SUFFIX) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs + KERNEL_INSTALL := + KERNEL_NAME := vmlinux +@@ -472,7 +511,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) \ +@@ -483,9 +521,11 @@ define Device/Build/initramfs + $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) + cp $$^ $$@ + ++ ifndef IB + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare + @rm -f $$@ + $$(call concat_cmd,$$(KERNEL_INITRAMFS)) ++ endif + + $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1)) + +@@ -519,7 +559,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) @@ -568,7 +607,7 @@ define Device/Build/kernel endef @@ -62,15 +97,7 @@ $$(_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="$(KERNEL_INITRAMFS)" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ -@@ -678,6 +718,8 @@ define Device/Build +@@ -678,6 +717,8 @@ define Device/Build $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),$(call Device/Build/initramfs,$(1))) $(call Device/Build/kernel,$(1)) @@ -99,14 +126,3 @@ ], stdout=PIPE, stderr=PIPE, - ---- a/scripts/json_add_image_info.py -+++ b/scripts/json_add_image_info.py -@@ -55,6 +55,7 @@ def get_titles(): - "profiles": { - device_id: { - "image_prefix": getenv("DEVICE_IMG_PREFIX"), -+ "kernel_initramfs": getenv("KERNEL_INITRAMFS"), - "images": [ - { - "type": getenv("FILE_TYPE"), \ No newline at end of file diff --git a/devices/common/patches/imagebuilder.patch b/devices/common/patches/imagebuilder.patch index 4123edfdc8c9..dd21227256d5 100644 --- a/devices/common/patches/imagebuilder.patch +++ b/devices/common/patches/imagebuilder.patch @@ -1,5 +1,14 @@ --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile +@@ -26,7 +26,7 @@ all: compile + + $(BIN_DIR)/$(IB_NAME).tar.xz: clean + rm -rf $(PKG_BUILD_DIR) +- mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \ ++ mkdir -p $(IB_KDIR)/tmp $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \ + $(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR) + -cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config + $(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER is not set/' $(PKG_BUILD_DIR)/.config @@ -38,13 +38,16 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean ./files/repositories.conf \ $(TMP_DIR)/.targetinfo \ @@ -20,6 +29,14 @@ $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages # create an empty package index so `opkg` doesn't report an error +@@ -79,6 +82,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),) + endif + + $(CP) -L $(TOPDIR)/target/linux $(PKG_BUILD_DIR)/target/ ++ $(CP) -L $(KERNEL_BUILD_DIR)/tmp/*initramfs* $(IB_KDIR)/tmp/ || true + if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \ + $(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \ + fi --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -51,7 +68,7 @@ $(MAKE) -s build_image $(MAKE) -s json_overview_image_info $(MAKE) -s checksum -+ rm -rf $(KERNEL_BUILD_DIR)/tmp ++ rm -rf $(KERNEL_BUILD_DIR)/tmp/openwrt-20.* + rm -rf $(KERNEL_BUILD_DIR)/root.* _call_manifest: FORCE diff --git a/devices/ipq60xx_generic/.config b/devices/ipq60xx_generic/.config index 17d2b474bf68..dc6195823f33 100644 --- a/devices/ipq60xx_generic/.config +++ b/devices/ipq60xx_generic/.config @@ -6,6 +6,8 @@ CONFIG_TARGET_ALL_PROFILES=y CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-ax1800=n CONFIG_TARGET_DEVICE_ipq60xx_generic_DEVICE_glinet_gl-axt1800=n +CONFIG_TARGET_ROOTFS_INITRAMFS=n + CONFIG_PACKAGE_dockerd=n CONFIG_GCC_USE_VERSION_7=y diff --git a/devices/ipq807x_generic/diy.sh b/devices/ipq807x_generic/diy.sh index a1710f9e652f..501e67494dd6 100644 --- a/devices/ipq807x_generic/diy.sh +++ b/devices/ipq807x_generic/diy.sh @@ -9,4 +9,6 @@ svn co https://github.com/robimarko/nss-packages/trunk/qca/qca-ssdk-shell packag sh -c "curl -sfL https://github.com/robimarko/openwrt/commit/23fa931934151f72c1655ffa62ff1a979575f07e.patch | patch -d './' -p1 --forward" +sed -i '/rm -rf $(KDIR)\/tmp/d' include/image.mk + rm -rf feeds/kiddin9/{rtl8821cu,rtl88x2bu} package/kernel/mt76 diff --git a/devices/ipq807x_ipq60xx/diy.sh b/devices/ipq807x_ipq60xx/diy.sh index 008b6143317a..9bb6de651a85 100644 --- a/devices/ipq807x_ipq60xx/diy.sh +++ b/devices/ipq807x_ipq60xx/diy.sh @@ -20,6 +20,9 @@ CONFIG_FEED_ipq807x=n CONFIG_FEED_wifi_ax=n " >> devices/common/.config +rm -rf target/imagebuilder +svn co https://github.com/openwrt/openwrt/branches/openwrt-21.02/target/imagebuilder target/imagebuilder + rm -rf feeds/kiddin9/{rtl*,base-files,netifd,fullconenat-nft,mbedtls,oaf,shortcut-fe,fullconenat} svn co https://github.com/coolsnowwolf/openwrt-gl-ax1800/trunk/package/network/services/fullconenat feeds/kiddin9/fullconenat @@ -28,7 +31,7 @@ rm -rf feeds/packages/net/xtables-addons package/feeds/packages/{openvswitch,ksm rm -rf package/kernel/exfat -rm -rf devices/common/patches/{glinet,imagebuilder.patch,fix.patch,iptables.patch,targets.patch,kernel-defaults.patch,disable_flock.patch} +rm -rf devices/common/patches/{glinet,fix.patch,iptables.patch,targets.patch,kernel-defaults.patch,disable_flock.patch} rm -rf toolchain/musl diff --git a/devices/ipq807x_ipq60xx/patches/fix.patch b/devices/ipq807x_ipq60xx/patches/fix.patch new file mode 100644 index 000000000000..7483f3e5067d --- /dev/null +++ b/devices/ipq807x_ipq60xx/patches/fix.patch @@ -0,0 +1,50 @@ +--- a/include/image.mk ++++ b/include/image.mk +@@ -469,7 +469,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) \ +@@ -479,9 +478,11 @@ define Device/Build/initramfs + $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) + cp $$^ $$@ + ++ ifndef IB + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare + @rm -f $$@ + $$(call concat_cmd,$$(KERNEL_INITRAMFS)) ++ endif + + $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1)) + +@@ -515,7 +516,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) + +--- a/scripts/json_overview_image_info.py ++++ b/scripts/json_overview_image_info.py +@@ -47,7 +47,7 @@ def get_initial_output(image_info): + + + if output: +- default_packages, output["arch_packages"] = run( ++ default_packages, output["arch_packages"], output["kernel_version"] = run( + [ + "make", + "--no-print-directory", +@@ -55,6 +55,7 @@ def get_initial_output(image_info): + "target/linux/", + "val.DEFAULT_PACKAGES", + "val.ARCH_PACKAGES", ++ "val.LINUX_VERSION", + ], + stdout=PIPE, + stderr=PIPE, diff --git a/devices/ipq807x_ipq60xx/patches/imagebuilder.patch b/devices/ipq807x_ipq60xx/patches/imagebuilder.patch deleted file mode 100644 index 3bf9fb35ada5..000000000000 --- a/devices/ipq807x_ipq60xx/patches/imagebuilder.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- a/target/imagebuilder/Makefile -+++ b/target/imagebuilder/Makefile -@@ -38,13 +38,15 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean - ./files/repositories.conf \ - $(TMP_DIR)/.targetinfo \ - $(TMP_DIR)/.packageinfo \ -- $(PKG_BUILD_DIR)/ -+ $(TOPDIR)/files \ -+ $(PKG_BUILD_DIR)/ || true - --ifeq ($(CONFIG_IB_STANDALONE),) - echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf - $(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf) - $(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf --endif -+ $(SED) 's/^src\/gz \(.*\) https.*top\/\(packages.*\)/src \1 file:\/\/www\/wwwroot\/op.supes.top\/\2/' $(PKG_BUILD_DIR)/repositories.conf -+ $(SED) 's/^src\/gz \(.*\) https.*top\/\(targets.*\)/src \1 file:\/\/www\/wwwroot\/op.supes.top\/releases\/\2/' $(PKG_BUILD_DIR)/repositories.conf -+ $(SED) 's/\/kiddin9//' $(PKG_BUILD_DIR)/repositories.conf - - $(INSTALL_DIR) $(PKG_BUILD_DIR)/packages - # create an empty package index so `opkg` doesn't report an error - ---- a/target/imagebuilder/files/Makefile -+++ b/target/imagebuilder/files/Makefile -@@ -115,17 +115,32 @@ BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(fi - PACKAGES:= - - _call_image: staging_dir/host/.prereq-build -+ [ "$(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/OpenWrt .* by/OpenWrt $$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 [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ -+ echo "src/gz openwrt_smflash https://op.supes.top/packages/mipsel_24kc/small_flash" >>$(TOPDIR)/repositories.conf; \ -+ else \ -+ sed -i "/smflash/d" $(TOPDIR)/repositories.conf; \ -+ fi - $(MAKE) package_reload - $(MAKE) package_install - $(MAKE) -s prepare_rootfs - $(MAKE) -s build_image - $(MAKE) -s json_overview_image_info - $(MAKE) -s checksum -+ rm -rf $(KERNEL_BUILD_DIR)/tmp -+ rm -rf $(KERNEL_BUILD_DIR)/root.* - - _call_manifest: FORCE - rm -rf $(TARGET_DIR) -@@ -166,7 +181,14 @@ package_install: FORCE - @echo Installing 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 \ -+ done; \ -+ $(OPKG) install --force-overwrite --force-checksum --force-depends $(BUILD_PACKAGES) luci-i18n-base-zh-cn luci-i18n-base-en; \ -+ $(OPKG) install $$packages || true -+ $(OPKG) install --force-overwrite --force-checksum --force-depends --force-maintainer --force-reinstall my-default-settings - - prepare_rootfs: FORCE - @echo -@@ -180,12 +202,15 @@ prepare_rootfs: FORCE - ) \ - ) - $(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES)) -+ if [[ "$(USER_PROFILE)" =~ (DEVICE_phicomm_k2p|DEVICE_asus_rt-n56u-b1|DEVICE_thunder_timecloud|DEVICE_youku_yk-l2|DEVICE_youhua_wr1200js|DEVICE_oraybox_x3a|DEVICE_netgear_wndr3700-v5|DEVICE_xiaomi_mi-router-4a-gigabit|DEVICE_xiaomi_mi-router-3g-v2|DEVICE_jcg_y2|DEVICE_glinet_gl-mt300a|DEVICE_glinet_gl-mt750|DEVICE_hiwifi_hc5661|DEVICE_hiwifi_hc5761|DEVICE_hiwifi_hc5861|DEVICE_lenovo_newifi-y1|DEVICE_lenovo_newifi-y1s|DEVICE_xiaomi_miwifi-mini|DEVICE_youku_yk-l1c|DEVICE_jdcloud_luban) || "$(TARGETID)" == "ramips/mt76x8" ]]; then \ -+ echo "src/gz openwrt_smflash https://op.supes.top/packages/mipsel_24kc/small_flash" >>$(BUILD_DIR)/root-ramips/etc/opkg/distfeeds.conf; \ -+ fi - - build_image: FORCE - @echo - @echo Building images... - rm -rf $(BUILD_DIR)/json_info_files/ -- $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ -+ 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 - ---- a/scripts/json_overview_image_info.py -+++ b/scripts/json_overview_image_info.py -@@ -47,7 +47,7 @@ def get_initial_output(image_info): - - - if output: -- default_packages, output["arch_packages"] = run( -+ default_packages, output["arch_packages"], output["kernel_version"] = run( - [ - "make", - "--no-print-directory", -@@ -55,6 +55,7 @@ def get_initial_output(image_info): - "target/linux/", - "val.DEFAULT_PACKAGES", - "val.ARCH_PACKAGES", -+ "val.LINUX_VERSION", - ], - stdout=PIPE, - stderr=PIPE, diff --git a/devices/kirkwood_generic/.config b/devices/kirkwood_generic/.config index cd30461025d7..08fc9100611e 100644 --- a/devices/kirkwood_generic/.config +++ b/devices/kirkwood_generic/.config @@ -4,7 +4,9 @@ CONFIG_TARGET_kirkwood_generic=y CONFIG_TARGET_MULTI_PROFILE=y CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_e4200-v2=y CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea4500=y +CONFIG_TARGET_DEVICE_kirkwood_DEVICE_linksys_ea3500=y CONFIG_TARGET_DEVICE_kirkwood_DEVICE_checkpoint_l-50=y +CONFIG_TARGET_DEVICE_kirkwood_DEVICE_netgear_readynas-duo-v2=y CONFIG_PACKAGE_luci-ssl=y # uhttpd服务 diff --git a/devices/kirkwood_generic/diy.sh b/devices/kirkwood_generic/diy.sh index b555f3f741d2..d1a4763cd5bc 100644 --- a/devices/kirkwood_generic/diy.sh +++ b/devices/kirkwood_generic/diy.sh @@ -3,6 +3,6 @@ shopt -s extglob SHELL_FOLDER=$(dirname $(readlink -f "$0")) -bash $SHELL_FOLDER/../common/kernel_5.15.sh +#bash $SHELL_FOLDER/../common/kernel_5.15.sh diff --git a/devices/mediatek_mt7981/patches/fix.patch b/devices/mediatek_mt7981/patches/fix.patch index 815493c43ebc..921b7f6dfcce 100644 --- a/devices/mediatek_mt7981/patches/fix.patch +++ b/devices/mediatek_mt7981/patches/fix.patch @@ -1,24 +1,42 @@ --- a/include/image.mk +++ b/include/image.mk -@@ -609,6 +609,7 @@ define Device/Build/image - IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ - IMAGE_FILESYSTEM="$(1)" \ - IMAGE_PREFIX="$(IMAGE_PREFIX)" \ -+ KERNEL_INITRAMFS="$(KERNEL_INITRAMFS)" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ - ---- a/scripts/json_add_image_info.py -+++ b/scripts/json_add_image_info.py -@@ -48,6 +48,7 @@ def get_titles(): - "profiles": { - device_id: { - "image_prefix": getenv("IMAGE_PREFIX"), -+ "kernel_initramfs": getenv("KERNEL_INITRAMFS"), - "images": [ - { - "type": getenv("IMAGE_TYPE"), +@@ -371,7 +370,7 @@ define Device/Init + KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX) + KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX) + KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs +- KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX) ++ KERNEL_INITRAMFS_IMAGE = $(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(1)-initramfs$$(KERNEL_INITRAMFS_SUFFIX) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs + KERNEL_INSTALL := + KERNEL_NAME := vmlinux +@@ -469,7 +468,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) \ +@@ -479,9 +477,11 @@ define Device/Build/initramfs + $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) + cp $$^ $$@ + ++ ifndef IB + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare + @rm -f $$@ + $$(call concat_cmd,$$(KERNEL_INITRAMFS)) ++ endif + + $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1)) + +@@ -515,7 +515,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) --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py diff --git a/devices/mediatek_mt7986/patches/fix.patch b/devices/mediatek_mt7986/patches/fix.patch index 815493c43ebc..921b7f6dfcce 100644 --- a/devices/mediatek_mt7986/patches/fix.patch +++ b/devices/mediatek_mt7986/patches/fix.patch @@ -1,24 +1,42 @@ --- a/include/image.mk +++ b/include/image.mk -@@ -609,6 +609,7 @@ define Device/Build/image - IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ - IMAGE_FILESYSTEM="$(1)" \ - IMAGE_PREFIX="$(IMAGE_PREFIX)" \ -+ KERNEL_INITRAMFS="$(KERNEL_INITRAMFS)" \ - DEVICE_VENDOR="$(DEVICE_VENDOR)" \ - DEVICE_MODEL="$(DEVICE_MODEL)" \ - DEVICE_VARIANT="$(DEVICE_VARIANT)" \ - ---- a/scripts/json_add_image_info.py -+++ b/scripts/json_add_image_info.py -@@ -48,6 +48,7 @@ def get_titles(): - "profiles": { - device_id: { - "image_prefix": getenv("IMAGE_PREFIX"), -+ "kernel_initramfs": getenv("KERNEL_INITRAMFS"), - "images": [ - { - "type": getenv("IMAGE_TYPE"), +@@ -371,7 +370,7 @@ define Device/Init + KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX) + KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX) + KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-initramfs +- KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX) ++ KERNEL_INITRAMFS_IMAGE = $(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(1)-initramfs$$(KERNEL_INITRAMFS_SUFFIX) + KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs + KERNEL_INSTALL := + KERNEL_NAME := vmlinux +@@ -469,7 +468,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) \ +@@ -479,9 +477,11 @@ define Device/Build/initramfs + $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) + cp $$^ $$@ + ++ ifndef IB + $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/$$(KERNEL_INITRAMFS_NAME) $(CURDIR)/Makefile $$(KERNEL_DEPENDS) image_prepare + @rm -f $$@ + $$(call concat_cmd,$$(KERNEL_INITRAMFS)) ++ endif + + $(call Device/Export,$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json,$(1)) + +@@ -515,7 +515,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) --- a/scripts/json_overview_image_info.py +++ b/scripts/json_overview_image_info.py diff --git a/devices/x86_64/diy.sh b/devices/x86_64/diy.sh index 28b4f969243b..7b099c0e3037 100644 --- a/devices/x86_64/diy.sh +++ b/devices/x86_64/diy.sh @@ -19,7 +19,6 @@ sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-usb-hid kmod-mmc kmod-sdh svn co https://github.com/openwrt/openwrt/trunk/package/kernel/mt76 package/feeds/kiddin9/mt76 curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/kernel/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -o package/feeds/kiddin9/mt76/patches/0001-mt76-allow-VHT-rate-on-2.4GHz.patch -svn co https://github.com/openwrt/openwrt/trunk/package/network/services/hostapd package/feeds/kiddin9/hostapd mv -f tmp/r81* feeds/kiddin9/ sed -i 's,kmod-r8169,kmod-r8168,g' target/linux/x86/image/64.mk