Skip to content

Commit

Permalink
Merge branch 'bananapi4-nvme' into bananapi4.
Browse files Browse the repository at this point in the history
r42. Version/date bump.
  • Loading branch information
N-Storm committed Dec 5, 2024
2 parents b4bfe92 + 35b7f02 commit a3e34a6
Show file tree
Hide file tree
Showing 374 changed files with 12,508 additions and 3,485 deletions.
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,13 @@
- changed-files:
- any-glob-to-any-file:
- "target/linux/starfive/**"
"target/stm32":
- changed-files:
- any-glob-to-any-file:
- "target/linux/stm32/**"
- "package/boot/arm-trusted-firmware-stm32/**"
- "package/boot/optee-os-stm32/**"
- "package/boot/uboot-stm32/**"
"target/sunxi":
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ jobs:
working-directory: openwrt
run: |
rm -rf .config
[[ -f config-nstorm-bananapi-bpi-r4 ]] && cat config-nstorm-bananapi-bpi-r4 > .config
if [ -f config-nstorm-bananapi-bpi-r4 ]; then cat config-nstorm-bananapi-bpi-r4 > .config; fi
- name: Configure testing kernel
if: inputs.testing == true
Expand Down
20 changes: 14 additions & 6 deletions config-nstorm-bananapi-bpi-r4
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ CONFIG_BPF_TOOLCHAIN_BUILD_LLVM=y
# CONFIG_BPF_TOOLCHAIN_NONE is not set
CONFIG_BUILD_PATENTED=y
CONFIG_BUSYBOX_CONFIG_ASH_HELP=y
CONFIG_BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_BUSYBOX_CONFIG_ASH_SLEEP=y
CONFIG_BUSYBOX_CONFIG_BLKDISCARD=y
CONFIG_BUSYBOX_CONFIG_BLKID=y
Expand Down Expand Up @@ -194,6 +193,7 @@ CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
CONFIG_MBEDTLS_VERSION_C=y
CONFIG_MBEDTLS_VERSION_FEATURES=y
CONFIG_PACKAGE_afuse=y
# CONFIG_PACKAGE_apk-mbedtls is not set
CONFIG_PACKAGE_arptables-legacy=y
CONFIG_PACKAGE_arptables-nft=y
CONFIG_PACKAGE_attendedsysupgrade-common=y
Expand Down Expand Up @@ -318,6 +318,7 @@ CONFIG_PACKAGE_kmod-ebtables-ipv6=y
CONFIG_PACKAGE_kmod-eeprom-93cx6=y
CONFIG_PACKAGE_kmod-fs-autofs4=y
CONFIG_PACKAGE_kmod-fs-exfat=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-f2fs=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-squashfs=y
Expand All @@ -331,6 +332,7 @@ CONFIG_PACKAGE_kmod-i2c-algo-bit=y
CONFIG_PACKAGE_kmod-i2c-gpio=y
CONFIG_PACKAGE_kmod-i2c-mux-reg=y
CONFIG_PACKAGE_kmod-i2c-smbus=y
CONFIG_PACKAGE_kmod-ifb=y
CONFIG_PACKAGE_kmod-iio-core=y
CONFIG_PACKAGE_kmod-ip6tables=y
CONFIG_PACKAGE_kmod-ip6tables-extra=y
Expand Down Expand Up @@ -618,7 +620,9 @@ CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-app-attendedsysupgrade=y
CONFIG_PACKAGE_luci-app-commands=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-mwan3=y
CONFIG_PACKAGE_luci-app-package-manager=y
CONFIG_PACKAGE_luci-app-qos=y
CONFIG_PACKAGE_luci-app-uhttpd=y
CONFIG_PACKAGE_luci-base=y
CONFIG_PACKAGE_luci-compat=y
Expand All @@ -627,7 +631,9 @@ CONFIG_PACKAGE_luci-i18n-base-ru=y
CONFIG_PACKAGE_luci-i18n-commands-ru=y
CONFIG_PACKAGE_luci-i18n-dashboard-ru=y
CONFIG_PACKAGE_luci-i18n-firewall-ru=y
CONFIG_PACKAGE_luci-i18n-mwan3-ru=y
CONFIG_PACKAGE_luci-i18n-package-manager-ru=y
CONFIG_PACKAGE_luci-i18n-qos-ru=y
CONFIG_PACKAGE_luci-i18n-uhttpd-ru=y
CONFIG_PACKAGE_luci-lib-base=y
CONFIG_PACKAGE_luci-lib-ip=y
Expand Down Expand Up @@ -660,6 +666,7 @@ CONFIG_PACKAGE_mwan3=y
CONFIG_PACKAGE_nano=y
CONFIG_PACKAGE_nstat=y
CONFIG_PACKAGE_nvme-cli=y
CONFIG_PACKAGE_opkg=y
CONFIG_PACKAGE_owipcalc=y
CONFIG_PACKAGE_owut=y
CONFIG_PACKAGE_perl=y
Expand Down Expand Up @@ -701,6 +708,7 @@ CONFIG_PACKAGE_ppp-mod-pppol2tp=y
CONFIG_PACKAGE_ppp-mod-pptp=y
CONFIG_PACKAGE_proto-bonding=y
CONFIG_PACKAGE_px5g-mbedtls=y
CONFIG_PACKAGE_qos-scripts=y
CONFIG_PACKAGE_relayd=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rpcd=y
Expand Down Expand Up @@ -732,7 +740,6 @@ CONFIG_PACKAGE_wpa-supplicant-mbedtls=y
# CONFIG_PACKAGE_wpad-basic-mbedtls is not set
CONFIG_PACKAGE_xtables-legacy=y
CONFIG_PACKAGE_xtables-nft=y
CONFIG_PACKAGE_zlib=y
CONFIG_PACKAGE_zoneinfo-core=y
CONFIG_PACKAGE_zoneinfo-europe=y
CONFIG_PACKAGE_zram-swap=y
Expand All @@ -752,24 +759,25 @@ CONFIG_TARGET_OPTIONS=y
CONFIG_TARGET_PREINIT_SHOW_NETMSG=y
# CONFIG_TARGET_PREINIT_SUPPRESS_STDERR is not set
CONFIG_TARGET_ROOTFS_PERSIST_VAR=y
# CONFIG_USE_APK is not set
# CONFIG_USE_FS_ACL_ATTR is not set
CONFIG_USE_GC_SECTIONS=y
CONFIG_USE_LLVM_BUILD=y
CONFIG_USE_LTO=y
CONFIG_USE_MOLD=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_BUG_URL=""
CONFIG_VERSION_CODE="20241105-r41"
CONFIG_VERSION_CODE="20241205-r42"
CONFIG_VERSION_CODE_FILENAMES=y
CONFIG_VERSION_DIST=""
CONFIG_VERSION_DIST="OpenWrt"
CONFIG_VERSION_FILENAMES=y
CONFIG_VERSION_HOME_URL="https://github.com/N-Storm/openwrt"
CONFIG_VERSION_HWREV=""
CONFIG_VERSION_MANUFACTURER="Sinovoip"
CONFIG_VERSION_MANUFACTURER_URL=""
CONFIG_VERSION_NUMBER="v24-SNAPSHOT-6.6.59"
CONFIG_VERSION_NUMBER="v24-SNAPSHOT-6.6.63"
CONFIG_VERSION_PRODUCT="BananaPI BPI-R4"
CONFIG_VERSION_REPO=""
CONFIG_VERSION_REPO="https://downloads.openwrt.org/releases/24.10-SNAPSHOT"
CONFIG_VERSION_SUPPORT_URL=""
CONFIG_ZLIB_OPTIMIZE_SPEED=y
CONFIG_ZRAM_DEF_COMP_ZSTD=y
Expand Down
22 changes: 20 additions & 2 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ menu "Global build settings"
config USE_APK
imply PACKAGE_apk-mbedtls
bool "Use APK instead of OPKG to build distribution (EXPERIMENTAL)"
default y

