Created
February 11, 2023 17:09
-
-
Save danielphan2003/be27d06a7ff4d12c569164ac3086bd13 to your computer and use it in GitHub Desktop.
openwrt@cefc543b029a7af72420a5c514245287cd3df933
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile | |
| index 50ad11a2cf..58c4a9e8cb 100644 | |
| --- a/package/libs/libnftnl/Makefile | |
| +++ b/package/libs/libnftnl/Makefile | |
| @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk | |
| PKG_NAME:=libnftnl | |
| PKG_CPE_ID:=cpe:/a:netfilter:libnftnl | |
| PKG_VERSION:=1.2.4 | |
| -PKG_RELEASE:=$(AUTORELEASE) | |
| +PKG_RELEASE:=1-fullcone | |
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 | |
| PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files | |
| @@ -20,6 +20,7 @@ PKG_MAINTAINER:=Steven Barth <[email protected]> | |
| PKG_LICENSE:=GPL-2.0-or-later | |
| PKG_LICENSE_FILES:=COPYING | |
| +PKG_FIXUP:=autoreconf | |
| PKG_INSTALL:=1 | |
| PKG_BUILD_PARALLEL:=1 | |
| diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile | |
| index bec03b62d4..e92aea30a6 100644 | |
| --- a/package/network/config/firewall4/Makefile | |
| +++ b/package/network/config/firewall4/Makefile | |
| @@ -5,7 +5,7 @@ | |
| include $(TOPDIR)/rules.mk | |
| PKG_NAME:=firewall4 | |
| -PKG_RELEASE:=$(AUTORELEASE) | |
| +PKG_RELEASE:=1-fullcone | |
| PKG_SOURCE_PROTO:=git | |
| PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git | |
| diff --git a/package/network/utils/nftables/Makefile b/package/network/utils/nftables/Makefile | |
| index 2010aaf65c..8d486be167 100644 | |
| --- a/package/network/utils/nftables/Makefile | |
| +++ b/package/network/utils/nftables/Makefile | |
| @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk | |
| PKG_NAME:=nftables | |
| PKG_VERSION:=1.0.6 | |
| -PKG_RELEASE:=1 | |
| +PKG_RELEASE:=1-fullcone | |
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz | |
| PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files | |
| diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile | |
| index 7d34dfe676..77b82d5334 100644 | |
| --- a/target/linux/ramips/Makefile | |
| +++ b/target/linux/ramips/Makefile | |
| @@ -10,8 +10,7 @@ BOARDNAME:=MediaTek Ralink MIPS | |
| SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883 | |
| FEATURES:=squashfs gpio | |
| -KERNEL_PATCHVER:=5.10 | |
| -KERNEL_TESTING_PATCHVER:=5.15 | |
| +KERNEL_PATCHVER:=5.15 | |
| define Target/Description | |
| Build firmware images for Ralink RT288x/RT3xxx based boards. | |
| diff --git a/target/sdk/Config.in b/target/sdk/Config.in | |
| index 1984e242e7..7eed3fb606 100644 | |
| --- a/target/sdk/Config.in | |
| +++ b/target/sdk/Config.in | |
| @@ -2,6 +2,12 @@ config SDK | |
| bool "Build the OpenWrt SDK" | |
| depends on !EXTERNAL_TOOLCHAIN | |
| default BUILDBOT | |
| + select TOOLS_SQUASHFS_GZIP | |
| + select TOOLS_SQUASHFS_LZ4 | |
| + select TOOLS_SQUASHFS_LZO | |
| + select TOOLS_SQUASHFS_XATTR | |
| + select TOOLS_SQUASHFS_XZ | |
| + select TOOLS_SQUASHFS_ZSTD | |
| help | |
| This is essentially a stripped-down version of the buildroot | |
| with a precompiled toolchain. It can be used to develop and | |
| diff --git a/tools/Makefile b/tools/Makefile | |
| index 7b3a8eb142..221b63316a 100644 | |
| --- a/tools/Makefile | |
| +++ b/tools/Makefile | |
| @@ -20,7 +20,7 @@ endif | |
| ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_BRCMSMAC_USE_FW_FROM_WL),) | |
| BUILD_B43_TOOLS = y | |
| endif | |
| -ifneq ($(CONFIG_SDK)$(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),) | |
| +ifneq ($(CONFIG_SDK)$(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4)$(CONFIG_TOOLS_SQUASHFS_LZ4),) | |
| BUILD_LZ4_TOOLS = y | |
| endif | |
| ifneq ($(CONFIG_SDK)$(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),) | |
| @@ -64,7 +64,6 @@ tools-y += sstrip | |
| tools-y += zip | |
| tools-y += zlib | |
| tools-y += zstd | |
| -tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS),y) += liblzo | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_ISL),y) += isl | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_LZ4_TOOLS),y) += lz4 | |
| @@ -78,6 +77,10 @@ tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_tegra),y) += cbootimage | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += kernel2minor | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_SPARSE),y) += sparse | |
| tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_LLVM_BUILD),y) += llvm-bpf | |
| +#tools-$(if $(CONFIG_TOOLS_SQUASHFS_GZIP),y) += zlib | |
| +tools-$(if $(CONFIG_TOOLS_SQUASHFS_LZO),y) += liblzo | |
| +#tools-$(if $(CONFIG_TOOLS_SQUASHFS_XZ),y) += lzma | |
| +#tools-$(if $(CONFIG_TOOLS_SQUASHFS_ZSTD),y) += zstd | |
| # builddir dependencies | |
| $(curdir)/autoconf/compile := $(curdir)/m4/compile | |
| @@ -117,9 +120,24 @@ $(curdir)/pkgconf/compile := $(curdir)/meson/compile | |
| $(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile | |
| $(curdir)/sdcc/compile := $(curdir)/bison/compile | |
| $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile | |
| -$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile | |
| $(curdir)/zstd/compile := $(curdir)/meson/compile | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_GZIP),y) | |
| + $(curdir)/squashfskit4/compile += $(curdir)/zlib/compile | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_LZ4),y) | |
| + $(curdir)/squashfskit4/compile += $(curdir)/lz4/compile | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_LZO),y) | |
| + $(curdir)/squashfskit4/compile += $(curdir)/liblzo/compile | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_XZ),y) | |
| + $(curdir)/squashfskit4/compile += $(curdir)/xz/compile | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_ZSTD),y) | |
| + $(curdir)/squashfskit4/compile += $(curdir)/zstd/compile | |
| +endif | |
| + | |
| ifneq ($(HOST_OS),Linux) | |
| $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile | |
| tools-y += coreutils | |
| diff --git a/tools/squashfskit4/Makefile b/tools/squashfskit4/Makefile | |
| index 1800306d33..3f25050f99 100644 | |
| --- a/tools/squashfskit4/Makefile | |
| +++ b/tools/squashfskit4/Makefile | |
| @@ -12,30 +12,90 @@ PKG_RELEASE:=3 | |
| PKG_SOURCE:=squashfskit-v$(PKG_VERSION).tar.xz | |
| PKG_SOURCE_URL:=https://github.com/squashfskit/squashfskit/releases/download/v$(PKG_VERSION)/ | |
| PKG_HASH:=5761aaa3aedc4f7112b708367d891c9abdc1ffea972e3fe47923ddba23984d95 | |
| +PKG_CONFIG_DEPENDS:= CONFIG_TOOLS_SQUASHFS_GZIP \ | |
| + CONFIG_TOOLS_SQUASHFS_LZ4 \ | |
| + CONFIG_TOOLS_SQUASHFS_LZO \ | |
| + CONFIG_TOOLS_SQUASHFS_XATTR \ | |
| + CONFIG_TOOLS_SQUASHFS_XZ \ | |
| + CONFIG_TOOLS_SQUASHFS_ZSTD | |
| HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/squashfskit-v$(PKG_VERSION) | |
| +HOST_BUILD_SUBDIR:=$(HOST_BUILD_DIR)/squashfs-tools | |
| include $(INCLUDE_DIR)/host-build.mk | |
| +HOST_FEATURE_FILE:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_feature_list | |
| +FEATURE_LIST:= | |
| +HOST_MAKE_VARS+=PREFIX="$(HOST_BUILD_PREFIX)" | |
| +HOST_MAKE_FLAGS+=-C $(HOST_BUILD_SUBDIR) | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_XATTR),y) | |
| + HOST_MAKE_FLAGS += XATTR_SUPPORT=1 XATTR_DEFAULT=1 | |
| + FEATURE_LIST += XATTR | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_GZIP)$(CONFIG_TOOLS_SQUASHFS_LZ4)$(CONFIG_TOOLS_SQUASHFS_LZO)$(CONFIG_TOOLS_SQUASHFS_ZSTD)$(CONFIG_TOOLS_SQUASHFS_XZ),) | |
| + CONFIG_TOOLS_SQUASHFS_GZIP := y | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_GZIP),y) | |
| + HOST_MAKE_FLAGS += GZIP_SUPPORT=1 | |
| + FEATURE_LIST += gzip | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_LZ4),y) | |
| + HOST_MAKE_FLAGS += LZ4_SUPPORT=1 | |
| + FEATURE_LIST += lz4 | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_LZO),y) | |
| + HOST_MAKE_FLAGS += LZO_SUPPORT=1 | |
| + FEATURE_LIST += lzo | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_ZSTD),y) | |
| + HOST_MAKE_FLAGS += ZSTD_SUPPORT=1 | |
| + FEATURE_LIST += zstd | |
| +endif | |
| +ifeq ($(CONFIG_TOOLS_SQUASHFS_XZ),y) | |
| + HOST_MAKE_FLAGS += XZ_SUPPORT=1 | |
| + FEATURE_LIST += xz | |
| +endif | |
| +HOST_MAKE_FLAGS += COMP_DEFAULT=$(strip \ | |
| + $(if $(CONFIG_TOOLS_SQUASHFS_XZ),xz,\ | |
| + $(if $(CONFIG_TOOLS_SQUASHFS_ZSTD),zstd,\ | |
| + $(if $(CONFIG_TOOLS_SQUASHFS_LZO),lzo,\ | |
| + $(if $(CONFIG_TOOLS_SQUASHFS_LZ4),lz4,\ | |
| + $(if $(CONFIG_TOOLS_SQUASHFS_GZIP),gzip,\ | |
| +)))))) | |
| + | |
| +FEATURE_LIST:=$(strip $(sort $(FEATURE_LIST))) | |
| +FEATURE_LIST_PREV:=$(strip $(shell cat $(HOST_FEATURE_FILE))) | |
| +ifeq ($(FEATURE_LIST_PREV),) | |
| + $(info tools/$(PKG_NAME): Building with features: $(FEATURE_LIST)) | |
| +else | |
| + $(info tools/$(PKG_NAME): Previous build features: $(FEATURE_LIST_PREV)) | |
| + ifneq ($(FEATURE_LIST),$(FEATURE_LIST_PREV)) | |
| + $(info tools/$(PKG_NAME): Rebuild with features: $(FEATURE_LIST)) | |
| + $(shell find "$(HOST_BUILD_SUBDIR)/" -name *.o -delete) | |
| + else | |
| + $(info tools/$(PKG_NAME): Rebuild not forced.) | |
| + endif | |
| +endif | |
| + | |
| +define Host/Configure | |
| +endef | |
| + | |
| define Host/Compile | |
| - +$(HOST_MAKE_VARS) \ | |
| - $(MAKE) -C $(HOST_BUILD_DIR)/squashfs-tools \ | |
| - XZ_SUPPORT=1 \ | |
| - LZMA_XZ_SUPPORT=1 \ | |
| - XATTR_SUPPORT=1 \ | |
| - LZMA_LIB="$(STAGING_DIR_HOST)/lib/liblzma.a" \ | |
| - EXTRA_CFLAGS="-I$(STAGING_DIR_HOST)/include" \ | |
| - mksquashfs unsquashfs | |
| + $(call Host/Compile/Default,mksquashfs) | |
| + $(call Host/Compile/Default,unsquashfs) | |
| endef | |
| define Host/Install | |
| - $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/mksquashfs $(STAGING_DIR_HOST)/bin/mksquashfs4 | |
| - $(INSTALL_BIN) $(HOST_BUILD_DIR)/squashfs-tools/unsquashfs $(STAGING_DIR_HOST)/bin/unsquashfs4 | |
| + $(call Host/Compile/Default,install) | |
| + $(shell echo -n $(FEATURE_LIST) > $(HOST_FEATURE_FILE)) | |
| +endef | |
| + | |
| +define Host/Uninstall | |
| + $(call Host/Compile/Default,uninstall) | |
| + $(call Host/Compile/Default,clean) | |
| endef | |
| define Host/Clean | |
| - rm -f $(STAGING_DIR_HOST)/bin/mksquashfs4 | |
| - rm -f $(STAGING_DIR_HOST)/bin/unsquashfs4 | |
| endef | |
| $(eval $(call HostBuild)) | |
| diff --git a/tools/squashfskit4/patches/0001-fix-version.sh.patch b/tools/squashfskit4/patches/0001-fix-version.sh.patch | |
| deleted file mode 100644 | |
| index 5f0894bc17..0000000000 | |
| --- a/tools/squashfskit4/patches/0001-fix-version.sh.patch | |
| +++ /dev/null | |
| @@ -1,21 +0,0 @@ | |
| ---- a/squashfs-tools/version.sh | |
| -+++ b/squashfs-tools/version.sh | |
| -@@ -27,13 +27,11 @@ if [ -z "$OUTPUT" ] ; then | |
| - fi | |
| - | |
| - our_date() { | |
| --case $(uname) in | |
| --NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin) | |
| -- date -r "$1" "$2" | |
| -- ;; | |
| --*) | |
| -- date -d "@$1" "$2" | |
| --esac | |
| -+ if date --version 2>&1 | grep -q "GNU coreutils"; then | |
| -+ date -d "@$1" "$2" | |
| -+ else | |
| -+ date -r "$1" "$2" | |
| -+ fi | |
| - } | |
| - | |
| - try_version() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment