Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
commit
feef75ea4d
@ -13,6 +13,14 @@ config HAVE_DOT_CONFIG
|
||||
bool
|
||||
default y
|
||||
|
||||
HOST_OS := $(shell, uname)
|
||||
|
||||
config HOST_OS_LINUX
|
||||
def_bool $(shell, ./config/check-uname.sh Linux)
|
||||
|
||||
config HOST_OS_MACOS
|
||||
def_bool $(shell, ./config/check-uname.sh Darwin)
|
||||
|
||||
source "target/Config.in"
|
||||
|
||||
source "config/Config-images.in"
|
||||
|
||||
1
config/check-uname.sh
Executable file
1
config/check-uname.sh
Executable file
@ -0,0 +1 @@
|
||||
[ "$(uname)" = "$1" ] && echo y || echo n
|
||||
68
include/bpf.mk
Normal file
68
include/bpf.mk
Normal file
@ -0,0 +1,68 @@
|
||||
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
|
||||
|
||||
ifneq ($(CONFIG_BPF_TOOLCHAIN_HOST),)
|
||||
BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
|
||||
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
|
||||
BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
|
||||
else
|
||||
BPF_PATH:=$(PATH)
|
||||
endif
|
||||
CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' which clang clang-13 clang-12 clang-11))
|
||||
LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
|
||||
else
|
||||
CLANG:=$(STAGING_DIR_HOST)/bin/clang
|
||||
LLVM_VER:=
|
||||
endif
|
||||
|
||||
LLVM_PATH:=$(dir $(CLANG))
|
||||
LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
|
||||
LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
|
||||
LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
|
||||
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
|
||||
|
||||
BPF_KARCH:=mips
|
||||
BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el)
|
||||
BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
|
||||
|
||||
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
|
||||
|
||||
BPF_KERNEL_INCLUDE := \
|
||||
-nostdinc -isystem $(TOOLCHAIN_DIR)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
|
||||
-I$(BPF_HEADERS_DIR)/include \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/include/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/include/generated/uapi \
|
||||
-I$(BPF_HEADERS_DIR)/tools/lib \
|
||||
-I$(BPF_HEADERS_DIR)/tools/testing/selftests \
|
||||
-I$(BPF_HEADERS_DIR)/samples/bpf \
|
||||
-include linux/kconfig.h -include asm_goto_workaround.h
|
||||
|
||||
BPF_CFLAGS := \
|
||||
$(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \
|
||||
-D__KERNEL__ -D__BPF_TRACING__ \
|
||||
-D__TARGET_ARCH_${BPF_KARCH} \
|
||||
-m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \
|
||||
-fno-stack-protector -Wall \
|
||||
-Wno-unused-value -Wno-pointer-sign \
|
||||
-Wno-compare-distinct-pointer-types \
|
||||
-Wno-gnu-variable-sized-type-not-at-end \
|
||||
-Wno-address-of-packed-member -Wno-tautological-compare \
|
||||
-Wno-unknown-warning-option \
|
||||
-fno-asynchronous-unwind-tables \
|
||||
-Wno-uninitialized -Wno-unused-variable \
|
||||
-Wno-unused-label \
|
||||
-O2 -emit-llvm -Xclang -disable-llvm-passes
|
||||
|
||||
define CompileBPF
|
||||
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \
|
||||
-c $(1) -o $(patsubst %.c,%.bc,$(1))
|
||||
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
|
||||
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
|
||||
$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
|
||||
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
|
||||
endef
|
||||
|
||||
@ -59,6 +59,21 @@ define dl_tar_pack
|
||||
$$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
|
||||
endef
|
||||
|
||||
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
|
||||
|
||||
# Used in Build/CoreTargets and HostBuild/Core as an integrity check for
|
||||
# downloaded files. It will add a FORCE rule if the sha256 hash does not
|
||||
# match, so that the download can be more thoroughly handled by download.pl.
|
||||
define check_download_integrity
|
||||
expected_hash:=$(strip $(if $(filter-out x,$(HASH)),$(HASH),$(MIRROR_HASH)))
|
||||
$$(if $$(and $(FILE),$$(wildcard $(DL_DIR)/$(FILE)), \
|
||||
$$(filter undefined,$$(flavor DownloadChecked/$(FILE)))), \
|
||||
$$(eval DownloadChecked/$(FILE):=1) \
|
||||
$$(if $$(filter-out $$(call gen_sha256sum,$(FILE)),$$(expected_hash)), \
|
||||
$(DL_DIR)/$(FILE): FORCE) \
|
||||
)
|
||||
endef
|
||||
|
||||
ifdef CHECK
|
||||
check_escape=$(subst ','\'',$(1))
|
||||
#')
|
||||
@ -74,8 +89,6 @@ else
|
||||
check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix))
|
||||
endif
|
||||
|
||||
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
|
||||
|
||||
ifdef FIXUP
|
||||
F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2)
|
||||
F_hash_mismatch = $(F_hash_deprecated)
|
||||
|
||||
@ -180,7 +180,7 @@ ifndef DUMP
|
||||
clean-build: host-clean-build
|
||||
endif
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
$(call check_download_integrity)
|
||||
|
||||
$(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
|
||||
$(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
|
||||
|
||||
@ -128,6 +128,10 @@ endef
|
||||
define Kernel/CompileModules/Default
|
||||
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
||||
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
|
||||
# If .config did not change, use the previous timestamp to avoid package rebuilds
|
||||
cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \
|
||||
mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \
|
||||
$(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save
|
||||
endef
|
||||
|
||||
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
define BuildTarget/bin
|
||||
ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT))
|
||||
TARGET_VARIANT=$(if $(ALL_VARIANTS),$(if $(VARIANT),$(VARIANT),$(firstword $(ALL_VARIANTS))))
|
||||
ifeq ($(if $(TARGET_VARIANT),$(BUILD_VARIANT)),$(TARGET_VARIANT))
|
||||
ifdef Package/$(1)/install
|
||||
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
|
||||
$(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
|
||||
|
||||
@ -105,7 +105,8 @@ ifeq ($(DUMP),)
|
||||
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
|
||||
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
|
||||
|
||||
ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT)))
|
||||
TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(VARIANT),$(firstword $(ALL_VARIANTS))))
|
||||
ifeq ($(BUILD_VARIANT),$$(if $$(TARGET_VARIANT),$$(TARGET_VARIANT),$(BUILD_VARIANT)))
|
||||
do_install=
|
||||
ifdef Package/$(1)/install
|
||||
do_install=yes
|
||||
|
||||
@ -183,7 +183,7 @@ define Build/CoreTargets
|
||||
$(call Build/Autoclean)
|
||||
$(call DefaultTargets)
|
||||
|
||||
$(DL_DIR)/$(FILE): FORCE
|
||||
$(call check_download_integrity)
|
||||
|
||||
download:
|
||||
$(foreach hook,$(Hooks/Download),
|
||||
|
||||
@ -198,5 +198,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash
|
||||
|
||||
# Install ldconfig stub
|
||||
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
|
||||
touch $(STAGING_DIR_HOST)/bin/ldconfig && \
|
||||
chmod +x $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
$(LN) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig))
|
||||
|
||||
@ -29,12 +29,14 @@ diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
|
||||
subdir_make_opts = \
|
||||
-r -C $(1) \
|
||||
BUILD_SUBDIR="$(1)" \
|
||||
BUILD_VARIANT="$(4)"
|
||||
BUILD_VARIANT="$(4)" \
|
||||
ALL_VARIANTS="$(5)"
|
||||
|
||||
# 1: subdir
|
||||
# 2: target
|
||||
# 3: build type
|
||||
# 4: build variant
|
||||
# 5: all variants
|
||||
log_make = \
|
||||
$(if $(call debug,$(1),v),,@)+ \
|
||||
$(if $(BUILD_LOG), \
|
||||
@ -62,15 +64,15 @@ define subdir
|
||||
$(foreach target,$(SUBTARGETS) $($(1)/subtargets),
|
||||
$(foreach btype,$(buildtypes-$(bd)),
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
|
||||
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
|
||||
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|
||||
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
|
||||
$(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target)))
|
||||
)
|
||||
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
|
||||
$(foreach variant,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default))),
|
||||
$(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant)))
|
||||
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))))
|
||||
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \
|
||||
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)))
|
||||
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|
||||
|| $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target))))
|
||||
)
|
||||
$(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),,
|
||||
|
||||
@ -331,13 +331,19 @@ find_mtd_part() {
|
||||
}
|
||||
|
||||
find_mmc_part() {
|
||||
local DEVNAME PARTNAME
|
||||
local DEVNAME PARTNAME ROOTDEV
|
||||
|
||||
if grep -q "$1" /proc/mtd; then
|
||||
echo "" && return 0
|
||||
fi
|
||||
|
||||
for DEVNAME in /sys/block/mmcblk*/mmcblk*p*; do
|
||||
if [ -n "$2" ]; then
|
||||
ROOTDEV="$2"
|
||||
else
|
||||
ROOTDEV="mmcblk*"
|
||||
fi
|
||||
|
||||
for DEVNAME in /sys/block/$ROOTDEV/mmcblk*p*; do
|
||||
PARTNAME="$(grep PARTNAME ${DEVNAME}/uevent | cut -f2 -d'=')"
|
||||
[ "$PARTNAME" = "$1" ] && echo "/dev/$(basename $DEVNAME)" && return 0
|
||||
done
|
||||
|
||||
@ -220,15 +220,6 @@ hex_le32_to_cpu() {
|
||||
echo "$@"
|
||||
}
|
||||
|
||||
get_partition_by_name() {
|
||||
for partname in /sys/class/block/$1/*/name; do
|
||||
[ "$(cat ${partname})" = "$2" ] && {
|
||||
basename ${partname%%/name}
|
||||
break
|
||||
}
|
||||
done
|
||||
}
|
||||
|
||||
get_partitions() { # <device> <filename>
|
||||
local disk="$1"
|
||||
local filename="$2"
|
||||
|
||||
@ -22,7 +22,7 @@ bananapi,bpi-r64)
|
||||
export_partdevice rootdev 0
|
||||
case "$rootdev" in
|
||||
mmc*)
|
||||
local envdev=/dev/$(get_partition_by_name $rootdev ubootenv)
|
||||
local envdev=$(find_mmc_part "ubootenv" $rootdev)
|
||||
ubootenv_add_uci_config "$envdev" "0x0" "0x80000" "0x80000" "1"
|
||||
ubootenv_add_uci_config "$envdev" "0x80000" "0x80000" "0x80000" "1"
|
||||
;;
|
||||
|
||||
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=5.10
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
|
||||
10
package/devel/strace/patches/010-m4.patch
Normal file
10
package/devel/strace/patches/010-m4.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -408,7 +408,6 @@ strace_LDADD += $(libiberty_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
-@CODE_COVERAGE_RULES@
|
||||
CODE_COVERAGE_BRANCH_COVERAGE = 1
|
||||
CODE_COVERAGE_GENHTML_OPTIONS = $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) \
|
||||
--prefix $(shell cd $(abs_top_srcdir)/.. && pwd || echo .)
|
||||
101
package/kernel/bpf-headers/Makefile
Normal file
101
package/kernel/bpf-headers/Makefile
Normal file
@ -0,0 +1,101 @@
|
||||
#
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
override QUILT:=
|
||||
override HOST_QUILT:=
|
||||
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
|
||||
PKG_NAME:=linux
|
||||
PKG_PATCHVER:=5.10
|
||||
PKG_VERSION:=$(PKG_PATCHVER)$(strip $(LINUX_VERSION-$(PKG_PATCHVER)))
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=$(LINUX_SITE)
|
||||
PKG_HASH:=$(LINUX_KERNEL_HASH-$(strip $(PKG_VERSION)))
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/bpf-headers/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
GENERIC_BACKPORT_DIR := $(GENERIC_PLATFORM_DIR)/backport$(if $(wildcard $(GENERIC_PLATFORM_DIR)/backport-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
|
||||
GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/pending$(if $(wildcard $(GENERIC_PLATFORM_DIR)/pending-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
|
||||
GENERIC_HACK_DIR := $(GENERIC_PLATFORM_DIR)/hack$(if $(wildcard $(GENERIC_PLATFORM_DIR)/hack-$(PKG_PATCHVER)),-$(PKG_PATCHVER))
|
||||
GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files $(GENERIC_PLATFORM_DIR)/files-$(PKG_PATCHVER)),"$(dir)")
|
||||
PATCH_DIR := $(CURDIR)/patches
|
||||
FILES_DIR :=
|
||||
|
||||
REAL_LINUX_DIR := $(LINUX_DIR)
|
||||
LINUX_DIR := $(PKG_BUILD_DIR)
|
||||
|
||||
include $(INCLUDE_DIR)/bpf.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/bpf-headers
|
||||
SECTION:=kernel
|
||||
CATEGORY:=Kernel
|
||||
TITLE:=eBPF kernel headers
|
||||
BUILDONLY:=1
|
||||
HIDDEN:=1
|
||||
endef
|
||||
|
||||
PKG_CONFIG_PATH:=
|
||||
|
||||
export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
|
||||
|
||||
KERNEL_MAKE := \
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
ARCH=$(BPF_KARCH) \
|
||||
CROSS_COMPILE=$(BPF_ARCH)-linux- \
|
||||
LLVM=1 CC="$(CLANG)" LD="$(TARGET_CROSS)ld" \
|
||||
HOSTCC="$(HOSTCC)" \
|
||||
HOSTCXX="$(HOSTCXX)" \
|
||||
HOST_LOADLIBES="-L$(STAGING_DIR_HOST)/lib" \
|
||||
KBUILD_HOSTLDLIBS="-L$(STAGING_DIR_HOST)/lib" \
|
||||
CONFIG_SHELL="$(BASH)" \
|
||||
INSTALL_HDR_PATH="$(PKG_BUILD_DIR)/user_headers"
|
||||
|
||||
define Build/Patch
|
||||
$(Kernel/Patch/Default)
|
||||
endef
|
||||
|
||||
BPF_DOC = $(PKG_BUILD_DIR)/scripts/bpf_helpers_doc.py
|
||||
|
||||
define Build/Configure
|
||||
grep -vE 'CONFIG_(CPU_.*ENDIAN|HZ)' $(PKG_BUILD_DIR)/arch/mips/configs/generic_defconfig > $(PKG_BUILD_DIR)/.config
|
||||
echo 'CONFIG_CPU_$(if $(CONFIG_BIG_ENDIAN),BIG,LITTLE)_ENDIAN=y' >> $(PKG_BUILD_DIR)/.config
|
||||
grep CONFIG_HZ $(REAL_LINUX_DIR)/.config >> $(PKG_BUILD_DIR)/.config
|
||||
yes '' | $(KERNEL_MAKE) oldconfig
|
||||
grep 'CONFIG_HZ=' $(REAL_LINUX_DIR)/.config | \
|
||||
cut -d= -f2 | \
|
||||
bc -q $(LINUX_DIR)/kernel/time/timeconst.bc \
|
||||
> $(LINUX_DIR)/include/generated/timeconst.h
|
||||
$(BPF_DOC) --header \
|
||||
--file $(LINUX_DIR)/tools/include/uapi/linux/bpf.h \
|
||||
> $(PKG_BUILD_DIR)/tools/lib/bpf/bpf_helper_defs.h
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) archprepare headers_install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/bpf-headers/arch $(1)/bpf-headers/tools
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/arch/$(BPF_KARCH) \
|
||||
$(1)/bpf-headers/arch/
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/tools/lib \
|
||||
$(PKG_BUILD_DIR)/tools/testing \
|
||||
$(1)/bpf-headers/tools/
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/include \
|
||||
$(PKG_BUILD_DIR)/samples \
|
||||
$(PKG_BUILD_DIR)/scripts \
|
||||
$(PKG_BUILD_DIR)/user_headers \
|
||||
$(1)/bpf-headers
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,bpf-headers))
|
||||
14
package/kernel/bpf-headers/src/include/generated/bounds.h
Normal file
14
package/kernel/bpf-headers/src/include/generated/bounds.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __LINUX_BOUNDS_H__
|
||||
#define __LINUX_BOUNDS_H__
|
||||
/*
|
||||
* DO NOT MODIFY.
|
||||
*
|
||||
* This file was generated by Kbuild
|
||||
*/
|
||||
|
||||
#define NR_PAGEFLAGS 23 /* __NR_PAGEFLAGS */
|
||||
#define MAX_NR_ZONES 4 /* __MAX_NR_ZONES */
|
||||
#define NR_CPUS_BITS 1 /* ilog2(CONFIG_NR_CPUS) */
|
||||
#define SPINLOCK_SIZE 64 /* sizeof(spinlock_t) */
|
||||
|
||||
#endif
|
||||
54
package/network/config/qosify/Makefile
Normal file
54
package/network/config/qosify/Makefile
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (C) 2021 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=qosify
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-11-01
|
||||
PKG_SOURCE_VERSION:=52a57bf0e4eb2c6419be304981c5c94adb32d037
|
||||
PKG_MIRROR_HASH:=11a5f2650cf9c4979455ca230eb9ceddb035e6914bda78cf75b8dd7ebaff65d3
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_BUILD_DEPENDS:=bpf-headers
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
include $(INCLUDE_DIR)/bpf.mk
|
||||
|
||||
define Package/qosify
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=A simple QoS solution based eBPF + CAKE
|
||||
DEPENDS:=+libbpf +libubox +libubus +kmod-sched-cake +kmod-sched-bpf +tc-full $(BPF_DEPENDS)
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call CompileBPF,$(PKG_BUILD_DIR)/qosify-bpf.c)
|
||||
$(Build/Compile/Default)
|
||||
endef
|
||||
|
||||
define Package/qosify/conffiles
|
||||
/etc/config/qosify
|
||||
/etc/qosify-defaults.conf
|
||||
endef
|
||||
|
||||
define Package/qosify/install
|
||||
$(INSTALL_DIR) $(1)/lib/bpf $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config $(1)/etc/hotplug.d/net
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/qosify-bpf.o $(1)/lib/bpf
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qosify $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/qosify.init $(1)/etc/init.d/qosify
|
||||
$(INSTALL_DATA) ./files/qosify-defaults.conf $(1)/etc/qosify-defaults.conf
|
||||
$(INSTALL_DATA) ./files/qosify.conf $(1)/etc/config/qosify
|
||||
$(INSTALL_DATA) ./files/qosify.hotplug $(1)/etc/hotplug.d/net/10-qosify
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,qosify))
|
||||
17
package/network/config/qosify/files/qosify-defaults.conf
Normal file
17
package/network/config/qosify/files/qosify-defaults.conf
Normal file
@ -0,0 +1,17 @@
|
||||
# DNS
|
||||
tcp:53 CS5
|
||||
tcp:5353 CS5
|
||||
udp:53 CS5
|
||||
udp:5353 CS5
|
||||
|
||||
# NTP
|
||||
udp:123 CS6
|
||||
|
||||
# SSH
|
||||
tcp:22 +CS4
|
||||
|
||||
# HTTP/QUIC
|
||||
tcp:80 +CS3
|
||||
tcp:443 +CS3
|
||||
udp:80 +CS3
|
||||
udp:443 +CS3
|
||||
30
package/network/config/qosify/files/qosify.conf
Normal file
30
package/network/config/qosify/files/qosify.conf
Normal file
@ -0,0 +1,30 @@
|
||||
config defaults
|
||||
list defaults /etc/qosify-defaults.conf
|
||||
option dscp_prio CS5
|
||||
option dscp_icmp CS6
|
||||
option dscp_bulk CS0
|
||||
option dscp_default_udp CS4
|
||||
option bulk_trigger_timeout 5
|
||||
option bulk_trigger_pps 100
|
||||
option prio_max_avg_pkt_len 500
|
||||
|
||||
config interface wan
|
||||
option name wan
|
||||
option disabled 1
|
||||
option bandwidth_up 100mbit
|
||||
option bandwidth_down 100mbit
|
||||
# defaults:
|
||||
option ingress 1
|
||||
option egress 1
|
||||
option mode diffserv4
|
||||
option host_isolate 1
|
||||
option autorate_ingress 1
|
||||
option ingress_options ""
|
||||
option egress_options ""
|
||||
option options ""
|
||||
|
||||
config device wandev
|
||||
option disabled 1
|
||||
option name wan
|
||||
option bandwidth 100mbit
|
||||
|
||||
2
package/network/config/qosify/files/qosify.hotplug
Normal file
2
package/network/config/qosify/files/qosify.hotplug
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
ubus call qosify check_devices
|
||||
105
package/network/config/qosify/files/qosify.init
Normal file
105
package/network/config/qosify/files/qosify.init
Normal file
@ -0,0 +1,105 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (c) 2021 OpenWrt.org
|
||||
|
||||
START=19
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/qosify
|
||||
|
||||
add_option() {
|
||||
local type="$1"
|
||||
local name="$2"
|
||||
|
||||
config_get val "$cfg" "$name"
|
||||
|
||||
[ -n "$val" ] && json_add_$type "$name" "$val"
|
||||
}
|
||||
|
||||
add_defaults() {
|
||||
cfg="$1"
|
||||
|
||||
json_add_boolean reset 1
|
||||
|
||||
config_get files "$cfg" defaults
|
||||
json_add_array files
|
||||
for i in $files; do
|
||||
json_add_string "" "$i"
|
||||
done
|
||||
json_close_array
|
||||
|
||||
add_option int timeout
|
||||
add_option string dscp_prio
|
||||
add_option string dscp_bulk
|
||||
add_option string dscp_icmp
|
||||
add_option string dscp_default_udp
|
||||
add_option string dscp_default_tcp
|
||||
add_option int bulk_trigger_timeout
|
||||
add_option int bulk_trigger_pps
|
||||
add_option int prio_max_avg_pkt_len
|
||||
}
|
||||
|
||||
add_interface() {
|
||||
local cfg="$1"
|
||||
|
||||
config_get_bool disabled "$cfg" disabled 0
|
||||
[ "$disabled" -gt 0 ] && return
|
||||
|
||||
config_get name "$cfg" name
|
||||
json_add_object "$name"
|
||||
|
||||
config_get bw "$cfg" bandwidth
|
||||
|
||||
config_get bw_up "$cfg" bandwidth_up
|
||||
bw_up="${bw_up:-$bw}"
|
||||
[ -n "$bw_up" ] && json_add_string bandwidth_up "$bw_up"
|
||||
|
||||
config_get bw_down "$cfg" bandwidth_down
|
||||
bw_down="${bw_down:-$bw}"
|
||||
[ -n "$bw_down" ] && json_add_string bandwidth_down "$bw_down"
|
||||
|
||||
add_option string bandwidth
|
||||
add_option boolean ingress
|
||||
add_option boolean egress
|
||||
add_option string mode
|
||||
add_option boolean host_isolate
|
||||
add_option boolean autorate_ingress
|
||||
add_option string ingress_options
|
||||
add_option string egress_options
|
||||
add_option string options
|
||||
|
||||
json_close_object
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
json_init
|
||||
|
||||
config_load qosify
|
||||
|
||||
config_foreach add_defaults defaults
|
||||
|
||||
json_add_object interfaces
|
||||
config_foreach add_interface interface
|
||||
json_close_object
|
||||
|
||||
json_add_object devices
|
||||
config_foreach add_interface device
|
||||
json_close_object
|
||||
|
||||
ubus call qosify config "$(json_dump)"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger qosify
|
||||
}
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
service_started() {
|
||||
ubus -t 10 wait_for qosify
|
||||
[ $? = 0 ] && reload_service
|
||||
}
|
||||
@ -965,8 +965,8 @@ dnsmasq_start()
|
||||
xappend "--addn-hosts=$HOSTFILE"
|
||||
append EXTRA_MOUNT "$HOSTFILE"
|
||||
else
|
||||
xappend "--addn-hosts=$(dirname $HOSTFILE)"
|
||||
append EXTRA_MOUNT "$(dirname $HOSTFILE)"
|
||||
xappend "--addn-hosts=$HOSTFILE_DIR"
|
||||
append EXTRA_MOUNT "$HOSTFILE_DIR"
|
||||
fi
|
||||
config_list_foreach "$cfg" "addnhosts" append_addnhosts
|
||||
config_list_foreach "$cfg" "bogusnxdomain" append_bogusnxdomain
|
||||
@ -1160,7 +1160,6 @@ dnsmasq_start()
|
||||
procd_add_jail_mount $EXTRA_MOUNT $RFC6761FILE $TRUSTANCHORSFILE
|
||||
procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
|
||||
procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
|
||||
[ "$HOSTFILE_DIR" != "/tmp" ] && procd_add_jail_mount "$HOSTFILE_DIR"
|
||||
procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
|
||||
|
||||
procd_close_instance
|
||||
|
||||
@ -677,6 +677,9 @@ ifeq ($(BUILD_VARIANT),supplicant-full-wolfssl)
|
||||
endef
|
||||
endif
|
||||
|
||||
# Build hostapd-common before its dependents, to avoid
|
||||
# spurious rebuilds when building multiple variants.
|
||||
$(eval $(call BuildPackage,hostapd-common))
|
||||
$(eval $(call BuildPackage,hostapd))
|
||||
$(eval $(call BuildPackage,hostapd-basic))
|
||||
$(eval $(call BuildPackage,hostapd-basic-openssl))
|
||||
@ -703,7 +706,6 @@ $(eval $(call BuildPackage,wpa-supplicant-openssl))
|
||||
$(eval $(call BuildPackage,wpa-supplicant-wolfssl))
|
||||
$(eval $(call BuildPackage,wpa-cli))
|
||||
$(eval $(call BuildPackage,hostapd-utils))
|
||||
$(eval $(call BuildPackage,hostapd-common))
|
||||
$(eval $(call BuildPackage,eapol-test))
|
||||
$(eval $(call BuildPackage,eapol-test-openssl))
|
||||
$(eval $(call BuildPackage,eapol-test-wolfssl))
|
||||
|
||||
@ -236,9 +236,11 @@ endef
|
||||
|
||||
$(eval $(call BuildPackage,ip-tiny))
|
||||
$(eval $(call BuildPackage,ip-full))
|
||||
# build tc-mod-iptables before its dependents, to avoid
|
||||
# spurious rebuilds when building multiple variants.
|
||||
$(eval $(call BuildPackage,tc-mod-iptables))
|
||||
$(eval $(call BuildPackage,tc-tiny))
|
||||
$(eval $(call BuildPackage,tc-full))
|
||||
$(eval $(call BuildPackage,tc-mod-iptables))
|
||||
$(eval $(call BuildPackage,genl))
|
||||
$(eval $(call BuildPackage,ip-bridge))
|
||||
$(eval $(call BuildPackage,ss))
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
|
||||
PKG_MIRROR_HASH:=c3b711047324b5eb149164b9d82f3ffb155ed579c9b00d7054a35b572201c2b6
|
||||
PKG_SOURCE_DATE:=2021-08-25
|
||||
PKG_SOURCE_VERSION:=e1b68111e1661c92a773cc5131b55f98d943888f
|
||||
PKG_MIRROR_HASH:=3833101859476d5d793cde0a3772464ac49d1e5fd0fce14e101a9c7ed1bb0709
|
||||
PKG_SOURCE_DATE:=2021-10-01
|
||||
PKG_SOURCE_VERSION:=d3907445b7aa9cbde70d501bd68a5e38db90c6b2
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
|
||||
PKG_SOURCE_DATE:=2021-10-22
|
||||
PKG_SOURCE_VERSION:=1c36d3d0a8fc87b97e236269f5104e139f1d641d
|
||||
PKG_MIRROR_HASH:=a5d64ab80c53bf3cb77e796aa673c2ba7d0a578fd443b802688ce91ee96a3f0d
|
||||
PKG_SOURCE_DATE:=2021-11-01
|
||||
PKG_SOURCE_VERSION:=c1976e57ce869d6d2a273ecbbe4fc071e53a181e
|
||||
PKG_MIRROR_HASH:=a7e5760b8ed55f89e8e36b3794c6653b6b58198bc55cce8be52a69e087e3dbf9
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -5,9 +5,9 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
|
||||
PKG_SOURCE_DATE:=2021-06-30
|
||||
PKG_SOURCE_VERSION:=4fc532c8a55ba8217ad67d7fd47c5eb9a8aba044
|
||||
PKG_MIRROR_HASH:=a5c8205f2e2b2f1f9ad687592e66a6e2bf8900dc54cfe3ceefe6c297d18971a8
|
||||
PKG_SOURCE_DATE:=2021-08-09
|
||||
PKG_SOURCE_VERSION:=a72457b61df045d3c499a6211362b751710590d7
|
||||
PKG_MIRROR_HASH:=ac617577bcb2ff3dbc3039ad67200afcce910840223a2de15977d3224e6557fd
|
||||
PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
|
||||
CMAKE_INSTALL:=1
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=f2fs-tools
|
||||
PKG_VERSION:=1.14.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
|
||||
@ -85,6 +85,7 @@ define Package/libf2fs
|
||||
DEPENDS:=+libuuid
|
||||
ABI_VERSION:=6
|
||||
CONFLICTS:=libf2fs-selinux
|
||||
VARIANT:=default
|
||||
endef
|
||||
|
||||
define Package/libf2fs-selinux
|
||||
@ -93,6 +94,7 @@ define Package/libf2fs-selinux
|
||||
TITLE:=Library for Flash-Friendly File System (F2FS) tools with SELinux support
|
||||
DEPENDS:=+libuuid +libselinux
|
||||
ABI_VERSION:=6
|
||||
VARIANT:=selinux
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
|
||||
@ -296,7 +296,6 @@ CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_AT91=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_AT91=y
|
||||
|
||||
@ -456,7 +456,6 @@ CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_AT91=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_HID=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
|
||||
@ -43,6 +43,7 @@ CONFIG_CSRC_R4K=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
|
||||
@ -435,7 +435,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_LAN78XX=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
|
||||
@ -437,7 +437,6 @@ CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWCOTG=y
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_PCI=y
|
||||
CONFIG_USB_PHY=y
|
||||
|
||||
@ -4599,6 +4599,7 @@ CONFIG_PROC_SYSCTL=y
|
||||
# CONFIG_PWM is not set
|
||||
# CONFIG_PWM_DEBUG is not set
|
||||
# CONFIG_PWM_FSL_FTM is not set
|
||||
# CONFIG_PWM_JZ4740 is not set
|
||||
# CONFIG_PWM_PCA9685 is not set
|
||||
CONFIG_PWRSEQ_EMMC=y
|
||||
# CONFIG_PWRSEQ_SD8787 is not set
|
||||
@ -6465,6 +6466,7 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y
|
||||
# CONFIG_USB_EMI26 is not set
|
||||
# CONFIG_USB_EMI62 is not set
|
||||
# CONFIG_USB_EPSON2888 is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
# CONFIG_USB_EZUSB_FX2 is not set
|
||||
# CONFIG_USB_FEW_INIT_RETRIES is not set
|
||||
# CONFIG_USB_FOTG210_HCD is not set
|
||||
|
||||
@ -73,42 +73,7 @@
|
||||
#ifdef CONFIG_SGI_PARTITION
|
||||
sgi_partition,
|
||||
#endif
|
||||
@@ -215,6 +222,18 @@ static ssize_t part_discard_alignment_sh
|
||||
p->start_sect));
|
||||
}
|
||||
|
||||
+static ssize_t part_name_show(struct device *dev,
|
||||
+ struct device_attribute *attr, char *buf)
|
||||
+{
|
||||
+ struct hd_struct *p = dev_to_part(dev);
|
||||
+
|
||||
+ if (p->info && p->info->volname)
|
||||
+ return sprintf(buf, "%s\n", p->info->volname);
|
||||
+
|
||||
+ buf[0] = '\0';
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static DEVICE_ATTR(partition, 0444, part_partition_show, NULL);
|
||||
static DEVICE_ATTR(start, 0444, part_start_show, NULL);
|
||||
static DEVICE_ATTR(size, 0444, part_size_show, NULL);
|
||||
@@ -223,6 +242,7 @@ static DEVICE_ATTR(alignment_offset, 044
|
||||
static DEVICE_ATTR(discard_alignment, 0444, part_discard_alignment_show, NULL);
|
||||
static DEVICE_ATTR(stat, 0444, part_stat_show, NULL);
|
||||
static DEVICE_ATTR(inflight, 0444, part_inflight_show, NULL);
|
||||
+static DEVICE_ATTR(name, 0444, part_name_show, NULL);
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
static struct device_attribute dev_attr_fail =
|
||||
__ATTR(make-it-fail, 0644, part_fail_show, part_fail_store);
|
||||
@@ -237,6 +257,7 @@ static struct attribute *part_attrs[] =
|
||||
&dev_attr_discard_alignment.attr,
|
||||
&dev_attr_stat.attr,
|
||||
&dev_attr_inflight.attr,
|
||||
+ &dev_attr_name.attr,
|
||||
#ifdef CONFIG_FAIL_MAKE_REQUEST
|
||||
&dev_attr_fail.attr,
|
||||
#endif
|
||||
@@ -694,6 +715,11 @@ static bool blk_add_partition(struct gen
|
||||
@@ -694,6 +701,11 @@ static bool blk_add_partition(struct gen
|
||||
(state->parts[p].flags & ADDPART_FLAG_RAID))
|
||||
md_autodetect_dev(part_to_dev(part)->devt);
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+config AR8216_PHY
|
||||
+ tristate "Driver for Atheros AR8216 switches"
|
||||
+ select SWCONFIG
|
||||
+ select ETHERNET_PACKET_MANGLE
|
||||
+
|
||||
+config AR8216_PHY_LEDS
|
||||
+ bool "Atheros AR8216 switch LED support"
|
||||
@ -52,7 +53,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+config PSB6970_PHY
|
||||
+ tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
|
||||
+ select SWCONFIG
|
||||
+ select ETHERNET_PACKET_MANGLE
|
||||
+
|
||||
+config RTL8306_PHY
|
||||
+ tristate "Driver for Realtek RTL8306S switches"
|
||||
|
||||
@ -0,0 +1,167 @@
|
||||
From ffe387740bbe88dd88bbe04d6375902708003d6e Mon Sep 17 00:00:00 2001
|
||||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Fri, 7 Jul 2017 17:25:00 +0200
|
||||
Subject: net: add packet mangeling
|
||||
|
||||
ar8216 switches have a hardware bug, which renders normal 802.1q support
|
||||
unusable. Packet mangling is required to fix up the vlan for incoming
|
||||
packets.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
include/linux/netdevice.h | 11 +++++++++++
|
||||
include/linux/skbuff.h | 14 ++++----------
|
||||
net/Kconfig | 6 ++++++
|
||||
net/core/dev.c | 20 +++++++++++++++-----
|
||||
net/core/skbuff.c | 17 +++++++++++++++++
|
||||
net/ethernet/eth.c | 6 ++++++
|
||||
6 files changed, 59 insertions(+), 15 deletions(-)
|
||||
|
||||
--- a/include/linux/netdevice.h
|
||||
+++ b/include/linux/netdevice.h
|
||||
@@ -1618,6 +1618,7 @@ enum netdev_priv_flags {
|
||||
IFF_FAILOVER_SLAVE = 1<<28,
|
||||
IFF_L3MDEV_RX_HANDLER = 1<<29,
|
||||
IFF_LIVE_RENAME_OK = 1<<30,
|
||||
+ IFF_NO_IP_ALIGN = 1<<31,
|
||||
};
|
||||
|
||||
#define IFF_802_1Q_VLAN IFF_802_1Q_VLAN
|
||||
@@ -1650,6 +1651,7 @@ enum netdev_priv_flags {
|
||||
#define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE
|
||||
#define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER
|
||||
#define IFF_LIVE_RENAME_OK IFF_LIVE_RENAME_OK
|
||||
+#define IFF_NO_IP_ALIGN IFF_NO_IP_ALIGN
|
||||
|
||||
/* Specifies the type of the struct net_device::ml_priv pointer */
|
||||
enum netdev_ml_priv_type {
|
||||
@@ -1990,6 +1992,11 @@ struct net_device {
|
||||
const struct tlsdev_ops *tlsdev_ops;
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ void (*eth_mangle_rx)(struct net_device *dev, struct sk_buff *skb);
|
||||
+ struct sk_buff *(*eth_mangle_tx)(struct net_device *dev, struct sk_buff *skb);
|
||||
+#endif
|
||||
+
|
||||
const struct header_ops *header_ops;
|
||||
|
||||
unsigned int flags;
|
||||
@@ -2080,6 +2087,10 @@ struct net_device {
|
||||
struct mpls_dev __rcu *mpls_ptr;
|
||||
#endif
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ void *phy_ptr; /* PHY device specific data */
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Cache lines mostly used on receive path (including eth_type_trans())
|
||||
*/
|
||||
--- a/include/linux/skbuff.h
|
||||
+++ b/include/linux/skbuff.h
|
||||
@@ -2710,6 +2710,10 @@ static inline int pskb_trim(struct sk_bu
|
||||
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
|
||||
}
|
||||
|
||||
+extern struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
+ unsigned int length, gfp_t gfp);
|
||||
+
|
||||
+
|
||||
/**
|
||||
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
|
||||
* @skb: buffer to alter
|
||||
@@ -2841,16 +2845,6 @@ static inline struct sk_buff *dev_alloc_
|
||||
}
|
||||
|
||||
|
||||
-static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
- unsigned int length, gfp_t gfp)
|
||||
-{
|
||||
- struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
|
||||
-
|
||||
- if (NET_IP_ALIGN && skb)
|
||||
- skb_reserve(skb, NET_IP_ALIGN);
|
||||
- return skb;
|
||||
-}
|
||||
-
|
||||
static inline struct sk_buff *netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
unsigned int length)
|
||||
{
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -26,6 +26,12 @@ menuconfig NET
|
||||
|
||||
if NET
|
||||
|
||||
+config ETHERNET_PACKET_MANGLE
|
||||
+ bool
|
||||
+ help
|
||||
+ This option can be selected by phy drivers that need to mangle
|
||||
+ packets going in or out of an ethernet device.
|
||||
+
|
||||
config WANT_COMPAT_NETLINK_MESSAGES
|
||||
bool
|
||||
help
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -3638,6 +3638,11 @@ static int xmit_one(struct sk_buff *skb,
|
||||
if (dev_nit_active(dev))
|
||||
dev_queue_xmit_nit(skb, dev);
|
||||
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev->eth_mangle_tx && !(skb = dev->eth_mangle_tx(dev, skb)))
|
||||
+ return NETDEV_TX_OK;
|
||||
+#endif
|
||||
+
|
||||
len = skb->len;
|
||||
PRANDOM_ADD_NOISE(skb, dev, txq, len + jiffies);
|
||||
trace_net_dev_start_xmit(skb, dev);
|
||||
--- a/net/core/skbuff.c
|
||||
+++ b/net/core/skbuff.c
|
||||
@@ -60,6 +60,7 @@
|
||||
#include <linux/prefetch.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/mpls.h>
|
||||
+#include <linux/if.h>
|
||||
|
||||
#include <net/protocol.h>
|
||||
#include <net/dst.h>
|
||||
@@ -553,6 +554,22 @@ skb_fail:
|
||||
}
|
||||
EXPORT_SYMBOL(__napi_alloc_skb);
|
||||
|
||||
+struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
|
||||
+ unsigned int length, gfp_t gfp)
|
||||
+{
|
||||
+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
|
||||
+
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
|
||||
+ return skb;
|
||||
+#endif
|
||||
+
|
||||
+ if (NET_IP_ALIGN && skb)
|
||||
+ skb_reserve(skb, NET_IP_ALIGN);
|
||||
+ return skb;
|
||||
+}
|
||||
+EXPORT_SYMBOL(__netdev_alloc_skb_ip_align);
|
||||
+
|
||||
void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
|
||||
int size, unsigned int truesize)
|
||||
{
|
||||
--- a/net/ethernet/eth.c
|
||||
+++ b/net/ethernet/eth.c
|
||||
@@ -171,6 +171,12 @@ __be16 eth_type_trans(struct sk_buff *sk
|
||||
const struct ethhdr *eth;
|
||||
|
||||
skb->dev = dev;
|
||||
+
|
||||
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
|
||||
+ if (dev->eth_mangle_rx)
|
||||
+ dev->eth_mangle_rx(dev, skb);
|
||||
+#endif
|
||||
+
|
||||
skb_reset_mac_header(skb);
|
||||
|
||||
eth = (struct ethhdr *)skb->data;
|
||||
@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/net/Kconfig
|
||||
+++ b/net/Kconfig
|
||||
@@ -98,6 +98,9 @@ source "net/mptcp/Kconfig"
|
||||
@@ -104,6 +104,9 @@ source "net/mptcp/Kconfig"
|
||||
|
||||
endif # if INET
|
||||
|
||||
|
||||
@ -470,7 +470,6 @@ CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_EHCI_MXC is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_MXS_PHY=y
|
||||
CONFIG_USB_OTG=y
|
||||
|
||||
@ -144,6 +144,7 @@ CONFIG_DWMAC_IPQ806X=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
|
||||
@ -48,7 +48,6 @@ CONFIG_DTC=y
|
||||
# CONFIG_DT_EASY50712 is not set
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EFI_EARLYCON=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FONT_8x16=y
|
||||
CONFIG_FONT_AUTOSELECT=y
|
||||
|
||||
@ -7,6 +7,7 @@ CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_INPUT=y
|
||||
|
||||
@ -6,6 +6,7 @@ CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_ACOMP2=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
# CONFIG_GPIO_SYSFS is not set
|
||||
CONFIG_INPUT=y
|
||||
|
||||
@ -13,15 +13,15 @@ platform_do_upgrade() {
|
||||
case "$rootdev" in
|
||||
mmc*)
|
||||
blockdev --rereadpt /dev/$rootdev || return 1
|
||||
local fitpart=$(get_partition_by_name $rootdev "production")
|
||||
local fitpart=$(find_mmc_part "production" $rootdev)
|
||||
[ "$fitpart" ] || return 1
|
||||
dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null
|
||||
dd if=/dev/zero of=$fitpart bs=4096 count=1 2>/dev/null
|
||||
blockdev --rereadpt /dev/$rootdev
|
||||
get_image "$1" | dd of=/dev/$fitpart
|
||||
get_image "$1" | dd of=$fitpart
|
||||
blockdev --rereadpt /dev/$rootdev
|
||||
local datapart=$(get_partition_by_name $rootdev "rootfs_data")
|
||||
local datapart=$(find_mmc_part "rootfs_data" $rootdev)
|
||||
[ "$datapart" ] || return 0
|
||||
dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null
|
||||
dd if=/dev/zero of=$datapart bs=4096 count=1 2>/dev/null
|
||||
echo $datapart > /tmp/sysupgrade.datapart
|
||||
;;
|
||||
*)
|
||||
@ -95,7 +95,7 @@ platform_copy_config_mmc() {
|
||||
[ -e "$UPGRADE_BACKUP" ] || return
|
||||
local datapart=$(cat /tmp/sysupgrade.datapart)
|
||||
[ "$datapart" ] || echo "no rootfs_data partition, cannot keep configuration." >&2
|
||||
dd if="$UPGRADE_BACKUP" of=/dev/$datapart
|
||||
dd if="$UPGRADE_BACKUP" of=$datapart
|
||||
sync
|
||||
}
|
||||
|
||||
|
||||
@ -89,13 +89,13 @@ platform_do_upgrade() {
|
||||
blockdev --rereadpt /dev/$rootdev || return 1
|
||||
export_partdevice fitpart 3
|
||||
[ "$fitpart" ] || return 1
|
||||
dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null
|
||||
dd if=/dev/zero of=$fitpart bs=4096 count=1 2>/dev/null
|
||||
blockdev --rereadpt /dev/$rootdev
|
||||
get_image "$1" | dd of=/dev/$fitpart
|
||||
get_image "$1" | dd of=$fitpart
|
||||
blockdev --rereadpt /dev/$rootdev
|
||||
local datapart=$(get_partition_by_name $rootdev "rootfs_data")
|
||||
local datapart=$(find_mmc_part "rootfs_data" $rootdev)
|
||||
[ "$datapart" ] || return 0
|
||||
dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null
|
||||
dd if=/dev/zero of=$datapart bs=4096 count=1 2>/dev/null
|
||||
echo $datapart > /tmp/sysupgrade.datapart
|
||||
;;
|
||||
|
||||
@ -175,7 +175,7 @@ platform_copy_config_mmc() {
|
||||
[ -e "$UPGRADE_BACKUP" ] || return
|
||||
local datapart=$(cat /tmp/sysupgrade.datapart)
|
||||
[ "$datapart" ] || echo "no rootfs_data partition, cannot keep configuration." >&2
|
||||
dd if="$UPGRADE_BACKUP" of=/dev/$datapart
|
||||
dd if="$UPGRADE_BACKUP" of=$datapart
|
||||
sync
|
||||
}
|
||||
|
||||
|
||||
@ -587,7 +587,6 @@ CONFIG_UNINLINE_SPIN_UNLOCK=y
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_COMMON=y
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_F_ACM=y
|
||||
CONFIG_USB_F_ECM=y
|
||||
CONFIG_USB_F_MASS_STORAGE=y
|
||||
|
||||
@ -68,6 +68,7 @@ CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FSL_BOOKE=y
|
||||
CONFIG_FSL_EMB_PERFMON=y
|
||||
|
||||
@ -231,7 +231,6 @@ CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_MXS_PHY=y
|
||||
CONFIG_USB_OTG=y
|
||||
|
||||
@ -12,6 +12,7 @@ CPU_TYPE:=24kc
|
||||
CPU_SUBTYPE:=24kf
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
KERNEL_TESTING_PATCHVER:=5.10
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
||||
315
target/linux/pistachio/config-5.10
Normal file
315
target/linux/pistachio/config-5.10
Normal file
@ -0,0 +1,315 @@
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_MMAP_RND_BITS_MAX=15
|
||||
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_BOARD_SCACHE=y
|
||||
CONFIG_BOOT_ELF32=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CLKDEV_LOOKUP=y
|
||||
CONFIG_CLKSRC_MIPS_GIC=y
|
||||
CONFIG_CLKSRC_PISTACHIO=y
|
||||
CONFIG_CLOCKSOURCE_WATCHDOG=y
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
# CONFIG_COMMON_CLK_BOSTON is not set
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONNECTOR=y
|
||||
CONFIG_CPU_GENERIC_DUMP_TLB=y
|
||||
CONFIG_CPU_HAS_DIEI=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_RIXI=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_CPU_IDLE_GOV_MENU=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R2=y
|
||||
CONFIG_CPU_MIPSR2=y
|
||||
CONFIG_CPU_MIPSR2_IRQ_EI=y
|
||||
CONFIG_CPU_MIPSR2_IRQ_VI=y
|
||||
CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
|
||||
CONFIG_CPU_PM=y
|
||||
CONFIG_CPU_R4K_CACHE_TLB=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CPU_SUPPORTS_MSA=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRC_CCITT=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_GF128MUL=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
|
||||
CONFIG_CRYPTO_LIB_SHA256=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_MD5=y
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA256=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_DMA_ENGINE=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DMA_OF=y
|
||||
CONFIG_DMA_VIRTUAL_CHANNELS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_DWMAC_GENERIC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EARLY_PRINTK_8250=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_EXT4_FS_SECURITY=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FS_MBCACHE=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_IRQ_CHIP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_LIB_ASHLDI3=y
|
||||
CONFIG_GENERIC_LIB_ASHRDI3=y
|
||||
CONFIG_GENERIC_LIB_CMPDI2=y
|
||||
CONFIG_GENERIC_LIB_LSHRDI3=y
|
||||
CONFIG_GENERIC_LIB_UCMPDI2=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_HANDLE_DOMAIN_IRQ=y
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BOARDINFO=y
|
||||
CONFIG_I2C_IMG=y
|
||||
CONFIG_IMGPDC_WDT=y
|
||||
CONFIG_IMG_MDC_DMA=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_MIPS_CPU=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_JBD2=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LKDTM=y
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOG_BUF_SHIFT=18
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MACH_PISTACHIO=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MICREL_PHY=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_ASID_BITS=8
|
||||
CONFIG_MIPS_ASID_SHIFT=0
|
||||
CONFIG_MIPS_CLOCK_VSYSCALL=y
|
||||
CONFIG_MIPS_CM=y
|
||||
CONFIG_MIPS_CMDLINE_DTB_EXTEND=y
|
||||
# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
|
||||
# CONFIG_MIPS_CMDLINE_FROM_DTB is not set
|
||||
CONFIG_MIPS_CPC=y
|
||||
CONFIG_MIPS_CPS=y
|
||||
# CONFIG_MIPS_CPS_CPUIDLE is not set
|
||||
# CONFIG_MIPS_CPS_NS16550_BOOL is not set
|
||||
CONFIG_MIPS_CPS_PM=y
|
||||
CONFIG_MIPS_CPU_SCACHE=y
|
||||
CONFIG_MIPS_EBPF_JIT=y
|
||||
# CONFIG_MIPS_ELF_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_EXTERNAL_TIMER=y
|
||||
CONFIG_MIPS_GIC=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
CONFIG_MIPS_LD_CAN_LINK_VDSO=y
|
||||
CONFIG_MIPS_MT=y
|
||||
CONFIG_MIPS_MT_FPAFF=y
|
||||
CONFIG_MIPS_MT_SMP=y
|
||||
CONFIG_MIPS_NO_APPENDED_DTB=y
|
||||
CONFIG_MIPS_NR_CPU_NR_MAP=4
|
||||
CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
|
||||
# CONFIG_MIPS_RAW_APPENDED_DTB is not set
|
||||
CONFIG_MIPS_SPRAM=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK=y
|
||||
CONFIG_MMC_DW=y
|
||||
# CONFIG_MMC_DW_BLUEFIELD is not set
|
||||
# CONFIG_MMC_DW_EXYNOS is not set
|
||||
# CONFIG_MMC_DW_HI3798CV200 is not set
|
||||
# CONFIG_MMC_DW_K3 is not set
|
||||
CONFIG_MMC_DW_PLTFM=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_SPI_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
|
||||
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_FASTMAP=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_NS=y
|
||||
CONFIG_NET_PTP_CLASSIFY=y
|
||||
CONFIG_NLS=y
|
||||
CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_NO_HZ_COMMON=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OF_NET=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PCI_DRIVERS_LEGACY=y
|
||||
CONFIG_PCS_XPCS=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLINK=y
|
||||
CONFIG_PHY_PISTACHIO_USB=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_PISTACHIO=y
|
||||
CONFIG_PISTACHIO_GPTIMER_CLKSRC=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_PPS=y
|
||||
# CONFIG_PREEMPT_NONE is not set
|
||||
CONFIG_PREEMPT_VOLUNTARY=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_PROC_EVENTS=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_PTP_1588_CLOCK=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_IMG=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_QUEUED_RWLOCKS=y
|
||||
CONFIG_QUEUED_SPINLOCKS=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_REGMAP_SPI=y
|
||||
CONFIG_REGULATOR=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_RESET_PISTACHIO=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_SCHEDSTATS=y
|
||||
CONFIG_SCHED_INFO=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_SCSI_SPI_ATTRS=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_8250_DWLIB=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_SC16IS7XX=y
|
||||
CONFIG_SERIAL_SC16IS7XX_CORE=y
|
||||
# CONFIG_SERIAL_SC16IS7XX_I2C is not set
|
||||
CONFIG_SERIAL_SC16IS7XX_SPI=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SG_POOL=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_UP=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_IMG_SPFI=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_SRCU=y
|
||||
CONFIG_STMMAC_ETH=y
|
||||
CONFIG_STMMAC_PLATFORM=y
|
||||
# CONFIG_STMMAC_SELFTESTS is not set
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SYNC_R4K=y
|
||||
CONFIG_SYSCTL_EXCEPTION_TRACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
CONFIG_SYS_SUPPORTS_MIPS_CPS=y
|
||||
CONFIG_SYS_SUPPORTS_MULTITHREADING=y
|
||||
CONFIG_SYS_SUPPORTS_RELOCATABLE=y
|
||||
CONFIG_SYS_SUPPORTS_SCHED_SMT=y
|
||||
CONFIG_SYS_SUPPORTS_SMP=y
|
||||
CONFIG_SYS_SUPPORTS_ZBOOT=y
|
||||
CONFIG_TARGET_ISA_REV=2
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
|
||||
CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_DUAL_ROLE=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_ROLE_SWITCH=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
|
||||
CONFIG_USE_OF=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_WEAK_ORDERING=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSMALLOC=y
|
||||
# CONFIG_ZSMALLOC_STAT is not set
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@ -15,6 +15,7 @@ define Device/Default
|
||||
KERNEL_SUFFIX := -kernel.itb
|
||||
KERNEL_INSTALL := 1
|
||||
KERNEL_IN_UBI := 1
|
||||
DEVICE_DTS_CONFIG := config@1
|
||||
IMAGES := factory.ubi sysupgrade.tar
|
||||
IMAGE/factory.ubi := append-ubi
|
||||
IMAGE/sysupgrade.tar := sysupgrade-tar
|
||||
|
||||
@ -0,0 +1,68 @@
|
||||
From a2dd154377c9aa6ddda00d39b8c7c334e4fa16ff Mon Sep 17 00:00:00 2001
|
||||
From: Damien Horsley <damien.horsley@imgtec.com>
|
||||
Date: Tue, 22 Mar 2016 12:46:09 +0000
|
||||
Subject: dmaengine: img-mdc: Handle early status read
|
||||
|
||||
It is possible that mdc_tx_status may be called before the first
|
||||
node has been read from memory.
|
||||
|
||||
In this case, the residue value stored in the register is undefined.
|
||||
Return the transfer size instead.
|
||||
|
||||
Signed-off-by: Damien Horsley <damien.horsley@imgtec.com>
|
||||
---
|
||||
drivers/dma/img-mdc-dma.c | 40 ++++++++++++++++++++++++----------------
|
||||
1 file changed, 24 insertions(+), 16 deletions(-)
|
||||
|
||||
--- a/drivers/dma/img-mdc-dma.c
|
||||
+++ b/drivers/dma/img-mdc-dma.c
|
||||
@@ -618,25 +618,33 @@ static enum dma_status mdc_tx_status(str
|
||||
(MDC_CMDS_PROCESSED_CMDS_DONE_MASK + 1);
|
||||
|
||||
/*
|
||||
- * If the command loaded event hasn't been processed yet, then
|
||||
- * the difference above includes an extra command.
|
||||
+ * If the first node has not yet been read from memory,
|
||||
+ * the residue register value is undefined
|
||||
*/
|
||||
- if (!mdesc->cmd_loaded)
|
||||
- cmds--;
|
||||
- else
|
||||
- cmds += mdesc->list_cmds_done;
|
||||
-
|
||||
- bytes = mdesc->list_xfer_size;
|
||||
- ldesc = mdesc->list;
|
||||
- for (i = 0; i < cmds; i++) {
|
||||
- bytes -= ldesc->xfer_size + 1;
|
||||
- ldesc = ldesc->next_desc;
|
||||
- }
|
||||
- if (ldesc) {
|
||||
- if (residue != MDC_TRANSFER_SIZE_MASK)
|
||||
- bytes -= ldesc->xfer_size - residue;
|
||||
+ if (!mdesc->cmd_loaded && !cmds) {
|
||||
+ bytes = mdesc->list_xfer_size;
|
||||
+ } else {
|
||||
+ /*
|
||||
+ * If the command loaded event hasn't been processed yet, then
|
||||
+ * the difference above includes an extra command.
|
||||
+ */
|
||||
+ if (!mdesc->cmd_loaded)
|
||||
+ cmds--;
|
||||
else
|
||||
+ cmds += mdesc->list_cmds_done;
|
||||
+
|
||||
+ bytes = mdesc->list_xfer_size;
|
||||
+ ldesc = mdesc->list;
|
||||
+ for (i = 0; i < cmds; i++) {
|
||||
bytes -= ldesc->xfer_size + 1;
|
||||
+ ldesc = ldesc->next_desc;
|
||||
+ }
|
||||
+ if (ldesc) {
|
||||
+ if (residue != MDC_TRANSFER_SIZE_MASK)
|
||||
+ bytes -= ldesc->xfer_size - residue;
|
||||
+ else
|
||||
+ bytes -= ldesc->xfer_size + 1;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&mchan->vc.lock, flags);
|
||||
@ -0,0 +1,198 @@
|
||||
From cd2a6af51553d38072cd31699b58d16ca6176ef5 Mon Sep 17 00:00:00 2001
|
||||
From: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
Date: Thu, 2 Feb 2017 16:46:14 +0000
|
||||
Subject: spi: img-spfi: Implement dual and quad mode
|
||||
|
||||
For dual and quad modes to work the SPFI controller needs
|
||||
to have information about command/address/dummy bytes in the
|
||||
transaction register. This information is not relevant for
|
||||
single mode, and therefore it can have any value in the
|
||||
allowed range. Therefore, for any read or write transfers of less
|
||||
than 8 bytes (cmd = 1 byte, addr up to 7 bytes), SPFI will be
|
||||
configured, but not enabled (unless it is the last transfer in
|
||||
the queue). The transfer will be enabled by the subsequent tranfer.
|
||||
A pending transfer is determined by the content of the transaction
|
||||
register: if command part is set and tsize is not.
|
||||
|
||||
This way we ensure that for dual and quad transactions
|
||||
the command request size will apear in the command/address part
|
||||
of the transaction register, while the data size will be in
|
||||
tsize, all data being sent/received in the same transaction (as
|
||||
set up in the transaction register).
|
||||
|
||||
Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
|
||||
---
|
||||
drivers/spi/spi-img-spfi.c | 96 ++++++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 85 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-img-spfi.c
|
||||
+++ b/drivers/spi/spi-img-spfi.c
|
||||
@@ -36,7 +36,8 @@
|
||||
#define SPFI_CONTROL_SOFT_RESET BIT(11)
|
||||
#define SPFI_CONTROL_SEND_DMA BIT(10)
|
||||
#define SPFI_CONTROL_GET_DMA BIT(9)
|
||||
-#define SPFI_CONTROL_SE BIT(8)
|
||||
+#define SPFI_CONTROL_SE BIT(8)
|
||||
+#define SPFI_CONTROL_TX_RX BIT(1)
|
||||
#define SPFI_CONTROL_TMODE_SHIFT 5
|
||||
#define SPFI_CONTROL_TMODE_MASK 0x7
|
||||
#define SPFI_CONTROL_TMODE_SINGLE 0
|
||||
@@ -47,6 +48,10 @@
|
||||
#define SPFI_TRANSACTION 0x18
|
||||
#define SPFI_TRANSACTION_TSIZE_SHIFT 16
|
||||
#define SPFI_TRANSACTION_TSIZE_MASK 0xffff
|
||||
+#define SPFI_TRANSACTION_CMD_SHIFT 13
|
||||
+#define SPFI_TRANSACTION_CMD_MASK 0x7
|
||||
+#define SPFI_TRANSACTION_ADDR_SHIFT 10
|
||||
+#define SPFI_TRANSACTION_ADDR_MASK 0x7
|
||||
|
||||
#define SPFI_PORT_STATE 0x1c
|
||||
#define SPFI_PORT_STATE_DEV_SEL_SHIFT 20
|
||||
@@ -83,6 +88,7 @@
|
||||
*/
|
||||
#define SPFI_32BIT_FIFO_SIZE 64
|
||||
#define SPFI_8BIT_FIFO_SIZE 16
|
||||
+#define SPFI_DATA_REQUEST_MAX_SIZE 8
|
||||
|
||||
struct img_spfi {
|
||||
struct device *dev;
|
||||
@@ -99,6 +105,8 @@ struct img_spfi {
|
||||
struct dma_chan *tx_ch;
|
||||
bool tx_dma_busy;
|
||||
bool rx_dma_busy;
|
||||
+
|
||||
+ bool complete;
|
||||
};
|
||||
|
||||
static inline u32 spfi_readl(struct img_spfi *spfi, u32 reg)
|
||||
@@ -115,9 +123,11 @@ static inline void spfi_start(struct img
|
||||
{
|
||||
u32 val;
|
||||
|
||||
- val = spfi_readl(spfi, SPFI_CONTROL);
|
||||
- val |= SPFI_CONTROL_SPFI_EN;
|
||||
- spfi_writel(spfi, val, SPFI_CONTROL);
|
||||
+ if (spfi->complete) {
|
||||
+ val = spfi_readl(spfi, SPFI_CONTROL);
|
||||
+ val |= SPFI_CONTROL_SPFI_EN;
|
||||
+ spfi_writel(spfi, val, SPFI_CONTROL);
|
||||
+ }
|
||||
}
|
||||
|
||||
static inline void spfi_reset(struct img_spfi *spfi)
|
||||
@@ -130,12 +140,21 @@ static int spfi_wait_all_done(struct img
|
||||
{
|
||||
unsigned long timeout = jiffies + msecs_to_jiffies(50);
|
||||
|
||||
+ if (!(spfi->complete))
|
||||
+ return 0;
|
||||
+
|
||||
while (time_before(jiffies, timeout)) {
|
||||
u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
|
||||
|
||||
if (status & SPFI_INTERRUPT_ALLDONETRIG) {
|
||||
spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
|
||||
SPFI_INTERRUPT_CLEAR);
|
||||
+ /*
|
||||
+ * Disable SPFI for it not to interfere with
|
||||
+ * pending transactions
|
||||
+ */
|
||||
+ spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
|
||||
+ & ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
|
||||
return 0;
|
||||
}
|
||||
cpu_relax();
|
||||
@@ -441,9 +460,32 @@ static void img_spfi_config(struct spi_m
|
||||
struct spi_transfer *xfer)
|
||||
{
|
||||
struct img_spfi *spfi = spi_master_get_devdata(spi->master);
|
||||
- u32 val, div;
|
||||
+ u32 val, div, transact;
|
||||
+ bool is_pending;
|
||||
|
||||
/*
|
||||
+ * For read or write transfers of less than 8 bytes (cmd = 1 byte,
|
||||
+ * addr up to 7 bytes), SPFI will be configured, but not enabled
|
||||
+ * (unless it is the last transfer in the queue).The transfer will
|
||||
+ * be enabled by the subsequent transfer.
|
||||
+ * A pending transfer is determined by the content of the
|
||||
+ * transaction register: if command part is set and tsize
|
||||
+ * is not
|
||||
+ */
|
||||
+ transact = spfi_readl(spfi, SPFI_TRANSACTION);
|
||||
+ is_pending = ((transact >> SPFI_TRANSACTION_CMD_SHIFT) &
|
||||
+ SPFI_TRANSACTION_CMD_MASK) &&
|
||||
+ (!((transact >> SPFI_TRANSACTION_TSIZE_SHIFT) &
|
||||
+ SPFI_TRANSACTION_TSIZE_MASK));
|
||||
+
|
||||
+ /* If there are no pending transactions it's OK to soft reset */
|
||||
+ if (!is_pending) {
|
||||
+ /* Start the transaction from a known (reset) state */
|
||||
+ spfi_reset(spfi);
|
||||
+ }
|
||||
+
|
||||
+ /*
|
||||
+ * Before anything else, set up parameters.
|
||||
* output = spfi_clk * (BITCLK / 512), where BITCLK must be a
|
||||
* power of 2 up to 128
|
||||
*/
|
||||
@@ -456,20 +498,52 @@ static void img_spfi_config(struct spi_m
|
||||
val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
|
||||
spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
|
||||
|
||||
- spfi_writel(spfi, xfer->len << SPFI_TRANSACTION_TSIZE_SHIFT,
|
||||
- SPFI_TRANSACTION);
|
||||
+ if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
|
||||
+ /*
|
||||
+ * For duplex mode (both the tx and rx buffers are !NULL) the
|
||||
+ * CMD, ADDR, and DUMMY byte parts of the transaction register
|
||||
+ * should always be 0 and therefore the pending transfer
|
||||
+ * technique cannot be used.
|
||||
+ */
|
||||
+ (xfer->tx_buf) && (!xfer->rx_buf) &&
|
||||
+ (xfer->len <= SPFI_DATA_REQUEST_MAX_SIZE) && !is_pending) {
|
||||
+ transact = (1 & SPFI_TRANSACTION_CMD_MASK) <<
|
||||
+ SPFI_TRANSACTION_CMD_SHIFT;
|
||||
+ transact |= ((xfer->len - 1) & SPFI_TRANSACTION_ADDR_MASK) <<
|
||||
+ SPFI_TRANSACTION_ADDR_SHIFT;
|
||||
+ spfi->complete = false;
|
||||
+ } else {
|
||||
+ spfi->complete = true;
|
||||
+ if (is_pending) {
|
||||
+ /* Keep setup from pending transfer */
|
||||
+ transact |= ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
|
||||
+ SPFI_TRANSACTION_TSIZE_SHIFT);
|
||||
+ } else {
|
||||
+ transact = ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
|
||||
+ SPFI_TRANSACTION_TSIZE_SHIFT);
|
||||
+ }
|
||||
+ }
|
||||
+ spfi_writel(spfi, transact, SPFI_TRANSACTION);
|
||||
|
||||
val = spfi_readl(spfi, SPFI_CONTROL);
|
||||
val &= ~(SPFI_CONTROL_SEND_DMA | SPFI_CONTROL_GET_DMA);
|
||||
- if (xfer->tx_buf)
|
||||
+ /*
|
||||
+ * We set up send DMA for pending transfers also, as
|
||||
+ * those are always send transfers
|
||||
+ */
|
||||
+ if ((xfer->tx_buf) || is_pending)
|
||||
val |= SPFI_CONTROL_SEND_DMA;
|
||||
- if (xfer->rx_buf)
|
||||
+ if (xfer->tx_buf)
|
||||
+ val |= SPFI_CONTROL_TX_RX;
|
||||
+ if (xfer->rx_buf) {
|
||||
val |= SPFI_CONTROL_GET_DMA;
|
||||
+ val &= ~SPFI_CONTROL_TX_RX;
|
||||
+ }
|
||||
val &= ~(SPFI_CONTROL_TMODE_MASK << SPFI_CONTROL_TMODE_SHIFT);
|
||||
- if (xfer->tx_nbits == SPI_NBITS_DUAL &&
|
||||
+ if (xfer->tx_nbits == SPI_NBITS_DUAL ||
|
||||
xfer->rx_nbits == SPI_NBITS_DUAL)
|
||||
val |= SPFI_CONTROL_TMODE_DUAL << SPFI_CONTROL_TMODE_SHIFT;
|
||||
- else if (xfer->tx_nbits == SPI_NBITS_QUAD &&
|
||||
+ else if (xfer->tx_nbits == SPI_NBITS_QUAD ||
|
||||
xfer->rx_nbits == SPI_NBITS_QUAD)
|
||||
val |= SPFI_CONTROL_TMODE_QUAD << SPFI_CONTROL_TMODE_SHIFT;
|
||||
val |= SPFI_CONTROL_SE;
|
||||
@ -0,0 +1,64 @@
|
||||
From 905ee06a9966113fe51d6bad1819759cb30fd0bd Mon Sep 17 00:00:00 2001
|
||||
From: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
Date: Tue, 9 Feb 2016 10:18:31 +0000
|
||||
Subject: spi: img-spfi: use device 0 configuration for all devices
|
||||
|
||||
Given that we control the chip select line externally
|
||||
we can use only one parameter register (device 0 parameter
|
||||
register) and one set of configuration bits (port configuration
|
||||
bits for device 0) for all devices (all chip select lines).
|
||||
|
||||
Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
---
|
||||
drivers/spi/spi-img-spfi.c | 23 ++++++++++++++++-------
|
||||
1 file changed, 16 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-img-spfi.c
|
||||
+++ b/drivers/spi/spi-img-spfi.c
|
||||
@@ -429,18 +429,23 @@ static int img_spfi_prepare(struct spi_m
|
||||
struct img_spfi *spfi = spi_master_get_devdata(master);
|
||||
u32 val;
|
||||
|
||||
+ /*
|
||||
+ * The chip select line is controlled externally so
|
||||
+ * we can use the CS0 configuration for all devices
|
||||
+ */
|
||||
val = spfi_readl(spfi, SPFI_PORT_STATE);
|
||||
+
|
||||
+ /* 0 for device selection */
|
||||
val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK <<
|
||||
SPFI_PORT_STATE_DEV_SEL_SHIFT);
|
||||
- val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT;
|
||||
if (msg->spi->mode & SPI_CPHA)
|
||||
- val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
|
||||
+ val |= SPFI_PORT_STATE_CK_PHASE(0);
|
||||
else
|
||||
- val &= ~SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
|
||||
+ val &= ~SPFI_PORT_STATE_CK_PHASE(0);
|
||||
if (msg->spi->mode & SPI_CPOL)
|
||||
- val |= SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
|
||||
+ val |= SPFI_PORT_STATE_CK_POL(0);
|
||||
else
|
||||
- val &= ~SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
|
||||
+ val &= ~SPFI_PORT_STATE_CK_POL(0);
|
||||
spfi_writel(spfi, val, SPFI_PORT_STATE);
|
||||
|
||||
return 0;
|
||||
@@ -492,11 +497,15 @@ static void img_spfi_config(struct spi_m
|
||||
div = DIV_ROUND_UP(clk_get_rate(spfi->spfi_clk), xfer->speed_hz);
|
||||
div = clamp(512 / (1 << get_count_order(div)), 1, 128);
|
||||
|
||||
- val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(spi->chip_select));
|
||||
+ /*
|
||||
+ * The chip select line is controlled externally so
|
||||
+ * we can use the CS0 parameters for all devices
|
||||
+ */
|
||||
+ val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(0));
|
||||
val &= ~(SPFI_DEVICE_PARAMETER_BITCLK_MASK <<
|
||||
SPFI_DEVICE_PARAMETER_BITCLK_SHIFT);
|
||||
val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
|
||||
- spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
|
||||
+ spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(0));
|
||||
|
||||
if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
|
||||
/*
|
||||
@ -0,0 +1,59 @@
|
||||
From 56466f505f58f44b69feb7eaed3b506842800456 Mon Sep 17 00:00:00 2001
|
||||
From: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
Date: Tue, 1 Mar 2016 17:49:45 +0000
|
||||
Subject: spi: img-spfi: RX maximum burst size for DMA is 8
|
||||
|
||||
The depth of the FIFOs is 16 bytes. The DMA request line is tied
|
||||
to the half full/empty (depending on the use of the TX or RX FIFO)
|
||||
threshold. For the TX FIFO, if you set a burst size of 8 (equal to
|
||||
half the depth) the first burst goes into FIFO without any issues,
|
||||
but due the latency involved (the time the data leaves the DMA
|
||||
engine to the time it arrives at the FIFO), the DMA might trigger
|
||||
another burst of 8. But given that there is no space for 2 additonal
|
||||
bursts of 8, this would result in a failure. Therefore, we have to
|
||||
keep the burst size for TX to 4 to accomodate for an extra burst.
|
||||
|
||||
For the read (RX) scenario, the DMA request line goes high when
|
||||
there is at least 8 entries in the FIFO (half full), and we can
|
||||
program the burst size to be 8 because the risk of accidental burst
|
||||
does not exist. The DMA engine will not trigger another read until
|
||||
the read data for all the burst it has sent out has been received.
|
||||
|
||||
While here, move the burst size setting outside of the if/else branches
|
||||
as they have the same value for both 8 and 32 bit data widths.
|
||||
|
||||
Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
---
|
||||
drivers/spi/spi-img-spfi.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-img-spfi.c
|
||||
+++ b/drivers/spi/spi-img-spfi.c
|
||||
@@ -338,12 +338,11 @@ static int img_spfi_start_dma(struct spi
|
||||
if (xfer->len % 4 == 0) {
|
||||
rxconf.src_addr = spfi->phys + SPFI_RX_32BIT_VALID_DATA;
|
||||
rxconf.src_addr_width = 4;
|
||||
- rxconf.src_maxburst = 4;
|
||||
} else {
|
||||
rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
|
||||
rxconf.src_addr_width = 1;
|
||||
- rxconf.src_maxburst = 4;
|
||||
}
|
||||
+ rxconf.src_maxburst = 8;
|
||||
dmaengine_slave_config(spfi->rx_ch, &rxconf);
|
||||
|
||||
rxdesc = dmaengine_prep_slave_sg(spfi->rx_ch, xfer->rx_sg.sgl,
|
||||
@@ -362,12 +361,11 @@ static int img_spfi_start_dma(struct spi
|
||||
if (xfer->len % 4 == 0) {
|
||||
txconf.dst_addr = spfi->phys + SPFI_TX_32BIT_VALID_DATA;
|
||||
txconf.dst_addr_width = 4;
|
||||
- txconf.dst_maxburst = 4;
|
||||
} else {
|
||||
txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
|
||||
txconf.dst_addr_width = 1;
|
||||
- txconf.dst_maxburst = 4;
|
||||
}
|
||||
+ txconf.dst_maxburst = 4;
|
||||
dmaengine_slave_config(spfi->tx_ch, &txconf);
|
||||
|
||||
txdesc = dmaengine_prep_slave_sg(spfi->tx_ch, xfer->tx_sg.sgl,
|
||||
@ -0,0 +1,120 @@
|
||||
From 5fcca3fd4b621d7b5bdeca18d36dfc6ca6cfe383 Mon Sep 17 00:00:00 2001
|
||||
From: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
Date: Wed, 10 Aug 2016 11:42:26 +0100
|
||||
Subject: spi: img-spfi: finish every transfer cleanly
|
||||
|
||||
Before this change, the interrupt status bit that signaled
|
||||
the end of a tranfers was cleared in the wait_all_done
|
||||
function. That functionality triggered issues for DMA
|
||||
duplex transactions where the wait function was called
|
||||
twice, in both the TX and RX callbacks.
|
||||
|
||||
In order to fix the issue, clear all interrupt data bits
|
||||
at the end of a PIO transfer or at the end of both TX and RX
|
||||
duplex transfers, if the transfer is not a pending tranfer
|
||||
(command waiting for data). After that, the status register
|
||||
is checked for new incoming data or new data requests to be
|
||||
signaled. If SPFI finished cleanly, no new interrupt data
|
||||
bits should be set.
|
||||
|
||||
Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
|
||||
---
|
||||
drivers/spi/spi-img-spfi.c | 49 +++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 35 insertions(+), 14 deletions(-)
|
||||
|
||||
--- a/drivers/spi/spi-img-spfi.c
|
||||
+++ b/drivers/spi/spi-img-spfi.c
|
||||
@@ -79,6 +79,14 @@
|
||||
#define SPFI_INTERRUPT_SDE BIT(1)
|
||||
#define SPFI_INTERRUPT_SDTRIG BIT(0)
|
||||
|
||||
+#define SPFI_INTERRUPT_DATA_BITS (SPFI_INTERRUPT_SDHF |\
|
||||
+ SPFI_INTERRUPT_SDFUL |\
|
||||
+ SPFI_INTERRUPT_GDEX32BIT |\
|
||||
+ SPFI_INTERRUPT_GDHF |\
|
||||
+ SPFI_INTERRUPT_GDFUL |\
|
||||
+ SPFI_INTERRUPT_ALLDONETRIG |\
|
||||
+ SPFI_INTERRUPT_GDEX8BIT)
|
||||
+
|
||||
/*
|
||||
* There are four parallel FIFOs of 16 bytes each. The word buffer
|
||||
* (*_32BIT_VALID_DATA) accesses all four FIFOs at once, resulting in an
|
||||
@@ -136,6 +144,23 @@ static inline void spfi_reset(struct img
|
||||
spfi_writel(spfi, 0, SPFI_CONTROL);
|
||||
}
|
||||
|
||||
+static inline void spfi_finish(struct img_spfi *spfi)
|
||||
+{
|
||||
+ if (!(spfi->complete))
|
||||
+ return;
|
||||
+
|
||||
+ /* Clear data bits as all transfers(TX and RX) have finished */
|
||||
+ spfi_writel(spfi, SPFI_INTERRUPT_DATA_BITS, SPFI_INTERRUPT_CLEAR);
|
||||
+ if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) & SPFI_INTERRUPT_DATA_BITS) {
|
||||
+ dev_err(spfi->dev, "SPFI did not finish transfer cleanly.\n");
|
||||
+ spfi_reset(spfi);
|
||||
+ }
|
||||
+ /* Disable SPFI for it not to interfere with pending transactions */
|
||||
+ spfi_writel(spfi,
|
||||
+ spfi_readl(spfi, SPFI_CONTROL) & ~SPFI_CONTROL_SPFI_EN,
|
||||
+ SPFI_CONTROL);
|
||||
+}
|
||||
+
|
||||
static int spfi_wait_all_done(struct img_spfi *spfi)
|
||||
{
|
||||
unsigned long timeout = jiffies + msecs_to_jiffies(50);
|
||||
@@ -144,19 +169,9 @@ static int spfi_wait_all_done(struct img
|
||||
return 0;
|
||||
|
||||
while (time_before(jiffies, timeout)) {
|
||||
- u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
|
||||
-
|
||||
- if (status & SPFI_INTERRUPT_ALLDONETRIG) {
|
||||
- spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
|
||||
- SPFI_INTERRUPT_CLEAR);
|
||||
- /*
|
||||
- * Disable SPFI for it not to interfere with
|
||||
- * pending transactions
|
||||
- */
|
||||
- spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
|
||||
- & ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
|
||||
+ if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) &
|
||||
+ SPFI_INTERRUPT_ALLDONETRIG)
|
||||
return 0;
|
||||
- }
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
@@ -288,6 +303,8 @@ static int img_spfi_start_pio(struct spi
|
||||
}
|
||||
|
||||
ret = spfi_wait_all_done(spfi);
|
||||
+ spfi_finish(spfi);
|
||||
+
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -303,8 +320,10 @@ static void img_spfi_dma_rx_cb(void *dat
|
||||
|
||||
spin_lock_irqsave(&spfi->lock, flags);
|
||||
spfi->rx_dma_busy = false;
|
||||
- if (!spfi->tx_dma_busy)
|
||||
+ if (!spfi->tx_dma_busy) {
|
||||
+ spfi_finish(spfi);
|
||||
spi_finalize_current_transfer(spfi->master);
|
||||
+ }
|
||||
spin_unlock_irqrestore(&spfi->lock, flags);
|
||||
}
|
||||
|
||||
@@ -317,8 +336,10 @@ static void img_spfi_dma_tx_cb(void *dat
|
||||
|
||||
spin_lock_irqsave(&spfi->lock, flags);
|
||||
spfi->tx_dma_busy = false;
|
||||
- if (!spfi->rx_dma_busy)
|
||||
+ if (!spfi->rx_dma_busy) {
|
||||
+ spfi_finish(spfi);
|
||||
spi_finalize_current_transfer(spfi->master);
|
||||
+ }
|
||||
spin_unlock_irqrestore(&spfi->lock, flags);
|
||||
}
|
||||
|
||||
@ -0,0 +1,49 @@
|
||||
From 3642843a06025ec333d7e92580cf52cb8db2a652 Mon Sep 17 00:00:00 2001
|
||||
From: Govindraj Raja <Govindraj.Raja@imgtec.com>
|
||||
Date: Fri, 8 Jan 2016 16:36:07 +0000
|
||||
Subject: clk: pistachio: Fix wrong SDHost card speed
|
||||
|
||||
The SDHost currently clocks the card 4x slower than it
|
||||
should do, because there is fixed divide by 4 in the
|
||||
sdhost wrapper that is not present in the clock tree.
|
||||
To model this add a fixed divide by 4 clock node in
|
||||
the SDHost clock path.
|
||||
|
||||
This will ensure the right clock frequency is selected when
|
||||
the mmc driver tries to configure frequency on card insert.
|
||||
|
||||
Signed-off-by: Govindraj Raja <Govindraj.Raja@imgtec.com>
|
||||
---
|
||||
drivers/clk/pistachio/clk-pistachio.c | 3 ++-
|
||||
include/dt-bindings/clock/pistachio-clk.h | 1 +
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/clk/pistachio/clk-pistachio.c
|
||||
+++ b/drivers/clk/pistachio/clk-pistachio.c
|
||||
@@ -41,7 +41,7 @@ static struct pistachio_gate pistachio_g
|
||||
GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div",
|
||||
0x104, 22),
|
||||
GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23),
|
||||
- GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24),
|
||||
+ GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24),
|
||||
GATE(CLK_BT, "bt", "bt_div", 0x104, 25),
|
||||
GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26),
|
||||
GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27),
|
||||
@@ -51,6 +51,7 @@ static struct pistachio_gate pistachio_g
|
||||
static struct pistachio_fixed_factor pistachio_ffs[] __initdata = {
|
||||
FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4),
|
||||
FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8),
|
||||
+ FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4),
|
||||
};
|
||||
|
||||
static struct pistachio_div pistachio_divs[] __initdata = {
|
||||
--- a/include/dt-bindings/clock/pistachio-clk.h
|
||||
+++ b/include/dt-bindings/clock/pistachio-clk.h
|
||||
@@ -18,6 +18,7 @@
|
||||
/* Fixed-factor clocks */
|
||||
#define CLK_WIFI_DIV4 16
|
||||
#define CLK_WIFI_DIV8 17
|
||||
+#define CLK_SDHOST_DIV4 18
|
||||
|
||||
/* Gate clocks */
|
||||
#define CLK_MIPS 32
|
||||
@ -0,0 +1,47 @@
|
||||
From 981c1d416af45eff207227aec106381ac23aac99 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Pozella <Ian.Pozella@imgtec.com>
|
||||
Date: Mon, 20 Feb 2017 10:00:52 +0000
|
||||
Subject: MIPS: DTS: img: marduk: switch mmc to 1 bit mode
|
||||
|
||||
The mmc block in Pistachio allows 1 to 8 data bits to be used.
|
||||
Marduk uses 4 bits allowing the upper 4 bits to be allocated
|
||||
to the Mikrobus ports. However these bits are still connected
|
||||
internally meaning the mmc block recieves signals on all data lines
|
||||
and seems the internal HW CRC checks get corrupted by this erroneous
|
||||
data.
|
||||
|
||||
We cannot control what data is sent on these lines because they go
|
||||
to external ports. 1 bit mode does not exhibit the issue hence the
|
||||
safe default is to use this. If a user knows that in their use case
|
||||
they will not use the upper bits then they can set to 4 bit mode in
|
||||
order to improve performance.
|
||||
|
||||
Also make sure that the upper 4 bits don't get allocated to the mmc
|
||||
driver (the default is to assign all 8 pins) so they can be allocated
|
||||
to other drivers. Allocating all 4 despite setting 1 bit mode as this
|
||||
matches what is there in hardware.
|
||||
|
||||
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
|
||||
---
|
||||
arch/mips/boot/dts/img/pistachio_marduk.dts | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
&sdhost {
|
||||
status = "okay";
|
||||
- bus-width = <4>;
|
||||
+ bus-width = <1>;
|
||||
disable-wp;
|
||||
};
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
|
||||
&pin_sdhost_data {
|
||||
drive-strength = <2>;
|
||||
+ pins = "mfio17", "mfio18", "mfio19", "mfio20";
|
||||
};
|
||||
|
||||
&pwm {
|
||||
@ -0,0 +1,54 @@
|
||||
From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
|
||||
From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
||||
Date: Sat, 25 Feb 2017 16:42:50 +0000
|
||||
Subject: mtd: nor: support mtd name from device tree
|
||||
|
||||
Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
|
||||
---
|
||||
drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/drivers/mtd/spi-nor/core.c
|
||||
+++ b/drivers/mtd/spi-nor/core.c
|
||||
@@ -3183,6 +3183,7 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
struct device *dev = nor->dev;
|
||||
struct mtd_info *mtd = &nor->mtd;
|
||||
struct device_node *np = spi_nor_get_flash_node(nor);
|
||||
+ const char __maybe_unused *of_mtd_name = NULL;
|
||||
int ret;
|
||||
int i;
|
||||
|
||||
@@ -3237,7 +3238,12 @@ int spi_nor_scan(struct spi_nor *nor, co
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
- if (!mtd->name)
|
||||
+#ifdef CONFIG_MTD_OF_PARTS
|
||||
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
||||
+#endif
|
||||
+ if (of_mtd_name)
|
||||
+ mtd->name = of_mtd_name;
|
||||
+ else if (!mtd->name)
|
||||
mtd->name = dev_name(dev);
|
||||
mtd->priv = nor;
|
||||
mtd->type = MTD_NORFLASH;
|
||||
--- a/drivers/mtd/mtdcore.c
|
||||
+++ b/drivers/mtd/mtdcore.c
|
||||
@@ -778,6 +778,17 @@ out_error:
|
||||
*/
|
||||
static void mtd_set_dev_defaults(struct mtd_info *mtd)
|
||||
{
|
||||
+#ifdef CONFIG_MTD_OF_PARTS
|
||||
+ const char __maybe_unused *of_mtd_name = NULL;
|
||||
+ struct device_node *np;
|
||||
+
|
||||
+ np = mtd_get_of_node(mtd);
|
||||
+ if (np && !mtd->name) {
|
||||
+ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
|
||||
+ if (of_mtd_name)
|
||||
+ mtd->name = of_mtd_name;
|
||||
+ } else
|
||||
+#endif
|
||||
if (mtd->dev.parent) {
|
||||
if (!mtd->owner && mtd->dev.parent->driver)
|
||||
mtd->owner = mtd->dev.parent->driver->owner;
|
||||
@ -0,0 +1,30 @@
|
||||
From 0023c706f7e0f0f02bd48a63a2f3c04c839532ae Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 15 Aug 2020 16:04:53 +0200
|
||||
Subject: [PATCH 901/904] MIPS: DTS: img: marduk: Add SPI NAND flash
|
||||
|
||||
Add Gigadevice GD5F4GQ4UCYIGT SPI NAND flash to the device tree.
|
||||
|
||||
The NAND flash chip is connected with quad SPI, but reading currently
|
||||
fails in quad SPI mode.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/boot/dts/img/pistachio_marduk.dts | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -88,6 +88,12 @@
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
};
|
||||
+
|
||||
+ flash@1 {
|
||||
+ compatible = "spi-nand";
|
||||
+ reg = <1>;
|
||||
+ spi-max-frequency = <50000000>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
@ -0,0 +1,43 @@
|
||||
From b7700154d75e8d7c9a2022f09c2d5430137606fa Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 15 Aug 2020 16:05:25 +0200
|
||||
Subject: [PATCH 902/904] MIPS: DTS: img: marduk: Add Cascoda CA8210 6LoWPAN
|
||||
|
||||
Add Cascoda CA8210 6LoWPAN controller to device tree.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/boot/dts/img/pistachio_marduk.dts | 22 +++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -75,6 +75,28 @@
|
||||
VDD-supply = <&internal_dac_supply>;
|
||||
};
|
||||
|
||||
+&spfi0 {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&spim0_pins>, <&spim0_cs0_alt_pin>, <&spim0_cs2_alt_pin>, <&spim0_cs3_alt_pin>, <&spim0_cs4_alt_pin>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ cs-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>, <&gpio0 2 GPIO_ACTIVE_HIGH>,
|
||||
+ <&gpio1 12 GPIO_ACTIVE_HIGH>, <&gpio1 13 GPIO_ACTIVE_HIGH>;
|
||||
+
|
||||
+ ca8210: ca8210@0 {
|
||||
+ status = "okay";
|
||||
+ compatible = "cascoda,ca8210";
|
||||
+ reg = <0>;
|
||||
+ spi-max-frequency = <4000000>;
|
||||
+ spi-cpol;
|
||||
+ reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
+ irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
|
||||
+ extclock-enable;
|
||||
+ extclock-freq = <16000000>;
|
||||
+ extclock-gpio = <2>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spfi1 {
|
||||
status = "okay";
|
||||
|
||||
@ -0,0 +1,81 @@
|
||||
From ad4eba0c36ce8af6ab9ea1bc163e4c1ac7c271c3 Mon Sep 17 00:00:00 2001
|
||||
From: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
Date: Sat, 15 Aug 2020 16:09:02 +0200
|
||||
Subject: [PATCH 903/904] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW
|
||||
|
||||
Add NXP SC16IS752IPW SPI-UART controller to device tree.
|
||||
|
||||
This controller drives 2 UARTs and 7 LEDs on the board.
|
||||
|
||||
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
||||
---
|
||||
arch/mips/boot/dts/img/pistachio_marduk.dts | 51 +++++++++++++++++++++
|
||||
1 file changed, 51 insertions(+)
|
||||
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -46,6 +46,46 @@
|
||||
regulator-max-microvolt = <1800000>;
|
||||
};
|
||||
|
||||
+ /* EXT clock from ca8210 is fed to sc16is752 */
|
||||
+ ca8210_ext_clk: ca8210-ext-clk {
|
||||
+ compatible = "fixed-clock";
|
||||
+ #clock-cells = <0>;
|
||||
+ clock-frequency = <16000000>;
|
||||
+ clock-output-names = "ca8210_ext_clock";
|
||||
+ };
|
||||
+
|
||||
+ gpioleds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ user1 {
|
||||
+ label = "marduk:red:user1";
|
||||
+ gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user2 {
|
||||
+ label = "marduk:red:user2";
|
||||
+ gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user3 {
|
||||
+ label = "marduk:red:user3";
|
||||
+ gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user4 {
|
||||
+ label = "marduk:red:user4";
|
||||
+ gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user5 {
|
||||
+ label = "marduk:red:user5";
|
||||
+ gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user6 {
|
||||
+ label = "marduk:red:user6";
|
||||
+ gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ user7 {
|
||||
+ label = "marduk:red:user7";
|
||||
+ gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "pwm-leds";
|
||||
heartbeat {
|
||||
@@ -95,6 +135,17 @@
|
||||
extclock-freq = <16000000>;
|
||||
extclock-gpio = <2>;
|
||||
};
|
||||
+
|
||||
+ sc16is752: sc16is752@1 {
|
||||
+ compatible = "nxp,sc16is752";
|
||||
+ reg = <1>;
|
||||
+ clocks = <&ca8210_ext_clk>;
|
||||
+ spi-max-frequency = <4000000>;
|
||||
+ interrupt-parent = <&gpio0>;
|
||||
+ interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
|
||||
+ gpio-controller;
|
||||
+ #gpio-cells = <2>;
|
||||
+ };
|
||||
};
|
||||
|
||||
&spfi1 {
|
||||
@ -0,0 +1,27 @@
|
||||
From ff0e950b605047bf50d470023e0fb2fc2003a0f0 Mon Sep 17 00:00:00 2001
|
||||
From: Ian Pozella <Ian.Pozella@imgtec.com>
|
||||
Date: Mon, 20 Feb 2017 10:38:07 +0000
|
||||
Subject: [PATCH 904/904] MIPS: DTS: img: marduk: Add partition name
|
||||
|
||||
Signed-off-by: Ian Pozella <Ian.Pozella@imgtec.com>
|
||||
---
|
||||
arch/mips/boot/dts/img/pistachio_marduk.dts | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -160,12 +160,14 @@
|
||||
compatible = "spansion,s25fl016k", "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
+ linux,mtd-name = "spi-nor";
|
||||
};
|
||||
|
||||
flash@1 {
|
||||
compatible = "spi-nand";
|
||||
reg = <1>;
|
||||
spi-max-frequency = <50000000>;
|
||||
+ linux,mtd-name = "spi-nand";
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
|
||||
@@ -19,6 +19,11 @@
|
||||
ethernet0 = &enet;
|
||||
spi0 = &spfi0;
|
||||
spi1 = &spfi1;
|
||||
+
|
||||
+ led-boot = &led_heartbeat;
|
||||
+ led-failsafe = &led_heartbeat;
|
||||
+ led-running = &led_heartbeat;
|
||||
+ led-upgrade = &led_heartbeat;
|
||||
};
|
||||
|
||||
chosen {
|
||||
@@ -88,11 +93,10 @@
|
||||
|
||||
leds {
|
||||
compatible = "pwm-leds";
|
||||
- heartbeat {
|
||||
+ led_heartbeat: heartbeat {
|
||||
label = "marduk:red:heartbeat";
|
||||
pwms = <&pwm 3 300000>;
|
||||
max-brightness = <255>;
|
||||
- linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
@ -41,6 +41,7 @@ CONFIG_DTB_RT_NONE=y
|
||||
# CONFIG_DTB_VOCORE2 is not set
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
|
||||
@ -35,6 +35,7 @@ CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DTB_RT_NONE=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
|
||||
@ -506,7 +506,6 @@ CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_DWC2_HOST=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_NET_DRIVERS=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
|
||||
@ -1,32 +1,26 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2006-2011 OpenWrt.org
|
||||
# Copyright (C) 2006-2021 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
# UML only makes sense on linux
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
ifeq ($(HOST_ARCH),x86_64)
|
||||
|
||||
ARCH:=$(shell uname -m | sed \
|
||||
-e 's/i[3-9]86/i386/' \
|
||||
-e 's/mipsel/mips/' \
|
||||
-e 's/mipseb/mips/' \
|
||||
-e 's/powerpc/ppc/' \
|
||||
-e 's/sh[234]/sh/' \
|
||||
-e 's/armeb/arm/' \
|
||||
)
|
||||
ARCH:=x86_64
|
||||
BOARD:=uml
|
||||
BOARDNAME:=User Mode Linux
|
||||
FEATURES:=squashfs ext4 audio source-only
|
||||
FEATURES:=squashfs ext4 audio
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
KERNEL_TESTING_PATCHVER:=5.10
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
LINUX_TARGET_CONFIG:=$(CURDIR)/config/$(ARCH)
|
||||
|
||||
DEFAULT_PACKAGES += wpad-basic-wolfssl kmod-mac80211-hwsim mkf2fs e2fsprogs
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
OpenWrt inside a user mode linux. Why would we even want this many ask?
|
||||
|
||||
There are potentially a lot of reasons, one obvious one to me, it allows
|
||||
folks to 'kick the tires' without actually flashing up any hardware. It's
|
||||
also a great environment for porting over packages, you can get a package
|
||||
fully functional in the uclibc root environment inside a uml without actually
|
||||
disturbing your 'real router', and then rebuild for a specific target once
|
||||
it's fully tested.
|
||||
|
||||
This is a first stab at a build that 'just works' and there will be more
|
||||
cleanup to come. The simple directions are:-
|
||||
|
||||
Configure for uml target
|
||||
Configure with an ext4 root file system
|
||||
build it all
|
||||
|
||||
In your bin directory you will find a kernel and an ext4 root file system
|
||||
when it's finished. Just run it like this:-
|
||||
|
||||
bin/targets/uml/generic/lede-uml-vmlinux
|
||||
ubd0=bin/targets/uml/generic/openwrt-uml-ext4.img
|
||||
|
||||
The uml will start, and eventually the serial console of the uml will be at your
|
||||
console prompt. If you would like it in xterms, substitute con=xterm and con0=xterm.
|
||||
No networking is configured, but, it's a starting point. The resulting file system
|
||||
has just enough free space to start kicking the tires and playing in the world of
|
||||
'embedded routers' along with all the resource restrictions that come with that
|
||||
world.
|
||||
|
||||
To configure networking and more, refer to the user mode linux documentation online.
|
||||
A quick start goes along this line. install the uml-utilities packages so you have
|
||||
the uml switch in and running, then add a command param to your uml start like this
|
||||
|
||||
eth0=daemon,00:01:01:01:01:01,unix,/<your uml switch control socket here>
|
||||
|
||||
With that in, and uml networking actually functional (can be a challenge at times),
|
||||
you should be able to ifconfig the interface and talk to the host side, or, if you
|
||||
bridged the uml switch to your host network, you should be able to run udhcp and be
|
||||
away with networking off to the world. Again, if you are unfamiliar with uml and
|
||||
uml networking, please read the docs and how-to stuff available on the net. It does
|
||||
take some fiddling to get it started and working right the first time, but after that,
|
||||
it opens up a whole new world of virtual machines.
|
||||
|
||||
|
||||
|
||||
http://user-mode-linux.sourceforge.net/
|
||||
51
target/linux/uml/README.md
Normal file
51
target/linux/uml/README.md
Normal file
@ -0,0 +1,51 @@
|
||||
# OpenWrt inside a user mode linux
|
||||
|
||||
> Why would we even want this many ask?
|
||||
|
||||
There are potentially a lot of reasons, one obvious one to me, it allows folks
|
||||
to 'kick the tires' without actually flashing up any hardware. It's also a
|
||||
great environment for porting over packages, you can get a package fully
|
||||
functional in the uclibc root environment inside a uml without actually
|
||||
disturbing your 'real router', and then rebuild for a specific target once it's
|
||||
fully tested.
|
||||
|
||||
This is a first stab at a build that 'just works' and there will be more
|
||||
cleanup to come. The simple directions are:-
|
||||
|
||||
* Configure for uml target
|
||||
* Configure with an ext4 or squashfs root file system
|
||||
* Build it all
|
||||
|
||||
In your bin directory you will find a Kernel and an root file system when it's
|
||||
finished. Just run it like this:-
|
||||
|
||||
```shell
|
||||
./openwrt-uml-vmlinux ubd0=openwrt-uml-squashfs.img
|
||||
```
|
||||
|
||||
The uml will start and eventually the serial console of the uml will be at your
|
||||
console prompt. If you would like it in xterms, substitute `con=xterm` and
|
||||
`con0=xterm`. **No networking is configured** but it's a starting point. The
|
||||
resulting file system has just enough free space to start kicking the tires and
|
||||
playing in the world of 'embedded routers' along with all the resource
|
||||
restrictions that come with that world.
|
||||
|
||||
To configure networking and more refer to the *user mode linux* documentation
|
||||
online. A quick start goes along this line. Install the `uml-utilities`
|
||||
packages so you have the `uml_switch` in and running, then add a command param
|
||||
to your uml start like this:
|
||||
|
||||
```shell
|
||||
eth0=daemon,00:01:01:01:01:01,unix,/<your uml switch control socket here>
|
||||
```
|
||||
|
||||
With that in, and uml networking actually functional (can be a challenge at
|
||||
times), you should be able to `ifconfig` the interface and talk to the host
|
||||
side or if you bridged the uml switch to your host network, you should be able
|
||||
to run `udhcp` and be away with networking off to the world. Again, if you are
|
||||
unfamiliar with uml and uml networking, please read the docs and how-to stuff
|
||||
available on the net. It does take some fiddling to get it started and working
|
||||
right the first time, but after that, it opens up a whole new world of virtual
|
||||
machines.
|
||||
|
||||
http://user-mode-linux.sourceforge.net/
|
||||
@ -1,14 +1,16 @@
|
||||
# CONFIG_3_LEVEL_PGTABLES is not set
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_ARCH_DEFCONFIG="arch/um/configs/i386_defconfig"
|
||||
CONFIG_ARCH_HAS_KCOV=y
|
||||
CONFIG_3_LEVEL_PGTABLES=y
|
||||
CONFIG_64BIT=y
|
||||
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
|
||||
CONFIG_ARCH_NO_PREEMPT=y
|
||||
CONFIG_BLK_DEV_COW_COMMON=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_BLK_DEV_UBD=y
|
||||
CONFIG_BLK_DEV_UBD_SYNC=y
|
||||
CONFIG_BLK_MQ_VIRTIO=y
|
||||
CONFIG_CC_HAS_KASAN_GENERIC=y
|
||||
CONFIG_BLK_SCSI_REQUEST=y
|
||||
CONFIG_CDROM=y
|
||||
# CONFIG_COMMON_CLK is not set
|
||||
# CONFIG_COMPAT_32BIT_TIME is not set
|
||||
CONFIG_CON_CHAN="xterm"
|
||||
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
|
||||
CONFIG_CPU_SUP_AMD=y
|
||||
@ -19,10 +21,12 @@ CONFIG_CPU_SUP_ZHAOXIN=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_CRC32=y
|
||||
CONFIG_CRYPTO_CRC32C=y
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_HASH2=y
|
||||
CONFIG_CRYPTO_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
|
||||
CONFIG_CRYPTO_NULL2=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
|
||||
CONFIG_DEBUG_MEMORY_INIT=y
|
||||
CONFIG_DECOMPRESS_BZIP2=y
|
||||
CONFIG_DECOMPRESS_GZIP=y
|
||||
@ -39,19 +43,11 @@ CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CPU_DEVICES=y
|
||||
CONFIG_GENERIC_FIND_FIRST_BIT=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
|
||||
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
|
||||
CONFIG_HAVE_ASM_MODVERSIONS=y
|
||||
CONFIG_HAVE_COPY_THREAD_TLS=y
|
||||
CONFIG_HAVE_DEBUG_BUGVERBOSE=y
|
||||
CONFIG_HAVE_DEBUG_KMEMLEAK=y
|
||||
CONFIG_HAVE_FUTEX_CMPXCHG=y
|
||||
CONFIG_HAVE_NET_DSA=y
|
||||
CONFIG_HAVE_UID16=y
|
||||
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
|
||||
CONFIG_HOSTFS=y
|
||||
CONFIG_HVC_DRIVER=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_IA32_FEAT_CTL=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=128
|
||||
CONFIG_IRQ_WORK=y
|
||||
@ -60,9 +56,10 @@ CONFIG_JBD2=y
|
||||
# CONFIG_JFFS2_FS is not set
|
||||
CONFIG_KALLSYMS=y
|
||||
CONFIG_KERNEL_STACK_ORDER=2
|
||||
CONFIG_LD_SCRIPT_STATIC=y
|
||||
CONFIG_LLD_VERSION=0
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
# CONFIG_MATOM is not set
|
||||
CONFIG_MAY_HAVE_RUNTIME_DEPS=y
|
||||
CONFIG_MCONSOLE=y
|
||||
# CONFIG_MCORE2 is not set
|
||||
CONFIG_MEMFD_CREATE=y
|
||||
@ -97,7 +94,6 @@ CONFIG_SRCU=y
|
||||
CONFIG_SSL=y
|
||||
CONFIG_SSL_CHAN="pty"
|
||||
CONFIG_STACKTRACE=y
|
||||
CONFIG_STATIC_LINK=y
|
||||
CONFIG_STDERR_CONSOLE=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TINY_SRCU=y
|
||||
@ -127,15 +123,13 @@ CONFIG_VIRTIO_NET=y
|
||||
CONFIG_VIRTIO_UML=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_X86_32=y
|
||||
# CONFIG_X86_64 is not set
|
||||
CONFIG_X86_64=y
|
||||
CONFIG_X86_CMOV=y
|
||||
CONFIG_X86_CMPXCHG64=y
|
||||
CONFIG_X86_GENERIC=y
|
||||
CONFIG_X86_INTEL_USERCOPY=y
|
||||
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
|
||||
CONFIG_X86_L1_CACHE_SHIFT=6
|
||||
CONFIG_X86_MINIMUM_CPU_FAMILY=5
|
||||
CONFIG_X86_MINIMUM_CPU_FAMILY=64
|
||||
CONFIG_X86_TSC=y
|
||||
CONFIG_X86_USE_PPRO_CHECKSUM=y
|
||||
CONFIG_XTERM_CHAN=y
|
||||
213
target/linux/uml/patches-5.10/101-mconsole-exec.patch
Normal file
213
target/linux/uml/patches-5.10/101-mconsole-exec.patch
Normal file
@ -0,0 +1,213 @@
|
||||
#
|
||||
# Minimalist mconsole exec patch
|
||||
#
|
||||
# 3.10 version (with bit more synchronous behavior) by fingon at iki dot fi
|
||||
# Adaptation to kernel 3.3.8 made by David Fernández (david at dit.upm.es) for
|
||||
# Starting point: mconsole-exec-2.6.30.patch for kernel 2.6.30
|
||||
# Author of original patch: Paolo Giarrusso, aka Blaisorblade
|
||||
# (http://www.user-mode-linux.org/~blaisorblade)
|
||||
#
|
||||
# Known misfeatures:
|
||||
#
|
||||
# - If output is too long, blocks (and breaks horribly)
|
||||
# (this misfeature from 3.10 patches, when minimalizing the patch;
|
||||
# workaround: redirect to a shared filesystem if long output is expected)
|
||||
#
|
||||
# - Nothing useful is done with stdin
|
||||
#
|
||||
--- a/arch/um/drivers/mconsole.h
|
||||
+++ b/arch/um/drivers/mconsole.h
|
||||
@@ -85,6 +85,7 @@ extern void mconsole_cad(struct mc_reque
|
||||
extern void mconsole_stop(struct mc_request *req);
|
||||
extern void mconsole_go(struct mc_request *req);
|
||||
extern void mconsole_log(struct mc_request *req);
|
||||
+extern void mconsole_exec(struct mc_request *req);
|
||||
extern void mconsole_proc(struct mc_request *req);
|
||||
extern void mconsole_stack(struct mc_request *req);
|
||||
|
||||
--- a/arch/um/drivers/mconsole_kern.c
|
||||
+++ b/arch/um/drivers/mconsole_kern.c
|
||||
@@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2001 - 2008 Jeff Dike (jdike@{addtoit,linux.intel}.com)
|
||||
*/
|
||||
|
||||
+#include <linux/kmod.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/string.h>
|
||||
@@ -26,6 +27,7 @@
|
||||
#include <linux/mount.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/uaccess.h>
|
||||
+#include <linux/completion.h>
|
||||
#include <asm/switch_to.h>
|
||||
|
||||
#include <init.h>
|
||||
@@ -123,6 +125,59 @@ void mconsole_log(struct mc_request *req
|
||||
mconsole_reply(req, "", 0, 0);
|
||||
}
|
||||
|
||||
+void mconsole_exec(struct mc_request *req)
|
||||
+{
|
||||
+ struct subprocess_info *sub_info;
|
||||
+ int res, len;
|
||||
+ struct file *out;
|
||||
+ char buf[MCONSOLE_MAX_DATA];
|
||||
+
|
||||
+ char *envp[] = {
|
||||
+ "HOME=/", "TERM=linux",
|
||||
+ "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin",
|
||||
+ NULL
|
||||
+ };
|
||||
+ char *argv[] = {
|
||||
+ "/bin/sh", "-c",
|
||||
+ req->request.data + strlen("exec "),
|
||||
+ NULL
|
||||
+ };
|
||||
+
|
||||
+ sub_info = call_usermodehelper_setup("/bin/sh", argv, envp, GFP_ATOMIC, NULL, NULL, NULL);
|
||||
+ if (sub_info == NULL) {
|
||||
+ mconsole_reply(req, "call_usermodehelper_setup failed", 1, 0);
|
||||
+ return;
|
||||
+ }
|
||||
+ res = call_usermodehelper_stdoutpipe(sub_info, &out);
|
||||
+ if (res < 0) {
|
||||
+ kfree(sub_info);
|
||||
+ mconsole_reply(req, "call_usermodehelper_stdoutpipe failed", 1, 0);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ res = call_usermodehelper_exec(sub_info, UMH_WAIT_PROC);
|
||||
+ if (res < 0) {
|
||||
+ kfree(sub_info);
|
||||
+ mconsole_reply(req, "call_usermodehelper_exec failed", 1, 0);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (;;) {
|
||||
+ len = out->f_op->read(out, buf, sizeof(buf), &out->f_pos);
|
||||
+ if (len < 0) {
|
||||
+ mconsole_reply(req, "reading output failed", 1, 0);
|
||||
+ break;
|
||||
+ }
|
||||
+ if (len == 0)
|
||||
+ break;
|
||||
+ mconsole_reply_len(req, buf, len, 0, 1);
|
||||
+ }
|
||||
+ fput(out);
|
||||
+
|
||||
+ mconsole_reply_len(req, NULL, 0, 0, 0);
|
||||
+}
|
||||
+
|
||||
+
|
||||
void mconsole_proc(struct mc_request *req)
|
||||
{
|
||||
struct vfsmount *mnt = proc_mnt;
|
||||
@@ -189,6 +244,7 @@ void mconsole_proc(struct mc_request *re
|
||||
stop - pause the UML; it will do nothing until it receives a 'go' \n\
|
||||
go - continue the UML after a 'stop' \n\
|
||||
log <string> - make UML enter <string> into the kernel log\n\
|
||||
+ exec <string> - pass <string> to /bin/sh -c synchronously\n\
|
||||
proc <file> - returns the contents of the UML's /proc/<file>\n\
|
||||
stack <pid> - returns the stack of the specified pid\n\
|
||||
"
|
||||
--- a/arch/um/drivers/mconsole_user.c
|
||||
+++ b/arch/um/drivers/mconsole_user.c
|
||||
@@ -30,6 +30,7 @@ static struct mconsole_command commands[
|
||||
{ "stop", mconsole_stop, MCONSOLE_PROC },
|
||||
{ "go", mconsole_go, MCONSOLE_INTR },
|
||||
{ "log", mconsole_log, MCONSOLE_INTR },
|
||||
+ { "exec", mconsole_exec, MCONSOLE_PROC },
|
||||
{ "proc", mconsole_proc, MCONSOLE_PROC },
|
||||
{ "stack", mconsole_stack, MCONSOLE_INTR },
|
||||
};
|
||||
--- a/arch/um/os-Linux/file.c
|
||||
+++ b/arch/um/os-Linux/file.c
|
||||
@@ -560,6 +560,8 @@ int os_create_unix_socket(const char *fi
|
||||
|
||||
addr.sun_family = AF_UNIX;
|
||||
|
||||
+ if (len > sizeof(addr.sun_path))
|
||||
+ len = sizeof(addr.sun_path);
|
||||
snprintf(addr.sun_path, len, "%s", file);
|
||||
|
||||
err = bind(sock, (struct sockaddr *) &addr, sizeof(addr));
|
||||
--- a/include/linux/kmod.h
|
||||
+++ b/include/linux/kmod.h
|
||||
@@ -32,4 +32,6 @@ static inline int request_module_nowait(
|
||||
#define try_then_request_module(x, mod...) (x)
|
||||
#endif
|
||||
|
||||
+int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info, struct file **filp);
|
||||
+
|
||||
#endif /* __LINUX_KMOD_H__ */
|
||||
--- a/include/linux/umh.h
|
||||
+++ b/include/linux/umh.h
|
||||
@@ -22,6 +22,7 @@ struct subprocess_info {
|
||||
const char *path;
|
||||
char **argv;
|
||||
char **envp;
|
||||
+ struct file *stdout;
|
||||
int wait;
|
||||
int retval;
|
||||
int (*init)(struct subprocess_info *info, struct cred *new);
|
||||
--- a/kernel/umh.c
|
||||
+++ b/kernel/umh.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <linux/ptrace.h>
|
||||
#include <linux/async.h>
|
||||
#include <linux/uaccess.h>
|
||||
+#include <linux/pipe_fs_i.h>
|
||||
|
||||
#include <trace/events/module.h>
|
||||
|
||||
@@ -72,6 +73,28 @@ static int call_usermodehelper_exec_asyn
|
||||
flush_signal_handlers(current, 1);
|
||||
spin_unlock_irq(¤t->sighand->siglock);
|
||||
|
||||
+ /* Install output when needed */
|
||||
+ if (sub_info->stdout) {
|
||||
+ struct files_struct *f = current->files;
|
||||
+ struct fdtable *fdt;
|
||||
+
|
||||
+ sys_close(1);
|
||||
+ sys_close(2);
|
||||
+ get_file(sub_info->stdout);
|
||||
+ fd_install(1, sub_info->stdout);
|
||||
+ fd_install(2, sub_info->stdout);
|
||||
+ spin_lock(&f->file_lock);
|
||||
+ fdt = files_fdtable(f);
|
||||
+ __set_bit(1, fdt->open_fds);
|
||||
+ __clear_bit(1, fdt->close_on_exec);
|
||||
+ __set_bit(2, fdt->open_fds);
|
||||
+ __clear_bit(2, fdt->close_on_exec);
|
||||
+ spin_unlock(&f->file_lock);
|
||||
+
|
||||
+ /* disallow core files */
|
||||
+ current->signal->rlim[RLIMIT_CORE] = (struct rlimit){0, 0};
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Initial kernel threads share ther FS with init, in order to
|
||||
* get the init root directory. But we've now created a new
|
||||
@@ -330,6 +353,20 @@ static void helper_unlock(void)
|
||||
wake_up(&running_helpers_waitq);
|
||||
}
|
||||
|
||||
+int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info,
|
||||
+ struct file **filp)
|
||||
+{
|
||||
+ struct file *f[2];
|
||||
+
|
||||
+ if (create_pipe_files(f, 0) < 0)
|
||||
+ return PTR_ERR(f);
|
||||
+
|
||||
+ sub_info->stdout = f[1];
|
||||
+ *filp = f[0];
|
||||
+ return 0;
|
||||
+}
|
||||
+EXPORT_SYMBOL(call_usermodehelper_stdoutpipe);
|
||||
+
|
||||
/**
|
||||
* call_usermodehelper_setup - prepare to call a usermode helper
|
||||
* @path: path to usermode executable
|
||||
147
target/linux/uml/patches-5.10/102-pseudo-random-mac.patch
Normal file
147
target/linux/uml/patches-5.10/102-pseudo-random-mac.patch
Normal file
@ -0,0 +1,147 @@
|
||||
===============================================================================
|
||||
|
||||
This patch makes MAC addresses of network interfaces predictable. In
|
||||
particular, it adds a small routine that computes MAC addresses of based on
|
||||
a SHA1 hash of the virtual machine name and interface ID.
|
||||
|
||||
TECHNICAL INFORMATION:
|
||||
|
||||
Applies to vanilla kernel 3.9.4.
|
||||
|
||||
===============================================================================
|
||||
--- a/arch/um/drivers/Kconfig
|
||||
+++ b/arch/um/drivers/Kconfig
|
||||
@@ -146,6 +146,20 @@ config UML_NET
|
||||
enable at least one of the following transport options to actually
|
||||
make use of UML networking.
|
||||
|
||||
+config UML_NET_DETERMINISTIC_MAC
|
||||
+ bool "Use deterministic MAC addresses for network interfaces"
|
||||
+ default y
|
||||
+ depends on UML_NET
|
||||
+ select CRYPTO_SHA1
|
||||
+ help
|
||||
+ Virtual network devices inside a User-Mode Linux instance must be
|
||||
+ assigned a MAC (Ethernet) address. If none is specified on the UML
|
||||
+ command line, one must be automatically computed. If this option is
|
||||
+ enabled, a randomly generated address is used. Otherwise, if this
|
||||
+ option is disabled, the address is generated from a SHA1 hash of
|
||||
+ the umid of the UML instance and the interface name. The latter choice
|
||||
+ is useful to make MAC addresses predictable.
|
||||
+
|
||||
config UML_NET_ETHERTAP
|
||||
bool "Ethertap transport (obsolete)"
|
||||
depends on UML_NET
|
||||
--- a/arch/um/drivers/net_kern.c
|
||||
+++ b/arch/um/drivers/net_kern.c
|
||||
@@ -25,6 +25,14 @@
|
||||
#include <net_kern.h>
|
||||
#include <net_user.h>
|
||||
|
||||
+#include <crypto/sha.h>
|
||||
+#include <crypto/hash.h>
|
||||
+#include <linux/string.h>
|
||||
+#include <linux/crypto.h>
|
||||
+#include <linux/err.h>
|
||||
+#include <linux/scatterlist.h>
|
||||
+#include "os.h"
|
||||
+
|
||||
#define DRIVER_NAME "uml-netdev"
|
||||
|
||||
static DEFINE_SPINLOCK(opened_lock);
|
||||
@@ -274,9 +282,51 @@ static const struct ethtool_ops uml_net_
|
||||
.get_ts_info = ethtool_op_get_ts_info,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_UML_NET_DETERMINISTIC_MAC
|
||||
+
|
||||
+/* Compute a SHA1 hash of the UML instance's id and
|
||||
+ * * an interface name. */
|
||||
+static int compute_hash(const char *umid, const char *ifname, char *hash)
|
||||
+{
|
||||
+ struct ahash_request *desc;
|
||||
+ struct crypto_ahash *tfm;
|
||||
+ struct scatterlist sg;
|
||||
+ char vmif[1024];
|
||||
+ int ret;
|
||||
+
|
||||
+ strcpy (vmif, umid);
|
||||
+ strcat (vmif, ifname);
|
||||
+
|
||||
+ tfm = crypto_alloc_ahash("sha1", 0, CRYPTO_ALG_ASYNC);
|
||||
+ if (IS_ERR(tfm))
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ desc = ahash_request_alloc(tfm, GFP_KERNEL);
|
||||
+ if (!desc) {
|
||||
+ ret = -ENOMEM;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ crypto_ahash_clear_flags(tfm, ~0);
|
||||
+
|
||||
+ sg_init_table(&sg, 1);
|
||||
+ sg_set_buf(&sg, vmif, strlen(vmif));
|
||||
+
|
||||
+ ahash_request_set_crypt(desc, &sg, hash, strlen(vmif));
|
||||
+
|
||||
+ ret = crypto_ahash_digest(desc);
|
||||
+out:
|
||||
+ crypto_free_ahash(tfm);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
void uml_net_setup_etheraddr(struct net_device *dev, char *str)
|
||||
{
|
||||
unsigned char *addr = dev->dev_addr;
|
||||
+ u8 hash[SHA1_DIGEST_SIZE];
|
||||
char *end;
|
||||
int i;
|
||||
|
||||
@@ -319,9 +369,26 @@ void uml_net_setup_etheraddr(struct net_
|
||||
return;
|
||||
|
||||
random:
|
||||
+#ifndef CONFIG_UML_NET_DETERMINISTIC_MAC
|
||||
printk(KERN_INFO
|
||||
"Choosing a random ethernet address for device %s\n", dev->name);
|
||||
eth_hw_addr_random(dev);
|
||||
+#else
|
||||
+ printk(KERN_INFO
|
||||
+ "Computing a digest to use as ethernet address for device %s\n", dev->name);
|
||||
+ if (compute_hash(get_umid(), dev->name, hash) < 0) {
|
||||
+ printk(KERN_WARNING
|
||||
+ "Could not compute digest to use as ethernet address for device %s. "
|
||||
+ "Using random address instead.\n", dev->name);
|
||||
+ random_ether_addr(addr);
|
||||
+ }
|
||||
+ else {
|
||||
+ for (i=0; i < 6; i++)
|
||||
+ addr[i] = (hash[i] + hash[i+6]) % 0x100;
|
||||
+ }
|
||||
+ addr [0] &= 0xfe; /* clear multicast bit */
|
||||
+ addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||
+#endif
|
||||
}
|
||||
|
||||
static DEFINE_SPINLOCK(devices_lock);
|
||||
--- a/kernel/umh.c
|
||||
+++ b/kernel/umh.c
|
||||
@@ -354,12 +354,12 @@ static void helper_unlock(void)
|
||||
}
|
||||
|
||||
int call_usermodehelper_stdoutpipe(struct subprocess_info *sub_info,
|
||||
- struct file **filp)
|
||||
+ struct file **filp)
|
||||
{
|
||||
struct file *f[2];
|
||||
|
||||
if (create_pipe_files(f, 0) < 0)
|
||||
- return PTR_ERR(f);
|
||||
+ return PTR_ERR(f);
|
||||
|
||||
sub_info->stdout = f[1];
|
||||
*filp = f[0];
|
||||
@ -507,7 +507,6 @@ CONFIG_USB_COMMON=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
# CONFIG_USB_ETH is not set
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_XILINX=y
|
||||
CONFIG_USB_HID=y
|
||||
|
||||
@ -37,13 +37,33 @@ menuconfig TARGET_OPTIONS
|
||||
|
||||
Most people will answer N.
|
||||
|
||||
config BUILD_LLVM_BPF
|
||||
bool "Build LLVM toolchain for eBPF" if DEVEL
|
||||
help
|
||||
If enabled, a LLVM toolchain for building eBPF binaries will be built.
|
||||
If this is not enabled, eBPF packages can only be built if the host
|
||||
has a suitable toolchain
|
||||
|
||||
choice BPF_TOOLCHAIN
|
||||
prompt "BPF toolchain" if DEVEL
|
||||
default BPF_TOOLCHAIN_NONE
|
||||
|
||||
config BPF_TOOLCHAIN_NONE
|
||||
bool "None"
|
||||
|
||||
config BPF_TOOLCHAIN_HOST
|
||||
select USE_LLVM_HOST
|
||||
bool "Use host LLVM toolchain"
|
||||
|
||||
config BPF_TOOLCHAIN_BUILD_LLVM
|
||||
select USE_LLVM_BUILD
|
||||
bool "Build LLVM toolchain for eBPF"
|
||||
help
|
||||
If enabled, a LLVM toolchain for building eBPF binaries will be built.
|
||||
If this is not enabled, eBPF packages can only be built if the host
|
||||
has a suitable toolchain
|
||||
endchoice
|
||||
|
||||
config BPF_TOOLCHAIN_HOST_PATH
|
||||
string
|
||||
depends on BPF_TOOLCHAIN_HOST
|
||||
prompt "Host LLVM toolchain path (prefix)" if DEVEL
|
||||
default "/usr/local/opt/llvm" if HOST_OS_MACOS
|
||||
default ""
|
||||
|
||||
menuconfig EXTERNAL_TOOLCHAIN
|
||||
bool
|
||||
@ -274,6 +294,17 @@ config GDB_PYTHON
|
||||
help
|
||||
Enable the python bindings for GDB to allow using python in the gdb shell.
|
||||
|
||||
config HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_LLVM_HOST
|
||||
select HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_LLVM_BUILD
|
||||
select HAS_BPF_TOOLCHAIN
|
||||
bool
|
||||
|
||||
config USE_GLIBC
|
||||
default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
|
||||
bool
|
||||
|
||||
@ -36,7 +36,7 @@ tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
|
||||
tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
|
||||
tools-$(CONFIG_USES_MINOR) += kernel2minor
|
||||
tools-$(CONFIG_USE_SPARSE) += sparse
|
||||
tools-$(CONFIG_BUILD_LLVM_BPF) += llvm-bpf
|
||||
tools-$(CONFIG_USE_LLVM_BUILD) += llvm-bpf
|
||||
|
||||
# builddir dependencies
|
||||
$(curdir)/autoconf/compile := $(curdir)/m4/compile
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libressl
|
||||
PKG_VERSION:=3.3.4
|
||||
PKG_HASH:=bcce767a3fed252bfd1210f8a7e3505a2b54d3008f66e43d9b95e3f30c072931
|
||||
PKG_VERSION:=3.4.1
|
||||
PKG_HASH:=107ceae6ca800e81cb563584c16afa36d6c7138fade94a2b3e9da65456f7c61c
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CPE_ID:=cpe:/a:openbsd:libressl
|
||||
|
||||
Loading…
Reference in New Issue
Block a user