Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
srdgame committed Jul 4, 2024
2 parents edcb67e + 37636a8 commit 7cb8f4c
Show file tree
Hide file tree
Showing 2,587 changed files with 324,054 additions and 329,716 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ else
include tools/Makefile
include toolchain/Makefile

# Include the test suite Makefile if it exists
-include tests/Makefile

$(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check)
$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
Expand Down
3 changes: 2 additions & 1 deletion include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers

BPF_KERNEL_INCLUDE := \
-nostdinc $(patsubst %,-isystem %,$(TOOLCHAIN_INC_DIRS)) \
-nostdinc -isystem $(TOOLCHAIN_ROOT_DIR)/lib/gcc/*/*/include \
$(patsubst %,-isystem%,$(TOOLCHAIN_INC_DIRS)) \
-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 \
Expand Down
4 changes: 4 additions & 0 deletions include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ HOST_CONFIGURE_ARGS = \
--localstatedir=$(HOST_BUILD_PREFIX)/var \
--sbindir=$(HOST_BUILD_PREFIX)/bin

ifneq ($(YEAR_2038),y)
HOST_CONFIGURE_ARGS += --disable-year2038
endif

HOST_MAKE_VARS = \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .158
LINUX_KERNEL_HASH-5.15.158 = f9071c83a4fd8b80af026b48cfc1869bfa25883f9148b92b5dc1e1e1e26dd5c6
LINUX_VERSION-5.15 = .161
LINUX_KERNEL_HASH-5.15.161 = d629f78680dc4b65e3d78b61406fb7757b960c83c206e63ad8c2606b3e3c474c
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .93
LINUX_KERNEL_HASH-6.1.93 = df31af2ef5923d61fadd68bfd991f50f2e42a913895eb4b03214ee78f8720bcf
LINUX_VERSION-6.1 = .95
LINUX_KERNEL_HASH-6.1.95 = 2960f0aa1d75665f39114ad3c272a999c54796e553a2355d0379f5188d14dfbd
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .33
LINUX_KERNEL_HASH-6.6.33 = a13ebc20dc2a75722699949af74aa86a4ce5d544d6daaa6a7de4e8c81b40de97
LINUX_VERSION-6.6 = .35
LINUX_KERNEL_HASH-6.6.35 = fce3ee728712ed063aa8c14a8756c8ff8c7a46ba3827f61d2b04a73c7cf5dd9e
2 changes: 1 addition & 1 deletion include/kernel-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif
define Download/git-kernel
URL:=$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI))
PROTO:=git
VERSION:=$(CONFIG_KERNEL_GIT_REF)
SOURCE_VERSION:=$(CONFIG_KERNEL_GIT_REF)
FILE:=$(LINUX_SOURCE)
SUBDIR:=linux-$(LINUX_VERSION)
OPTS:=$(KERNEL_GIT_OPTS)
Expand Down
2 changes: 0 additions & 2 deletions include/netfilter.mk
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED))
# tee

$(eval $(call nf_add,IPT_TEE,CONFIG_NETFILTER_XT_TARGET_TEE, $(P_XT)xt_TEE))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV4, $(P_V4)nf_dup_ipv4),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_ipv6),))

# u32

Expand Down
13 changes: 9 additions & 4 deletions include/package-pack.mk
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ endif

$(RSTRIP) $$(IDIR_$(1))

ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),)
(cd $$(IDIR_$(1)); \
( \
find . -type f \! -path ./CONTROL/\* -exec $(MKHASH) sha256 -n \{\} \; 2> /dev/null | \
sed 's|\([[:blank:]]\)\./| \1/|' > $$(IDIR_$(1))/CONTROL/files-sha256sum \
) || true \
)
endif

