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 Aug 26, 2024
2 parents 1304647 + ebe7c5f commit a215a1c
Show file tree
Hide file tree
Showing 765 changed files with 65,020 additions and 19,970 deletions.
10 changes: 10 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,10 @@ config KERNEL_BPF_EVENTS
for sending data from BPF programs to user-space for post-processing
or logging.

config KERNEL_PROBE_EVENTS_BTF_ARGS
bool "Support BTF function arguments for probe events"
depends on KERNEL_DEBUG_INFO_BTF && KERNEL_KPROBE_EVENTS && LINUX_6_6

config KERNEL_BPF_KPROBE_OVERRIDE
bool
depends on KERNEL_KPROBES
Expand Down Expand Up @@ -1234,6 +1238,12 @@ if KERNEL_IP_PNP

endif

config KERNEL_BTRFS_FS
bool "Compile the kernel with built-in BTRFS support"
help
Say Y here if you want to make the kernel to be able to boot off a
BTRFS partition.

menu "Filesystem ACL and attr support options"
config USE_FS_ACL_ATTR
bool "Use filesystem ACL and attr support by default"
Expand Down
4 changes: 3 additions & 1 deletion include/host-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ define Host/Configure
$(call Host/Configure/Default)
endef

HOST_MAKE_PATH ?= .

define Host/Compile/Default
+$(HOST_MAKE_VARS) \
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(HOST_MAKE_PATH) \
$(HOST_MAKE_FLAGS) \
$(1)
endef
Expand Down
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 = .100
LINUX_KERNEL_HASH-6.1.100 = b9aa6ec1a00f234d6c6f2d428fbb0a6bf459606c259263df978f86685b65a8b9
LINUX_VERSION-6.1 = .106
LINUX_KERNEL_HASH-6.1.106 = 3773c9052c7ba7432e8337ca84bee115c1a94ccef9d62b72b99ae30c4cd5f80f
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 = .41
LINUX_KERNEL_HASH-6.6.41 = 9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef
LINUX_VERSION-6.6 = .47
LINUX_KERNEL_HASH-6.6.47 = d43376c9e9eaa92bb1b926054bd160d329c58a62d64bd65fe1222c11c6564f50
5 changes: 4 additions & 1 deletion include/site/linux
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ac_cv_func_rindex=yes
ac_cv_func_setlocale=yes
ac_cv_func_setgrent_void=yes
ac_cv_func_setpgrp_void=yes
ac_cv_func_setresuid=no
ac_cv_func_setresuid=yes
ac_cv_func_setvbuf_reversed=no
ac_cv_func_stat_empty_string_bug=no
ac_cv_func_stat_ignores_trailing_slash=no
Expand Down Expand Up @@ -66,9 +66,12 @@ ac_cv_sctp=no
ac_cv_sys_restartable_syscalls=yes
ac_cv_time_r_type=POSIX
ac_cv_type_suseconds_t=yes
ac_cv_size_t=yes
ac_cv_ssize_t=yes
ac_cv_uchar=no
ac_cv_uint=yes
ac_cv_uint64_t=yes
ac_cv_uintptr_t=yes
ac_cv_ulong=yes
ac_cv_ushort=yes
ac_cv_va_copy=C99
Expand Down
4 changes: 4 additions & 0 deletions package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ ifneq ($(CONFIG_USE_APK),)
else
$(curdir)/compile: $(curdir)/system/opkg/host/compile
endif
else
ifneq ($(CONFIG_USE_APK),)
$(curdir)/compile: $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB)
endif
endif

$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index
Expand Down
7 changes: 6 additions & 1 deletion package/base-files/files/lib/preinit/10_indicate_failsafe
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ indicate_failsafe_led () {

indicate_failsafe() {
[ "$pi_preinit_no_failsafe" = "y" ] && return
echo "- failsafe -"
local consoles="$(cat /sys/class/tty/console/active)"
[ -n "$consoles" ] || consoles=console
for console in $consoles; do
[ -c "/dev/$console" ] && echo "- failsafe -" >"/dev/$console"
done
preinit_net_echo "Entering Failsafe!\n"
indicate_failsafe_led
echo OpenWrt-failsafe > /proc/sys/kernel/hostname
}

boot_hook_add failsafe indicate_failsafe
5 changes: 4 additions & 1 deletion package/base-files/files/lib/preinit/30_failsafe_wait
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fs_wait_for_key () {
rm -f $keypress_wait
} &

local consoles="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | sed -e 's/^console=//' -e 's/,.*//')"
local consoles="$(cat /sys/class/tty/console/active)"
[ -n "$consoles" ] || consoles=console
for console in $consoles; do
[ -c "/dev/$console" ] || continue
Expand Down Expand Up @@ -78,6 +78,9 @@ fs_wait_for_key () {
keypressed=1
[ "$(cat $keypress_true)" = "true" ] && keypressed=0

trap - INT
trap - USR1

rm -f $keypress_true
rm -f $keypress_wait
rm -f $keypress_sec
Expand Down
18 changes: 13 additions & 5 deletions package/base-files/files/lib/preinit/99_10_failsafe_login
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,22 @@
# Copyright (C) 2010 Vertical Communications

failsafe_shell() {
local consoles="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | sed -e 's/^console=//' -e 's/,.*//')"
local consoles="$(cat /sys/class/tty/console/active)"
[ -n "$consoles" ] || consoles=console
for console in $consoles; do
[ -c "/dev/$console" ] && while true; do
ash --login <"/dev/$console" >"/dev/$console" 2>"/dev/$console"
sleep 1
done &
case "$console" in
console|tty[0-9]*)
term=${TERM:-linux}
;;
*)
term=vt102
;;
esac
# Running asynchronously via the shell's & would ignore SIGINT,
# breaking ^C. Use start-stop-daemon instead.
[ -c "/dev/$console" ] && start-stop-daemon -Sb -p /dev/null -- env -i ash -c "while true; do setsid -c env -i USER=root LOGNAME=root SHELL=/bin/ash TERM="$term" ash --login <\"/dev/$console\" >\"/dev/$console\" 2>\"/dev/$console\"; sleep 1; done"
done

}

