Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  elfutils: fix build with GCC 12/13
  x86: 6.6: Activate CONFIG_FB_DEVICE
  kernel: Add CONFIG_FB_DEVICE to kmod-fb
  ramips: add support for JDCloud RE-CP-02
  ramips: gl-mt1300: downclock SPI to 50MHz
  build: introduce PKG_BUILD_FLAGS
  ramips: add support for OpenFi 5Pro (coolsnowwolf#12196)
  hostapd: fix mbo module build
  kernel: bump 6.6 to 6.6.32 (coolsnowwolf#12186)
  kernel: bump 6.1 to 6.1.92 (coolsnowwolf#12187)
  mtd: spi-nor: add support for Winbond W25Q512
  mvebu: add support for QNAP QHora-321/322 with commo image
  base-files: add legacy-sdcard sysupgrade support
  kernel: bump 5.4 to 5.4.277 (coolsnowwolf#12191)
  kernel: bump 5.10 to 5.10.218 (coolsnowwolf#12190)
  kernel: bump 5.15 to 5.15.160 (coolsnowwolf#12188)
  • Loading branch information
github-actions[bot] committed Jun 1, 2024
2 parents e6deef5 + 3d715fe commit 99a5d2b
Show file tree
Hide file tree
Showing 35 changed files with 1,555 additions and 29 deletions.
15 changes: 15 additions & 0 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ menu "Global build settings"
default n
help
Adds -g3 to the CFLAGS.

config USE_GC_SECTIONS
bool
prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
help
Places functions and data items into its own sections to use the linker's
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections

config USE_LTO
bool
prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)"
help
Adds LTO flags to the CFLAGS and LDFLAGS.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto

config IPV6
def_bool y
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.10
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .217
LINUX_KERNEL_HASH-5.10.217 = c52bc1ffc396c11bce335c9ee5cd55fe4213cbc1fb4026ff62bb90c864c61f62
LINUX_VERSION-5.10 = .218
LINUX_KERNEL_HASH-5.10.218 = 9c36b243e8c3ec1d5963366618f336710b84340bf95be2037b26c452392cb2d6
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 = .159
LINUX_KERNEL_HASH-5.15.159 = 3478fe50225e9c88e09cf114f38e3fb71e82d9fdcc356aa1257d721199b341c5
LINUX_VERSION-5.15 = .160
LINUX_KERNEL_HASH-5.15.160 = f41e718e33b88f269a6b6a7653e5e9824c4ba541f6ffe5bf26ecc37c540a1b05
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .276
LINUX_KERNEL_HASH-5.4.276 = e2712ebd4421ffa5b25a366659ecfbe1b45a444027ee2fe57369676453e86e07
LINUX_VERSION-5.4 = .277
LINUX_KERNEL_HASH-5.4.277 = 7e1f5b28588e49ddfd18e7772476e4e8b52bdc9c3e19beafcbb7c103e6c01f51
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 = .91
LINUX_KERNEL_HASH-6.1.91 = 880ace63ca2291b8b639e9bd862cc828649d3e1e00ccfee5861473debd2e4dec
LINUX_VERSION-6.1 = .92
LINUX_KERNEL_HASH-6.1.92 = 9019f427bfdc9ced5bc954d760d37ac08c0cdffb45ad28087fc45a73e64336c9
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 = .31
LINUX_KERNEL_HASH-6.6.31 = d6ecff966f8c95ec4cb3bb303904f757b7de6a6bcfef0d0771cb852158e61c20
LINUX_VERSION-6.6 = .32
LINUX_KERNEL_HASH-6.6.32 = aaa824eaf07f61911d22b75ff090a403c3dd0bd73e23933e0bba8b5971436ce1
45 changes: 39 additions & 6 deletions include/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ include $(INCLUDE_DIR)/download.mk
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_PARALLEL ?=
PKG_USE_MIPS16 ?= 1
PKG_IREMAP ?= 1
PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)

MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
Expand All @@ -24,15 +22,50 @@ PKG_JOBS?=-j1
else
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
endif

PKG_BUILD_FLAGS?=
# TODO remove this when all packages moved to PKG_BUILD_FLAGS=no-mips16
PKG_USE_MIPS16?=1
ifneq ($(strip $(PKG_USE_MIPS16)),1)
PKG_BUILD_FLAGS+=no-mips16
endif

__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto no-mold,$(PKG_BUILD_FLAGS))
ifneq ($(__unknown_flags),)
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
endif

# $1=flagname, $2=default (0/1)
define pkg_build_flag
$(if $(filter no-$(1),$(PKG_BUILD_FLAGS)),0,$(if $(filter $(1),$(PKG_BUILD_FLAGS)),1,$(2)))
endef

ifeq ($(call pkg_build_flag,iremap,1),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS)
endif

ifdef CONFIG_USE_MIPS16
ifeq ($(strip $(PKG_USE_MIPS16)),1)
ifeq ($(call pkg_build_flag,mips16,1),1)
TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
TARGET_CFLAGS += -mips16 -minterlink-mips16
TARGET_CXXFLAGS += -mips16 -minterlink-mips16
endif
endif
ifeq ($(strip $(PKG_IREMAP)),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS)
ifeq ($(call pkg_build_flag,gc-sections,$(if $(CONFIG_USE_GC_SECTIONS),1,0)),1)
TARGET_CFLAGS+= -ffunction-sections -fdata-sections
TARGET_CXXFLAGS+= -ffunction-sections -fdata-sections
TARGET_LDFLAGS+= -Wl,--gc-sections
endif
ifeq ($(call pkg_build_flag,lto,$(if $(CONFIG_USE_LTO),1,0)),1)
TARGET_CFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
endif
ifdef CONFIG_USE_MOLD
ifeq ($(call pkg_build_flag,mold,1),1)
TARGET_LINKER:=mold
endif
endif

include $(INCLUDE_DIR)/hardening.mk
Expand Down
8 changes: 8 additions & 0 deletions package/base-files/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0
PKG_CONFIG_DEPENDS += \
CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
CONFIG_NAND_SUPPORT \
CONFIG_LEGACY_SDCARD_SUPPORT \
CONFIG_EMMC_SUPPORT \
CONFIG_CLEAN_IPKG \
CONFIG_PER_FEED_REPO \
Expand Down Expand Up @@ -125,6 +126,12 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
endef
endif

ifeq ($(CONFIG_LEGACY_SDCARD_SUPPORT),)
define Package/base-files/legacy-sdcard-support
rm -f $(1)/lib/upgrade/legacy-sdcard.sh
endef
endif

ifeq ($(CONFIG_EMMC_SUPPORT),)
define Package/base-files/emmc-support
rm -f $(1)/lib/upgrade/emmc.sh
Expand All @@ -135,6 +142,7 @@ define Package/base-files/install
$(CP) ./files/* $(1)/
$(Package/base-files/install-key)
$(Package/base-files/nand-support)
$(Package/base-files/legacy-sdcard-support)
$(Package/base-files/emmc-support)
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
Expand Down
91 changes: 91 additions & 0 deletions package/base-files/files/lib/upgrade/legacy-sdcard.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
legacy_sdcard_check_image() {
local file="$1"
local diskdev partdev diff

export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}

get_partitions "/dev/$diskdev" bootdisk

v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b

get_partitions /tmp/image.bs image

#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"

rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image

if [ -n "$diff" ]; then
v "Partition layout has changed. Full image will be written."
ask_bool 0 "Abort" && exit 1
return 0
fi
}

legacy_sdcard_do_upgrade() {
local board=$(board_name)
local diskdev partdev diff

export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}

sync

if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk

v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b

get_partitions /tmp/image.bs image

#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
else
diff=1
fi

if [ -n "$diff" ]; then
get_image_dd "$1" of="/dev/$diskdev" bs=4096 conv=fsync

# Separate removal and addtion is necessary; otherwise, partition 1
# will be missing if it overlaps with the old partition 2
partx -d - "/dev/$diskdev"
partx -a - "/dev/$diskdev"
else
v "Writing bootloader to /dev/$diskdev"
get_image_dd "$1" of="$diskdev" bs=512 skip=1 seek=1 count=2048 conv=fsync
#iterate over each partition from the image and write it to the boot disk
while read part start size; do
if export_partdevice partdev $part; then
v "Writing image to /dev/$partdev..."
get_image_dd "$1" of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
else
v "Unable to find partition $part device, skipped."
fi
done < /tmp/partmap.image

v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
fi

sleep 1
}

legacy_sdcard_copy_config() {
local partdev

if export_partdevice partdev 1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot
cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
sync
umount /boot
fi
}
1 change: 1 addition & 0 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ define KernelPackage/fb
DEPENDS:=@DISPLAY_SUPPORT
KCONFIG:= \
CONFIG_FB \
CONFIG_FB_DEVICE=y \
CONFIG_FB_MXS=n \
CONFIG_FB_SM750=n \
CONFIG_FRAMEBUFFER_CONSOLE=y \
Expand Down
5 changes: 5 additions & 0 deletions package/libs/elfutils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ CONFIGURE_VARS += \

TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral

ifneq ($(filter $(GCC_MAJOR_VERSION),12 13),)
TARGET_CFLAGS += \
-Wno-error=use-after-free
endif

define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -339,6 +339,7 @@

ifdef CONFIG_MBO
CONFIG_WNM=y
+NEED_GAS=y
endif

ifdef CONFIG_WNM
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3467,10 +3467,11 @@ static int bcmgenet_probe(struct platfor
@@ -3478,10 +3478,11 @@ static int bcmgenet_probe(struct platfor
const struct of_device_id *of_id = NULL;
struct bcmgenet_priv *priv;
struct net_device *dev;
Expand All @@ -1846,7 +1846,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>

/* Up to GENET_MAX_MQ_CNT + 1 TX queues and RX queues */
dev = alloc_etherdev_mqs(sizeof(*priv), GENET_MAX_MQ_CNT + 1,
@@ -3497,14 +3498,15 @@ static int bcmgenet_probe(struct platfor
@@ -3508,14 +3509,15 @@ static int bcmgenet_probe(struct platfor
}

if (dn) {
Expand All @@ -1865,7 +1865,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}

priv->base = devm_platform_ioremap_resource(pdev, 0);
@@ -3517,7 +3519,6 @@ static int bcmgenet_probe(struct platfor
@@ -3529,7 +3531,6 @@ static int bcmgenet_probe(struct platfor

SET_NETDEV_DEV(dev, &pdev->dev);
dev_set_drvdata(&pdev->dev, dev);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 59ec726b7c77..3f089abd6fc9 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -13,10 +13,11 @@ if ASYMMETRIC_KEY_TYPE
config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
tristate "Asymmetric public-key crypto algorithm subtype"
@@ -15,6 +15,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select MPILIB
select CRYPTO_HASH_INFO
select CRYPTO_AKCIPHER
+ select CRYPTO_SIG
select CRYPTO_HASH
help
This option provides support for asymmetric public key type handling.
If signature generation and/or verification are to be used,
appropriate hash algorithms (such as SHA-1) must be available.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* CONFIG_CMDLINE is meant to be a default in case nothing else
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -2240,6 +2240,14 @@ config CMDLINE_FORCE
@@ -2239,6 +2239,14 @@ config CMDLINE_FORCE

endchoice

Expand Down
2 changes: 2 additions & 0 deletions target/linux/mvebu/cortexa72/base-files/etc/board.d/01_leds
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ board_config_update
board=$(board_name)

case "$board" in
qnap,qhora-321|\
iei,puzzle-m901)
ucidef_set_led_netdev "wan" "WAN" "white:network" "eth0" "link"
;;
qnap,qhora-322|\
iei,puzzle-m902)
ucidef_set_led_netdev "wan" "WAN" "white:network" "eth2" "link"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ case "$board" in
globalscale,mochabin)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "eth0 eth2"
;;
qnap,qhora-321|\
iei,puzzle-m901)
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5" "eth0"
;;
qnap,qhora-322|\
iei,puzzle-m902)
ucidef_set_interfaces_lan_wan "eth0 eth1 eth3 eth4 eth5 eth6 eth7 eth8" "eth2"
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ platform_do_upgrade_emmc() {

v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync

mkfs.ext4 -F -L rootfs_data $(find_mmc_part rootfs_data)

sleep 1
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ REQUIRE_IMAGE_METADATA=1
platform_check_image() {
case "$(board_name)" in
globalscale,mochabin|\
qnap,qhora-321|\
qnap,qhora-322|\
iei,puzzle-m901|\
iei,puzzle-m902|\
marvell,armada8040-mcbin-doubleshot|\
Expand All @@ -25,6 +27,8 @@ platform_check_image() {

platform_do_upgrade() {
case "$(board_name)" in
qnap,qhora-321|\
qnap,qhora-322|\
iei,puzzle-m901|\
iei,puzzle-m902)
platform_do_upgrade_emmc "$1"
Expand All @@ -43,6 +47,8 @@ platform_do_upgrade() {
platform_copy_config() {
case "$(board_name)" in
globalscale,mochabin|\
qnap,qhora-321|\
qnap,qhora-322|\
iei,puzzle-m901|\
iei,puzzle-m902|\
marvell,armada8040-mcbin-doubleshot|\
Expand Down
Loading

0 comments on commit 99a5d2b

Please sign in to comment.