ifneq ($$(KEEP_$(1)),)
@( \
keepfiles=""; \
Expand Down Expand Up @@ -320,10 +329,6 @@ else
rm -rf $$(IDIR_$(1))/CONTROL/conffiles; \
fi

ifneq ($$(CONFIG_IPK_FILES_CHECKSUMS),)
if [ -f $$(IDIR_$(1))/CONTROL/files-sha256sum ]; then mv -f $$(IDIR_$(1))/CONTROL/files-sha256sum $$(IDIR_$(1))/lib/apk/packages/$(1).files-sha256sum; fi
endif

if [ -z "$$$$(ls -A $$(IDIR_$(1))/CONTROL 2>/dev/null)" ]; then \
rm -rf $$(IDIR_$(1))/CONTROL; \
else \
Expand Down
26 changes: 22 additions & 4 deletions include/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,19 @@ ifneq ($(DUMP),)
# default package configuration
# Keep DYNAMIC_DEF_PKG_CONF in sync with toplevel.mk to reflect the same configs
DYNAMIC_DEF_PKG_CONF := CONFIG_USE_APK CONFIG_SELINUX CONFIG_SMALL_FLASH CONFIG_SECCOMP
$(foreach config, $(DYNAMIC_DEF_PKG_CONF), \
$(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \
)
ifneq ($(wildcard $(TOPDIR)/.config),)
$(foreach config, $(DYNAMIC_DEF_PKG_CONF), \
$(eval $(config) := $(shell grep "$(config)=y" $(TOPDIR)/.config 2>/dev/null)) \
)
# Init config that are enabled by default. Dependency are checked matching the one in
# the config.
else
ifeq ($(filter $(BOARD), uml),)
ifneq ($(filter $(ARCH), aarch64 arm armeb mips mipsel mips64 mips64el i386 powerpc x86_64),)
CONFIG_SECCOMP := y
endif
endif
endif
endif

# default device type
Expand Down Expand Up @@ -348,7 +358,15 @@ ifeq ($(DUMP),1)
ifneq ($(CONFIG_CPU_MIPS32_R2),)
FEATURES += mips16
endif
FEATURES += $(foreach v,6 7,$(if $(CONFIG_CPU_V$(v)),arm_v$(v)))
ifneq ($(CONFIG_CPU_V6),)
FEATURES += arm_v6
endif
ifneq ($(CONFIG_CPU_V6K),)
FEATURES += arm_v6
endif
ifneq ($(CONFIG_CPU_V7),)
FEATURES += arm_v7
endif

# remove duplicates
FEATURES:=$(sort $(FEATURES))
Expand Down
2 changes: 2 additions & 0 deletions package/base-files/files/bin/ipcalc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ start=$((network | (start & hostmask)))

if [ "$prefix" -le 30 ]; then
upper=$(((network | hostmask) - 1))
elif [ "$prefix" -eq 31 ]; then
upper=$((network | hostmask))
else
upper="$network"
fi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
. /lib/functions.sh

migrate_ports() {
local config="$1"
local type ports ifname

config_get type "$config" type
[ "$type" != "bridge" ] && return

config_get ports "$config" ports
[ -n "$ports" ] && return

config_get ifname "$config" ifname
[ -z "$ifname" ] && return

for port in $ifname; do
uci add_list network.$config.ports="$port"
done
uci delete network.$config.ifname
}

migrate_bridge() {
local config="$1"
local type ifname

config_get type "$config" type
[ "$type" != "bridge" ] && return

config_get ifname "$config" ifname

uci -q batch <<-EOF
add network device
set network.@device[-1].name='br-$config'
set network.@device[-1].type='bridge'
EOF
for port in $ifname; do
uci add_list network.@device[-1].ports="$port"
done

uci -q batch <<-EOF
delete network.$config.type
delete network.$config.ifname
set network.$config.device='br-$config'
EOF
}

config_load network
config_foreach migrate_ports device
config_foreach migrate_bridge interface
19 changes: 6 additions & 13 deletions package/base-files/files/sbin/pkg_check
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@ MISSING=""
SUMMARY=""
NL="
"
if [ -d /usr/lib/opkg ]; then
IPKG_INFO_DIR=/usr/lib/opkg/info
elif [ -d /lib/apk ];
IPKG_INFO_DIR=/lib/apk/packages
else
exti 1
fi

# Arguments parsing
while expr "x$1" : "x-" > /dev/null; do
Expand All @@ -56,12 +49,12 @@ done

# Check all packages by default
if [ -z "$1" ]; then
set $(cd $IPKG_INFO_DIR; for i in *.files-sha256sum; do basename $i .files-sha256sum; done)
set $(cd /usr/lib/opkg/info/; for i in *.files-sha256sum; do basename $i .files-sha256sum; done)
fi
# Iterate over packages
while [ "$1" ]; do
if [ \! -f "$IPKG_INFO_DIR/$1.files-sha256sum" ]; then
if [ \! -f "/usr/lib/opkg/info/$1.files-sha256sum" ]; then
if [ "$ERRFATAL" = no ]; then
echo " * No checksums for $1 - skipping"
echo
Expand All @@ -79,13 +72,13 @@ while [ "$1" ]; do
fi
[ $QUIET = yes ] || echo " * Checking package $1:"
ERR=""
CHECK="$(sha256sum -c $IPKG_INFO_DIR/$1.files-sha256sum 2> /dev/null)"
CHECK="$(sha256sum -c /usr/lib/opkg/info/$1.files-sha256sum 2> /dev/null)"
# Are the changed files config files?
if [ $? -ne 0 ] && [ "$(cat "$IPKG_INFO_DIR/$1.files-sha256sum")" ]; then
if [ $? -ne 0 ] && [ "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ]; then
NEWCHECK="$(echo "$CHECK" | grep '^.*: OK$')"
for i in $(echo "$CHECK" | sed -n 's|^\(.*\): FAILED$|\1|p'); do
if [ "$(grep "^$i\$" "$IPKG_INFO_DIR/$1.conffiles" 2> /dev/null)" ] || \
if [ "$(grep "^$i\$" "/usr/lib/opkg/info/$1.conffiles" 2> /dev/null)" ] || \
[ "$(echo "$i" | grep "^/etc/uci-defaults/")" ]; then
NEWCHECK="${NEWCHECK}${NL}${i}: CONFIGURED"
else
Expand All @@ -98,7 +91,7 @@ while [ "$1" ]; do
# Do we have changed files or not?
if [ -z "$ERR" ]; then
[ $QUIET = yes ] || [ ! -s "$IPKG_INFO_DIR/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
[ $QUIET = yes ] || [ ! -s "/usr/lib/opkg/info/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
[ $QUIET = yes ] || echo " * Package $1 is ok"
[ $QUIET = yes ] || echo
else
Expand Down
11 changes: 10 additions & 1 deletion package/boot/uboot-mvebu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ define U-Boot/eDPU
BUILD_SUBTARGET:=cortexa53
endef

define U-Boot/rb5009
NAME:=MikroTik RB5009
BUILD_SUBTARGET:=cortexa72
BUILD_DEVICES:=mikrotik_rb5009
UBOOT_CONFIG:=mvebu_rb5009
UBOOT_IMAGE:=u-boot.elf
endef

UBOOT_TARGETS:= \
clearfog \
helios4 \
omnia \
espressobin \
uDPU \
eDPU
eDPU \
rb5009

define Package/u-boot/install
$(if $(findstring cortexa53,$(BUILD_SUBTARGET)),,$(Package/u-boot/install/default))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From a322b1cbb3f3e606d33a11fd18df20811e5c16f2 Mon Sep 17 00:00:00 2001
From: Robert Marko <[email protected]>
Date: Fri, 21 Jun 2024 11:41:30 +0200
Subject: [PATCH 1/3] mvebu: armada-8k: respect CONFIG_DISTRO_DEFAULTS

Currently, Armada 8k config header is setting boot devices and including
<config_distro_bootcmd.h> regardless of the CONFIG_DISTRO_DEFAULTS being
enabled or not, thus populating the environment for distro boot even on
devices that have no need for it.

So, lets simply respect the value of CONFIG_DISTRO_DEFAULTS.

Signed-off-by: Robert Marko <[email protected]>
---
include/configs/mvebu_armada-8k.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

--- a/include/configs/mvebu_armada-8k.h
+++ b/include/configs/mvebu_armada-8k.h
@@ -30,7 +30,7 @@
/*
* PCI configuration
*/
-
+#ifdef CONFIG_DISTRO_DEFAULTS
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 1) \
func(MMC, mmc, 0) \
@@ -40,6 +40,9 @@
func(DHCP, dhcp, na)

#include <config_distro_bootcmd.h>
+#else
+#define BOOTENV
+#endif

#define CFG_EXTRA_ENV_SETTINGS \
"scriptaddr=0x6d00000\0" \
Loading

0 comments on commit 7cb8f4c

Please sign in to comment.