comment "General build options"

Expand Down Expand Up @@ -295,12 +296,22 @@ menu "Global build settings"
Enable GCC Stack Smashing Protection (SSP) for userspace applications
config PKG_CC_STACKPROTECTOR_NONE
bool "None"
help
No stack smashing protection.
config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
config PKG_CC_STACKPROTECTOR_ALL
bool "All"
help
Protects all functions.
endchoice

choice
Expand All @@ -310,10 +321,18 @@ menu "Global build settings"
Enable GCC Stack-Smashing Protection (SSP) for the kernel
config KERNEL_CC_STACKPROTECTOR_NONE
bool "None"
help
No stack smashing protection.
config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config KERNEL_CC_STACKPROTECTOR_STRONG
bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
endchoice

config KERNEL_STACKPROTECTOR
Expand Down Expand Up @@ -404,10 +423,9 @@ menu "Global build settings"

endchoice

config SECCOMP
config USE_SECCOMP
bool "Enable SECCOMP"
select KERNEL_SECCOMP
select PACKAGE_procd-seccomp
depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64)
depends on !TARGET_uml
default y
Expand Down
19 changes: 19 additions & 0 deletions config/Config-kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,25 @@ if KERNEL_TASKSTATS

endif

config KERNEL_PSI
bool "Compile the kernel with pressure stall information tracking"
help
Collect metrics that indicate how overcommitted the CPU, memory,
and IO capacity are in the system.