boot_hook_add failsafe failsafe_shell
1 change: 0 additions & 1 deletion package/base-files/files/lib/upgrade/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export_bootdevice() {
done
;;
/dev/*)
[ "$rootpart" = "/dev/fit0" ] && rootpart="$(fitblk_get_bootdev)"
uevent="/sys/class/block/${rootpart##*/}/../uevent"
;;
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \
Expand Down
13 changes: 10 additions & 3 deletions package/base-files/files/lib/upgrade/nand.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,11 @@ nand_verify_tar_file() {

nand_do_flash_file() {
local file="$1"
local cmd="$2"
local file_type

local cmd="$(identify_if_gzip "$file")cat"
local file_type="$(identify "$file" "$cmd" "")"
[ -z "$cmd" ] && cmd="$(identify_if_gzip "$file")cat"
file_type="$(identify "$file" "$cmd" "")"

[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART=rootfs

Expand Down Expand Up @@ -423,17 +425,22 @@ nand_do_restore_config() {
# Supported firmware containers:
# 1. Raw file
# 2. Gzip
# 3. Custom (requires passing extracting command)
#
# Supported data formats:
# 1. Tar with kernel/rootfs
# 2. UBI image (built using "ubinized")
# 3. UBIFS image (to update UBI volume with)
# 4. FIT image (to update UBI volume with)
#
# $(1): firmware file path
# $(2): (optional) pipe command to extract firmware
nand_do_upgrade() {
local file="$1"
local cmd="$2"

sync
nand_do_flash_file "$file" && nand_do_upgrade_success
nand_do_flash_file "$file" "$cmd" && nand_do_upgrade_success
nand_do_upgrade_failed
}

Expand Down
14 changes: 13 additions & 1 deletion package/base-files/files/usr/libexec/login.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
#!/bin/sh

[ "$(uci -q get system.@system[0].ttylogin)" = 1 ] || exec /bin/ash --login
[ -t 0 ] && {
tty_dev=$(readlink /proc/self/fd/0)
case "$tty_dev" in
/dev/console|/dev/tty[0-9]*)
export TERM=${TERM:-linux}
;;
/dev/*)
export TERM=vt102
;;
esac
}

[ "$(uci -q get system.@system[0].ttylogin)" = 1 ] || exec /bin/login -f root

exec /bin/login
29 changes: 27 additions & 2 deletions package/boot/arm-trusted-firmware-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=arm-trusted-firmware-mediatek
PKG_RELEASE:=2
PKG_RELEASE:=3

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
Expand Down Expand Up @@ -52,6 +52,27 @@ define Trusted-Firmware-A/mt7622-nor-2ddr
DDR3_FLYBY:=1
endef

define Trusted-Firmware-A/mt7622-ram-1ddr
NAME:=MediaTek MT7622 (RAM, 1x DDR3)
BOOT_DEVICE:=ram
BUILD_SUBTARGET:=mt7622
PLAT:=mt7622
RAM_BOOT_UART_DL:=1
HIDDEN:=
DEFAULT:=TARGET_mediatek_mt7622
endef

define Trusted-Firmware-A/mt7622-ram-2ddr
NAME:=MediaTek MT7622 (RAM, 2x DDR3)
BOOT_DEVICE:=ram
BUILD_SUBTARGET:=mt7622
PLAT:=mt7622
DDR3_FLYBY:=1
RAM_BOOT_UART_DL:=1
HIDDEN:=
DEFAULT:=TARGET_mediatek_mt7622
endef

define Trusted-Firmware-A/mt7622-snand-1ddr
NAME:=MediaTek MT7622 (SPI-NAND, 1x DDR3)
BUILD_SUBTARGET:=mt7622
Expand Down Expand Up @@ -483,6 +504,8 @@ endef
TFA_TARGETS:= \
mt7622-nor-1ddr \
mt7622-nor-2ddr \
mt7622-ram-1ddr \
mt7622-ram-2ddr \
mt7622-snand-1ddr \
mt7622-snand-ubi-1ddr \
mt7622-snand-2ddr \
Expand Down Expand Up @@ -547,12 +570,14 @@ TFA_MAKE_FLAGS += \
$(if $(RAM_BOOT_UART_DL),RAM_BOOT_UART_DL=1) \
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7981,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x100000)) \
all
$(if $(RAM_BOOT_UART_DL),bl2,all)

define Package/trusted-firmware-a-ram/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.bin $(BIN_DIR)/$(BUILD_VARIANT)-bl2.bin
endef
Package/trusted-firmware-a-mt7622-ram-1ddr/install = $(Package/trusted-firmware-a-ram/install)
Package/trusted-firmware-a-mt7622-ram-2ddr/install = $(Package/trusted-firmware-a-ram/install)
Package/trusted-firmware-a-mt7981-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
Package/trusted-firmware-a-mt7981-ram-ddr4/install = $(Package/trusted-firmware-a-ram/install)
Package/trusted-firmware-a-mt7986-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 94802b344195d3574701ca6ab5122f6b7615a6eb Mon Sep 17 00:00:00 2001
From: Daniel Golle <[email protected]>
Date: Sun, 11 Aug 2024 23:12:33 +0100
Subject: [PATCH] mediatek: snfi: fix return code when reading

Return 0 on succesful read, which may contain correctable bitflips.

Fixes: #10
Signed-off-by: Daniel Golle <[email protected]>
---
plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c
+++ b/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c
@@ -29,8 +29,10 @@ static int snfi_mtd_read_page(struct nan
int ret;

ret = mtk_snand_read_page(snf, addr, (void *)buffer, NULL, false);
- if (ret == -EBADMSG)
+ if (ret > 0) {
+ NOTICE("corrected %d bitflips while reading page %u\n", ret, page);
ret = 0;
+ }

return ret;
}
2 changes: 2 additions & 0 deletions package/boot/imx-bootlets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://trabant.uid0.hu/openwrt/
PKG_HASH:=09ecd81a64db5166a235932146faf08d0689bfc7ac04ac9fcc3a5bd809fba74a

PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk

define Package/imx-bootlets
Expand Down
1 change: 1 addition & 0 deletions package/boot/kobs-ng/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/imx-kobs-$(PKG_VERSION)

PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
PKG_FLAGS:=nonshared

include $(INCLUDE_DIR)/package.mk

Expand Down
40 changes: 39 additions & 1 deletion package/boot/rkbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ define Trusted-Firmware-A/Default
BUILD_TARGET:=rockchip
endef

define Trusted-Firmware-A/rk3308
BUILD_SUBTARGET:=armv8
ATF:=rk33/rk3308_bl31_v2.26.elf
TPL:=rk33/rk3308_ddr_589MHz_uart2_m1_v2.07.bin
endef

define Trusted-Firmware-A/rk3308-rock-pi-s
NAME:=Radxa ROCK Pi S
BUILD_SUBTARGET:=armv8
ATF:=rk33/rk3308_bl31_v2.26.elf
TPL:=rk33/rk3308_ddr_589MHz_uart0_m0_v2.07.bin
endef

define Trusted-Firmware-A/rk3566
BUILD_SUBTARGET:=armv8
ATF:=rk35/rk3568_bl31_v1.44.elf
Expand All @@ -44,10 +57,35 @@ define Trusted-Firmware-A/rk3568-e25
TPL:=rk35/rk3568_ddr_1560MHz_uart2_m0_115200_v1.21.bin
endef

define Trusted-Firmware-A/rk3588
BUILD_SUBTARGET:=armv8
ATF:=rk35/rk3588_bl31_v1.45.elf
TPL:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin
endef

TFA_TARGETS:= \
rk3308 \
rk3308-rock-pi-s \
rk3566 \
rk3568 \
rk3568-e25
rk3568-e25 \
rk3588

ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s)
TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin
define Download/rk3308-tpl-rock-pi-s
FILE:=$(TPL_FILE)
URL:=https://github.com/radxa/rkbin/raw/5696fab20dcac57c1458f72dc7604ba60e553adf/bin/rk33/
HASH:=8a1a42df23cccb86a2dabc14a5c0e9227d64a51b9b83e9968ef5af3b30787f7d
endef

define Build/Prepare
$(eval $(call Download,rk3308-tpl-rock-pi-s))
$(call Build/Prepare/Default)

$(CP) $(DL_DIR)/$(TPL_FILE) $(PKG_BUILD_DIR)/bin/rk33/
endef
endif

ifeq ($(BUILD_VARIANT),rk3568-e25)
TPL_FILE:=rk3568_ddr_1560MHz_uart2_m0_115200_v1.21.bin
Expand Down
Loading

0 comments on commit a215a1c

Please sign in to comment.