sync fix
This commit is contained in:
parent
5be98d8ce5
commit
8ea6d6666a
@ -37,11 +37,9 @@ menu "Target Images"
|
||||
bool "lzma"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_LZO
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
|
||||
bool "lzo"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_LZ4
|
||||
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
|
||||
bool "lz4"
|
||||
|
||||
config TARGET_INITRAMFS_COMPRESSION_XZ
|
||||
@ -307,7 +305,8 @@ menu "Target Images"
|
||||
config TARGET_ROOTFS_PARTSIZE
|
||||
int "Root filesystem partition size (in MiB)"
|
||||
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
|
||||
default 400
|
||||
default 400 if TARGET_x86
|
||||
default 160
|
||||
help
|
||||
Select the root filesystem partition size.
|
||||
|
||||
|
@ -643,6 +643,7 @@ config KERNEL_CRASH_DUMP
|
||||
|
||||
config USE_RFKILL
|
||||
bool "Enable rfkill support"
|
||||
default y if TARGET_rockchip
|
||||
default RFKILL_SUPPORT
|
||||
|
||||
config USE_SPARSE
|
||||
|
@ -64,7 +64,7 @@ BPF_CFLAGS := \
|
||||
-O2 -emit-llvm -Xclang -disable-llvm-passes
|
||||
|
||||
ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
|
||||
ifeq ($(DUMP),)
|
||||
ifeq ($(DUMP)$(filter download refresh,$(MAKECMDGOALS)),)
|
||||
CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
|
||||
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
|
||||
ifeq ($(CLANG_VER_VALID),)
|
||||
|
@ -206,5 +206,9 @@ endif
|
||||
|
||||
define HostBuild
|
||||
$(HostBuild/Core)
|
||||
$(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
|
||||
$(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,
|
||||
$(if $(and $(CONFIG_AUTOREMOVE), $(wildcard $(HOST_STAMP_INSTALLED), $(wildcard $(HOST_STAMP_BUILT)))),,
|
||||
$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))
|
||||
)
|
||||
)
|
||||
endef
|
||||
|
@ -277,7 +277,9 @@ endef
|
||||
define Build/initrd_compression
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),.lz4) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),.lzma) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),.lzo) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),.xz) \
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd)
|
||||
endef
|
||||
@ -316,6 +318,15 @@ define Build/gzip
|
||||
@mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/gzip-filename
|
||||
@mkdir -p $@.tmp
|
||||
@cp $@ $@.tmp/$(word 1,$(1))
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $@.tmp/$(word 1,$(1)) $(word 2,$(1)))
|
||||
$(STAGING_DIR_HOST)/bin/gzip -f -9 -N -c $@.tmp/$(word 1,$(1)) $(word 2,$(1)) > $@.new
|
||||
@mv $@.new $@
|
||||
@rm -rf $@.tmp
|
||||
endef
|
||||
|
||||
define Build/install-dtb
|
||||
$(call locked, \
|
||||
$(foreach dts,$(DEVICE_DTS), \
|
||||
|
@ -333,6 +333,8 @@ define Device/InitProfile
|
||||
DEVICE_ALT0_TITLE = $$(DEVICE_ALT0_VENDOR) $$(DEVICE_ALT0_MODEL)$$(if $$(DEVICE_ALT0_VARIANT), $$(DEVICE_ALT0_VARIANT))
|
||||
DEVICE_ALT1_TITLE = $$(DEVICE_ALT1_VENDOR) $$(DEVICE_ALT1_MODEL)$$(if $$(DEVICE_ALT1_VARIANT), $$(DEVICE_ALT1_VARIANT))
|
||||
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
|
||||
DEVICE_ALT3_TITLE = $$(DEVICE_ALT3_VENDOR) $$(DEVICE_ALT3_MODEL)$$(if $$(DEVICE_ALT3_VARIANT), $$(DEVICE_ALT3_VARIANT))
|
||||
DEVICE_ALT4_TITLE = $$(DEVICE_ALT4_VENDOR) $$(DEVICE_ALT4_MODEL)$$(if $$(DEVICE_ALT4_VARIANT), $$(DEVICE_ALT4_VARIANT))
|
||||
DEVICE_VENDOR :=
|
||||
DEVICE_MODEL :=
|
||||
DEVICE_VARIANT :=
|
||||
@ -345,6 +347,12 @@ define Device/InitProfile
|
||||
DEVICE_ALT2_VENDOR :=
|
||||
DEVICE_ALT2_MODEL :=
|
||||
DEVICE_ALT2_VARIANT :=
|
||||
DEVICE_ALT3_VENDOR :=
|
||||
DEVICE_ALT3_MODEL :=
|
||||
DEVICE_ALT3_VARIANT :=
|
||||
DEVICE_ALT4_VENDOR :=
|
||||
DEVICE_ALT4_MODEL :=
|
||||
DEVICE_ALT4_VARIANT :=
|
||||
DEVICE_PACKAGES :=
|
||||
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
|
||||
endef
|
||||
@ -359,6 +367,7 @@ define Device/Init
|
||||
ARTIFACTS :=
|
||||
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
|
||||
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
|
||||
FACTORY_IMG_NAME :=
|
||||
IMAGE_SIZE :=
|
||||
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
|
||||
KERNEL_SUFFIX := -kernel.bin
|
||||
@ -418,11 +427,14 @@ DEFAULT_DEVICE_VARS := \
|
||||
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
|
||||
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
|
||||
UBOOT_PATH IMAGE_SIZE \
|
||||
FACTORY_IMG_NAME FACTORY_SIZE \
|
||||
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
|
||||
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
|
||||
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
|
||||
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
|
||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT
|
||||
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT \
|
||||
DEVICE_ALT3_VENDOR DEVICE_ALT3_MODEL DEVICE_ALT3_VARIANT \
|
||||
DEVICE_ALT4_VENDOR DEVICE_ALT4_MODEL DEVICE_ALT4_VARIANT
|
||||
|
||||
define Device/ExportVar
|
||||
$(1) : $(2):=$$($(2))
|
||||
@ -505,6 +517,12 @@ define Device/Build/initramfs
|
||||
DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_ALT3_VENDOR="$$(DEVICE_ALT3_VENDOR)" \
|
||||
DEVICE_ALT3_MODEL="$$(DEVICE_ALT3_MODEL)" \
|
||||
DEVICE_ALT3_VARIANT="$$(DEVICE_ALT3_VARIANT)" \
|
||||
DEVICE_ALT4_VENDOR="$$(DEVICE_ALT4_VENDOR)" \
|
||||
DEVICE_ALT4_MODEL="$$(DEVICE_ALT4_MODEL)" \
|
||||
DEVICE_ALT4_VARIANT="$$(DEVICE_ALT4_VARIANT)" \
|
||||
DEVICE_TITLE="$$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
@ -613,6 +631,12 @@ define Device/Build/image
|
||||
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
|
||||
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
|
||||
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
|
||||
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
||||
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
||||
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
@ -658,6 +682,12 @@ define Device/Build/artifact
|
||||
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
|
||||
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
|
||||
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
|
||||
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
|
||||
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
|
||||
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
|
||||
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
|
||||
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
|
||||
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
|
||||
DEVICE_TITLE="$(DEVICE_TITLE)" \
|
||||
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
|
||||
TARGET="$(BOARD)" \
|
||||
@ -699,6 +729,8 @@ $(if $(strip $(DEVICE_ALT0_TITLE)),Alternative device titles:
|
||||
- $(DEVICE_ALT0_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT3_TITLE)),- $(DEVICE_ALT3_TITLE))
|
||||
$(if $(strip $(DEVICE_ALT4_TITLE)),- $(DEVICE_ALT4_TITLE))
|
||||
@@
|
||||
|
||||
endef
|
||||
@ -716,6 +748,14 @@ ifneq ($$(strip $$(DEVICE_ALT2_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT2_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
ifneq ($$(strip $$(DEVICE_ALT3_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT3_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
ifneq ($$(strip $$(DEVICE_ALT4_TITLE)),)
|
||||
DEVICE_DISPLAY = $$(DEVICE_ALT4_TITLE) ($$(DEVICE_TITLE))
|
||||
$$(info $$(call Device/DumpInfo,$(1)))
|
||||
endif
|
||||
DEVICE_DISPLAY = $$(DEVICE_TITLE)
|
||||
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
|
||||
endef
|
||||
|
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.10 = .164
|
||||
LINUX_KERNEL_HASH-5.10.164 = 0c7eaaa87b012c6662440f4ce2ea6e1bb961c1845cafd102eab08a57efeb8278
|
||||
LINUX_VERSION-5.10 = .165
|
||||
LINUX_KERNEL_HASH-5.10.165 = 971defc48f19ed0a2a7ffd4b48234619cac28895c985c6d747f5b707ba47af0d
|
||||
|
@ -1,2 +1,2 @@
|
||||
LINUX_VERSION-5.15 = .89
|
||||
LINUX_KERNEL_HASH-5.15.89 = e7311b874e014bb6d37c051319bd6a4a4e3d05a1c32546522deabbfd2d752fe8
|
||||
LINUX_VERSION-5.15 = .90
|
||||
LINUX_KERNEL_HASH-5.15.90 = e6fd430022686753af7516fe7544f96aab379509dc5b7829017bdcd92b393b42
|
||||
|
@ -21,7 +21,7 @@ Kernel/Patch:=$(Kernel/Patch/Default)
|
||||
ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
|
||||
LINUX_CAT:=xzcat
|
||||
else
|
||||
LINUX_CAT:=gzip -dc
|
||||
LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
||||
@ -180,10 +180,10 @@ endif
|
||||
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),$(STAGING_DIR_HOST)/bin/lz4c -l -c1 -fz --favor-decSpeed $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),$(STAGING_DIR_HOST)/bin/lzop -9 -f $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),)
|
||||
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
|
||||
endif
|
||||
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
|
@ -49,10 +49,9 @@ $(eval $(call TestHostCommand,working-g++, \
|
||||
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
|
||||
$(TMP_DIR)/a.out))
|
||||
|
||||
$(eval $(call TestHostCommand,ncurses, \
|
||||
$(eval $(call RequireCHeader,ncurses.h, \
|
||||
Please install ncurses. (Missing libncurses.so or ncurses.h), \
|
||||
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \
|
||||
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
|
||||
initscr(), -lncurses))
|
||||
|
||||
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
|
||||
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
|
||||
@ -205,6 +204,20 @@ $(eval $(call SetupHostCommand,which,Please install 'which', \
|
||||
/bin/which which, \
|
||||
which which))
|
||||
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
$(eval $(call RequireCHeader,argp.h, \
|
||||
Missing argp.h Please install the argp-standalone package if musl libc))
|
||||
|
||||
$(eval $(call RequireCHeader,fts.h, \
|
||||
Missing fts.h Please install the musl-fts-dev package if musl libc))
|
||||
|
||||
$(eval $(call RequireCHeader,obstack.h, \
|
||||
Missing obstack.h Please install the musl-obstack-dev package if musl libc))
|
||||
|
||||
$(eval $(call RequireCHeader,libintl.h, \
|
||||
Missing libintl.h Please install the musl-libintl package if musl libc))
|
||||
endif
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
|
||||
mkdir -p $(dir $@)
|
||||
$(CC) -O2 -I$(TOPDIR)/tools/include -o $@ $<
|
||||
|
@ -63,6 +63,18 @@ define RequireHeader
|
||||
$$(eval $$(call Require,$(1),$(2)))
|
||||
endef
|
||||
|
||||
# 1: header to test
|
||||
# 2: failure message
|
||||
# 3: optional compile time test
|
||||
# 4: optional link library test (example -lncurses)
|
||||
define RequireCHeader
|
||||
define Require/$(1)
|
||||
echo 'int main(int argc, char **argv) { $(3); return 0; }' | gcc -include $(1) -x c -o $(TMP_DIR)/a.out - $(4)
|
||||
endef
|
||||
|
||||
$$(eval $$(call Require,$(1),$(2)))
|
||||
endef
|
||||
|
||||
define CleanupPython2
|
||||
define Require/python2-cleanup
|
||||
if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
|
||||
|
@ -11,7 +11,7 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp
|
||||
FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
|
||||
|
||||
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
|
||||
export PATH:=$(STAGING_DIR_HOST)/bin:$(PATH)
|
||||
|
||||
define feedname
|
||||
$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
|
||||
|
@ -51,22 +51,22 @@ path:=$(subst :,$(space),$(PATH))
|
||||
path:=$(filter-out .%,$(path))
|
||||
path:=$(subst $(space),:,$(path))
|
||||
export PATH:=$(path)
|
||||
export STAGING_DIR_HOST:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host),$(TOPDIR)/staging_dir/host)
|
||||
|
||||
unexport TAR_OPTIONS
|
||||
|
||||
ifeq ($(FORCE),)
|
||||
.config scripts/config/conf scripts/config/mconf: staging_dir/host/.prereq-build
|
||||
.config scripts/config/conf scripts/config/mconf: $(STAGING_DIR_HOST)/.prereq-build
|
||||
endif
|
||||
|
||||
SCAN_COOKIE?=$(shell echo $$$$)
|
||||
export SCAN_COOKIE
|
||||
export STAGING_DIR_HOST=$(TOPDIR)/staging_dir/host
|
||||
|
||||
SUBMAKE:=umask 022; $(SUBMAKE)
|
||||
|
||||
ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;
|
||||
|
||||
prepare-mk: staging_dir/host/.prereq-build FORCE ;
|
||||
prepare-mk: $(STAGING_DIR_HOST)/.prereq-build FORCE ;
|
||||
|
||||
ifdef SDK
|
||||
IGNORE_PACKAGES = linux
|
||||
@ -75,7 +75,7 @@ endif
|
||||
_ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))
|
||||
|
||||
prepare-tmpinfo: FORCE
|
||||
@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK)
|
||||
@+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK)
|
||||
mkdir -p tmp/info
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
|
||||
@ -152,7 +152,7 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE
|
||||
|
||||
prepare_kernel_conf: .config toolchain/install FORCE
|
||||
|
||||
ifeq ($(wildcard staging_dir/host/bin/quilt),)
|
||||
ifeq ($(wildcard $(STAGING_DIR_HOST)/bin/quilt),)
|
||||
prepare_kernel_conf:
|
||||
@+$(SUBMAKE) -r tools/quilt/compile
|
||||
else
|
||||
@ -176,7 +176,7 @@ kernel_nconfig: prepare_kernel_conf
|
||||
kernel_xconfig: prepare_kernel_conf
|
||||
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig
|
||||
|
||||
staging_dir/host/.prereq-build: include/prereq-build.mk
|
||||
$(STAGING_DIR_HOST)/.prereq-build: include/prereq-build.mk
|
||||
mkdir -p tmp
|
||||
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
|
||||
echo "Prerequisite check failed. Use FORCE=1 to override."; \
|
||||
@ -199,7 +199,7 @@ else
|
||||
DOWNLOAD_DIRS = package/download
|
||||
endif
|
||||
|
||||
download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
|
||||
download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile)
|
||||
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
|
||||
|
||||
clean dirclean: .config
|
||||
@ -263,7 +263,7 @@ distclean:
|
||||
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean
|
||||
|
||||
ifeq ($(findstring v,$(DEBUG)),)
|
||||
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig staging_dir/host/.prereq-build tmp/.prereq-package prepare-tmpinfo
|
||||
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig $(STAGING_DIR_HOST)/.prereq-build tmp/.prereq-package prepare-tmpinfo
|
||||
endif
|
||||
.PHONY: help FORCE
|
||||
.NOTPARALLEL:
|
||||
|
@ -81,7 +81,7 @@ define Build/Compile/Trusted-Firmware-A
|
||||
$(if $(DTC),DTC="$(DTC)") \
|
||||
PLAT=$(PLAT) \
|
||||
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
|
||||
$(if $(CONFIG_BINUTILS_VERSION_2_39),LDFLAGS="-no-warn-rwx-segments") \
|
||||
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
|
||||
$(TFA_MAKE_FLAGS)
|
||||
endef
|
||||
|
||||
|
@ -18,7 +18,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
|
||||
ifeq ($(filter gz tgz,$(EXT)),$(EXT))
|
||||
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||
DECOMPRESS_CMD:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
|
||||
DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
|
||||
endif
|
||||
ifeq ($(filter bzip2 bz2 bz tbz2 tbz,$(EXT)),$(EXT))
|
||||
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
|
||||
@ -56,7 +56,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
|
||||
endif
|
||||
# replace zcat with $(ZCAT), because some system don't support it properly
|
||||
ifeq ($(PKG_CAT),zcat)
|
||||
UNPACK_CMD=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD)
|
||||
UNPACK_CMD=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=trace-cmd
|
||||
PKG_VERSION:=v3.1.5
|
||||
PKG_VERSION:=v3.1.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/
|
||||
PKG_HASH:=9af1ea00e312d03639470e126fa9c786789f03c16df93a57c0bc90eeffbc7d50
|
||||
PKG_HASH:=f9198ea306deee9cda3b262342b03b6029e82c1b9c671ba521739a9703e115b9
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
@ -12,7 +12,9 @@ PKG_NAME:=kernel
|
||||
PKG_FLAGS:=hold
|
||||
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages
|
||||
SCAN_DEPS=modules/*.mk $(TOPDIR)/target/linux/*/modules.mk $(TOPDIR)/include/netfilter.mk
|
||||
SUBTARGETS = $(sort $(filter-out feeds,$(notdir $(wildcard $(TOPDIR)/target/linux/* $(TOPDIR)/target/linux/feeds/*))))
|
||||
SUBTARGET_MODULES = $(foreach t,$(SUBTARGETS),$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(t)/modules.mk $(TOPDIR)/target/linux/$(t)/modules.mk)))
|
||||
SCAN_DEPS=modules/*.mk $(SUBTARGET_MODULES) $(TOPDIR)/include/netfilter.mk
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_LICENSE_FILES:=
|
||||
@ -63,4 +65,4 @@ endef
|
||||
$(eval $(if $(DUMP),,$(call BuildPackage,kernel)))
|
||||
|
||||
include $(sort $(wildcard ./modules/*.mk))
|
||||
-include $(TOPDIR)/target/linux/*/modules.mk
|
||||
-include $(SUBTARGET_MODULES)
|
||||
|
@ -406,11 +406,13 @@ define KernelPackage/rfkill
|
||||
DEPENDS:=@USE_RFKILL +kmod-input-core
|
||||
KCONFIG:= \
|
||||
CONFIG_RFKILL_FULL \
|
||||
CONFIG_RFKILL_GPIO=y \
|
||||
CONFIG_RFKILL_INPUT=y \
|
||||
CONFIG_RFKILL_LEDS=y
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/net/rfkill/rfkill.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,rfkill)
|
||||
$(LINUX_DIR)/net/rfkill/rfkill.ko \
|
||||
$(LINUX_DIR)/net/rfkill/rfkill-gpio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,rfkill-gpio)
|
||||
endef
|
||||
|
||||
define KernelPackage/rfkill/description
|
||||
|
@ -24,7 +24,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define KernelPackage/rtl8812au-ct
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Driver for Realtek 8812 AU devices comfast 912-ac, etc
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT
|
||||
DEPENDS:=+kmod-cfg80211 +kmod-usb-core +@DRIVER_11AC_SUPPORT
|
||||
FILES:=\
|
||||
$(PKG_BUILD_DIR)/rtl8812au.ko
|
||||
AUTOLOAD:=$(call AutoProbe,rtl8812au)
|
||||
@ -39,7 +39,9 @@ NOSTDINC_FLAGS := \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
||||
-include backport/backport.h
|
||||
-include backport/backport.h \
|
||||
-Wno-error=address \
|
||||
-Wno-error=stringop-overread
|
||||
|
||||
NOSTDINC_FLAGS+=-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DBUILD_OPENWRT
|
||||
|
||||
|
56
package/kernel/rtl8812au-ct/patches/100-api_update.patch
Normal file
56
package/kernel/rtl8812au-ct/patches/100-api_update.patch
Normal file
@ -0,0 +1,56 @@
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c
|
||||
@@ -798,8 +798,8 @@ check_bss:
|
||||
|
||||
DBG_871X(FUNC_ADPT_FMT" call cfg80211_roamed\n", FUNC_ADPT_ARG(padapter));
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
||||
- roam_info.channel = notify_channel;
|
||||
- roam_info.bssid = cur_network->network.MacAddress;
|
||||
+ roam_info.links[0].channel = notify_channel;
|
||||
+ roam_info.links[0].bssid = cur_network->network.MacAddress;
|
||||
roam_info.req_ie = pmlmepriv->assoc_req + sizeof(struct rtw_ieee80211_hdr_3addr) + 2;
|
||||
roam_info.req_ie_len = pmlmepriv->assoc_req_len - sizeof(struct rtw_ieee80211_hdr_3addr) - 2;
|
||||
roam_info.resp_ie = pmlmepriv->assoc_rsp + sizeof(struct rtw_ieee80211_hdr_3addr) + 6;
|
||||
@@ -1389,6 +1389,7 @@ exit:
|
||||
|
||||
static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
+ int link_id,
|
||||
u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||
#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
u8 key_index, const u8 *mac_addr,
|
||||
@@ -1529,6 +1530,7 @@ addkey_end:
|
||||
|
||||
static int cfg80211_rtw_get_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
+ int link_id,
|
||||
u8 key_index, bool pairwise, const u8 *mac_addr,
|
||||
#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
u8 key_index, const u8 *mac_addr,
|
||||
@@ -1562,6 +1564,7 @@ static int cfg80211_rtw_get_key(struct w
|
||||
|
||||
static int cfg80211_rtw_del_key(struct wiphy *wiphy, struct net_device *ndev,
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
+ int link_id,
|
||||
u8 key_index, bool pairwise, const u8 *mac_addr)
|
||||
#else // (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||
u8 key_index, const u8 *mac_addr)
|
||||
@@ -1581,7 +1584,7 @@ static int cfg80211_rtw_del_key(struct w
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
|
||||
- struct net_device *ndev, u8 key_index
|
||||
+ struct net_device *ndev, int link_id, u8 key_index
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
, bool unicast, bool multicast
|
||||
#endif
|
||||
@@ -4019,7 +4022,8 @@ static int cfg80211_rtw_change_beacon(st
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
|
||||
+static int cfg80211_rtw_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
+ unsigned int link_id)
|
||||
{
|
||||
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
return 0;
|
@ -81,7 +81,7 @@ HOST_CONFIGURE_VARS += \
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_search__obstack_free=yes
|
||||
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
|
||||
TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral -Wno-error=use-after-free
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006-2022 OpenWrt.org
|
||||
# Copyright (C) 2006-2013 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libpcap
|
||||
PKG_VERSION:=1.10.1
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=1.10.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://www.tcpdump.org/release/
|
||||
PKG_HASH:=ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4
|
||||
PKG_HASH:=2a8885c403516cf7b0933ed4b14d6caa30e02052489ebd414dc75ac52e7559e6
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1042,7 +1042,6 @@ endif()
|
||||
@@ -1325,7 +1325,6 @@ endif()
|
||||
#
|
||||
# OpenSSL/libressl.
|
||||
#
|
||||
|
@ -9,7 +9,7 @@ Subject: [PATCH] skip manpages
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2732,57 +2732,6 @@ if(NOT MSVC)
|
||||
@@ -3325,57 +3325,6 @@ if(NOT MSVC)
|
||||
if(MINGW)
|
||||
find_program(LINK_EXECUTABLE ln)
|
||||
endif(MINGW)
|
||||
|
@ -1,26 +0,0 @@
|
||||
--- a/pcap-common.c
|
||||
+++ b/pcap-common.c
|
||||
@@ -1662,14 +1662,23 @@ swap_pseudo_headers(int linktype, struct
|
||||
break;
|
||||
|
||||
case DLT_USB_LINUX:
|
||||
+#ifndef PCAP_SUPPORT_USB
|
||||
+ return;
|
||||
+#endif
|
||||
swap_linux_usb_header(hdr, data, 0);
|
||||
break;
|
||||
|
||||
case DLT_USB_LINUX_MMAPPED:
|
||||
+#ifndef PCAP_SUPPORT_USB
|
||||
+ return;
|
||||
+#endif
|
||||
swap_linux_usb_header(hdr, data, 1);
|
||||
break;
|
||||
|
||||
case DLT_NFLOG:
|
||||
+#ifndef PCAP_SUPPORT_NETFILTER
|
||||
+ return;
|
||||
+#endif
|
||||
swap_nflog_header(hdr, data);
|
||||
break;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -200,15 +200,7 @@ option(NO_PROTOCHAIN "Disable protochain
|
||||
@@ -477,15 +477,7 @@ option(NO_PROTOCHAIN "Disable protochain
|
||||
#
|
||||
set(PCAP_TYPE "" CACHE STRING "Packet capture type")
|
||||
|
||||
|
@ -0,0 +1,642 @@
|
||||
From 3d8d268320d2381021a409ff8d03533698dd6242 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
|
||||
Date: Mon, 23 Nov 2020 00:38:22 +0100
|
||||
Subject: [PATCH] Add support for B.A.T.M.A.N. Advanced
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This adds support for the layer 2 mesh routing protocol
|
||||
B.A.T.M.A.N. Advanced. "batadv" can be used to filter on batman-adv
|
||||
packets. It also allows later filters to look at frames inside the
|
||||
tunnel when both "version" and "type" are specified.
|
||||
|
||||
Documentation for the batman-adv protocol can be found at the following
|
||||
locations:
|
||||
|
||||
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/batman-adv.rst
|
||||
https://www.open-mesh.org/
|
||||
|
||||
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
---
|
||||
Makefile.in | 2 +
|
||||
batadv_legacy_packet.h | 77 +++++++++++++++++++
|
||||
batadv_packet.h | 78 ++++++++++++++++++++
|
||||
ethertype.h | 3 +
|
||||
gencode.c | 164 +++++++++++++++++++++++++++++++++++++++++
|
||||
gencode.h | 3 +
|
||||
grammar.y.in | 32 +++++++-
|
||||
nametoaddr.c | 59 +++++++++++++++
|
||||
pcap-filter.manmisc.in | 35 ++++++++-
|
||||
pcap/namedb.h | 2 +
|
||||
scanner.l | 1 +
|
||||
11 files changed, 453 insertions(+), 3 deletions(-)
|
||||
create mode 100644 batadv_legacy_packet.h
|
||||
create mode 100644 batadv_packet.h
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -133,6 +133,8 @@ PUBHDR = \
|
||||
HDR = $(PUBHDR) \
|
||||
arcnet.h \
|
||||
atmuni31.h \
|
||||
+ batadv_legacy_packet.h \
|
||||
+ batadv_packet.h \
|
||||
diag-control.h \
|
||||
ethertype.h \
|
||||
extract.h \
|
||||
--- /dev/null
|
||||
+++ b/batadv_legacy_packet.h
|
||||
@@ -0,0 +1,77 @@
|
||||
+/* SPDX-License-Identifier: BSD-3 */
|
||||
+/* Copyright (C) 2020 Linus Lüssing */
|
||||
+
|
||||
+#ifndef _BATADV_LEGACY_PACKET_H_
|
||||
+#define _BATADV_LEGACY_PACKET_H_
|
||||
+
|
||||
+enum batadv_legacy_packettype {
|
||||
+ BATADV_LEGACY_IV_OGM = 0x01,
|
||||
+ BATADV_LEGACY_ICMP = 0x02,
|
||||
+ BATADV_LEGACY_UNICAST = 0x03,
|
||||
+ BATADV_LEGACY_BCAST = 0x04,
|
||||
+ BATADV_LEGACY_VIS = 0x05,
|
||||
+ BATADV_LEGACY_UNICAST_FRAG = 0x06,
|
||||
+ BATADV_LEGACY_TT_QUERY = 0x07,
|
||||
+ BATADV_LEGACY_ROAM_ADV = 0x08,
|
||||
+ BATADV_LEGACY_UNICAST_4ADDR = 0x09,
|
||||
+ BATADV_LEGACY_CODED = 0x0a,
|
||||
+};
|
||||
+
|
||||
+#define ETH_ALEN 6
|
||||
+
|
||||
+struct batadv_legacy_unicast_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t ttvn;
|
||||
+ uint8_t dest[ETH_ALEN];
|
||||
+};
|
||||
+
|
||||
+struct batadv_legacy_unicast_4addr_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t src[ETH_ALEN];
|
||||
+ uint8_t subtype;
|
||||
+ uint8_t reserved;
|
||||
+};
|
||||
+
|
||||
+struct batadv_legacy_unicast_frag_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t ttvn;
|
||||
+ uint8_t dest[ETH_ALEN];
|
||||
+ uint8_t flags;
|
||||
+ uint8_t align;
|
||||
+ uint8_t orig[ETH_ALEN];
|
||||
+ uint8_t seqno[2]; /* 2-byte integral value */
|
||||
+};
|
||||
+
|
||||
+struct batadv_legacy_bcast_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t reserved;
|
||||
+ uint8_t seqno[4]; /* 4-byte integral value */
|
||||
+ uint8_t orig[ETH_ALEN];
|
||||
+};
|
||||
+
|
||||
+struct batadv_legacy_coded_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t first_ttvn;
|
||||
+ uint8_t first_source[ETH_ALEN];
|
||||
+ uint8_t first_orig_dest[ETH_ALEN];
|
||||
+ uint8_t first_crc[4]; /* 4-byte integral value */
|
||||
+ uint8_t second_ttl;
|
||||
+ uint8_t second_ttvn;
|
||||
+ uint8_t second_dest[ETH_ALEN];
|
||||
+ uint8_t second_source[ETH_ALEN];
|
||||
+ uint8_t second_orig_dest[ETH_ALEN];
|
||||
+ uint8_t second_crc[4]; /* 4-byte integral value */
|
||||
+ uint8_t coded_len[2]; /* 2-byte integral value */
|
||||
+};
|
||||
+
|
||||
+#endif /* _BATADV_LEGACY_PACKET_H_ */
|
||||
--- /dev/null
|
||||
+++ b/batadv_packet.h
|
||||
@@ -0,0 +1,78 @@
|
||||
+/* SPDX-License-Identifier: BSD-3 */
|
||||
+/* Copyright (C) 2020 Linus Lüssing */
|
||||
+
|
||||
+#ifndef _BATADV_PACKET_H_
|
||||
+#define _BATADV_PACKET_H_
|
||||
+
|
||||
+/* For the definitive and most recent packet format definition,
|
||||
+ * see the batadv_packet.h in the Linux kernel.
|
||||
+ */
|
||||
+
|
||||
+enum batadv_packettype {
|
||||
+ BATADV_IV_OGM = 0x00,
|
||||
+ BATADV_BCAST = 0x01,
|
||||
+ BATADV_CODED = 0x02,
|
||||
+ BATADV_ELP = 0x03,
|
||||
+ BATADV_OGM2 = 0x04,
|
||||
+ BATADV_UNICAST = 0x40,
|
||||
+ BATADV_UNICAST_FRAG = 0x41,
|
||||
+ BATADV_UNICAST_4ADDR = 0x42,
|
||||
+ BATADV_ICMP = 0x43,
|
||||
+ BATADV_UNICAST_TVLV = 0x44,
|
||||
+};
|
||||
+
|
||||
+#define ETH_ALEN 6
|
||||
+
|
||||
+struct batadv_unicast_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t ttvn;
|
||||
+ uint8_t dest[ETH_ALEN];
|
||||
+};
|
||||
+
|
||||
+struct batadv_unicast_4addr_packet {
|
||||
+ struct batadv_unicast_packet u;
|
||||
+ uint8_t src[ETH_ALEN];
|
||||
+ uint8_t subtype;
|
||||
+ uint8_t reserved;
|
||||
+};
|
||||
+
|
||||
+struct batadv_frag_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t num_pri; /* number and priority */
|
||||
+ uint8_t dest[ETH_ALEN];
|
||||
+ uint8_t orig[ETH_ALEN];
|
||||
+ uint8_t seqno[2]; /* 2-byte integral value */
|
||||
+ uint8_t total_size[2]; /* 2-byte integral value */
|
||||
+};
|
||||
+
|
||||
+struct batadv_bcast_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t reserved;
|
||||
+ uint8_t seqno[4]; /* 4-byte integral value */
|
||||
+ uint8_t orig[ETH_ALEN];
|
||||
+};
|
||||
+
|
||||
+struct batadv_coded_packet {
|
||||
+ uint8_t packet_type;
|
||||
+ uint8_t version;
|
||||
+ uint8_t ttl;
|
||||
+ uint8_t first_ttvn;
|
||||
+ uint8_t first_source[ETH_ALEN];
|
||||
+ uint8_t first_orig_dest[ETH_ALEN];
|
||||
+ uint8_t first_crc[4]; /* 4-byte integral value */
|
||||
+ uint8_t second_ttl;
|
||||
+ uint8_t second_ttvn;
|
||||
+ uint8_t second_dest[ETH_ALEN];
|
||||
+ uint8_t second_source[ETH_ALEN];
|
||||
+ uint8_t second_orig_dest[ETH_ALEN];
|
||||
+ uint8_t second_crc[4]; /* 4-byte integral value */
|
||||
+ uint8_t coded_len[2]; /* 2-byte integral value */
|
||||
+};
|
||||
+
|
||||
+#endif /* _BATADV_PACKET_H_ */
|
||||
--- a/ethertype.h
|
||||
+++ b/ethertype.h
|
||||
@@ -49,6 +49,9 @@
|
||||
#ifndef ETHERTYPE_TRAIL
|
||||
#define ETHERTYPE_TRAIL 0x1000
|
||||
#endif
|
||||
+#ifndef ETHERTYPE_BATMAN
|
||||
+#define ETHERTYPE_BATMAN 0x4305 /* B.A.T.M.A.N. Advanced */
|
||||
+#endif
|
||||
#ifndef ETHERTYPE_MOPDL
|
||||
#define ETHERTYPE_MOPDL 0x6001
|
||||
#endif
|
||||
--- a/gencode.c
|
||||
+++ b/gencode.c
|
||||
@@ -60,6 +60,8 @@
|
||||
#include "sunatmpos.h"
|
||||
#include "pflog.h"
|
||||
#include "ppp.h"
|
||||
+#include "batadv_packet.h"
|
||||
+#include "batadv_legacy_packet.h"
|
||||
#include "pcap/sll.h"
|
||||
#include "pcap/ipnet.h"
|
||||
#include "arcnet.h"
|
||||
@@ -9436,6 +9438,168 @@ gen_geneve(compiler_state_t *cstate, bpf
|
||||
return b1;
|
||||
}
|
||||
|
||||
+static struct block *
|
||||
+gen_batadv_check_version(compiler_state_t *cstate, struct block *b0, bpf_u_int32 version)
|
||||
+{
|
||||
+ struct block *b1;
|
||||
+
|
||||
+ if (version > UINT8_MAX)
|
||||
+ bpf_error(cstate,
|
||||
+ "batman-adv compatibility version number %u unsupported",
|
||||
+ version);
|
||||
+
|
||||
+ b1 = gen_cmp(cstate, OR_LINKPL, 1, BPF_B, version);
|
||||
+ gen_and(b0, b1);
|
||||
+
|
||||
+ return b1;
|
||||
+}
|
||||
+
|
||||
+static struct block *
|
||||
+gen_batadv_check_type(compiler_state_t *cstate, struct block *b0,
|
||||
+ bpf_u_int32 version, bpf_u_int32 type)
|
||||
+{
|
||||
+ struct block *b1;
|
||||
+
|
||||
+ switch (version) {
|
||||
+ case 14:
|
||||
+ case 15:
|
||||
+ if (type > UINT8_MAX)
|
||||
+ bpf_error(cstate,
|
||||
+ "batman-adv packet type %u unsupported for compatibility version %u",
|
||||
+ type, version);
|
||||
+
|
||||
+ b1 = gen_cmp(cstate, OR_LINKPL, 0, BPF_B, type);
|
||||
+ gen_and(b0, b1);
|
||||
+ b0 = b1;
|
||||
+
|
||||
+ break;
|
||||
+ default:
|
||||
+ bpf_error(cstate,
|
||||
+ "batman-adv compatibility version number %u unsupported",
|
||||
+ version);
|
||||
+ }
|
||||
+
|
||||
+ return b0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void gen_batadv_push_offset(compiler_state_t *cstate, u_int offset)
|
||||
+{
|
||||
+ PUSH_LINKHDR(cstate, DLT_EN10MB, cstate->off_linkpl.is_variable,
|
||||
+ cstate->off_linkpl.constant_part + cstate->off_nl + offset,
|
||||
+ cstate->off_linkpl.reg);
|
||||
+
|
||||
+ cstate->off_linktype.constant_part += cstate->off_linkhdr.constant_part;
|
||||
+ cstate->off_linkpl.constant_part += cstate->off_linkhdr.constant_part;
|
||||
+
|
||||
+ cstate->off_nl = 0;
|
||||
+ cstate->off_nl_nosnap = 0; /* no 802.2 LLC */
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+gen_batadv_offsets_v14(compiler_state_t *cstate, bpf_u_int32 type)
|
||||
+{
|
||||
+ size_t offset;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case BATADV_LEGACY_UNICAST: /* 0x03 */
|
||||
+ offset = sizeof(struct batadv_legacy_unicast_packet);
|
||||
+ break;
|
||||
+ case BATADV_LEGACY_BCAST: /* 0x04 */
|
||||
+ offset = sizeof(struct batadv_legacy_bcast_packet);
|
||||
+ break;
|
||||
+ case BATADV_LEGACY_UNICAST_FRAG: /* 0x06 */
|
||||
+ offset = sizeof(struct batadv_legacy_unicast_frag_packet);
|
||||
+ break;
|
||||
+ case BATADV_LEGACY_UNICAST_4ADDR: /* 0x09 */
|
||||
+ offset = sizeof(struct batadv_legacy_unicast_4addr_packet);
|
||||
+ break;
|
||||
+ case BATADV_LEGACY_CODED: /* 0x0a */
|
||||
+ offset = sizeof(struct batadv_legacy_coded_packet);
|
||||
+ break;
|
||||
+ default:
|
||||
+ offset = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (offset)
|
||||
+ gen_batadv_push_offset(cstate, (u_int)offset);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+gen_batadv_offsets_v15(compiler_state_t *cstate, bpf_u_int32 type)
|
||||
+{
|
||||
+ size_t offset;
|
||||
+
|
||||
+ switch (type) {
|
||||
+ case BATADV_BCAST: /* 0x01 */
|
||||
+ offset = sizeof(struct batadv_bcast_packet);
|
||||
+ break;
|
||||
+ case BATADV_CODED: /* 0x02 */
|
||||
+ offset = sizeof(struct batadv_coded_packet);
|
||||
+ break;
|
||||
+ case BATADV_UNICAST: /* 0x40 */
|
||||
+ offset = sizeof(struct batadv_unicast_packet);
|
||||
+ break;
|
||||
+ case BATADV_UNICAST_FRAG: /* 0x41 */
|
||||
+ offset = sizeof(struct batadv_frag_packet);
|
||||
+ break;
|
||||
+ case BATADV_UNICAST_4ADDR: /* 0x42 */
|
||||
+ offset = sizeof(struct batadv_unicast_4addr_packet);
|
||||
+ break;
|
||||
+ case BATADV_UNICAST_TVLV:
|
||||
+ /* unsupported for now, needs variable offset to
|
||||
+ * take tvlv_len into account
|
||||
+ */
|
||||
+ /* fall through */
|
||||
+ default:
|
||||
+ offset = 0;
|
||||
+ }
|
||||
+
|
||||
+ if (offset)
|
||||
+ gen_batadv_push_offset(cstate, (u_int)offset);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+gen_batadv_offsets(compiler_state_t *cstate, bpf_u_int32 version, bpf_u_int32 type)
|
||||
+{
|
||||
+ switch (version) {
|
||||
+ case 14:
|
||||
+ gen_batadv_offsets_v14(cstate, type);
|
||||
+ break;
|
||||
+ case 15:
|
||||
+ gen_batadv_offsets_v15(cstate, type);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+struct block *
|
||||
+gen_batadv(compiler_state_t *cstate, bpf_u_int32 version, int has_version,
|
||||
+ bpf_u_int32 type, int has_type)
|
||||
+{
|
||||
+ struct block *b0;
|
||||
+
|
||||
+ /*
|
||||
+ * Catch errors reported by us and routines below us, and return NULL
|
||||
+ * on an error.
|
||||
+ */
|
||||
+ if (setjmp(cstate->top_ctx))
|
||||
+ return (NULL);
|
||||
+
|
||||
+ b0 = gen_linktype(cstate, ETHERTYPE_BATMAN);
|
||||
+
|
||||
+ if (has_version)
|
||||
+ b0 = gen_batadv_check_version(cstate, b0, version);
|
||||
+
|
||||
+ if (has_type) {
|
||||
+ b0 = gen_batadv_check_type(cstate, b0, version, type);
|
||||
+ gen_batadv_offsets(cstate, version, type);
|
||||
+ }
|
||||
+
|
||||
+ return b0;
|
||||
+}
|
||||
+
|
||||
/* Check that the encapsulated frame has a link layer header
|
||||
* for Ethernet filters. */
|
||||
static struct block *
|
||||
--- a/gencode.h
|
||||
+++ b/gencode.h
|
||||
@@ -358,6 +358,9 @@ struct block *gen_pppoes(compiler_state_
|
||||
|
||||
struct block *gen_geneve(compiler_state_t *, bpf_u_int32, int);
|
||||
|
||||
+struct block *gen_batadv(compiler_state_t *, bpf_u_int32, int,
|
||||
+ bpf_u_int32, int);
|
||||
+
|
||||
struct block *gen_atmfield_code(compiler_state_t *, int, bpf_u_int32,
|
||||
int, int);
|
||||
struct block *gen_atmtype_abbrev(compiler_state_t *, int);
|
||||
--- a/grammar.y.in
|
||||
+++ b/grammar.y.in
|
||||
@@ -375,6 +375,7 @@ DIAG_OFF_BISON_BYACC
|
||||
%type <i> mtp2type
|
||||
%type <blk> mtp3field
|
||||
%type <blk> mtp3fieldvalue mtp3value mtp3listvalue
|
||||
+%type <rblk> pbatadv
|
||||
|
||||
|
||||
%token DST SRC HOST GATEWAY
|
||||
@@ -393,7 +394,7 @@ DIAG_OFF_BISON_BYACC
|
||||
%token LEN
|
||||
%token IPV6 ICMPV6 AH ESP
|
||||
%token VLAN MPLS
|
||||
-%token PPPOED PPPOES GENEVE
|
||||
+%token PPPOED PPPOES GENEVE BATADV
|
||||
%token ISO ESIS CLNP ISIS L1 L2 IIH LSP SNP CSNP PSNP
|
||||
%token STP
|
||||
%token IPX
|
||||
@@ -620,11 +621,40 @@ other: pqual TK_BROADCAST { CHECK_PTR_
|
||||
| PPPOES { CHECK_PTR_VAL(($$ = gen_pppoes(cstate, 0, 0))); }
|
||||
| GENEVE pnum { CHECK_PTR_VAL(($$ = gen_geneve(cstate, $2, 1))); }
|
||||
| GENEVE { CHECK_PTR_VAL(($$ = gen_geneve(cstate, 0, 0))); }
|
||||
+ | BATADV pbatadv { $$ = $2; }
|
||||
| pfvar { $$ = $1; }
|
||||
| pqual p80211 { $$ = $2; }
|
||||
| pllc { $$ = $1; }
|
||||
;
|
||||
|
||||
+pbatadv: { CHECK_PTR_VAL(($$ = gen_batadv(cstate, 0, 0, 0, 0))); }
|
||||
+ | pnum { CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, 0, 0))); }
|
||||
+ | pnum pnum { CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, $2, 1))); }
|
||||
+ | pnum ID
|
||||
+ {
|
||||
+ int type;
|
||||
+
|
||||
+ switch ($1) {
|
||||
+ case 14:
|
||||
+ type = pcap_nametobatadvtype_v14($2);
|
||||
+ break;
|
||||
+ case 15:
|
||||
+ type = pcap_nametobatadvtype_v15($2);
|
||||
+ break;
|
||||
+ default:
|
||||
+ bpf_set_error(cstate, "batman-adv compatibility version number %u unsupported", $1);
|
||||
+ YYABORT;
|
||||
+ }
|
||||
+
|
||||
+ if (type == PROTO_UNDEF) {
|
||||
+ bpf_set_error(cstate, "invalid batman-adv packet type value \"%s\"", $2);
|
||||
+ YYABORT;
|
||||
+ }
|
||||
+
|
||||
+ CHECK_PTR_VAL(($$ = gen_batadv(cstate, $1, 1, type, 1)));
|
||||
+ }
|
||||
+ ;
|
||||
+
|
||||
pfvar: PF_IFNAME ID { CHECK_PTR_VAL($2); CHECK_PTR_VAL(($$ = gen_pf_ifname(cstate, $2))); }
|
||||
| PF_RSET ID { CHECK_PTR_VAL($2); CHECK_PTR_VAL(($$ = gen_pf_ruleset(cstate, $2))); }
|
||||
| PF_RNR NUM { CHECK_PTR_VAL(($$ = gen_pf_rnr(cstate, $2))); }
|
||||
--- a/nametoaddr.c
|
||||
+++ b/nametoaddr.c
|
||||
@@ -136,8 +136,12 @@
|
||||
|
||||
#include "diag-control.h"
|
||||
|
||||
+#include "batadv_packet.h"
|
||||
+#include "batadv_legacy_packet.h"
|
||||
+
|
||||
#include "gencode.h"
|
||||
#include <pcap/namedb.h>
|
||||
+
|
||||
#include "nametoaddr.h"
|
||||
|
||||
#ifdef HAVE_OS_PROTO_H
|
||||
@@ -604,6 +608,7 @@ PCAP_API_DEF struct eproto eproto_db[] =
|
||||
{ "moprc", ETHERTYPE_MOPRC },
|
||||
{ "rarp", ETHERTYPE_REVARP },
|
||||
{ "sca", ETHERTYPE_SCA },
|
||||
+ { "batadv", ETHERTYPE_BATMAN },
|
||||
{ (char *)0, 0 }
|
||||
};
|
||||
|
||||
@@ -638,6 +643,60 @@ pcap_nametollc(const char *s)
|
||||
|
||||
while (p->s != 0) {
|
||||
if (strcmp(p->s, s) == 0)
|
||||
+ return p->p;
|
||||
+ p += 1;
|
||||
+ }
|
||||
+ return PROTO_UNDEF;
|
||||
+}
|
||||
+
|
||||
+/* Static data base of batman-adv v14 packet type values. */
|
||||
+static struct eproto batadv_type_db_v14[] = {
|
||||
+ { "iv_ogm", BATADV_LEGACY_IV_OGM },
|
||||
+ { "icmp", BATADV_LEGACY_ICMP },
|
||||
+ { "unicast", BATADV_LEGACY_UNICAST },
|
||||
+ { "bcast", BATADV_LEGACY_BCAST },
|
||||
+ { "vis", BATADV_LEGACY_VIS },
|
||||
+ { "unicast_frag", BATADV_LEGACY_UNICAST_FRAG },
|
||||
+ { "tt_query", BATADV_LEGACY_TT_QUERY },
|
||||
+ { "roam_adv", BATADV_LEGACY_ROAM_ADV },
|
||||
+ { "unicast_4addr", BATADV_LEGACY_UNICAST_4ADDR },
|
||||
+ { "coded", BATADV_LEGACY_CODED },
|
||||
+ { (char *)0, 0 }
|
||||
+};
|
||||
+
|
||||
+int pcap_nametobatadvtype_v14(const char *s)
|
||||
+{
|
||||
+ struct eproto *p = batadv_type_db_v14;
|
||||
+
|
||||
+ while (p->s != 0) {
|
||||
+ if (strcmp(p->s, s) == 0)
|
||||
+ return p->p;
|
||||
+ p += 1;
|
||||
+ }
|
||||
+ return PROTO_UNDEF;
|
||||
+}
|
||||
+
|
||||
+/* Static data base of batman-adv v15 packet type values. */
|
||||
+static struct eproto batadv_type_db_v15[] = {
|
||||
+ { "iv_ogm", BATADV_IV_OGM },
|
||||
+ { "bcast", BATADV_BCAST },
|
||||
+ { "coded", BATADV_CODED },
|
||||
+ { "elp", BATADV_ELP },
|
||||
+ { "ogm2", BATADV_OGM2 },
|
||||
+ { "unicast", BATADV_UNICAST },
|
||||
+ { "unicast_frag", BATADV_UNICAST_FRAG },
|
||||
+ { "unicast_4addr", BATADV_UNICAST_4ADDR },
|
||||
+ { "icmp", BATADV_ICMP },
|
||||
+ { "unicast_tvlv", BATADV_UNICAST_TVLV },
|
||||
+ { (char *)0, 0 }
|
||||
+};
|
||||
+
|
||||
+int pcap_nametobatadvtype_v15(const char *s)
|
||||
+{
|
||||
+ struct eproto *p = batadv_type_db_v15;
|
||||
+
|
||||
+ while (p->s != 0) {
|
||||
+ if (strcmp(p->s, s) == 0)
|
||||
return p->p;
|
||||
p += 1;
|
||||
}
|
||||
--- a/pcap-filter.manmisc.in
|
||||
+++ b/pcap-filter.manmisc.in
|
||||
@@ -98,6 +98,7 @@ protocols are:
|
||||
.BR arp ,
|
||||
.BR rarp ,
|
||||
.BR decnet ,
|
||||
+.BR batadv ,
|
||||
.BR sctp ,
|
||||
.B tcp
|
||||
and
|
||||
@@ -400,7 +401,7 @@ True if the packet is an IPv6 multicast
|
||||
.IP "\fBether proto \fIprotocol\fR"
|
||||
True if the packet is of ether type \fIprotocol\fR.
|
||||
\fIProtocol\fP can be a number or one of the names
|
||||
-\fBaarp\fP, \fBarp\fP, \fBatalk\fP, \fBdecnet\fP, \fBip\fP, \fBip6\fP,
|
||||
+\fBaarp\fP, \fBarp\fP, \fBatalk\fP, \fBbatadv\fP, \fBdecnet\fP, \fBip\fP, \fBip6\fP,
|
||||
\fBipx\fP, \fBiso\fP, \fBlat\fP, \fBloopback\fP, \fBmopdl\fP, \fBmoprc\fP, \fBnetbeui\fP,
|
||||
\fBrarp\fP, \fBsca\fP or \fBstp\fP.
|
||||
Note these identifiers (except \fBloopback\fP) are also keywords
|
||||
@@ -454,7 +455,7 @@ the filter checks for the IPX etype in a
|
||||
DSAP in the LLC header, the 802.3-with-no-LLC-header encapsulation of
|
||||
IPX, and the IPX etype in a SNAP frame.
|
||||
.RE
|
||||
-.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP"
|
||||
+.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fBnetbeui\fP, \fBbatadv\fP"
|
||||
Abbreviations for:
|
||||
.in +.5i
|
||||
.nf
|
||||
@@ -792,6 +793,36 @@ For example:
|
||||
filters IPv4 protocol encapsulated in Geneve with VNI 0xb. This will
|
||||
match both IPv4 directly encapsulated in Geneve as well as IPv4 contained
|
||||
inside an Ethernet frame.
|
||||
+.IP "\fBbatadv \fI[version] \fI[type]\fR"
|
||||
+True if the packet is a B.A.T.M.A.N. Advanced packet (Ethernet type 0x4305).
|
||||
+If the optional \fIversion\fR is specified, only true if the packet has the
|
||||
+specified batman-adv compatibility \fIversion\fR. If the optional \fIversion\fR
|
||||
+and \fItype\fR are specified, only true if the packet has both the specified
|
||||
+batman-adv compatibility \fIversion\fR and batman-adv packet \fItype\fR.
|
||||
+.IP
|
||||
+\fIversion\fR may be a number from 0 to 255, though only compatibility version
|
||||
+14 and 15 were actually deployed in the wild. Version 15 is the current version,
|
||||
+14 is considered deprecated.
|
||||
+.IP
|
||||
+\fItype\fR is currently only defined for compatibility \fIversion\fR 14 and 15.
|
||||
+\fItype\fR may be a number from 0 to 255 for compatibility \fIversion\fR 14 and 15.
|
||||
+.IP
|
||||
+The following packet \fItype\fR aliases are available for compat \fIversion\fR 14:
|
||||
+\fBiv_ogm\fP, \fBicmp\fP, \fBunicast\fP, \fBbcast\fP, \fBvis\fP, \fBunicast-frag\fP,
|
||||
+\fBtt_query\fP, \fBroam_adv\fP, \fBunicast_4addr\fP, \fPcoded\fP.
|
||||
+.IP
|
||||
+The following packet \fItype\fR aliases are available for compat \fIversion\fR 15:
|
||||
+\fBiv_ogm\fP, \fBbcast\fP, \fBcoded\fP, \fBelp\fP, \fBogm2\fP, \fBunicast\fP,
|
||||
+\fBunicast_frag\fP, \fBunicast_4addr\fP, \fBicmp\fP, \fPunicast_tvlv\fP.
|
||||
+.IP
|
||||
+Note that when the \fBbatadv\fR keyword is encountered in an expression and
|
||||
+a batman-adv packet \fItype\fR is provided which specifies an encapsulating
|
||||
+packet type then it changes the decoding offsets for the remainder of the
|
||||
+expression on the assumption that the packet is a batman-adv packet. For compat
|
||||
+\fIversion\fR 14 these are packet \fItype\fRs \fBunicast\fP, \fBbcast\fP,
|
||||
+\fBunicast_frag\fP, \fBunicast_4addr\fP and \fBcoded\fP. For compat \fIversion\fR
|
||||
+15 these are currently packet \fItype\fRs \fBbcast\fP, \fBcoded\fP, \fBunicast\fP,
|
||||
+\fBunicast_frag\fP and \fBunicast_4addr\fP.
|
||||
.IP "\fBiso proto \fIprotocol\fR"
|
||||
True if the packet is an OSI packet of protocol type \fIprotocol\fP.
|
||||
\fIProtocol\fP can be a number or one of the names
|
||||
--- a/pcap/namedb.h
|
||||
+++ b/pcap/namedb.h
|
||||
@@ -70,6 +70,8 @@ PCAP_API int pcap_nametoportrange(const
|
||||
PCAP_API int pcap_nametoproto(const char *);
|
||||
PCAP_API int pcap_nametoeproto(const char *);
|
||||
PCAP_API int pcap_nametollc(const char *);
|
||||
+PCAP_API int pcap_nametobatadvtype_v14(const char *);
|
||||
+PCAP_API int pcap_nametobatadvtype_v15(const char *);
|
||||
/*
|
||||
* If a protocol is unknown, PROTO_UNDEF is returned.
|
||||
* Also, pcap_nametoport() returns the protocol along with the port number.
|
||||
--- a/scanner.l
|
||||
+++ b/scanner.l
|
||||
@@ -347,6 +347,7 @@ mpls return MPLS;
|
||||
pppoed return PPPOED;
|
||||
pppoes return PPPOES;
|
||||
geneve return GENEVE;
|
||||
+batadv return BATADV;
|
||||
|
||||
lane return LANE;
|
||||
llc return LLC;
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtraceevent
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_VERSION:=1.7.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/snapshot/
|
||||
PKG_HASH:=3e902184f743c955b183b45f25ea163a3d41c9f287fdcfc95cd9cca748c563c8
|
||||
PKG_HASH:=17b7131c106793c3b45477445bd32d295170c4245ed8348e03c17296e53009e1
|
||||
|
||||
PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libtracefs
|
||||
PKG_VERSION:=1.6.3
|
||||
PKG_VERSION:=1.6.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/
|
||||
PKG_HASH:=de307faaa54ac52cf0ce3ff19b32b51af24897e3440e643068ac82d31e197e92
|
||||
PKG_HASH:=52ce793dbb35a3e59bddce31de09a5d92cedd4d0702e64d0916f1ccdb00526c9
|
||||
|
||||
PKG_MAINTAINER:=Nick Hainke <vincent@systemli.org>
|
||||
|
||||
|
@ -130,13 +130,6 @@ CMAKE_OPTIONS += \
|
||||
-DENABLE_TESTING:Bool=OFF \
|
||||
-DENABLE_PROGRAMS:Bool=ON
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default)
|
||||
|
||||
sed -i '/fuzz/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt
|
||||
sed -i '/test/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
|
||||
|
15
package/libs/mbedtls/patches/101-remove-test.patch
Normal file
15
package/libs/mbedtls/patches/101-remove-test.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/programs/CMakeLists.txt
|
||||
+++ b/programs/CMakeLists.txt
|
||||
@@ -1,12 +1,8 @@
|
||||
add_subdirectory(aes)
|
||||
-if (NOT WIN32)
|
||||
- add_subdirectory(fuzz)
|
||||
-endif()
|
||||
add_subdirectory(hash)
|
||||
add_subdirectory(pkey)
|
||||
add_subdirectory(psa)
|
||||
add_subdirectory(random)
|
||||
add_subdirectory(ssl)
|
||||
-add_subdirectory(test)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(x509)
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ncurses
|
||||
PKG_CPE_ID:=cpe:/a:gnu:ncurses
|
||||
PKG_VERSION:=6.3
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=6.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
||||
PKG_HASH:=97fc51ac2b085d4cde31ef4d2c3122c21abc217e9090a43a30fc5ec21684e059
|
||||
PKG_HASH:=6931283d9ac87c5073f30b6290c4c75f21632bb4fc3603ac8100812bed248159
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=README
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/misc/terminfo.src
|
||||
+++ b/misc/terminfo.src
|
||||
@@ -6616,6 +6616,172 @@ rxvt-cygwin-native|rxvt terminal emulato
|
||||
@@ -6886,6 +6886,172 @@ rxvt-cygwin-native|rxvt terminal emulato
|
||||
rxvt-16color|rxvt with 16 colors like aixterm,
|
||||
ncv#32, use=ibm+16color, use=rxvt,
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
--- a/misc/terminfo.src
|
||||
+++ b/misc/terminfo.src
|
||||
@@ -4815,6 +4815,7 @@ xterm+nofkeys|building block for xterm f
|
||||
# This version reflects the current xterm features.
|
||||
xterm-new|modern xterm terminal emulator,
|
||||
@@ -4984,6 +4984,7 @@ xterm-xfree86|xterm terminal emulator (X
|
||||
|
||||
xterm+nofkeys|building block for xterm fkey-variants,
|
||||
npc,
|
||||
+ kbs=\177,
|
||||
kcbt=\E[Z, kent=\EOM, nel=\EE, use=ecma+index,
|
||||
use=ansi+rep, use=ecma+strikeout, use=xterm+pcfkeys,
|
||||
use=xterm+nofkeys,
|
||||
@@ -6416,6 +6417,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
|
||||
use=ansi+rep, use=ecma+strikeout, use=vt420+lrmm,
|
||||
use=xterm+sm+1006, use=xterm+tmux, use=ecma+italics,
|
||||
@@ -6689,6 +6690,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
|
||||
rxvt-basic|rxvt terminal base (X Window System),
|
||||
OTbs, am, bce, eo, mir, msgr, xenl, xon, XT,
|
||||
cols#80, it#8, lines#24,
|
||||
@ -16,24 +16,24 @@
|
||||
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
|
||||
bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[2J, cr=\r,
|
||||
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
|
||||
@@ -6425,7 +6427,7 @@ rxvt-basic|rxvt terminal base (X Window
|
||||
@@ -6698,7 +6700,7 @@ rxvt-basic|rxvt terminal base (X Window
|
||||
enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H,
|
||||
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
|
||||
ind=\n, is1=\E[?47l\E=\E[?1l,
|
||||
- is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H,
|
||||
+ is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
|
||||
kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
|
||||
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m,
|
||||
rmul=\E[24m,
|
||||
@@ -8060,6 +8062,7 @@ dumb-emacs-ansi|Emacs dumb terminal with
|
||||
screen|VT 100/ANSI X3.64 virtual terminal,
|
||||
rmir=\E[4l, rmkx=\E>, rmso=\E[27m, rmul=\E[24m,
|
||||
rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
|
||||
@@ -8347,6 +8349,7 @@ dumb-emacs-ansi|Emacs dumb terminal with
|
||||
screen-base|VT 100/ANSI X3.64 virtual terminal (base),
|
||||
OTbs, OTpt, am, km, mir, msgr, xenl, G0,
|
||||
colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1,
|
||||
+ kbs=\177,
|
||||
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy
|
||||
yzz{{||}}~~,
|
||||
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
|
||||
@@ -8071,7 +8074,7 @@ screen|VT 100/ANSI X3.64 virtual termina
|
||||
@@ -8358,7 +8361,7 @@ screen-base|VT 100/ANSI X3.64 virtual te
|
||||
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
|
||||
enacs=\E(B\E)0, flash=\Eg, home=\E[H, hpa=\E[%i%p1%dG,
|
||||
ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
|
||||
@ -42,7 +42,7 @@
|
||||
kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kf1=\EOP,
|
||||
kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\EOQ, kf3=\EOR,
|
||||
kf4=\EOS, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
|
||||
@@ -8199,6 +8202,7 @@ screen.xterm-r6|screen customized for X1
|
||||
@@ -8500,6 +8503,7 @@ screen.xterm-r6|screen customized for X1
|
||||
# on Solaris because Sun's curses implementation gets confused.
|
||||
screen.teraterm|disable ncv in teraterm,
|
||||
ncv#127,
|
||||
|
@ -15,7 +15,7 @@ Subject: [PATCH] ncurses 5.9 - patch 20141206
|
||||
|
||||
--- a/ncurses/base/MKlib_gen.sh
|
||||
+++ b/ncurses/base/MKlib_gen.sh
|
||||
@@ -511,11 +511,22 @@ sed -n -f $ED1 \
|
||||
@@ -512,11 +512,22 @@ sed -n -f $ED1 \
|
||||
-e 's/gen_$//' \
|
||||
-e 's/ / /g' >>$TMP
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -505,7 +505,7 @@ AC_CACHE_CHECK(for options to update arc
|
||||
@@ -523,7 +523,7 @@ AC_CACHE_CHECK(for options to update arc
|
||||
;;
|
||||
(*)
|
||||
cf_cv_ar_flags=unknown
|
||||
@ -11,7 +11,7 @@
|
||||
# check if $ARFLAGS already contains this choice
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5072,7 +5072,7 @@ else
|
||||
@@ -5110,7 +5110,7 @@ else
|
||||
;;
|
||||
(*)
|
||||
cf_cv_ar_flags=unknown
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/misc/terminfo.src
|
||||
+++ b/misc/terminfo.src
|
||||
@@ -6240,12 +6240,11 @@ konsole-xf3x|KDE console window with key
|
||||
@@ -6514,12 +6514,11 @@ konsole-xf3x|KDE console window with key
|
||||
# The value for kbs (see konsole-vt100) reflects local customization rather
|
||||
# than the settings used for XFree86 xterm.
|
||||
konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
|
||||
|
52
package/libs/openssl/patches/010-padlock.patch
Normal file
52
package/libs/openssl/patches/010-padlock.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 2bcf8e69bd92e33d84c48e7d108d3d46b22f8a6d Mon Sep 17 00:00:00 2001
|
||||
From: ValdikSS <iam@valdikss.org.ru>
|
||||
Date: Wed, 18 Jan 2023 20:14:48 +0300
|
||||
Subject: [PATCH] Padlock: fix byte swapping assembly for AES-192 and 256
|
||||
|
||||
Byte swapping code incorrectly uses the number of AES rounds to swap expanded
|
||||
AES key, while swapping only a single dword in a loop, resulting in swapped
|
||||
key and partially swapped expanded keys, breaking AES encryption and
|
||||
decryption on VIA Padlock hardware.
|
||||
|
||||
This commit correctly sets the number of swapping loops to be done.
|
||||
|
||||
Fixes #20073
|
||||
|
||||
CLA: trivial
|
||||
|
||||
Reviewed-by: Hugo Landau <hlandau@openssl.org>
|
||||
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
||||
(Merged from https://github.com/openssl/openssl/pull/20077)
|
||||
|
||||
(cherry picked from commit 7331e7ef79fe4499d81cc92249e9c97e9ff9291a)
|
||||
---
|
||||
engines/asm/e_padlock-x86.pl | 2 ++
|
||||
engines/asm/e_padlock-x86_64.pl | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/engines/asm/e_padlock-x86.pl b/engines/asm/e_padlock-x86.pl
|
||||
index 5b097ce3ef9b..07f7000fd38a 100644
|
||||
--- a/engines/asm/e_padlock-x86.pl
|
||||
+++ b/engines/asm/e_padlock-x86.pl
|
||||
@@ -116,6 +116,8 @@
|
||||
&function_begin_B("padlock_key_bswap");
|
||||
&mov ("edx",&wparam(0));
|
||||
&mov ("ecx",&DWP(240,"edx"));
|
||||
+ &inc ("ecx");
|
||||
+ &shl ("ecx",2);
|
||||
&set_label("bswap_loop");
|
||||
&mov ("eax",&DWP(0,"edx"));
|
||||
&bswap ("eax");
|
||||
diff --git a/engines/asm/e_padlock-x86_64.pl b/engines/asm/e_padlock-x86_64.pl
|
||||
index 09b0aaa48dfe..dfd2ae656375 100644
|
||||
--- a/engines/asm/e_padlock-x86_64.pl
|
||||
+++ b/engines/asm/e_padlock-x86_64.pl
|
||||
@@ -92,6 +92,8 @@
|
||||
.align 16
|
||||
padlock_key_bswap:
|
||||
mov 240($arg1),%edx
|
||||
+ inc %edx
|
||||
+ shl \$2,%edx
|
||||
.Lbswap_loop:
|
||||
mov ($arg1),%eax
|
||||
bswap %eax
|
@ -8,15 +8,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lldpd
|
||||
PKG_VERSION:=1.0.9
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=1.0.16
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://media.luffy.cx/files/lldpd
|
||||
PKG_HASH:=6b64eb3125952b1e33472198b054e8aa0dee45f45d3d4be22789090a474949f5
|
||||
PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/
|
||||
PKG_HASH:=7753c6e31e938923185f4e10c4ab328929729e22ee4a9687d08881fb82c092ee
|
||||
|
||||
PKG_MAINTAINER:=Stijn Tintel <stijn@linux-ipv6.be>
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_CPE_ID:=cpe:/a:lldpd_project:lldpd
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -56,6 +56,10 @@ write_lldpd_conf()
|
||||
[ -e $LLDPD_CONFS_DIR ] || ln -s /etc/lldpd.d $LLDPD_CONFS_DIR
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "lldpd"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
|
||||
local enable_cdp
|
||||
@ -84,8 +88,7 @@ start_service() {
|
||||
write_lldpd_conf
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/lldpd
|
||||
procd_append_param command -d # don't daemonize, procd will handle that for us
|
||||
procd_set_param command /usr/sbin/lldpd -d
|
||||
|
||||
[ $enable_cdp -gt 0 ] && procd_append_param command '-c'
|
||||
[ $enable_fdp -gt 0 ] && procd_append_param command '-f'
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 3a3a2f6be704c970938eb8dac4eb0118f1c2fb06 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Wed, 21 Dec 2022 23:26:28 +0100
|
||||
Subject: [PATCH iproute2 v2] configure: Remove include <sys/stat.h>
|
||||
|
||||
The check_name_to_handle_at() function in the configure script is
|
||||
including sys/stat.h. This include fails with glibc 2.36 like this:
|
||||
````
|
||||
In file included from /linux-5.15.84/include/uapi/linux/stat.h:5,
|
||||
from /toolchain-x86_64_gcc-12.2.0_glibc/include/bits/statx.h:31,
|
||||
from /toolchain-x86_64_gcc-12.2.0_glibc/include/sys/stat.h:465,
|
||||
from config.YExfMc/name_to_handle_at_test.c:3:
|
||||
/linux-5.15.84/include/uapi/linux/types.h:10:2: warning: #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders" [-Wcpp]
|
||||
10 | #warning "Attempt to use kernel headers from user space, see https://kernelnewbies.org/KernelHeaders"
|
||||
| ^~~~~~~
|
||||
In file included from /linux-5.15.84/include/uapi/linux/posix_types.h:5,
|
||||
from /linux-5.15.84/include/uapi/linux/types.h:14:
|
||||
/linux-5.15.84/include/uapi/linux/stddef.h:5:10: fatal error: linux/compiler_types.h: No such file or directory
|
||||
5 | #include <linux/compiler_types.h>
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~
|
||||
compilation terminated.
|
||||
````
|
||||
|
||||
Just removing the include works, the manpage of name_to_handle_at() says
|
||||
only fcntl.h is needed.
|
||||
|
||||
Fixes: c5b72cc56bf8 ("lib/fs: fix issue when {name,open}_to_handle_at() is not implemented")
|
||||
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
configure | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -215,7 +215,6 @@ check_name_to_handle_at()
|
||||
cat >$TMPDIR/name_to_handle_at_test.c <<EOF
|
||||
#define _GNU_SOURCE
|
||||
#include <sys/types.h>
|
||||
-#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ipset
|
||||
PKG_VERSION:=7.16
|
||||
PKG_VERSION:=7.17
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://ipset.netfilter.org
|
||||
PKG_HASH:=87b1d9cdf4a1de3d1d0671e7da33e111eb65087e65ad75268b22bf13f0f296d0
|
||||
PKG_HASH:=be49c9ff489dd6610cad6541e743c3384eac96e9f24707da7b3929d8f2ac64d8
|
||||
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nftables
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=1.0.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files
|
||||
PKG_HASH:=8d1b4b18393af43698d10baa25d2b9b6397969beecac7816c35dd0714e4de50a
|
||||
PKG_HASH:=2407430ddd82987670e48dc2fda9e280baa8307abec04ab18d609df3db005e4c
|
||||
|
||||
PKG_MAINTAINER:=
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -1,23 +0,0 @@
|
||||
'rule inet dscpclassify dscp_match meta l4proto { udp } th dport { 3478 } th sport { 3478-3497, 16384-16387 } goto ct_set_ef'
|
||||
works with 'nft add', but not 'nft insert', the latter yields: "BUG: unhandled op 4".
|
||||
|
||||
Fixes: 81e36530fcac ("src: replace interval segment tree overlap and automerge")
|
||||
Signed-off-by: Florian Westphal <fw@strlen.de>
|
||||
---
|
||||
src/evaluate.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/evaluate.c b/src/evaluate.c
|
||||
index d9c9ca28a53a..edebd7bcd8ab 100644
|
||||
--- a/src/evaluate.c
|
||||
+++ b/src/evaluate.c
|
||||
@@ -1520,6 +1520,7 @@ static int interval_set_eval(struct eval_ctx *ctx, struct set *set,
|
||||
switch (ctx->cmd->op) {
|
||||
case CMD_CREATE:
|
||||
case CMD_ADD:
|
||||
+ case CMD_INSERT:
|
||||
if (set->automerge) {
|
||||
ret = set_automerge(ctx->msgs, ctx->cmd, set, init,
|
||||
ctx->nft->debug_mask);
|
||||
--
|
||||
2.35.1
|
@ -32,7 +32,11 @@ define Package/uqmi/description
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include -ffunction-sections -fdata-sections
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-ffunction-sections \
|
||||
-fdata-sections \
|
||||
-Wno-error=dangling-pointer \
|
||||
-Wno-error=maybe-uninitialized
|
||||
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections
|
||||
|
||||
|
@ -29,7 +29,7 @@ Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
ifeq ($(KVER), 3.4.0)
|
||||
OS_VER=3_4
|
||||
endif
|
||||
@@ -123,7 +127,7 @@ endif
|
||||
@@ -123,7 +131,7 @@ endif
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/app/nathelper/linux/lib/nat_helper_dt.c
|
||||
+++ b/app/nathelper/linux/lib/nat_helper_dt.c
|
||||
@@ -721,7 +721,7 @@ napt_ct_counter_sync(a_uint32_t hw_index)
|
||||
@@ -721,7 +721,7 @@ napt_ct_counter_sync(a_uint32_t hw_index
|
||||
}
|
||||
|
||||
if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) {
|
||||
@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
if((cct != NULL) && (napt_hw_get_by_index(&napt, hw_index) == 0))
|
||||
@@ -770,7 +770,7 @@ napt_ct_timer_update(a_uint32_t hw_index)
|
||||
@@ -770,7 +770,7 @@ napt_ct_timer_update(a_uint32_t hw_index
|
||||
}
|
||||
|
||||
if (!test_bit(IPS_FIXED_TIMEOUT_BIT, &ct->status)) {
|
||||
@ -32,7 +32,7 @@
|
||||
}
|
||||
|
||||
int
|
||||
@@ -85,7 +80,7 @@ napt_ct_aging_is_enable(uint32_t ct_addr)
|
||||
@@ -85,7 +80,7 @@ napt_ct_aging_is_enable(uint32_t ct_addr
|
||||
|
||||
ct = (struct nf_conn *)ct_addr;
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
struct nf_conntrack_tuple_hash *h = NULL;
|
||||
struct nf_conn *ct = NULL;
|
||||
struct hlist_nulls_node *pos = (struct hlist_nulls_node *) (*iterate);
|
||||
@@ -349,7 +342,7 @@ napt_ct_list_iterate(uint32_t *hash, uint32_t *iterate)
|
||||
@@ -349,7 +342,7 @@ napt_ct_list_iterate(uint32_t *hash, uin
|
||||
if(pos == 0)
|
||||
{
|
||||
/*get head for list*/
|
||||
|
@ -0,0 +1,30 @@
|
||||
From ecd1e0c57fdf7f8916fa20f085e08bb4b6ba0396 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandru Gagniuc <mr.nuke.me@gmail.com>
|
||||
Date: Fri, 23 Sep 2022 08:21:13 -0500
|
||||
Subject: [PATCH 10/11] QSDK: config: Avoid -Werror heroics
|
||||
|
||||
Trying to compile the QSDK with warnings as errors is a very brave
|
||||
endeavor. It's also stupid as it doesn't work on ipq60xx:
|
||||
|
||||
isisc_acl_prv.h:99: error: "FIELD_GET" redefined [-Werror]
|
||||
99 | #define FIELD_GET(reg, field, val) \
|
||||
|
|
||||
|
||||
Instead of dealing with the braindead code, just disable Werror.
|
||||
|
||||
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
|
||||
---
|
||||
config | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/config
|
||||
+++ b/config
|
||||
@@ -132,7 +132,7 @@ endif
|
||||
|
||||
ifeq ($(ARCH), arm64)
|
||||
ifeq ($(KVER),$(filter 4.1% 4.4% 4.9% 5.4% 5.10% 5.15%,$(KVER)))
|
||||
- CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -Werror -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -mcmodel=large
|
||||
+ CPU_CFLAG= -DMODULE -Os -pipe -march=armv8-a -mcpu=cortex-a53+crypto -fno-caller-saves -fno-strict-aliasing -fno-common -Wno-format-security -Wno-pointer-sign -Wno-unused-but-set-variable -Wno-error=unused-result -Wno-error=maybe-uninitialized -Wno-error=array-bounds -mcmodel=large
|
||||
endif
|
||||
endif
|
||||
|
@ -10,8 +10,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
||||
include/ref/ref_uci.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/include/ref/ref_uci.h b/include/ref/ref_uci.h
|
||||
index a42ea153..0906c5ba 100755
|
||||
--- a/include/ref/ref_uci.h
|
||||
+++ b/include/ref/ref_uci.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@ -22,6 +20,3 @@ index a42ea153..0906c5ba 100755
|
||||
|
||||
#if defined(IN_SWCONFIG)
|
||||
int
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2014-2022 OpenWrt.org
|
||||
# Copyright (C) 2014-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fstools
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_MIRROR_HASH:=28be14a1e28fc62e80681e1b5e7f2435692ee326b66afcc1f3d158764df686d5
|
||||
PKG_SOURCE_DATE:=2022-11-10
|
||||
PKG_SOURCE_VERSION:=3affe9ea5098c8bb90111ce97d50ad976ef0c034
|
||||
PKG_MIRROR_HASH:=edda9151c73c1adfe369f5e315347344727a540ad57d3e2b41b9f57f9d4313fe
|
||||
PKG_SOURCE_DATE:=2023-01-22
|
||||
PKG_SOURCE_VERSION:=1ea5855e980cd88766dd9f615e78e7dd6edfbb74
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=procd
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_MIRROR_HASH:=d60b4aa9d47d75e906dfd812528a1bc28e91f5af72a9d9275056b71b19d99f04
|
||||
PKG_SOURCE_DATE:=2022-11-10
|
||||
PKG_SOURCE_VERSION:=039b88f75367203e540009cc97603b1bce3fafa6
|
||||
PKG_MIRROR_HASH:=75a92c01ef85f41dc7e0b77ac35f464fbe45942af02ca6847516c4ebf574c4a4
|
||||
PKG_SOURCE_DATE:=2023-01-16
|
||||
PKG_SOURCE_VERSION:=190f13a75e67e0bdb662188da79b8be31e0aae01
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=urngd
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
|
||||
|
@ -208,6 +208,15 @@ config BUSYBOX_DEFAULT_PASSWORD_MINLEN
|
||||
config BUSYBOX_DEFAULT_MD5_SMALL
|
||||
int
|
||||
default 1
|
||||
config BUSYBOX_DEFAULT_SHA1_SMALL
|
||||
int
|
||||
default 3
|
||||
config BUSYBOX_DEFAULT_SHA1_HWACCEL
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_SHA256_HWACCEL
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_SHA3_SMALL
|
||||
int
|
||||
default 1
|
||||
@ -298,6 +307,15 @@ config BUSYBOX_DEFAULT_UNICODE_NEUTRAL_TABLE
|
||||
config BUSYBOX_DEFAULT_UNICODE_PRESERVE_BROKEN
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_LOOP_CONFIGURE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_NO_LOOP_CONFIGURE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_TRY_LOOP_CONFIGURE
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_FEATURE_SEAMLESS_XZ
|
||||
bool
|
||||
default n
|
||||
@ -860,6 +878,9 @@ config BUSYBOX_DEFAULT_TRUNCATE
|
||||
bool
|
||||
default y if TARGET_bcm53xx
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_TSORT
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_TTY
|
||||
bool
|
||||
default n
|
||||
@ -2162,6 +2183,9 @@ config BUSYBOX_DEFAULT_RUNLEVEL
|
||||
config BUSYBOX_DEFAULT_RX
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_SEEDRNG
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_SETFATTR
|
||||
bool
|
||||
default n
|
||||
@ -2174,6 +2198,9 @@ config BUSYBOX_DEFAULT_STRINGS
|
||||
config BUSYBOX_DEFAULT_TIME
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_TREE
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_TS
|
||||
bool
|
||||
default n
|
||||
@ -2682,6 +2709,9 @@ config BUSYBOX_DEFAULT_FEATURE_UDHCPC_SANITIZEOPT
|
||||
config BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
|
||||
string
|
||||
default "/usr/share/udhcpc/default.script"
|
||||
config BUSYBOX_DEFAULT_UDHCPC6_DEFAULT_SCRIPT
|
||||
string
|
||||
default ""
|
||||
config BUSYBOX_DEFAULT_UDHCPC6
|
||||
bool
|
||||
default n
|
||||
@ -3012,6 +3042,9 @@ config BUSYBOX_DEFAULT_ASH_PRINTF
|
||||
config BUSYBOX_DEFAULT_ASH_TEST
|
||||
bool
|
||||
default y
|
||||
config BUSYBOX_DEFAULT_ASH_SLEEP
|
||||
bool
|
||||
default n
|
||||
config BUSYBOX_DEFAULT_ASH_HELP
|
||||
bool
|
||||
default n
|
||||
|
@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=busybox
|
||||
PKG_VERSION:=1.35.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=1.36.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_FLAGS:=essential
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://www.busybox.net/downloads \
|
||||
http://sources.buildroot.net
|
||||
PKG_HASH:=faeeb244c35a348a334f4a59e44626ee870fb07b6884d68c10ae8bc19f83a694
|
||||
PKG_HASH:=542750c8af7cb2630e201780b4f99f3dcceeb06f505b479ec68241c1e6af61a5
|
||||
|
||||
PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
@ -653,7 +653,7 @@ config BUSYBOX_CONFIG_SORT
|
||||
sort is used to sort lines of text in specified files.
|
||||
|
||||
config BUSYBOX_CONFIG_FEATURE_SORT_BIG
|
||||
bool "Full SuSv3 compliant sort (support -ktcbdfiogM)"
|
||||
bool "Full SuSv3 compliant sort (support -ktcbdfioghM)"
|
||||
default BUSYBOX_DEFAULT_FEATURE_SORT_BIG
|
||||
depends on BUSYBOX_CONFIG_SORT
|
||||
help
|
||||
@ -851,6 +851,11 @@ config BUSYBOX_CONFIG_TRUNCATE
|
||||
help
|
||||
truncate truncates files to a given size. If a file does
|
||||
not exist, it is created unless told otherwise.
|
||||
config BUSYBOX_CONFIG_TSORT
|
||||
bool "tsort (0.7 kb)"
|
||||
default BUSYBOX_DEFAULT_TSORT
|
||||
help
|
||||
tsort performs a topological sort.
|
||||
config BUSYBOX_CONFIG_TTY
|
||||
bool "tty (3.6 kb)"
|
||||
default BUSYBOX_DEFAULT_TTY
|
||||
|
@ -98,21 +98,47 @@ config BUSYBOX_CONFIG_MD5_SMALL
|
||||
default BUSYBOX_DEFAULT_MD5_SMALL # all "fast or small" options default to small
|
||||
range 0 3
|
||||
help
|
||||
Trade binary size versus speed for the md5sum algorithm.
|
||||
Trade binary size versus speed for the md5 algorithm.
|
||||
Approximate values running uClibc and hashing
|
||||
linux-2.4.4.tar.bz2 were:
|
||||
value user times (sec) text size (386)
|
||||
0 (fastest) 1.1 6144
|
||||
1 1.4 5392
|
||||
2 3.0 5088
|
||||
3 (smallest) 5.1 4912
|
||||
value user times (sec) text size (386)
|
||||
0 (fastest) 1.1 6144
|
||||
1 1.4 5392
|
||||
2 3.0 5088
|
||||
3 (smallest) 5.1 4912
|
||||
|
||||
config BUSYBOX_CONFIG_SHA1_SMALL
|
||||
int "SHA1: Trade bytes for speed (0:fast, 3:slow)"
|
||||
default BUSYBOX_DEFAULT_SHA1_SMALL # all "fast or small" options default to small
|
||||
range 0 3
|
||||
help
|
||||
Trade binary size versus speed for the sha1 algorithm.
|
||||
With FEATURE_COPYBUF_KB=64:
|
||||
throughput MB/s size of sha1_process_block64
|
||||
value 486 x86-64 486 x86-64
|
||||
0 440 485 3481 3502
|
||||
1 265 265 641 696
|
||||
2,3 220 210 342 364
|
||||
|
||||
config BUSYBOX_CONFIG_SHA1_HWACCEL
|
||||
bool "SHA1: Use hardware accelerated instructions if possible"
|
||||
default BUSYBOX_DEFAULT_SHA1_HWACCEL
|
||||
help
|
||||
On x86, this adds ~590 bytes of code. Throughput
|
||||
is about twice as fast as fully-unrolled generic code.
|
||||
|
||||
config BUSYBOX_CONFIG_SHA256_HWACCEL
|
||||
bool "SHA256: Use hardware accelerated instructions if possible"
|
||||
default BUSYBOX_DEFAULT_SHA256_HWACCEL
|
||||
help
|
||||
On x86, this adds ~1k bytes of code.
|
||||
|
||||
config BUSYBOX_CONFIG_SHA3_SMALL
|
||||
int "SHA3: Trade bytes for speed (0:fast, 1:slow)"
|
||||
default BUSYBOX_DEFAULT_SHA3_SMALL # all "fast or small" options default to small
|
||||
range 0 1
|
||||
help
|
||||
Trade binary size versus speed for the sha3sum algorithm.
|
||||
Trade binary size versus speed for the sha3 algorithm.
|
||||
SHA3_SMALL=0 compared to SHA3_SMALL=1 (approximate):
|
||||
64-bit x86: +270 bytes of code, 45% faster
|
||||
32-bit x86: +450 bytes of code, 75% faster
|
||||
@ -399,3 +425,25 @@ config BUSYBOX_CONFIG_UNICODE_PRESERVE_BROKEN
|
||||
For example, this means that entering 'l', 's', ' ', 0xff, [Enter]
|
||||
at shell prompt will list file named 0xff (single char name
|
||||
with char value 255), not file named '?'.
|
||||
|
||||
choice
|
||||
prompt "Use LOOP_CONFIGURE for losetup and loop mounts"
|
||||
default BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
|
||||
help
|
||||
LOOP_CONFIGURE is added to Linux 5.8
|
||||
https://lwn.net/Articles/820408/
|
||||
This allows userspace to completely setup a loop device with a single
|
||||
ioctl, removing the in-between state where the device can be partially
|
||||
configured - eg the loop device has a backing file associated with it,
|
||||
but is reading from the wrong offset.
|
||||
|
||||
config BUSYBOX_CONFIG_LOOP_CONFIGURE
|
||||
bool "use LOOP_CONFIGURE, needs kernel >= 5.8"
|
||||
|
||||
config BUSYBOX_CONFIG_NO_LOOP_CONFIGURE
|
||||
bool "use LOOP_SET_FD + LOOP_SET_STATUS"
|
||||
|
||||
config BUSYBOX_CONFIG_TRY_LOOP_CONFIGURE
|
||||
bool "try LOOP_CONFIGURE, fall back to LOOP_SET_FD + LOOP_SET_STATUS"
|
||||
|
||||
endchoice
|
||||
|
@ -704,6 +704,13 @@ config BUSYBOX_CONFIG_RX
|
||||
default BUSYBOX_DEFAULT_RX
|
||||
help
|
||||
Receive files using the Xmodem protocol.
|
||||
config BUSYBOX_CONFIG_SEEDRNG
|
||||
bool "seedrng (1.3 kb)"
|
||||
default BUSYBOX_DEFAULT_SEEDRNG
|
||||
help
|
||||
Seed the kernel RNG from seed files, meant to be called
|
||||
once during startup, once during shutdown, and optionally
|
||||
at some periodic interval in between.
|
||||
config BUSYBOX_CONFIG_SETFATTR
|
||||
bool "setfattr (3.7 kb)"
|
||||
default BUSYBOX_DEFAULT_SETFATTR
|
||||
@ -727,6 +734,11 @@ config BUSYBOX_CONFIG_TIME
|
||||
The time command runs the specified program with the given arguments.
|
||||
When the command finishes, time writes a message to standard output
|
||||
giving timing statistics about this program run.
|
||||
config BUSYBOX_CONFIG_TREE
|
||||
bool "tree (0.6 kb)"
|
||||
default BUSYBOX_DEFAULT_TREE
|
||||
help
|
||||
List files and directories in a tree structure.
|
||||
config BUSYBOX_CONFIG_TS
|
||||
bool "ts (450 bytes)"
|
||||
default BUSYBOX_DEFAULT_TS
|
||||
|
@ -93,12 +93,17 @@ config BUSYBOX_CONFIG_FEATURE_UDHCPC_SANITIZEOPT
|
||||
config BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT
|
||||
string "Absolute path to config script"
|
||||
default BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT
|
||||
depends on BUSYBOX_CONFIG_UDHCPC || BUSYBOX_CONFIG_UDHCPC6
|
||||
depends on BUSYBOX_CONFIG_UDHCPC
|
||||
help
|
||||
This script is called after udhcpc receives an answer. See
|
||||
examples/udhcp for a working example. Normally it is safe
|
||||
to leave this untouched.
|
||||
|
||||
config BUSYBOX_CONFIG_UDHCPC6_DEFAULT_SCRIPT
|
||||
string "Absolute path to config script for IPv6"
|
||||
default BUSYBOX_DEFAULT_UDHCPC6_DEFAULT_SCRIPT
|
||||
depends on BUSYBOX_CONFIG_UDHCPC6
|
||||
|
||||
# udhcpc6 config is inserted here:
|
||||
config BUSYBOX_CONFIG_UDHCPC6
|
||||
bool "udhcpc6 (21 kb)"
|
||||
|
@ -201,6 +201,11 @@ config BUSYBOX_CONFIG_ASH_TEST
|
||||
default BUSYBOX_DEFAULT_ASH_TEST
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_SLEEP
|
||||
bool "sleep builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_SLEEP
|
||||
depends on BUSYBOX_CONFIG_SHELL_ASH
|
||||
|
||||
config BUSYBOX_CONFIG_ASH_HELP
|
||||
bool "help builtin"
|
||||
default BUSYBOX_DEFAULT_ASH_HELP
|
||||
|
@ -1,42 +0,0 @@
|
||||
From e63d7cdfdac78c6fd27e9e63150335767592b85e Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Date: Fri, 17 Jun 2022 17:45:34 +0200
|
||||
Subject: awk: fix use after free (CVE-2022-30065)
|
||||
|
||||
fixes https://bugs.busybox.net/show_bug.cgi?id=14781
|
||||
|
||||
function old new delta
|
||||
evaluate 3343 3357 +14
|
||||
|
||||
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
||||
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
||||
---
|
||||
editors/awk.c | 3 +++
|
||||
testsuite/awk.tests | 6 ++++++
|
||||
2 files changed, 9 insertions(+)
|
||||
|
||||
--- a/editors/awk.c
|
||||
+++ b/editors/awk.c
|
||||
@@ -3114,6 +3114,9 @@ static var *evaluate(node *op, var *res)
|
||||
|
||||
case XC( OC_MOVE ):
|
||||
debug_printf_eval("MOVE\n");
|
||||
+ /* make sure that we never return a temp var */
|
||||
+ if (L.v == TMPVAR0)
|
||||
+ L.v = res;
|
||||
/* if source is a temporary string, jusk relink it to dest */
|
||||
if (R.v == TMPVAR1
|
||||
&& !(R.v->type & VF_NUMBER)
|
||||
--- a/testsuite/awk.tests
|
||||
+++ b/testsuite/awk.tests
|
||||
@@ -469,4 +469,10 @@ testing 'awk printf %% prints one %' \
|
||||
"%\n" \
|
||||
'' ''
|
||||
|
||||
+testing 'awk assign while test' \
|
||||
+ "awk '\$1==\$1=\"foo\" {print \$1}'" \
|
||||
+ "foo\n" \
|
||||
+ "" \
|
||||
+ "foo"
|
||||
+
|
||||
exit $FAILCOUNT
|
40
package/utils/ucode-mod-bpf/Makefile
Normal file
40
package/utils/ucode-mod-bpf/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ucode-mod-bpf
|
||||
PKG_RELEASE:=1
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/nls.mk
|
||||
|
||||
define Package/ucode-mod-bpf
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=ucode eBPF module
|
||||
DEPENDS:=+libucode +libbpf
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-bpf/description
|
||||
The bpf plugin provides functionality for loading and interacting with
|
||||
eBPF modules.
|
||||
|
||||
It allows loading full modules and pinned maps/programs and supports
|
||||
interacting with maps and attaching programs as tc classifiers.
|
||||
endef
|
||||
|
||||
define Package/ucode-mod-bpf/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/ucode
|
||||
$(CP) $(PKG_BUILD_DIR)/bpf.so $(1)/usr/lib/ucode/
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(FPIC) \
|
||||
-Wall -ffunction-sections -Wl,--gc-sections -shared -Wl,--no-as-needed -lbpf \
|
||||
-o $(PKG_BUILD_DIR)/bpf.so $(PKG_BUILD_DIR)/bpf.c
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,ucode-mod-bpf))
|
814
package/utils/ucode-mod-bpf/src/bpf.c
Normal file
814
package/utils/ucode-mod-bpf/src/bpf.c
Normal file
@ -0,0 +1,814 @@
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <bpf/bpf.h>
|
||||
#include <bpf/libbpf.h>
|
||||
|
||||
#include "ucode/module.h"
|
||||
|
||||
#define err_return_int(err, ...) do { set_error(err, __VA_ARGS__); return -1; } while(0)
|
||||
#define err_return(err, ...) do { set_error(err, __VA_ARGS__); return NULL; } while(0)
|
||||
#define TRUE ucv_boolean_new(true)
|
||||
|
||||
static uc_resource_type_t *module_type, *map_type, *map_iter_type, *program_type;
|
||||
static uc_value_t *registry;
|
||||
static uc_vm_t *debug_vm;
|
||||
|
||||
static struct {
|
||||
int code;
|
||||
char *msg;
|
||||
} last_error;
|
||||
|
||||
struct uc_bpf_fd {
|
||||
int fd;
|
||||
bool close;
|
||||
};
|
||||
|
||||
struct uc_bpf_map {
|
||||
struct uc_bpf_fd fd; /* must be first */
|
||||
unsigned int key_size, val_size;
|
||||
};
|
||||
|
||||
struct uc_bpf_map_iter {
|
||||
int fd;
|
||||
unsigned int key_size;
|
||||
bool has_next;
|
||||
uint8_t key[];
|
||||
};
|
||||
|
||||
__attribute__((format(printf, 2, 3))) static void
|
||||
set_error(int errcode, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
free(last_error.msg);
|
||||
|
||||
last_error.code = errcode;
|
||||
last_error.msg = NULL;
|
||||
|
||||
if (fmt) {
|
||||
va_start(ap, fmt);
|
||||
xvasprintf(&last_error.msg, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
static void init_env(void)
|
||||
{
|
||||
static bool init_done = false;
|
||||
struct rlimit limit = {
|
||||
.rlim_cur = RLIM_INFINITY,
|
||||
.rlim_max = RLIM_INFINITY,
|
||||
};
|
||||
|
||||
if (init_done)
|
||||
return;
|
||||
|
||||
setrlimit(RLIMIT_MEMLOCK, &limit);
|
||||
init_done = true;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_error(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
uc_value_t *numeric = uc_fn_arg(0);
|
||||
const char *msg = last_error.msg;
|
||||
int code = last_error.code;
|
||||
uc_stringbuf_t *buf;
|
||||
const char *s;
|
||||
|
||||
if (last_error.code == 0)
|
||||
return NULL;
|
||||
|
||||
set_error(0, NULL);
|
||||
|
||||
if (ucv_is_truish(numeric))
|
||||
return ucv_int64_new(code);
|
||||
|
||||
buf = ucv_stringbuf_new();
|
||||
if (code < 0 && msg) {
|
||||
ucv_stringbuf_addstr(buf, msg, strlen(msg));
|
||||
} else {
|
||||
s = strerror(code);
|
||||
ucv_stringbuf_addstr(buf, s, strlen(s));
|
||||
if (msg)
|
||||
ucv_stringbuf_printf(buf, ": %s", msg);
|
||||
}
|
||||
|
||||
return ucv_stringbuf_finish(buf);
|
||||
}
|
||||
|
||||
static int
|
||||
uc_bpf_module_set_opts(struct bpf_object *obj, uc_value_t *opts)
|
||||
{
|
||||
uc_value_t *val;
|
||||
|
||||
if (!opts)
|
||||
return 0;
|
||||
|
||||
if (ucv_type(opts) != UC_OBJECT)
|
||||
err_return_int(EINVAL, "options argument");
|
||||
|
||||
if ((val = ucv_object_get(opts, "rodata", NULL)) != NULL) {
|
||||
struct bpf_map *map = NULL;
|
||||
|
||||
if (ucv_type(val) != UC_STRING)
|
||||
err_return_int(EINVAL, "rodata type");
|
||||
|
||||
while ((map = bpf_object__next_map(obj, map)) != NULL) {
|
||||
if (!strstr(bpf_map__name(map), ".rodata"))
|
||||
continue;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (!map)
|
||||
err_return_int(errno, "rodata map");
|
||||
|
||||
if (bpf_map__set_initial_value(map, ucv_string_get(val),
|
||||
ucv_string_length(val)))
|
||||
err_return_int(errno, "rodata");
|
||||
}
|
||||
|
||||
if ((val = ucv_object_get(opts, "program-type", NULL)) != NULL) {
|
||||
if (ucv_type(val) != UC_OBJECT)
|
||||
err_return_int(EINVAL, "prog_types argument");
|
||||
|
||||
ucv_object_foreach(val, name, type) {
|
||||
struct bpf_program *prog;
|
||||
|
||||
if (ucv_type(type) != UC_INTEGER)
|
||||
err_return_int(EINVAL, "program %s type", name);
|
||||
|
||||
prog = bpf_object__find_program_by_name(obj, name);
|
||||
if (!prog)
|
||||
err_return_int(-1, "program %s not found", name);
|
||||
|
||||
bpf_program__set_type(prog, ucv_int64_get(type));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_open_module(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
DECLARE_LIBBPF_OPTS(bpf_object_open_opts, bpf_opts);
|
||||
uc_value_t *path = uc_fn_arg(0);
|
||||
uc_value_t *opts = uc_fn_arg(1);
|
||||
struct bpf_object *obj;
|
||||
|
||||
if (ucv_type(path) != UC_STRING)
|
||||
err_return(EINVAL, "module path");
|
||||
|
||||
init_env();
|
||||
obj = bpf_object__open_file(ucv_string_get(path), &bpf_opts);
|
||||
if (libbpf_get_error(obj))
|
||||
err_return(errno, NULL);
|
||||
|
||||
if (uc_bpf_module_set_opts(obj, opts)) {
|
||||
bpf_object__close(obj);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (bpf_object__load(obj)) {
|
||||
bpf_object__close(obj);
|
||||
err_return(errno, NULL);
|
||||
}
|
||||
|
||||
return uc_resource_new(module_type, obj);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_create(int fd, unsigned int key_size, unsigned int val_size, bool close)
|
||||
{
|
||||
struct uc_bpf_map *uc_map;
|
||||
|
||||
uc_map = xalloc(sizeof(*uc_map));
|
||||
uc_map->fd.fd = fd;
|
||||
uc_map->key_size = key_size;
|
||||
uc_map->val_size = val_size;
|
||||
uc_map->fd.close = close;
|
||||
|
||||
return uc_resource_new(map_type, uc_map);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_open_map(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct bpf_map_info info;
|
||||
uc_value_t *path = uc_fn_arg(0);
|
||||
__u32 len = sizeof(info);
|
||||
int err;
|
||||
int fd;
|
||||
|
||||
if (ucv_type(path) != UC_STRING)
|
||||
err_return(EINVAL, "module path");
|
||||
|
||||
fd = bpf_obj_get(ucv_string_get(path));
|
||||
if (fd < 0)
|
||||
err_return(errno, NULL);
|
||||
|
||||
err = bpf_obj_get_info_by_fd(fd, &info, &len);
|
||||
if (err) {
|
||||
close(fd);
|
||||
err_return(errno, NULL);
|
||||
}
|
||||
|
||||
return uc_bpf_map_create(fd, info.key_size, info.value_size, true);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_open_program(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
uc_value_t *path = uc_fn_arg(0);
|
||||
struct uc_bpf_fd *f;
|
||||
int fd;
|
||||
|
||||
if (ucv_type(path) != UC_STRING)
|
||||
err_return(EINVAL, "module path");
|
||||
|
||||
fd = bpf_obj_get(ucv_string_get(path));
|
||||
if (fd < 0)
|
||||
err_return(errno, NULL);
|
||||
|
||||
f = xalloc(sizeof(*f));
|
||||
f->fd = fd;
|
||||
f->close = true;
|
||||
|
||||
return uc_resource_new(program_type, f);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_module_get_maps(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct bpf_object *obj = uc_fn_thisval("bpf.module");
|
||||
struct bpf_map *map = NULL;
|
||||
uc_value_t *rv;
|
||||
int i = 0;
|
||||
|
||||
if (!obj)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
rv = ucv_array_new(vm);
|
||||
bpf_object__for_each_map(map, obj)
|
||||
ucv_array_set(rv, i++, ucv_string_new(bpf_map__name(map)));
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_module_get_map(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct bpf_object *obj = uc_fn_thisval("bpf.module");
|
||||
struct bpf_map *map;
|
||||
uc_value_t *name = uc_fn_arg(0);
|
||||
int fd;
|
||||
|
||||
if (!obj || ucv_type(name) != UC_STRING)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
map = bpf_object__find_map_by_name(obj, ucv_string_get(name));
|
||||
if (!map)
|
||||
err_return(errno, NULL);
|
||||
|
||||
fd = bpf_map__fd(map);
|
||||
if (fd < 0)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
return uc_bpf_map_create(fd, bpf_map__key_size(map), bpf_map__value_size(map), false);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_module_get_programs(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct bpf_object *obj = uc_fn_thisval("bpf.module");
|
||||
struct bpf_program *prog = NULL;
|
||||
uc_value_t *rv;
|
||||
int i = 0;
|
||||
|
||||
if (!obj)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
rv = ucv_array_new(vm);
|
||||
bpf_object__for_each_program(prog, obj)
|
||||
ucv_array_set(rv, i++, ucv_string_new(bpf_program__name(prog)));
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_module_get_program(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct bpf_object *obj = uc_fn_thisval("bpf.module");
|
||||
struct bpf_program *prog;
|
||||
uc_value_t *name = uc_fn_arg(0);
|
||||
struct uc_bpf_fd *f;
|
||||
int fd;
|
||||
|
||||
if (!obj || !name || ucv_type(name) != UC_STRING)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
prog = bpf_object__find_program_by_name(obj, ucv_string_get(name));
|
||||
if (!prog)
|
||||
err_return(errno, NULL);
|
||||
|
||||
fd = bpf_program__fd(prog);
|
||||
if (fd < 0)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
f = xalloc(sizeof(*f));
|
||||
f->fd = fd;
|
||||
|
||||
return uc_resource_new(program_type, f);
|
||||
}
|
||||
|
||||
static void *
|
||||
uc_bpf_map_arg(uc_value_t *val, const char *kind, unsigned int size)
|
||||
{
|
||||
static union {
|
||||
uint32_t u32;
|
||||
uint64_t u64;
|
||||
} val_int;
|
||||
|
||||
switch (ucv_type(val)) {
|
||||
case UC_INTEGER:
|
||||
if (size == 4)
|
||||
val_int.u32 = ucv_int64_get(val);
|
||||
else if (size == 8)
|
||||
val_int.u64 = ucv_int64_get(val);
|
||||
else
|
||||
break;
|
||||
|
||||
return &val_int;
|
||||
case UC_STRING:
|
||||
if (size != ucv_string_length(val))
|
||||
break;
|
||||
|
||||
return ucv_string_get(val);
|
||||
default:
|
||||
err_return(EINVAL, "%s type", kind);
|
||||
}
|
||||
|
||||
err_return(EINVAL, "%s size mismatch (expected: %d)", kind, size);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_get(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
uc_value_t *a_key = uc_fn_arg(0);
|
||||
void *key, *val;
|
||||
|
||||
if (!map)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
key = uc_bpf_map_arg(a_key, "key", map->key_size);
|
||||
if (!key)
|
||||
return NULL;
|
||||
|
||||
val = alloca(map->val_size);
|
||||
if (bpf_map_lookup_elem(map->fd.fd, key, val))
|
||||
return NULL;
|
||||
|
||||
return ucv_string_new_length(val, map->val_size);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_set(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
uc_value_t *a_key = uc_fn_arg(0);
|
||||
uc_value_t *a_val = uc_fn_arg(1);
|
||||
uc_value_t *a_flags = uc_fn_arg(2);
|
||||
uint64_t flags;
|
||||
void *key, *val;
|
||||
|
||||
if (!map)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
key = uc_bpf_map_arg(a_key, "key", map->key_size);
|
||||
if (!key)
|
||||
return NULL;
|
||||
|
||||
val = uc_bpf_map_arg(a_val, "value", map->val_size);
|
||||
if (!val)
|
||||
return NULL;
|
||||
|
||||
if (!a_flags)
|
||||
flags = BPF_ANY;
|
||||
else if (ucv_type(a_flags) != UC_INTEGER)
|
||||
err_return(EINVAL, "flags");
|
||||
else
|
||||
flags = ucv_int64_get(a_flags);
|
||||
|
||||
if (bpf_map_update_elem(map->fd.fd, key, val, flags))
|
||||
return NULL;
|
||||
|
||||
return ucv_string_new_length(val, map->val_size);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_delete(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
uc_value_t *a_key = uc_fn_arg(0);
|
||||
uc_value_t *a_return = uc_fn_arg(1);
|
||||
void *key, *val = NULL;
|
||||
int ret;
|
||||
|
||||
if (!map)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
key = uc_bpf_map_arg(a_key, "key", map->key_size);
|
||||
if (!key)
|
||||
return NULL;
|
||||
|
||||
if (!ucv_is_truish(a_return)) {
|
||||
ret = bpf_map_delete_elem(map->fd.fd, key);
|
||||
|
||||
return ucv_boolean_new(ret == 0);
|
||||
}
|
||||
|
||||
val = alloca(map->val_size);
|
||||
if (bpf_map_lookup_and_delete_elem(map->fd.fd, key, val))
|
||||
return NULL;
|
||||
|
||||
return ucv_string_new_length(val, map->val_size);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_delete_all(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
uc_value_t *filter = uc_fn_arg(0);
|
||||
bool has_next;
|
||||
void *key, *next;
|
||||
|
||||
if (!map)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
key = alloca(map->key_size);
|
||||
next = alloca(map->key_size);
|
||||
has_next = !bpf_map_get_next_key(map->fd.fd, NULL, next);
|
||||
while (has_next) {
|
||||
bool skip = false;
|
||||
|
||||
memcpy(key, next, map->key_size);
|
||||
has_next = !bpf_map_get_next_key(map->fd.fd, next, next);
|
||||
|
||||
if (ucv_is_callable(filter)) {
|
||||
uc_value_t *rv;
|
||||
|
||||
uc_value_push(ucv_get(filter));
|
||||
uc_value_push(ucv_string_new_length((const char *)key, map->key_size));
|
||||
if (uc_call(1) != EXCEPTION_NONE)
|
||||
break;
|
||||
|
||||
rv = uc_vm_stack_pop(vm);
|
||||
if (!rv)
|
||||
break;
|
||||
|
||||
skip = !ucv_is_truish(rv);
|
||||
ucv_put(rv);
|
||||
}
|
||||
|
||||
if (!skip)
|
||||
bpf_map_delete_elem(map->fd.fd, key);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_iterator(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
struct uc_bpf_map_iter *iter;
|
||||
|
||||
if (!map)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
iter = xalloc(sizeof(*iter) + map->key_size);
|
||||
iter->fd = map->fd.fd;
|
||||
iter->key_size = map->key_size;
|
||||
iter->has_next = !bpf_map_get_next_key(iter->fd, NULL, &iter->key);
|
||||
|
||||
return uc_resource_new(map_iter_type, iter);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_iter_next(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map_iter *iter = uc_fn_thisval("bpf.map_iter");
|
||||
uc_value_t *rv;
|
||||
|
||||
if (!iter->has_next)
|
||||
return NULL;
|
||||
|
||||
rv = ucv_string_new_length((const char *)iter->key, iter->key_size);
|
||||
iter->has_next = !bpf_map_get_next_key(iter->fd, &iter->key, &iter->key);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_iter_next_int(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map_iter *iter = uc_fn_thisval("bpf.map_iter");
|
||||
uint64_t intval;
|
||||
uc_value_t *rv;
|
||||
|
||||
if (!iter->has_next)
|
||||
return NULL;
|
||||
|
||||
if (iter->key_size == 4)
|
||||
intval = *(uint32_t *)iter->key;
|
||||
else if (iter->key_size == 8)
|
||||
intval = *(uint64_t *)iter->key;
|
||||
else
|
||||
return NULL;
|
||||
|
||||
rv = ucv_int64_new(intval);
|
||||
iter->has_next = !bpf_map_get_next_key(iter->fd, &iter->key, &iter->key);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_foreach(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_map *map = uc_fn_thisval("bpf.map");
|
||||
uc_value_t *func = uc_fn_arg(0);
|
||||
bool has_next;
|
||||
void *key, *next;
|
||||
bool ret = false;
|
||||
|
||||
key = alloca(map->key_size);
|
||||
next = alloca(map->key_size);
|
||||
has_next = !bpf_map_get_next_key(map->fd.fd, NULL, next);
|
||||
|
||||
while (has_next) {
|
||||
uc_value_t *rv;
|
||||
bool stop;
|
||||
|
||||
memcpy(key, next, map->key_size);
|
||||
has_next = !bpf_map_get_next_key(map->fd.fd, next, next);
|
||||
|
||||
uc_value_push(ucv_get(func));
|
||||
uc_value_push(ucv_string_new_length((const char *)key, map->key_size));
|
||||
|
||||
if (uc_call(1) != EXCEPTION_NONE)
|
||||
break;
|
||||
|
||||
rv = uc_vm_stack_pop(vm);
|
||||
stop = (ucv_type(rv) == UC_BOOLEAN && !ucv_boolean_get(rv));
|
||||
ucv_put(rv);
|
||||
|
||||
if (stop)
|
||||
break;
|
||||
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ucv_boolean_new(ret);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_obj_pin(uc_vm_t *vm, size_t nargs, const char *type)
|
||||
{
|
||||
struct uc_bpf_fd *f = uc_fn_thisval(type);
|
||||
uc_value_t *path = uc_fn_arg(0);
|
||||
|
||||
if (ucv_type(path) != UC_STRING)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
if (bpf_obj_pin(f->fd, ucv_string_get(path)))
|
||||
err_return(errno, NULL);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_program_pin(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
return uc_bpf_obj_pin(vm, nargs, "bpf.program");
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_map_pin(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
return uc_bpf_obj_pin(vm, nargs, "bpf.map");
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_set_tc_hook(uc_value_t *ifname, uc_value_t *type, uc_value_t *prio,
|
||||
int fd)
|
||||
{
|
||||
DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook);
|
||||
DECLARE_LIBBPF_OPTS(bpf_tc_opts, attach_tc,
|
||||
.handle = 1);
|
||||
const char *type_str;
|
||||
uint64_t prio_val;
|
||||
|
||||
if (ucv_type(ifname) != UC_STRING || ucv_type(type) != UC_STRING ||
|
||||
ucv_type(prio) != UC_INTEGER)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
prio_val = ucv_int64_get(prio);
|
||||
if (prio_val > 0xffff)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
type_str = ucv_string_get(type);
|
||||
if (!strcmp(type_str, "ingress"))
|
||||
hook.attach_point = BPF_TC_INGRESS;
|
||||
else if (!strcmp(type_str, "egress"))
|
||||
hook.attach_point = BPF_TC_EGRESS;
|
||||
else
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
hook.ifindex = if_nametoindex(ucv_string_get(ifname));
|
||||
if (!hook.ifindex)
|
||||
goto error;
|
||||
|
||||
bpf_tc_hook_create(&hook);
|
||||
attach_tc.priority = prio_val;
|
||||
if (bpf_tc_detach(&hook, &attach_tc) < 0 && fd < 0)
|
||||
goto error;
|
||||
|
||||
if (fd < 0)
|
||||
goto out;
|
||||
|
||||
attach_tc.prog_fd = fd;
|
||||
if (bpf_tc_attach(&hook, &attach_tc) < 0)
|
||||
goto error;
|
||||
|
||||
out:
|
||||
return TRUE;
|
||||
|
||||
error:
|
||||
if (fd >= 0)
|
||||
err_return(ENOENT, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_program_tc_attach(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
struct uc_bpf_fd *f = uc_fn_thisval("bpf.program");
|
||||
uc_value_t *ifname = uc_fn_arg(0);
|
||||
uc_value_t *type = uc_fn_arg(1);
|
||||
uc_value_t *prio = uc_fn_arg(2);
|
||||
|
||||
if (!f)
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
return uc_bpf_set_tc_hook(ifname, type, prio, f->fd);
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_tc_detach(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
uc_value_t *ifname = uc_fn_arg(0);
|
||||
uc_value_t *type = uc_fn_arg(1);
|
||||
uc_value_t *prio = uc_fn_arg(2);
|
||||
|
||||
return uc_bpf_set_tc_hook(ifname, type, prio, -1);
|
||||
}
|
||||
|
||||
static int
|
||||
uc_bpf_debug_print(enum libbpf_print_level level, const char *format,
|
||||
va_list args)
|
||||
{
|
||||
char buf[256], *str = NULL;
|
||||
uc_value_t *val;
|
||||
va_list ap;
|
||||
int size;
|
||||
|
||||
va_copy(ap, args);
|
||||
size = vsnprintf(buf, sizeof(buf), format, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (size > 0 && (unsigned long)size < ARRAY_SIZE(buf) - 1) {
|
||||
val = ucv_string_new(buf);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (vasprintf(&str, format, args) < 0)
|
||||
return 0;
|
||||
|
||||
val = ucv_string_new(str);
|
||||
free(str);
|
||||
|
||||
out:
|
||||
uc_vm_stack_push(debug_vm, ucv_get(ucv_array_get(registry, 0)));
|
||||
uc_vm_stack_push(debug_vm, ucv_int64_new(level));
|
||||
uc_vm_stack_push(debug_vm, val);
|
||||
if (uc_vm_call(debug_vm, false, 2) == EXCEPTION_NONE)
|
||||
ucv_put(uc_vm_stack_pop(debug_vm));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uc_value_t *
|
||||
uc_bpf_set_debug_handler(uc_vm_t *vm, size_t nargs)
|
||||
{
|
||||
uc_value_t *handler = uc_fn_arg(0);
|
||||
|
||||
if (handler && !ucv_is_callable(handler))
|
||||
err_return(EINVAL, NULL);
|
||||
|
||||
debug_vm = vm;
|
||||
libbpf_set_print(handler ? uc_bpf_debug_print : NULL);
|
||||
|
||||
ucv_array_set(registry, 0, ucv_get(handler));
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
register_constants(uc_vm_t *vm, uc_value_t *scope)
|
||||
{
|
||||
#define ADD_CONST(x) ucv_object_add(scope, #x, ucv_int64_new(x))
|
||||
ADD_CONST(BPF_PROG_TYPE_SCHED_CLS);
|
||||
ADD_CONST(BPF_PROG_TYPE_SCHED_ACT);
|
||||
|
||||
ADD_CONST(BPF_ANY);
|
||||
ADD_CONST(BPF_NOEXIST);
|
||||
ADD_CONST(BPF_EXIST);
|
||||
ADD_CONST(BPF_F_LOCK);
|
||||
}
|
||||
|
||||
static const uc_function_list_t module_fns[] = {
|
||||
{ "get_map", uc_bpf_module_get_map },
|
||||
{ "get_maps", uc_bpf_module_get_maps },
|
||||
{ "get_programs", uc_bpf_module_get_programs },
|
||||
{ "get_program", uc_bpf_module_get_program },
|
||||
};
|
||||
|
||||
static void module_free(void *ptr)
|
||||
{
|
||||
struct bpf_object *obj = ptr;
|
||||
|
||||
bpf_object__close(obj);
|
||||
}
|
||||
|
||||
static const uc_function_list_t map_fns[] = {
|
||||
{ "pin", uc_bpf_map_pin },
|
||||
{ "get", uc_bpf_map_get },
|
||||
{ "set", uc_bpf_map_set },
|
||||
{ "delete", uc_bpf_map_delete },
|
||||
{ "delete_all", uc_bpf_map_delete_all },
|
||||
{ "foreach", uc_bpf_map_foreach },
|
||||
{ "iterator", uc_bpf_map_iterator },
|
||||
};
|
||||
|
||||
static void uc_bpf_fd_free(void *ptr)
|
||||
{
|
||||
struct uc_bpf_fd *f = ptr;
|
||||
|
||||
if (f->close)
|
||||
close(f->fd);
|
||||
free(f);
|
||||
}
|
||||
|
||||
static const uc_function_list_t map_iter_fns[] = {
|
||||
{ "next", uc_bpf_map_iter_next },
|
||||
{ "next_int", uc_bpf_map_iter_next_int },
|
||||
};
|
||||
|
||||
static const uc_function_list_t prog_fns[] = {
|
||||
{ "pin", uc_bpf_program_pin },
|
||||
{ "tc_attach", uc_bpf_program_tc_attach },
|
||||
};
|
||||
|
||||
static const uc_function_list_t global_fns[] = {
|
||||
{ "error", uc_bpf_error },
|
||||
{ "set_debug_handler", uc_bpf_set_debug_handler },
|
||||
{ "open_module", uc_bpf_open_module },
|
||||
{ "open_map", uc_bpf_open_map },
|
||||
{ "open_program", uc_bpf_open_program },
|
||||
{ "tc_detach", uc_bpf_tc_detach },
|
||||
};
|
||||
|
||||
void uc_module_init(uc_vm_t *vm, uc_value_t *scope)
|
||||
{
|
||||
uc_function_list_register(scope, global_fns);
|
||||
register_constants(vm, scope);
|
||||
|
||||
registry = ucv_array_new(vm);
|
||||
uc_vm_registry_set(vm, "bpf.registry", registry);
|
||||
|
||||
module_type = uc_type_declare(vm, "bpf.module", module_fns, module_free);
|
||||
map_type = uc_type_declare(vm, "bpf.map", map_fns, uc_bpf_fd_free);
|
||||
map_iter_type = uc_type_declare(vm, "bpf.map_iter", map_iter_fns, free);
|
||||
program_type = uc_type_declare(vm, "bpf.program", prog_fns, uc_bpf_fd_free);
|
||||
}
|
@ -12,9 +12,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
|
||||
PKG_SOURCE_DATE:=2022-12-02
|
||||
PKG_SOURCE_VERSION:=46d93c9cc5da6fce581df86159bd0fc4357de41c
|
||||
PKG_MIRROR_HASH:=970a47f1bef719f056d40d17398db492bd4de92b98ef9aba4582cb18b4c9b270
|
||||
PKG_SOURCE_DATE:=2023-01-09
|
||||
PKG_SOURCE_VERSION:=8dad974baa4696fcba85837fa70cde8b68dd7c12
|
||||
PKG_MIRROR_HASH:=91494352ac298ac2735d62355837a1f18e366999c9e940613e6fa3265edc0364
|
||||
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
|
||||
PKG_LICENSE:=ISC
|
||||
|
||||
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=util-linux
|
||||
PKG_VERSION:=2.38
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
PKG_VERSION:=2.38.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.38
|
||||
PKG_HASH:=6d111cbe4d55b336db2f1fbeffbc65b89908704c01136371d32aa9bec373eb64
|
||||
PKG_HASH:=60492a19b44e6cf9a3ddff68325b333b8b52b6c59ce3ebd6a0ecaa4c5117e84f
|
||||
PKG_CPE_ID:=cpe:/a:kernel:util-linux
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
|
@ -1,20 +0,0 @@
|
||||
From c387d4fe7a1435a762a5b7d8b75feb13ad613315 Mon Sep 17 00:00:00 2001
|
||||
From: Anatoly Pugachev <matorola@gmail.com>
|
||||
Date: Fri, 8 Apr 2022 15:34:16 +0300
|
||||
Subject: [PATCH] libfdisk: meson.build fix typo
|
||||
|
||||
---
|
||||
libfdisk/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/libfdisk/meson.build
|
||||
+++ b/libfdisk/meson.build
|
||||
@@ -11,7 +11,7 @@ libfdisk_h = configure_file(
|
||||
output : 'libfdisk.h',
|
||||
configuration : defs,
|
||||
install : build_libfdisk,
|
||||
- install_dir : join_paths(get_option('includedir'), 'libfisk'),
|
||||
+ install_dir : join_paths(get_option('includedir'), 'libfdisk'),
|
||||
)
|
||||
|
||||
lib_fdisk_sources = '''
|
@ -1,22 +0,0 @@
|
||||
From 38b15ca2dc4ca32bbe4a2449e1c7b645e4577840 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Fri, 29 Apr 2022 16:53:43 -0700
|
||||
Subject: [PATCH 1/7] meson: fix compilation without systemd
|
||||
|
||||
systemdsystemunitdir is used elsewhere.
|
||||
|
||||
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||
---
|
||||
meson.build | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -720,6 +720,7 @@ if fs_search_path_extra != ''
|
||||
endif
|
||||
conf.set_quoted('FS_SEARCH_PATH', fs_search_path)
|
||||
|
||||
+systemdsystemunitdir = ''
|
||||
if systemd.found()
|
||||
systemdsystemunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
endif
|
@ -1,21 +0,0 @@
|
||||
From e51565b653cf09985df57cb7254b16d5af5df223 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Caramelli <caramelli.devel@gmail.com>
|
||||
Date: Fri, 29 Apr 2022 18:16:36 +0200
|
||||
Subject: [PATCH] meson: fix when HAVE_CLOCK_GETTIME is set
|
||||
|
||||
Signed-off-by: Nicolas Caramelli <caramelli.devel@gmail.com>
|
||||
---
|
||||
meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -602,7 +602,7 @@ if not have
|
||||
have = cc.has_function('clock_gettime',
|
||||
dependencies : realtime_libs)
|
||||
endif
|
||||
-conf.set('HAVE_CLOCK_GETTIME', have_dirfd ? 1 : false)
|
||||
+conf.set('HAVE_CLOCK_GETTIME', have ? 1 : false)
|
||||
|
||||
thread_libs = dependency('threads')
|
||||
|
@ -1,12 +1,10 @@
|
||||
apply_bootconfig() {
|
||||
. /lib/functions.sh
|
||||
|
||||
local part
|
||||
|
||||
case $(board_name) in
|
||||
zyxel,nwa50ax|\
|
||||
zyxel,nwa55axe)
|
||||
mtd_idx=$(find_mtd_index "bootconfig")
|
||||
mtd_idx=$(find_mtd_index "bootconfig")
|
||||
zyxel-bootconfig "/dev/mtd$mtd_idx" set-image-status 0 valid
|
||||
zyxel-bootconfig "/dev/mtd$mtd_idx" set-active-image 0
|
||||
;;
|
||||
|
4
rules.mk
4
rules.mk
@ -156,8 +156,8 @@ BUILD_LOG_DIR:=$(if $(call qstrip,$(CONFIG_BUILD_LOG_DIR)),$(call qstrip,$(CONFI
|
||||
PKG_INFO_DIR := $(STAGING_DIR)/pkginfo
|
||||
|
||||
BUILD_DIR_HOST:=$(if $(IS_PACKAGE_BUILD),$(BUILD_DIR_BASE)/hostpkg,$(BUILD_DIR_BASE)/host)
|
||||
STAGING_DIR_HOST:=$(TOPDIR)/staging_dir/host
|
||||
STAGING_DIR_HOSTPKG:=$(TOPDIR)/staging_dir/hostpkg
|
||||
STAGING_DIR_HOST:=$(abspath $(STAGING_DIR)/../host)
|
||||
STAGING_DIR_HOSTPKG:=$(abspath $(STAGING_DIR)/../hostpkg)
|
||||
|
||||
TARGET_PATH:=$(subst $(space),:,$(filter-out .,$(filter-out ./,$(subst :,$(space),$(PATH)))))
|
||||
TARGET_INIT_PATH:=$(call qstrip,$(CONFIG_TARGET_INIT_PATH))
|
||||
|
@ -133,7 +133,7 @@ class Path(object):
|
||||
def tar(path, subdir, into=None, ts=None):
|
||||
"""Pack ``path`` into tarball ``into``."""
|
||||
# --sort=name requires a recent build of GNU tar
|
||||
args = ['tar', '--numeric-owner', '--owner=0', '--group=0', '--sort=name']
|
||||
args = ['tar', '--numeric-owner', '--owner=0', '--group=0', '--sort=name', '--mode=a-s']
|
||||
args += ['-C', path, '-cf', into, subdir]
|
||||
envs = os.environ.copy()
|
||||
if ts is not None:
|
||||
|
@ -5,16 +5,14 @@ HOST_BUILD_DIR=$(pwd)/"build_dir/host"
|
||||
HOST_STAGING_DIR_STAMP=$(pwd)/"staging_dir/host/stamp"
|
||||
|
||||
refresh_timestamps() {
|
||||
find "$1" -not -type l -print0 | xargs -0 touch
|
||||
find -H "$1" -not -type l -print0 | xargs -0 touch
|
||||
}
|
||||
|
||||
extract_prebuilt_tar() {
|
||||
tar -xf "$1"
|
||||
}
|
||||
|
||||
install_prebuilt_tools() {
|
||||
extract_prebuilt_tar "$TOOLS_TAR"
|
||||
|
||||
refresh_prebuilt_tools() {
|
||||
if [ ! -d "$HOST_BUILD_DIR" ]; then
|
||||
echo "Can't find Host Build Dir "$HOST_BUILD_DIR"" >&2
|
||||
exit 1
|
||||
@ -33,6 +31,14 @@ install_prebuilt_tools() {
|
||||
return 0
|
||||
}
|
||||
|
||||
install_prebuilt_tools() {
|
||||
extract_prebuilt_tar "$TOOLS_TAR"
|
||||
|
||||
refresh_prebuilt_tools
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
arg="$1"; shift
|
||||
case "$arg" in
|
||||
@ -63,6 +69,12 @@ while [ -n "$1" ]; do
|
||||
exit $?
|
||||
;;
|
||||
|
||||
--refresh)
|
||||
refresh_prebuilt_tools
|
||||
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-h|--help)
|
||||
me="$(basename "$0")"
|
||||
echo -e "\nUsage:\n" >&2
|
||||
@ -81,8 +93,12 @@ while [ -n "$1" ]; do
|
||||
echo -e " $me --tools {tar}" >&2
|
||||
echo -e " Install the prebuilt tools present in the passed" >&2
|
||||
echo -e " tar and prepare them." >&2
|
||||
echo -e " To correctly use them it's needed to update the." >&2
|
||||
echo -e " To correctly use them it's needed to update the" >&2
|
||||
echo -e " timestamp of each tools to skip recompilation.\n" >&2
|
||||
echo -e " $me --refresh" >&2
|
||||
echo -e " Refresh timestamps of already extracted prebuilt" >&2
|
||||
echo -e " tools to correctly use them and skip" >&2
|
||||
echo -e " recompilation.\n" >&2
|
||||
echo -e " $me --help" >&2
|
||||
echo -e " Display this help text and exit.\n\n" >&2
|
||||
exit 1
|
||||
|
@ -21,7 +21,7 @@ if not file_path.is_file():
|
||||
|
||||
def get_titles():
|
||||
titles = []
|
||||
for prefix in ["", "ALT0_", "ALT1_", "ALT2_"]:
|
||||
for prefix in ["", "ALT0_", "ALT1_", "ALT2_", "ALT3_", "ALT4_"]:
|
||||
title = {}
|
||||
for var in ["vendor", "model", "variant"]:
|
||||
if getenv("DEVICE_{}{}".format(prefix, var.upper())):
|
||||
|
@ -35,8 +35,11 @@ Available Commands:
|
||||
info: Show a list of available target profiles
|
||||
clean: Remove images and temporary build files
|
||||
image: Build an image (see below for more information).
|
||||
manifest: Show all package that will be installed into the image
|
||||
package_whatdepends: Show which packages have a dependency on this
|
||||
package_depends: Show installation dependency of the package
|
||||
|
||||
Building images:
|
||||
image:
|
||||
By default 'make image' will create an image with the default
|
||||
target profile and package set. You can use the following parameters
|
||||
to change that:
|
||||
@ -49,7 +52,7 @@ Building images:
|
||||
make image DISABLED_SERVICES="<svc1> [<svc2> [<svc3> ..]]" # Which services in /etc/init.d/ should be disabled
|
||||
make image ADD_LOCAL_KEY=1 # store locally generated signing key in built images
|
||||
|
||||
Print manifest:
|
||||
manifest:
|
||||
List "all" packages which get installed into the image.
|
||||
You can use the following parameters:
|
||||
|
||||
@ -57,6 +60,19 @@ Print manifest:
|
||||
make manifest PACKAGES="<pkg1> [<pkg2> [<pkg3> ...]]" # include extra packages
|
||||
make manifest STRIP_ABI=1 # remove ABI version from printed package names
|
||||
|
||||
|
||||
package_whatdepends:
|
||||
List "all" packages that have a dependency on this package
|
||||
You can use the following parameters:
|
||||
|
||||
make package_whatdepends PACKAGE="<pkg>"
|
||||
|
||||
package_depends:
|
||||
List "all" packages dependency of the package
|
||||
You can use the following parameters:
|
||||
|
||||
make package_depends PACKAGE="<pkg>"
|
||||
|
||||
endef
|
||||
$(eval $(call shexport,Helptext))
|
||||
|
||||
@ -255,7 +271,7 @@ manifest: FORCE
|
||||
$(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \
|
||||
$(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)"))
|
||||
|
||||
whatdepends: FORCE
|
||||
package_whatdepends: FORCE
|
||||
ifeq ($(PACKAGE),)
|
||||
@echo 'Variable `PACKAGE` is not set but required by `whatdepends`'
|
||||
@exit 1
|
||||
@ -263,4 +279,13 @@ endif
|
||||
@$(MAKE) -s package_reload
|
||||
@$(OPKG) whatdepends -A $(PACKAGE)
|
||||
|
||||
.SILENT: help info image manifest whatdepends
|
||||
package_depends: FORCE
|
||||
ifeq ($(PACKAGE),)
|
||||
@echo 'Variable `PACKAGE` is not set but required by `package_depends`'
|
||||
@exit 1
|
||||
endif
|
||||
@$(MAKE) -s package_reload
|
||||
@$(OPKG) depends -A $(PACKAGE)
|
||||
|
||||
|
||||
.SILENT: help info image manifest package_whatdepends package_depends
|
||||
|
@ -0,0 +1,33 @@
|
||||
From b4aeb93e697e4dbe2d336d01290e92e98acfd83c Mon Sep 17 00:00:00 2001
|
||||
From: jensen <jensenhuang@friendlyarm.com>
|
||||
Date: Sat, 15 Oct 2022 18:47:24 +0800
|
||||
Subject: [PATCH] rfkill: gpio: add of_match_table support
|
||||
|
||||
Signed-off-by: jensen <jensenhuang@friendlyarm.com>
|
||||
---
|
||||
net/rfkill/rfkill-gpio.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/net/rfkill/rfkill-gpio.c
|
||||
+++ b/net/rfkill/rfkill-gpio.c
|
||||
@@ -156,6 +156,13 @@ static const struct acpi_device_id rfkill_acpi_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, rfkill_acpi_match);
|
||||
#endif
|
||||
+#ifdef CONFIG_OF
|
||||
+static struct of_device_id rfkill_gpio_of_match[] = {
|
||||
+ { .compatible = "rfkill-gpio" },
|
||||
+ { },
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(of, rfkill_gpio_of_match);
|
||||
+#endif
|
||||
|
||||
static struct platform_driver rfkill_gpio_driver = {
|
||||
.probe = rfkill_gpio_probe,
|
||||
@@ -163,6 +170,7 @@ static struct platform_driver rfkill_gpio_driver = {
|
||||
.driver = {
|
||||
.name = "rfkill_gpio",
|
||||
.acpi_match_table = ACPI_PTR(rfkill_acpi_match),
|
||||
+ .of_match_table = of_match_ptr(rfkill_gpio_of_match),
|
||||
},
|
||||
};
|
@ -17,6 +17,10 @@ choice
|
||||
config BINUTILS_USE_VERSION_2_39
|
||||
bool "Binutils 2.39"
|
||||
select BINUTILS_VERSION_2_39
|
||||
|
||||
config BINUTILS_USE_VERSION_2_40
|
||||
bool "Binutils 2.40"
|
||||
select BINUTILS_VERSION_2_40
|
||||
endchoice
|
||||
|
||||
config EXTRA_BINUTILS_CONFIG_OPTIONS
|
||||
|
@ -9,8 +9,12 @@ config BINUTILS_VERSION_2_39
|
||||
default y if !TOOLCHAINOPTS
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION_2_40
|
||||
bool
|
||||
|
||||
config BINUTILS_VERSION
|
||||
string
|
||||
default "2.37" if BINUTILS_VERSION_2_37
|
||||
default "2.38" if BINUTILS_VERSION_2_38
|
||||
default "2.39" if BINUTILS_VERSION_2_39
|
||||
default "2.40" if BINUTILS_VERSION_2_40
|
||||
|
@ -27,6 +27,10 @@ ifeq ($(PKG_VERSION),2.39)
|
||||
PKG_HASH:=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
|
||||
endif
|
||||
|
||||
ifeq ($(PKG_VERSION),2.40)
|
||||
PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1
|
||||
endif
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
PATCH_DIR:=./patches/$(PKG_VERSION)
|
||||
|
@ -0,0 +1,22 @@
|
||||
--- a/ld/Makefile.am
|
||||
+++ b/ld/Makefile.am
|
||||
@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
--- a/ld/Makefile.in
|
||||
+++ b/ld/Makefile.in
|
||||
@@ -573,7 +573,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
@ -0,0 +1,18 @@
|
||||
--- a/bfd/elfxx-mips.c
|
||||
+++ b/bfd/elfxx-mips.c
|
||||
@@ -8119,6 +8119,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
|
||||
bh = NULL;
|
||||
+ if (0) {
|
||||
if (!(_bfd_generic_link_add_one_symbol
|
||||
(info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
|
||||
NULL, false, get_elf_backend_data (abfd)->collect, &bh)))
|
||||
@@ -8131,6 +8132,7 @@ _bfd_mips_elf_create_dynamic_sections (b
|
||||
|
||||
if (! bfd_elf_link_record_dynamic_symbol (info, h))
|
||||
return false;
|
||||
+ }
|
||||
|
||||
if (! mips_elf_hash_table (info)->use_rld_obj_head)
|
||||
{
|
@ -0,0 +1,38 @@
|
||||
--- a/bfd/config.bfd
|
||||
+++ b/bfd/config.bfd
|
||||
@@ -944,12 +944,12 @@ case "${targ}" in
|
||||
targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
|
||||
;;
|
||||
mips64*el-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_le_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
|
||||
+ targ_defvec=mips_elf64_trad_le_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=mips_elf32_ntrad_be_vec
|
||||
- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
|
||||
+ targ_defvec=mips_elf64_trad_be_vec
|
||||
+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
|
||||
;;
|
||||
mips*el-*-linux*)
|
||||
targ_defvec=mips_elf32_trad_le_vec
|
||||
--- a/ld/configure.tgt
|
||||
+++ b/ld/configure.tgt
|
||||
@@ -585,12 +585,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx
|
||||
;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss
|
||||
;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls
|
||||
;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
@ -3,7 +3,7 @@
|
||||
choice
|
||||
prompt "GCC compiler Version" if TOOLCHAINOPTS
|
||||
default GCC_USE_VERSION_8 if mips || mipsel || mips64 || mips64el
|
||||
default GCC_USE_VERSION_11
|
||||
default GCC_USE_VERSION_12
|
||||
help
|
||||
Select the version of gcc you wish to use.
|
||||
|
||||
|
@ -3,12 +3,12 @@ config GCC_VERSION_8
|
||||
default y if mips || mipsel || mips64 || mips64el
|
||||
bool
|
||||
|
||||
config GCC_VERSION_12
|
||||
default y if GCC_USE_VERSION_12
|
||||
config GCC_VERSION_11
|
||||
default y if GCC_USE_VERSION_11
|
||||
bool
|
||||
|
||||
config GCC_VERSION
|
||||
string
|
||||
default "8.4.0" if GCC_VERSION_8
|
||||
default "12.2.0" if GCC_VERSION_12
|
||||
default "11.3.0"
|
||||
default "11.3.0" if GCC_VERSION_11
|
||||
default "12.2.0"
|
||||
|
@ -76,7 +76,7 @@ ifdef CONFIG_INSTALL_GCCGO
|
||||
endif
|
||||
|
||||
ifdef CONFIG_GCC_USE_GRAPHITE
|
||||
GRAPHITE_CONFIGURE:= --with-isl=$(TOPDIR)/staging_dir/host
|
||||
GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
|
||||
else
|
||||
GRAPHITE_CONFIGURE:= --without-isl --without-cloog
|
||||
endif
|
||||
@ -110,9 +110,9 @@ GCC_CONFIGURE:= \
|
||||
--with-abi=$(call qstrip,$(CONFIG_MIPS64_ABI))) \
|
||||
$(if $(CONFIG_arc),--with-cpu=$(CONFIG_CPU_TYPE)) \
|
||||
$(if $(CONFIG_powerpc64), $(if $(CONFIG_USE_MUSL),--with-abi=elfv2)) \
|
||||
--with-gmp=$(TOPDIR)/staging_dir/host \
|
||||
--with-mpfr=$(TOPDIR)/staging_dir/host \
|
||||
--with-mpc=$(TOPDIR)/staging_dir/host \
|
||||
--with-gmp=$(STAGING_DIR_HOST) \
|
||||
--with-mpfr=$(STAGING_DIR_HOST) \
|
||||
--with-mpc=$(STAGING_DIR_HOST) \
|
||||
--disable-decimal-float \
|
||||
--with-diagnostics-color=auto-if-env \
|
||||
--enable-__cxa_atexit \
|
||||
@ -181,7 +181,7 @@ define Host/SetToolchainInfo
|
||||
$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(GCC_VERSION),' $(TOOLCHAIN_DIR)/info.mk
|
||||
endef
|
||||
|
||||
ifdef CONFIG_GCC_USE_VERSION_12
|
||||
ifeq ($(GCC_MAJOR_VERSION),12)
|
||||
GCC_VERSION_FILE:=gcc/genversion.cc
|
||||
else
|
||||
GCC_VERSION_FILE:=gcc/version.c
|
||||
|
@ -9,7 +9,7 @@ GCC_CONFIGURE += \
|
||||
--enable-threads \
|
||||
--with-slibdir=$(TOOLCHAIN_DIR)/lib \
|
||||
--enable-lto \
|
||||
--with-libelf=$(TOPDIR)/staging_dir/host
|
||||
--with-libelf=$(STAGING_DIR_HOST)
|
||||
|
||||
ifndef CONFIG_USE_GLIBC
|
||||
GCC_CONFIGURE += --disable-libsanitizer
|
||||
|
@ -30,10 +30,10 @@ HOST_CONFIGURE_ARGS = \
|
||||
--build=$(GNU_HOST_NAME) \
|
||||
--host=$(GNU_HOST_NAME) \
|
||||
--target=$(REAL_GNU_TARGET_NAME) \
|
||||
--with-gmp=$(TOPDIR)/staging_dir/host \
|
||||
--with-mpfr=$(TOPDIR)/staging_dir/host \
|
||||
--with-mpc=$(TOPDIR)/staging_dir/host \
|
||||
--with-expat=$(TOPDIR)/staging_dir/host \
|
||||
--with-gmp=$(STAGING_DIR_HOST) \
|
||||
--with-mpfr=$(STAGING_DIR_HOST) \
|
||||
--with-mpc=$(STAGING_DIR_HOST) \
|
||||
--with-expat=$(STAGING_DIR_HOST) \
|
||||
--disable-werror \
|
||||
--without-uiout \
|
||||
--enable-tui --disable-gdbtk --without-x \
|
||||
|
61
toolchain/musl/patches/800-mips_pie_debug.patch
Normal file
61
toolchain/musl/patches/800-mips_pie_debug.patch
Normal file
@ -0,0 +1,61 @@
|
||||
Fix DT_DEBUG handling on MIPS in musl libc.
|
||||
With this change gdb will load the symbol files for shared libraries on MIPS too.
|
||||
|
||||
This patch was taken from this thread: https://www.openwall.com/lists/musl/2022/01/09/4
|
||||
|
||||
--- a/arch/mips/reloc.h
|
||||
+++ b/arch/mips/reloc.h
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#define NEED_MIPS_GOT_RELOCS 1
|
||||
#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
|
||||
+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL
|
||||
#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
|
||||
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
--- a/arch/mips64/reloc.h
|
||||
+++ b/arch/mips64/reloc.h
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#define NEED_MIPS_GOT_RELOCS 1
|
||||
#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
|
||||
+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL
|
||||
#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
|
||||
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
--- a/arch/mipsn32/reloc.h
|
||||
+++ b/arch/mipsn32/reloc.h
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#define NEED_MIPS_GOT_RELOCS 1
|
||||
#define DT_DEBUG_INDIRECT DT_MIPS_RLD_MAP
|
||||
+#define DT_DEBUG_INDIRECT_REL DT_MIPS_RLD_MAP_REL
|
||||
#define ARCH_SYM_REJECT_UND(s) (!((s)->st_other & STO_MIPS_PLT))
|
||||
|
||||
#define CRTJMP(pc,sp) __asm__ __volatile__( \
|
||||
--- a/ldso/dynlink.c
|
||||
+++ b/ldso/dynlink.c
|
||||
@@ -1923,6 +1923,10 @@ void __dls3(size_t *sp, size_t *auxv)
|
||||
size_t *ptr = (size_t *) app.dynv[i+1];
|
||||
*ptr = (size_t)&debug;
|
||||
}
|
||||
+ if (app.dynv[i]==DT_DEBUG_INDIRECT_REL) {
|
||||
+ size_t *ptr = (size_t *)((size_t)&app.dynv[i] + app.dynv[i+1]);
|
||||
+ *ptr = (size_t)&debug;
|
||||
+ }
|
||||
}
|
||||
|
||||
/* This must be done before final relocations, since it calls
|
||||
--- a/src/internal/dynlink.h
|
||||
+++ b/src/internal/dynlink.h
|
||||
@@ -92,6 +92,10 @@ struct fdpic_dummy_loadmap {
|
||||
#define DT_DEBUG_INDIRECT 0
|
||||
#endif
|
||||
|
||||
+#ifndef DT_DEBUG_INDIRECT_REL
|
||||
+#define DT_DEBUG_INDIRECT_REL 0
|
||||
+#endif
|
||||
+
|
||||
#define AUX_CNT 32
|
||||
#define DYN_CNT 32
|
||||
|
@ -5,12 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nasm
|
||||
PKG_VERSION:=2.15.05
|
||||
PKG_VERSION:=2.16.01
|
||||
|
||||
PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
|
||||
PKG_HASH:=3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f
|
||||
PKG_HASH:=c77745f4802375efeee2ec5c0ad6b7f037ea9c87c92b149a9637ff099f162558
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
|
@ -20,6 +20,12 @@ 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),)
|
||||
BUILD_LZ4_TOOLS = y
|
||||
endif
|
||||
ifneq ($(CONFIG_SDK)$(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),)
|
||||
BUILD_LZO_TOOLS = y
|
||||
endif
|
||||
|
||||
tools-y += autoconf
|
||||
tools-y += autoconf-archive
|
||||
@ -36,7 +42,6 @@ tools-y += findutils
|
||||
tools-y += firmware-utils
|
||||
tools-y += flex
|
||||
tools-y += gengetopt
|
||||
tools-y += libdeflate
|
||||
tools-y += libressl
|
||||
tools-y += libtool
|
||||
tools-y += lzma
|
||||
@ -59,8 +64,11 @@ 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
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_LZO_TOOLS),y) += lzop
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_TOOLCHAIN),y) += gmp mpc mpfr
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini),y) += genext2fs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_ath79),y) += lzma-old squashfs
|
||||
@ -89,10 +97,11 @@ $(curdir)/genext2fs/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/gengetopt/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/gmp/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/isl/compile := $(curdir)/gmp/compile
|
||||
$(curdir)/libdeflate/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/liblzo/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/libressl/compile := $(curdir)/pkgconf/compile
|
||||
$(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile
|
||||
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
|
||||
$(curdir)/lzop/compile := $(curdir)/cmake/compile $(curdir)/liblzo/compile
|
||||
$(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
|
||||
$(curdir)/meson/compile := $(curdir)/ninja/compile
|
||||
@ -136,8 +145,11 @@ $(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(
|
||||
|
||||
$(foreach tool, $(filter-out xz,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/xz/compile))
|
||||
|
||||
# make any tool depend on tar, xz and patch to ensure that archives can be unpacked and patched properly
|
||||
tools-core := tar xz patch
|
||||
# make any tool depend on the following to ensure that archives can be unpacked and patched properly
|
||||
tools-core += libdeflate
|
||||
tools-core += patch
|
||||
tools-core += tar
|
||||
tools-core += xz
|
||||
|
||||
$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(patsubst %,$(curdir)/%/compile,$(tools-core))))
|
||||
tools-y += $(tools-core)
|
||||
|
@ -6,7 +6,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, "$pkgdatadir";
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
# Lib files.
|
||||
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
local $config_h;
|
||||
my $config_h_in;
|
||||
my @prepend_include;
|
||||
@ -41,7 +41,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, $pkgdatadir;
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -51,7 +51,7 @@
|
||||
# Data directory.
|
||||
-my $pkgdatadir = $ENV{'AC_MACRODIR'} || '@pkgdatadir@';
|
||||
+my $pkgdatadir = $ENV{'AC_MACRODIR'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
|
||||
# $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE.
|
||||
my %language;
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
# $M4.
|
||||
-my $m4 = $ENV{"M4"} || '@M4@';
|
||||
+my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/m4' : '@M4@');
|
||||
+my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/m4' : '@M4@');
|
||||
# Some non-GNU m4's don't reject the --help option, so give them /dev/null.
|
||||
fatal "need GNU m4 1.4 or later: $m4"
|
||||
if system "$m4 --help </dev/null 2>&1 | grep reload-state >/dev/null";
|
||||
@ -69,9 +69,9 @@
|
||||
my @words = shellwords ($_);
|
||||
my $type = shift @words;
|
||||
+
|
||||
+ if ($ENV{'STAGING_DIR'})
|
||||
+ if ($ENV{'STAGING_DIR_HOST'})
|
||||
+ {
|
||||
+ @words = map { s!^@pkgdatadir@!$ENV{'STAGING_DIR'}/../host/share/autoconf!; $_ } @words;
|
||||
+ @words = map { s!^@pkgdatadir@!$ENV{'STAGING_DIR_HOST'}/share/autoconf!; $_ } @words;
|
||||
+ }
|
||||
+
|
||||
if ($type eq 'begin-language:')
|
||||
@ -99,7 +99,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, $pkgdatadir;
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -110,9 +110,9 @@
|
||||
-my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@';
|
||||
-my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@';
|
||||
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
|
||||
+my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autoconf-name@' : '@bindir@/@autoconf-name@');
|
||||
+my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autoheader-name@' : '@bindir@/@autoheader-name@');
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
+my $autoconf = $ENV{'AUTOCONF'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoconf-name@' : '@bindir@/@autoconf-name@');
|
||||
+my $autoheader = $ENV{'AUTOHEADER'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autoheader-name@' : '@bindir@/@autoheader-name@');
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
my $automake = $ENV{'AUTOMAKE'} || 'automake';
|
||||
my $aclocal = $ENV{'ACLOCAL'} || 'aclocal';
|
||||
my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
|
||||
@ -134,7 +134,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, $pkgdatadir;
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -143,11 +143,11 @@
|
||||
|
||||
# Autoconf and lib files.
|
||||
-my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@';
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
+my $autom4te = $ENV{'AUTOM4TE'} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/@autom4te-name@' : '@bindir@/@autom4te-name@');
|
||||
my $autoconf = "$autom4te --language=autoconf";
|
||||
my @prepend_include;
|
||||
-my @include = ('@pkgdatadir@');
|
||||
+my @include = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+my @include = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
|
||||
# $help
|
||||
# -----
|
||||
@ -169,7 +169,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, $pkgdatadir;
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -178,11 +178,11 @@
|
||||
# We need to find m4sugar.
|
||||
my @prepend_include;
|
||||
-my @include = ('@pkgdatadir@');
|
||||
+my @include = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+my @include = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
my $force = 0;
|
||||
# m4.
|
||||
-my $m4 = $ENV{"M4"} || '@M4@';
|
||||
+my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/bin/m4' : '@M4@');
|
||||
+my $m4 = $ENV{"M4"} || ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/bin/m4' : '@M4@');
|
||||
|
||||
|
||||
# $HELP
|
||||
@ -208,7 +208,7 @@
|
||||
{
|
||||
- my $pkgdatadir = $ENV{'autom4te_perllibdir'} || '@pkgdatadir@';
|
||||
+ my $pkgdatadir = $ENV{'autom4te_perllibdir'} ||
|
||||
+ ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/autoconf' : '@pkgdatadir@');
|
||||
+ ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/autoconf' : '@pkgdatadir@');
|
||||
unshift @INC, $pkgdatadir;
|
||||
|
||||
# Override SHELL. On DJGPP SHELL may not be set to a shell
|
||||
@ -219,8 +219,8 @@
|
||||
|
||||
# Variables.
|
||||
-: ${AUTOM4TE='@bindir@/@autom4te-name@'}
|
||||
+if test -n "$STAGING_DIR"; then
|
||||
+ : ${AUTOM4TE="$STAGING_DIR/../host/bin/@autom4te-name@"}
|
||||
+if test -n "$STAGING_DIR_HOST"; then
|
||||
+ : ${AUTOM4TE="$STAGING_DIR_HOST/bin/@autom4te-name@"}
|
||||
+else
|
||||
+ : ${AUTOM4TE='@bindir@/@autom4te-name@'}
|
||||
+fi
|
||||
|
@ -25,7 +25,7 @@ HOST_CONFIGURE_VARS += \
|
||||
am_cv_prog_PERL_ithreads=no
|
||||
|
||||
define Host/Configure
|
||||
(cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) STAGING_DIR="" ./bootstrap)
|
||||
(cd $(HOST_BUILD_DIR); $(AM_TOOL_PATHS) STAGING_DIR_HOST="" ./bootstrap)
|
||||
$(call Host/Configure/Default)
|
||||
endef
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
our $VERSION = '@VERSION@';
|
||||
our $RELEASE_YEAR = '@RELEASE_YEAR@';
|
||||
-our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
|
||||
+our $libdir = $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@';
|
||||
+our $libdir = $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@';
|
||||
|
||||
our $perl_threads = 0;
|
||||
# We need at least this version for CLONE support.
|
||||
@ -30,7 +30,7 @@
|
||||
BEGIN
|
||||
{
|
||||
- @Aclocal::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
+ @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
+ @Aclocal::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
unless @Aclocal::perl_libdirs;
|
||||
unshift @INC, @Aclocal::perl_libdirs;
|
||||
}
|
||||
@ -40,8 +40,8 @@
|
||||
my @user_includes = ();
|
||||
-my @automake_includes = ("@datadir@/aclocal-$APIVERSION");
|
||||
-my @system_includes = ('@datadir@/aclocal');
|
||||
+my @automake_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . "/../host/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
|
||||
+my @system_includes = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/aclocal' : '@datadir@/aclocal');
|
||||
+my @automake_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . "/share/aclocal-$APIVERSION" : "@datadir@/aclocal-$APIVERSION");
|
||||
+my @system_includes = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/aclocal' : '@datadir@/aclocal');
|
||||
|
||||
# Whether we should copy M4 file in $user_includes[0].
|
||||
my $install = 0;
|
||||
@ -66,7 +66,7 @@
|
||||
BEGIN
|
||||
{
|
||||
- @Automake::perl_libdirs = ('@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
+ @Automake::perl_libdirs = ($ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
+ @Automake::perl_libdirs = ($ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/@PACKAGE@-@APIVERSION@' : '@datadir@/@PACKAGE@-@APIVERSION@')
|
||||
unless @Automake::perl_libdirs;
|
||||
unshift @INC, @Automake::perl_libdirs;
|
||||
|
||||
|
@ -8,18 +8,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=b43-tools
|
||||
PKG_DATE:=2017-09-13
|
||||
PKG_DATE:=2022-07-05
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/mbuesch/b43-tools.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
|
||||
PKG_SOURCE_VERSION:=27892ef741e7f1d08cb939744f8b8f5dac7b04ae
|
||||
PKG_MIRROR_HASH:=f914c36ac566e9e3b5a3a04de16ddb014fcad6a1cf25cdd8e4825c708d28d3f4
|
||||
HOST_BUILD_DIR=$(BUILD_DIR_HOST)/$(PKG_NAME)
|
||||
PKG_SOURCE_URL:=https://github.com/mbuesch/b43-tools.git
|
||||
PKG_SOURCE_VERSION:=2fe10ea6690df9a068cb21cde537236bae784a14
|
||||
PKG_MIRROR_HASH:=4f1cde5da35a1e768f6a01d67888549d04512073990769342381af1b2c9e7fd2
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
|
||||
define Host/Compile
|
||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/fwcutter \
|
||||
CFLAGS="$(HOST_CFLAGS) -include endian.h" \
|
||||
|
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cmake
|
||||
PKG_VERSION:=3.25.1
|
||||
PKG_VERSION:=3.25.2
|
||||
PKG_VERSION_MAJOR:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
||||
PKG_RELEASE:=1
|
||||
PKG_CPE_ID:=cpe:/a:kitware:cmake
|
||||
@ -15,7 +15,7 @@ PKG_CPE_ID:=cpe:/a:kitware:cmake
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
|
||||
https://cmake.org/files/v$(PKG_VERSION_MAJOR)/
|
||||
PKG_HASH:=1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8
|
||||
PKG_HASH:=c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
HOST_CONFIGURE_PARALLEL:=1
|
||||
|
@ -19,8 +19,6 @@ Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
|
||||
src/mkfs.fat.c | 19 ++++++++++++++++---
|
||||
3 files changed, 53 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/boot.c b/src/boot.c
|
||||
index 4de450d..8f78e1c 100644
|
||||
--- a/src/boot.c
|
||||
+++ b/src/boot.c
|
||||
@@ -33,6 +33,8 @@
|
||||
@ -32,7 +30,7 @@ index 4de450d..8f78e1c 100644
|
||||
|
||||
#include "common.h"
|
||||
#include "fsck.fat.h"
|
||||
@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, char *label)
|
||||
@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, cha
|
||||
{
|
||||
time_t now;
|
||||
struct tm *mtime;
|
||||
@ -40,7 +38,7 @@ index 4de450d..8f78e1c 100644
|
||||
off_t offset;
|
||||
int created;
|
||||
DIR_ENT de;
|
||||
@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, char *label)
|
||||
@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, cha
|
||||
if (de.name[0] == 0xe5)
|
||||
de.name[0] = 0x05;
|
||||
|
||||
@ -67,8 +65,6 @@ index 4de450d..8f78e1c 100644
|
||||
if (mtime && mtime->tm_year >= 80 && mtime->tm_year <= 207) {
|
||||
de.time = htole16((unsigned short)((mtime->tm_sec >> 1) +
|
||||
(mtime->tm_min << 5) +
|
||||
diff --git a/src/common.c b/src/common.c
|
||||
index 6a2e396..4f1afcb 100644
|
||||
--- a/src/common.c
|
||||
+++ b/src/common.c
|
||||
@@ -30,6 +30,7 @@
|
||||
@ -83,10 +79,9 @@ index 6a2e396..4f1afcb 100644
|
||||
uint32_t generate_volume_id(void)
|
||||
{
|
||||
struct timeval now;
|
||||
-
|
||||
- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
|
||||
+ char *source_date_epoch = NULL;
|
||||
+
|
||||
|
||||
- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
|
||||
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
||||
+ if (source_date_epoch) {
|
||||
+ char *tmp = NULL;
|
||||
@ -103,8 +98,6 @@ index 6a2e396..4f1afcb 100644
|
||||
srand(getpid());
|
||||
/* rand() returns int from [0,RAND_MAX], therefore only 31 bits */
|
||||
return (((uint32_t)(rand() & 0xFFFF)) << 16) | ((uint32_t)(rand() & 0xFFFF));
|
||||
diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
|
||||
index 37fc8ff..1948635 100644
|
||||
--- a/src/mkfs.fat.c
|
||||
+++ b/src/mkfs.fat.c
|
||||
@@ -1074,7 +1074,7 @@ static void setup_tables(void)
|
||||
@ -154,4 +147,4 @@ index 37fc8ff..1948635 100644
|
||||
+
|
||||
volume_id = generate_volume_id();
|
||||
check_atari();
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
From e7671c2a3be03d790cbc225cd3e784b5434fb5da Mon Sep 17 00:00:00 2001
|
||||
From: David Bauer <mail@david-bauer.net>
|
||||
Date: Mon, 16 Jan 2023 01:29:22 +0100
|
||||
Subject: [PATCH] config: switch to AC_CHECK_LIB
|
||||
|
||||
This fixes spurious build-errors on OpenWrt, where the AM_ICONV macro
|
||||
is undefined while invoking autoconfig. Later in the build, the ICONV
|
||||
LDOPTIONS are set to @LIBICONV@, failing the build.
|
||||
|
||||
Signed-off-by: David Bauer <mail@david-bauer.net>
|
||||
---
|
||||
configure.ac | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -70,10 +70,7 @@ AC_CHECK_DECLS([getmntent], [], [], [[#i
|
||||
AC_CHECK_DECLS([getmntinfo], [], [], [[#include <sys/mount.h>]])
|
||||
|
||||
# optional iconv support
|
||||
-AC_ARG_WITH([iconv], AS_HELP_STRING([--without-iconv], [build without iconv support]))
|
||||
-if test "x$with_iconv" != "xno"; then
|
||||
- AM_ICONV
|
||||
-fi
|
||||
+AC_CHECK_LIB(iconv, iconv_open)
|
||||
|
||||
# xxd (distributed with vim) is used in the testsuite
|
||||
AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
|
@ -7,25 +7,32 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libdeflate
|
||||
PKG_VERSION:=1.15
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.17
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_MIRROR_HASH:=122feff4543541b547dc89e832adf262c81911ae1acbccdc591f0353a85b600a
|
||||
PKG_MIRROR_HASH:=ee5790cf3140aa6a2e0f0c400d4b32539f13cb270e9357135c51927ba3784dc7
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Host/Compile
|
||||
$(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
|
||||
$(HOST_BUILD_DIR)/lib/*{,/*}.c \
|
||||
$(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \
|
||||
-o $(HOST_BUILD_DIR)/libdeflate-gzip
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/programs/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/
|
||||
$(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/libdeflate-gzip
|
||||
rm -f $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
|
||||
define Host/Uninstall
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip
|
||||
$(call Host/Uninstall/Default)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
42
tools/liblzo/Makefile
Normal file
42
tools/liblzo/Makefile
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright (C) 2022 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lzo
|
||||
PKG_VERSION:=2.10
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/
|
||||
PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
CMAKE_BINARY_SUBDIR:=openwrt-build
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DENABLE_SHARED=ON \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_EXAMPLES=OFF \
|
||||
-DENABLE_DOCS=ON \
|
||||
-DBUILD_TESTING=OFF
|
||||
|
||||
define Host/Uninstall
|
||||
rm -rf $(HOST_BUILD_PREFIX)/include/lzo
|
||||
rm -f $(HOST_BUILD_PREFIX)/lib/liblzo2.a
|
||||
rm -f $(HOST_BUILD_PREFIX)/lib/liblzo2.so.2.0.0
|
||||
rm -f $(HOST_BUILD_PREFIX)/lib/liblzo2.so.2
|
||||
rm -f $(HOST_BUILD_PREFIX)/lib/liblzo2.so
|
||||
rm -f $(HOST_BUILD_PREFIX)/lib/pkgconfig/lzo2.pc
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -0,0 +1,68 @@
|
||||
--- a/CMakeLists.txt 2022-11-28 06:34:39.171209779 -0800
|
||||
+++ b/CMakeLists.txt 2022-11-28 06:33:13.368239757 -0800
|
||||
@@ -51,8 +51,11 @@
|
||||
project(lzo VERSION 2.10 LANGUAGES C)
|
||||
|
||||
# configuration options
|
||||
-option(ENABLE_STATIC "Build static LZO library." ON)
|
||||
-option(ENABLE_SHARED "Build shared LZO library." OFF)
|
||||
+option(ENABLE_STATIC "Build static LZO library." ON)
|
||||
+option(ENABLE_SHARED "Build shared LZO library." OFF)
|
||||
+option(ENABLE_TESTS "Build tests." ON)
|
||||
+option(ENABLE_EXAMPLES "Build examples." ON)
|
||||
+option(ENABLE_DOCS "Install documentation." ON)
|
||||
if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
|
||||
set(ENABLE_STATIC ON)
|
||||
endif()
|
||||
@@ -127,14 +130,20 @@
|
||||
endif()
|
||||
endmacro()
|
||||
# main test driver
|
||||
+if(ENABLE_TESTS OR ENABLE_EXAMPLES)
|
||||
lzo_add_executable(lzotest lzotest/lzotest.c)
|
||||
+endif()
|
||||
# examples
|
||||
+if(ENABLE_EXAMPLES)
|
||||
lzo_add_executable(dict examples/dict.c)
|
||||
lzo_add_executable(lzopack examples/lzopack.c)
|
||||
lzo_add_executable(overlap examples/overlap.c)
|
||||
lzo_add_executable(precomp examples/precomp.c)
|
||||
lzo_add_executable(precomp2 examples/precomp2.c)
|
||||
+endif()
|
||||
+if(ENABLE_TESTS OR ENABLE_EXAMPLES)
|
||||
lzo_add_executable(simple examples/simple.c)
|
||||
+endif()
|
||||
# some boring internal test programs
|
||||
if(0)
|
||||
lzo_add_executable(align tests/align.c)
|
||||
@@ -144,7 +153,7 @@
|
||||
endif()
|
||||
|
||||
# miniLZO
|
||||
-if(1)
|
||||
+if(ENABLE_TESTS)
|
||||
add_executable(testmini minilzo/testmini.c minilzo/minilzo.c)
|
||||
target_include_directories(testmini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/lzo") # needed for "lzoconf.h"
|
||||
endif()
|
||||
@@ -263,8 +272,10 @@
|
||||
|
||||
if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
|
||||
|
||||
-set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
|
||||
-install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
|
||||
+if(ENABLE_DOCS)
|
||||
+ set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
|
||||
+ install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
|
||||
+endif()
|
||||
|
||||
set(f include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h
|
||||
include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h
|
||||
@@ -285,7 +296,7 @@
|
||||
)
|
||||
endif()
|
||||
|
||||
-if(1)
|
||||
+if(ENABLE_EXAMPLES)
|
||||
set(f lzopack lzotest simple testmini) # examples
|
||||
install(TARGETS ${f} DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/lzo/examples")
|
||||
endif()
|
@ -13,11 +13,11 @@
|
||||
: ${MV="mv -f"}
|
||||
: ${RM="rm -f"}
|
||||
-: ${SED="@SED@"}
|
||||
+if test -n "$STAGING_DIR"; then
|
||||
+ : ${EGREP="$STAGING_DIR/../host/bin/grep -E"}
|
||||
+ : ${FGREP="$STAGING_DIR/../host/bin/grep -F"}
|
||||
+ : ${GREP="$STAGING_DIR/../host/bin/grep"}
|
||||
+ : ${SED="$STAGING_DIR/../host/bin/sed"}
|
||||
+if test -n "$STAGING_DIR_HOST"; then
|
||||
+ : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"}
|
||||
+ : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"}
|
||||
+ : ${GREP="$STAGING_DIR_HOST/bin/grep"}
|
||||
+ : ${SED="$STAGING_DIR_HOST/bin/sed"}
|
||||
+else
|
||||
+ : ${EGREP="@EGREP@"}
|
||||
+ : ${FGREP="@FGREP@"}
|
||||
@ -42,11 +42,11 @@
|
||||
: ${MV="mv -f"}
|
||||
: ${RM="rm -f"}
|
||||
-: ${SED="@SED@"}
|
||||
+if test -n "$STAGING_DIR"; then
|
||||
+ : ${EGREP="$STAGING_DIR/../host/bin/grep -E"}
|
||||
+ : ${FGREP="$STAGING_DIR/../host/bin/grep -F"}
|
||||
+ : ${GREP="$STAGING_DIR/../host/bin/grep"}
|
||||
+ : ${SED="$STAGING_DIR/../host/bin/sed"}
|
||||
+if test -n "$STAGING_DIR_HOST"; then
|
||||
+ : ${EGREP="$STAGING_DIR_HOST/bin/grep -E"}
|
||||
+ : ${FGREP="$STAGING_DIR_HOST/bin/grep -F"}
|
||||
+ : ${GREP="$STAGING_DIR_HOST/bin/grep"}
|
||||
+ : ${SED="$STAGING_DIR_HOST/bin/sed"}
|
||||
+else
|
||||
+ : ${EGREP="@EGREP@"}
|
||||
+ : ${FGREP="@FGREP@"}
|
||||
@ -64,11 +64,11 @@
|
||||
- pkgdatadir=@pkgdatadir@
|
||||
- pkgltdldir=@pkgdatadir@
|
||||
- aclocaldir=@aclocaldir@
|
||||
+ if test -n "$STAGING_DIR"; then
|
||||
+ datadir="$STAGING_DIR/../host/share"
|
||||
+ pkgdatadir="$STAGING_DIR/../host/share/libtool"
|
||||
+ pkgltdldir="$STAGING_DIR/../host/share/libtool"
|
||||
+ aclocaldir="$STAGING_DIR/../host/share/aclocal"
|
||||
+ if test -n "$STAGING_DIR_HOST"; then
|
||||
+ datadir="$STAGING_DIR_HOST/share"
|
||||
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool"
|
||||
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool"
|
||||
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal"
|
||||
+ else
|
||||
+ datadir=@datadir@
|
||||
+ pkgdatadir=@pkgdatadir@
|
||||
@ -88,11 +88,11 @@
|
||||
- pkgdatadir=@pkgdatadir@
|
||||
- pkgltdldir=@pkgdatadir@
|
||||
- aclocaldir=@aclocaldir@
|
||||
+ if test -n "$STAGING_DIR"; then
|
||||
+ datadir="$STAGING_DIR/../host/share"
|
||||
+ pkgdatadir="$STAGING_DIR/../host/share/libtool"
|
||||
+ pkgltdldir="$STAGING_DIR/../host/share/libtool"
|
||||
+ aclocaldir="$STAGING_DIR/../host/share/aclocal"
|
||||
+ if test -n "$STAGING_DIR_HOST"; then
|
||||
+ datadir="$STAGING_DIR_HOST/share"
|
||||
+ pkgdatadir="$STAGING_DIR_HOST/share/libtool"
|
||||
+ pkgltdldir="$STAGING_DIR_HOST/share/libtool"
|
||||
+ aclocaldir="$STAGING_DIR_HOST/share/aclocal"
|
||||
+ else
|
||||
+ datadir=@datadir@
|
||||
+ pkgdatadir=@pkgdatadir@
|
||||
@ -111,7 +111,7 @@
|
||||
-
|
||||
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
|
||||
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
|
||||
+_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR:-$STAGING_DIR}/../host/include"], [LTCC compiler flags])dnl
|
||||
+_LT_DECL([LTCFLAGS], [CFLAGS], ["-O2 -I\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/include"], [LTCC compiler flags])dnl
|
||||
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
|
||||
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
|
||||
|
||||
@ -122,9 +122,9 @@
|
||||
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
|
||||
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
|
||||
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
|
||||
+_LT_DECL([], [GREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep"], [A grep program that handles long lines])
|
||||
+_LT_DECL([], [EGREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep -E"], [An ERE matcher])
|
||||
+_LT_DECL([], [FGREP], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/grep -F"], [A literal string matcher])
|
||||
+_LT_DECL([], [GREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep"], [A grep program that handles long lines])
|
||||
+_LT_DECL([], [EGREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep -E"], [An ERE matcher])
|
||||
+_LT_DECL([], [FGREP], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/grep -F"], [A literal string matcher])
|
||||
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
|
||||
AC_SUBST([GREP])
|
||||
])
|
||||
@ -135,7 +135,7 @@
|
||||
-test -z "$SED" && SED=sed
|
||||
Xsed="$SED -e 1s/^X//"
|
||||
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
|
||||
+_LT_DECL([], [SED], ["\${STAGING_DIR:-$STAGING_DIR}/../host/bin/sed"], [A sed program that does not truncate output])
|
||||
+_LT_DECL([], [SED], ["\${STAGING_DIR_HOST:-$STAGING_DIR_HOST}/bin/sed"], [A sed program that does not truncate output])
|
||||
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
|
||||
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
|
||||
])# _LT_DECL_SED
|
||||
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=llvm-project
|
||||
PKG_VERSION:=15.0.6
|
||||
PKG_VERSION:=15.0.7
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
|
||||
PKG_HASH:=9d53ad04dc60cb7b30e810faf64c5ab8157dadef46c8766f67f286238256ff92
|
||||
PKG_HASH:=8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user