If you say Y here, the kernel will create /proc/pressure/ with the
pressure statistics files cpu, memory, and io. These will indicate
the share of walltime in which some or all tasks in the system are
delayed due to contention of the respective resource.

In kernels with cgroup support, cgroups (cgroup2 only) will
have cpu.pressure, memory.pressure, and io.pressure files,
which aggregate pressure stalls for the grouped tasks only.

For more details see Documentation/accounting/psi.rst.

Say N if unsure.

config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information"
default y if !SMALL_FLASH
Expand Down
2 changes: 1 addition & 1 deletion include/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ define Build/Configure/Default
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_VERSION=1 \
-DCMAKE_SYSTEM_PROCESSOR=$(ARCH) \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=$(if $(CONFIG_DEBUG),Debug,Release) \
-DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
-DCMAKE_C_COMPILER_LAUNCHER="$(CMAKE_C_COMPILER_LAUNCHER)" \
Expand Down
5 changes: 5 additions & 0 deletions include/default-packages.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ifneq ($(CONFIG_USE_APK),)
DEFAULT_PACKAGES += apk-mbedtls
else
DEFAULT_PACKAGES += opkg
endif
62 changes: 58 additions & 4 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ include $(INCLUDE_DIR)/rootfs.mk
override MAKE:=$(_SINGLE)$(SUBMAKE)
override NO_TRACE_MAKE:=$(_SINGLE)$(NO_TRACE_MAKE)

##@
# @brief Convert size with unit postfix to unitless expression in bytes.
#
# @param 1: Size with unit. Possible unit postfix are `g`, `m`, `k`.
##
exp_units = $(subst k, * 1024,$(subst m, * 1024k,$(subst g, * 1024m,$(1))))

target_params = $(subst +,$(space),$*)
Expand Down Expand Up @@ -111,19 +116,37 @@ endef

PROFILE_SANITIZED := $(call tolower,$(subst DEVICE_,,$(subst $(space),-,$(PROFILE))))

##@
# @brief Call function for each group of arguments.
#
# @param 1: List of lists of arguments. Lists are separated by `|`.
# @param 2: Function to call for list of arguments.
##
define split_args
$(foreach data, \
$(subst |,$(space),\
$(subst $(space),^,$(1))), \
$(call $(2),$(strip $(subst ^,$(space),$(data)))))
endef

##@
# @brief Call build function with arguments.
#
# @param 1: Function to call. Function name is prepended with `Build/`.
# @param 2...: Function arguments.
##
define build_cmd
$(if $(Build/$(word 1,$(1))),,$(error Missing Build/$(word 1,$(1))))
$(call Build/$(word 1,$(1)),$(wordlist 2,$(words $(1)),$(1)))

endef

##@
# @brief Call build functions from the list.
#
# @param 1: List of build functions with arguments, separated by `|`.
# First word in each group is a build command without `Build/` prefix.
##
define concat_cmd
$(call split_args,$(1),build_cmd)
endef
Expand Down Expand Up @@ -163,6 +186,12 @@ DTC_WARN_FLAGS := \
DTC_FLAGS += $(DTC_WARN_FLAGS)
DTCO_FLAGS += $(DTC_WARN_FLAGS)

##@
# @brief Pad file to specified size.
#
# @param 1: File.
# @param 2: Padding.
##
define Image/pad-to
dd if=$(1) of=$(1).new bs=$(2) conv=sync
mv $(1).new $(1)
Expand Down Expand Up @@ -281,7 +310,7 @@ endef
define Image/Manifest
$(if $(CONFIG_USE_APK), \
$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
--repositories-file /dev/zero | sort | sed 's/ / - /' > \
--repositories-file /dev/null | sort | sed 's/ / - /' > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
Expand Down Expand Up @@ -336,19 +365,17 @@ opkg_target = \

apk_target = \
$(call apk,$(mkfs_cur_target_dir)) --no-scripts \
--repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb


target-dir-%: FORCE
ifneq ($(CONFIG_USE_APK),)
rm -rf $(mkfs_cur_target_dir)
$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
mv $(mkfs_cur_target_dir)/etc/apk/repositories $(mkfs_cur_target_dir).repositories
$(if $(mkfs_packages_remove), \
$(apk_target) del $(mkfs_packages_remove))
$(if $(mkfs_packages_add), \
$(apk_target) add $(mkfs_packages_add))
mv $(mkfs_cur_target_dir).repositories $(mkfs_cur_target_dir)/etc/apk/repositories
else
rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg
$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
Expand Down Expand Up @@ -403,26 +430,53 @@ define Device/InitProfile
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
endef

##@
# @brief Image configuration variables.
#
# @param 1: Device name.
##
define Device/Init
##@ Device name.
DEVICE_NAME := $(1)
##@ Commands to build kernel.
# Commands with arguments are separated by `|`.
##
KERNEL:=
##@ Commands to build initramfs.
# Commands with arguments are separated by `|`.
##
KERNEL_INITRAMFS = $$(KERNEL)
##@ Kernel command line.
CMDLINE:=

##@ Images to build.
IMAGES :=
##@ Artifacts to build.
ARTIFACTS :=
##@ Device image prefix.
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
##@ Device image name.
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
##@ Factory image name.
FACTORY_IMG_NAME :=
##@ Maximum image size. Optional.
IMAGE_SIZE :=
##@ Maximum image size. Optional.
NAND_SIZE :=
##@ Kernel image prefix.
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
##@ Kernel image suffix.
KERNEL_SUFFIX := -kernel.bin
##@ Initramfs image suffix.
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
##@ Kernel image name.
KERNEL_IMAGE = $$(KERNEL_PREFIX)$$(KERNEL_SUFFIX)
##@ Initramfs image prefix.
KERNEL_INITRAMFS_PREFIX = $$(DEVICE_IMG_PREFIX)-initramfs
KERNEL_INITRAMFS_IMAGE = $$(KERNEL_INITRAMFS_PREFIX)$$(KERNEL_INITRAMFS_SUFFIX)
##@ Initramfs image name.
KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs
##@ Kernel install flag.
KERNEL_INSTALL :=
KERNEL_NAME := vmlinux
KERNEL_DEPENDS :=
Expand Down
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 = .59
LINUX_KERNEL_HASH-6.6.59 = 23616808d8c08f12815ff898f4edb4c11397a2b2843d029ee62452d21833a76d
LINUX_VERSION-6.6 = .63
LINUX_KERNEL_HASH-6.6.63 = d1054ab4803413efe2850f50f1a84349c091631ec50a1cf9e891d1b1f9061835
2 changes: 1 addition & 1 deletion include/meson.mk
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ define Build/Configure/Meson
$(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt)
$(call Meson, \
setup \
--buildtype plain \
--buildtype $(if $(CONFIG_DEBUG),debug,plain) \
--native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
--cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \
-Ddefault_library=both \
Expand Down
Loading

0 comments on commit a3e34a6

Please sign in to comment.