Compare commits

...

24 Commits

Author SHA1 Message Date
Sven-Ola Tuecke
4805f62eb7
spacemit: remove old and unused patch set (#9497)
Signed-off-by: Sven-Ola Tuecke <sven-ola@gmx.de>
2026-03-07 12:32:56 +01:00
Igor Pecovnik
1b38e53689 add Vulkan support and expand 3D package descriptions
- Add vulkan-tools: Vulkan utilities (vulkaninfo) for testing and debugging
- Add mesa-vulkan-drivers: Vulkan drivers for Mesa GPUs (Panfrost, Lima, Radeon, Intel)
- Expand package definitions with individual inline comments describing each package:
  - libglx-mesa0: Mesa OpenGL extension library for X11
  - mesa-utils: Mesa utilities for OpenGL information and testing
  - mesa-utils-extra: Additional Mesa demonstration programs
  - glmark2 variants: OpenGL 2.0/3.0 and ES 2.0 benchmark suite with Wayland/X11 backends
- Improves code documentation and makes package purposes clear for maintainers

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-03-06 07:45:51 +01:00
Igor Pecovnik
82a2a16f13 rockchip: Disable specific patches in 6.19 series
Disable several patches in the rockchip-6.19 kernel series including:
- PCI Link-Up IRQ handler patches
- USB phy patches
- ASoC and pmdomain fixes
- AV1 media codec patches

Signed-off-by: Igor Pecovnik <igor@armbian.com>
2026-03-06 06:23:02 +01:00
Austin Lane
ed3ef9d0eb rockchip: Enable Wireguard/TUN module in vendor kernel
Allow VPN apps (wireguard, tailscale, etc) to function on rockchip armhf vendor kernel.
Includes a `rewrite-kernel-config` to fix ordering/etc.
2026-03-06 06:00:31 +01:00
Julian Sikorski
5acad3ad65 Update odroidxu4-current to 6.6.128 2026-03-05 22:02:47 +01:00
StepSecurity Bot
c27048a57d
[StepSecurity] ci: Harden GitHub Actions (#9356)
* [StepSecurity] ci: Harden GitHub Actions

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>

* imprement coderabbit recommendations

---------

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
Co-authored-by: Igor Velkov <325961+iav@users.noreply.github.com>
2026-03-05 13:47:09 +01:00
Igor Velkov
ea547d6e0a (#9400 P1a) lib/functions/bsp/armbian-bsp-cli-deb.sh: convert [ ] to [[ ]]
Replace all 43 POSIX `[ ]` tests with bash `[[ ]]` across five board-side
package hook functions (preinst, postinst_base, postinst_finish,
postinst_update_uboot_bootscript, get_bootscript_info).

Normalise `=` to `==` in the `"$1" == "upgrade"` comparison.
Collapse paired `[ A ] && [ B ]` into a single `[[ A && B ]]` where possible.
Variables that were previously unquoted inside `[ ]` (e.g. ${BOOTSCRIPT_DST},
${BOOTSCRIPT_BACKUP_VERSION}) are now properly quoted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
3c37a1618c (#9400 P1a) config/sources/families/spacemit.conf: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]`; also quote the unquoted `${2}boot0`
expansion to prevent word-splitting on the path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
fc841b6b74 (#9400 P1a) config/sources/families/rockchip.conf: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]`; also quote the unquoted `$1`
positional parameter inside the file test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
8cb897856f (#9400 P1a) extensions/gxlimg.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on two file existence checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
1839857f8d (#9400 P1a) extensions/lowmem.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on two file existence checks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
73e69995d8 (#9400 P1a) lib/functions/compilation/kernel-debs.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one numeric argument-count check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
234f39b6ca (#9400 P1a) lib/functions/bsp/utils-bsp.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one directory existence check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
3e4de6c02b (#9400 P1a) lib/functions/image/fingerprint.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one -n test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
b9bf4489a8 (#9400 P1a) lib/functions/image/initrd.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
934575ee35 (#9400 P1a) lib/functions/rootfs/distro-agnostic.sh: convert [ ] to [[ ]]
Replace two chained POSIX `[ ]` with a single bash `[[ ]]` using `&&`
inside the double brackets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
956aa02bf7 (#9400 P1a) lib/functions/rootfs/distro-specific.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on four conditionals: file/path
existence checks and an array length comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
2d1784eff0 (#9400 P1a) lib/functions/configuration/main-config.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on six conditionals: file existence
checks, string comparisons, and -n tests. Also normalise `=` to `==` in
the string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
7b137e0067 (#9400 P1a) lib/functions/main/config-prepare.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one array expansion check.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
1cafc27959 (#9400 P1a) lib/functions/host/prepare-host.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on one string comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
Igor Velkov
f0201782a4 (#9400 P1a) lib/functions/image/partitioning.sh: convert [ ] to [[ ]]
Replace POSIX `[ ]` with bash `[[ ]]` on three remaining single-bracket
conditionals: two numeric comparisons on sfdisk version (lines 251, 270)
and one -z test with unquoted variable (line 485, also adds quoting).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:36:20 +01:00
igorpecovnik
4654894352 Automatic board configs status synchronise 2026-03-05 10:19:04 +01:00
Igor Velkov
ae6735f470
patching: fix #9028 timestamp when multiple patches touch same file (#9489)
If patch B sorts after patch A but has an older mtime, it would
overwrite A's timestamp on the shared file, causing the kernel Makefile
to skip recompilation.

Fix: only call os.utime() when the new mtime is strictly greater than
the file's current mtime.
2026-03-05 10:13:40 +01:00
Igor Velkov
b7af31d65b fix(gitignore): ignore __pycache__ at all depths (#7863)
`/__pycache__/*` only covered the root level. Replace with `**/__pycache__/`
so that generated bytecode directories in lib/tools/ and elsewhere are ignored.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 09:53:15 +01:00
49 changed files with 33881 additions and 715 deletions

13
.github/CODEOWNERS vendored
View File

@ -25,7 +25,10 @@ config/boards/armsom-forge1.csc @amazingfate
config/boards/armsom-sige1.csc @amazingfate
config/boards/armsom-sige3.csc @amazingfate
config/boards/avaota-a1.csc @chainsx
config/boards/ayn-odin2.csc @Squishy123 @kasimling
config/boards/ayn-odin2.csc @FantasyGmm @Squishy123 @kasimling
config/boards/ayn-odin2mini.csc @Squishy123
config/boards/ayn-odin2portal.csc @Squishy123
config/boards/ayn-thor.csc @Squishy123
config/boards/bananapi.conf @DylanHP @janprunk
config/boards/bananapicm4io.conf @pyavitz
config/boards/bananapif3.conf @pyavitz
@ -235,7 +238,7 @@ config/kernel/linux-rockchip-*.config @amazingfate @paolosabatino @vidplace7
config/kernel/linux-rockchip-rv1106-*.config @vidplace7
config/kernel/linux-rockchip64-*.config @150balbes @ColorfulRhino @HeyMeco @JohnTheCoolingFan @Lemon1151 @SuperKali @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @alexl83 @amazingfate @andyshrk @brentr @catalinii @chainsx @efectn @fridtjof @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @lanefu @linhz0hz @mlegenovic @paolosabatino @prahal @pyavitz @rbqvq @redrathnure @retro98boy @rpardini @schwar3kat @sicXnull @tdleiyao @torte71 @utlark @vamzii
config/kernel/linux-sm8250-*.config @amazingfate
config/kernel/linux-sm8550-*.config @Squishy123 @kasimling
config/kernel/linux-sm8550-*.config @FantasyGmm @Squishy123 @kasimling
config/kernel/linux-spacemit-*.config @pyavitz @sven-ola
config/kernel/linux-starfive2-*.config @libiunc
config/kernel/linux-sun55iw3-syterkit-*.config @chainsx
@ -258,7 +261,7 @@ patch/atf/atf-qcs6490/ @HeyMeco
patch/atf/atf-rockchip64/v2.13/ @150balbes @ColorfulRhino @HeyMeco @SuperKali @Tonymac32 @ahoneybun @alexl83 @amazingfate @andyshrk @fridtjof @joekhoobyar @linhz0hz @paolosabatino @prahal
patch/atf/atf-rockchip64/v2.14/ @HeyMeco
patch/atf/atf-sm8250/ @amazingfate
patch/atf/atf-sm8550/ @Squishy123 @kasimling
patch/atf/atf-sm8550/ @FantasyGmm @Squishy123 @kasimling
patch/atf/atf-spacemit/ @pyavitz @sven-ola
patch/atf/atf-sun55iw3-syterkit/ @chainsx
patch/atf/atf-sunxi64/ @AGM1968 @IsMrX @JohnTheCoolingFan @Kreyren @PanderMusubi @Qvy-png @Ressetkk @The-going @Tonymac32 @alexl83 @chraac @devdotnetorg @eliasbakken @igorpecovnik @krachlatte @pyavitz @schwar3kat @sicXnull @spendist @teknoid
@ -278,7 +281,7 @@ patch/kernel/archive/realtek-rtd1619b-*/ @wei633
patch/kernel/archive/rockchip-*/ @paolosabatino
patch/kernel/archive/rockchip64-*/ @150balbes @ColorfulRhino @HeyMeco @JohnTheCoolingFan @Lemon1151 @SuperKali @TheSnowfield @Tonymac32 @ZazaBR @ahoneybun @alexl83 @amazingfate @andyshrk @brentr @catalinii @chainsx @efectn @fridtjof @hqnicolas @igorpecovnik @joekhoobyar @krachlatte @lanefu @linhz0hz @mlegenovic @paolosabatino @prahal @pyavitz @rbqvq @redrathnure @retro98boy @rpardini @schwar3kat @sicXnull @tdleiyao @torte71 @utlark @vamzii
patch/kernel/archive/sm8250-*/ @amazingfate
patch/kernel/archive/sm8550-*/ @Squishy123 @kasimling
patch/kernel/archive/sm8550-*/ @FantasyGmm @Squishy123 @kasimling
patch/kernel/archive/spacemit-*/ @pyavitz @sven-ola
patch/kernel/archive/sunxi-*/ @1ubuntuuser @AGM1968 @AaronNGray @DylanHP @IsMrX @Janmcha @JohnTheCoolingFan @Kreyren @PanderMusubi @Qvy-png @Ressetkk @StephenGraf @The-going @TheSnowfield @Tonymac32 @alexl83 @chraac @devdotnetorg @eliasbakken @igorpecovnik @janprunk @krachlatte @lbmendes @leggewie @mhawkins-consultant @pyavitz @schwar3kat @sgjava @sicXnull @spendist @teknoid
patch/kernel/archive/uefi-arm64-*/ @PeterChrz @rpardini
@ -357,7 +360,7 @@ sources/families/rockchip-rv1106.conf @vidplace7
sources/families/rockchip.conf @amazingfate @paolosabatino @vidplace7
sources/families/rockchip64.conf @150balbes @JohnTheCoolingFan @Lemon1151 @TheSnowfield @Tonymac32 @ahoneybun @andyshrk @brentr @hqnicolas @igorpecovnik @joekhoobyar @mlegenovic @paolosabatino @prahal @rbqvq @redrathnure @retro98boy @rpardini @sicXnull @torte71 @utlark
sources/families/sm8250.conf @amazingfate
sources/families/sm8550.conf @Squishy123 @kasimling
sources/families/sm8550.conf @FantasyGmm @Squishy123 @kasimling
sources/families/spacemit.conf @pyavitz @sven-ola
sources/families/starfive2.conf @libiunc
sources/families/sun50iw1.conf @Kreyren @PanderMusubi @Qvy-png @devdotnetorg @eliasbakken

View File

@ -7,6 +7,9 @@ on:
- "config/boards/*.*"
branches: [main]
permissions:
contents: read
jobs:
update-board-list-dispatch:
name: Send dispatch

View File

@ -12,6 +12,9 @@ on:
paths:
- ".github/labels.yml"
permissions:
contents: read
jobs:
labeler:
permissions:

View File

@ -8,6 +8,9 @@ on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
dispatch-on-forked-repo:
name: 📢 Run repository dispatch on fork

View File

@ -4,6 +4,9 @@ on:
push:
branches: [ main ]
permissions:
contents: read
jobs:
announcepush:
# Do not run this workflow in forks

View File

@ -5,11 +5,14 @@ on:
pull_request:
types: [ labeled ]
permissions:
contents: read
jobs:
Announce:
permissions:
pull-requests: read
contents: read
runs-on: ubuntu-latest
if: ${{ github.repository == 'armbian/build' && github.event.label.id == '6210849975' }}
steps:
@ -22,4 +25,4 @@ jobs:
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST --data \
"{\"username\": \"Github\", \"avatar_url\": \"${{ secrets.AVATARURL }}\", \"content\": \"\
:arrow_heading_up: **Pull request** to [$GITHUB_REPOSITORY](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY>) by [$GITHUB_ACTOR](<$GITHUB_SERVER_URL/$GITHUB_ACTOR>) - **Please review!** \
:point_right: [Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/${{github.event.pull_request.number}}>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}
:point_right: [Link](<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pull/${{github.event.pull_request.number}}>): *$(git show -s --format=%s)*\"}" ${{ secrets.WEBHOOKURL }}

View File

@ -13,6 +13,9 @@ env:
BOARD_IMAGES_DIR: "board-images"
VENDOR_LOGOS_DIR: "board-vendor-logos"
permissions:
contents: read
jobs:
Check:
name: "Verify assets for newly added boards"

View File

@ -15,6 +15,9 @@ env:
SCHEDULED_RUNS_OLDER_THAN: "10"
SCHEDULED_RUNS_TO_KEEP: "0"
permissions:
contents: read
jobs:
clean-logs:
runs-on: ubuntu-latest

View File

@ -4,11 +4,15 @@ on:
workflows: ["Maintenance: Listen PR review"]
types: [completed]
permissions:
contents: read
jobs:
label:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
issues: write
pull-requests: write
@ -51,4 +55,4 @@ jobs:
} catch (e) {
core.warning(`Could not remove label "${name}": ${e.message}`);
}
}
}

View File

@ -3,6 +3,9 @@ on:
pull_request_review:
types: [submitted]
permissions:
contents: read
jobs:
ping:
if: ${{ github.event.review.state == 'approved' }}

View File

@ -4,6 +4,9 @@ on:
issues:
types: opened
permissions:
contents: read
jobs:
welcome-first-time-contributor:
runs-on: ubuntu-latest

View File

@ -4,6 +4,9 @@ on:
pull_request_target:
types: opened
permissions:
contents: read
jobs:
welcome-first-time-contributor:
runs-on: ubuntu-latest

2
.gitignore vendored
View File

@ -22,7 +22,7 @@ ubuntu-*-cloudimg-console.log
.DS_Store
*~
*.swp
/__pycache__/*
**/__pycache__/
# Mainly generated by merge tools like 'meld'
*.orig

View File

@ -96,6 +96,7 @@ CONFIG_INET=y
CONFIG_INET_ESP=m
# CONFIG_INET_DIAG is not set
CONFIG_IPV6=m
CONFIG_IPV6_TUNNEL=m
CONFIG_NETFILTER=y
CONFIG_BRIDGE_NETFILTER=m
CONFIG_NETFILTER_NETLINK_HOOK=m
@ -276,6 +277,8 @@ CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPI_NOR_MISC=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BLOCK=y
# CONFIG_DTC_OMIT_DISABLED is not set
# CONFIG_DTC_OMIT_EMPTY is not set
CONFIG_ZRAM=m
CONFIG_ZRAM_WRITEBACK=y
CONFIG_ZRAM_MEMORY_TRACKING=y
@ -286,9 +289,11 @@ CONFIG_BLK_DEV_SD=m
# CONFIG_SCSI_LOWLEVEL is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_WIREGUARD=m
CONFIG_MACVLAN=m
CONFIG_IPVLAN=m
CONFIG_VXLAN=m
CONFIG_TUN=m
CONFIG_VETH=m
# CONFIG_NET_VENDOR_ALACRITECH is not set
# CONFIG_NET_VENDOR_AMAZON is not set
@ -393,8 +398,8 @@ CONFIG_I2C_CHARDEV=y
CONFIG_I2C_GPIO=y
CONFIG_I2C_RK3X=y
CONFIG_SPI=y
CONFIG_SPI_ROCKCHIP_FLEXBUS_FSPI=y
CONFIG_SPI_ROCKCHIP=y
CONFIG_SPI_ROCKCHIP_FLEXBUS_FSPI=y
CONFIG_SPI_ROCKCHIP_SFC=y
CONFIG_SPI_SPIDEV=y
# CONFIG_PTP_1588_CLOCK_KVM is not set
@ -490,8 +495,6 @@ CONFIG_FIQ_DEBUGGER_TRUST_ZONE=y
CONFIG_RK_CONSOLE_THREAD=y
CONFIG_ROCKCHIP_DEBUG=y
CONFIG_ROCKCHIP_MINI_KERNEL=y
# CONFIG_DTC_OMIT_DISABLED is not set
# CONFIG_DTC_OMIT_EMPTY is not set
CONFIG_PM_DEVFREQ=y
CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
CONFIG_DEVFREQ_GOV_USERSPACE=y

View File

@ -226,7 +226,7 @@ elif [[ "$BOOT_SOC" == "rk3506" ]]; then
local logging_prelude=""
[[ $(type -t run_host_command_logged) == function ]] && logging_prelude="run_host_command_logged"
if [ -f $1/u-boot-rockchip.bin ]; then #"$BOOT_SCENARIO" == binman
if [[ -f "$1/u-boot-rockchip.bin" ]]; then #"$BOOT_SCENARIO" == binman
${logging_prelude} dd if=$1/u-boot-rockchip.bin of=$2 bs=32k seek=1 conv=notrunc status=none
fi
}

View File

@ -66,7 +66,7 @@ pre_prepare_partitions() {
write_uboot_platform() {
local device=${2}
if [ -b ${2}boot0 ]; then
if [[ -b "${2}boot0" ]]; then
echo "eMMC"
DEVICE=`ls /dev/mmcblk*boot0 | sed 's/^.....//'`
echo 0 > /sys/block/${DEVICE}/force_ro

View File

@ -60,7 +60,7 @@ function gxlimg_repack_fip_with_new_uboot() {
-s raw-u-boot.bin \
"${EXTRACT_DIR}/bl33.enc"
if [ -e "${EXTRACT_DIR}/lpddr3_1d.fw" ]; then
if [[ -e "${EXTRACT_DIR}/lpddr3_1d.fw" ]]; then
run_host_command_logged gxlimg \
-t fip \
--bl2 "${EXTRACT_DIR}/bl2.sign" \
@ -101,7 +101,7 @@ function gxlimg_repack_fip_with_new_uboot() {
;;
esac
if [ ! -s u-boot.bin ]; then
if [[ ! -s u-boot.bin ]]; then
exit_with_error "FIP repack produced empty u-boot.bin"
fi
}

View File

@ -13,7 +13,7 @@ function post_family_tweaks_bsp__initramfs() {
display_alert "${EXTENSION}" "Set initramfs config for low memory" "debug"
# Create /etc/initramfs-tools/conf.d/armbian-lowmem.conf configuration file
if [ ! -f "$destination/etc/initramfs-tools/conf.d/armbian-lowmem.conf" ]; then
if [[ ! -f "$destination/etc/initramfs-tools/conf.d/armbian-lowmem.conf" ]]; then
mkdir -p "$destination/etc/initramfs-tools/conf.d"
install -m 644 /dev/null "$destination/etc/initramfs-tools/conf.d/armbian-lowmem.conf"
@ -35,7 +35,7 @@ function post_family_tweaks_bsp__copy_lowmem_config() {
# Copy /etc/default/armbian-lowmem configuration file
# Allows user to customize swapfile size / location
if [ ! -f "$destination/etc/default/armbian-lowmem" ]; then
if [[ ! -f "$destination/etc/default/armbian-lowmem" ]]; then
install -m 664 "$SRC/packages/bsp/armbian-lowmem/etc/default/armbian-lowmem.dpkg-dist" "$destination/etc/default/armbian-lowmem"
fi

View File

@ -46,9 +46,17 @@ function post_install_kernel_debs__3d() {
declare -a pkgs=("libgl1-mesa-dri")
if [[ "${BUILD_DESKTOP}" == "yes" ]]; then
pkgs+=("libglx-mesa0") # x11 stuff all the way
pkgs+=("mesa-utils" "mesa-utils-extra")
pkgs+=("glmark2" "glmark2-wayland" "glmark2-es2-wayland" "glmark2-es2" "glmark2-x11" "glmark2-es2-x11")
pkgs+=("libglx-mesa0") # Mesa OpenGL extension library for X11
pkgs+=("mesa-utils") # Mesa utilities for OpenGL information and testing
pkgs+=("mesa-utils-extra") # Additional Mesa demonstration programs
pkgs+=("glmark2") # OpenGL 2.0/3.0 benchmark suite
pkgs+=("glmark2-wayland") # Glmark2 Wayland backend for benchmarking
pkgs+=("glmark2-es2-wayland") # Glmark2 OpenGL ES 2.0 Wayland backend
pkgs+=("glmark2-es2") # Glmark2 OpenGL ES 2.0 benchmark support
pkgs+=("glmark2-x11") # Glmark2 X11 backend for benchmarking
pkgs+=("glmark2-es2-x11") # Glmark2 OpenGL ES 2.0 X11 backend
pkgs+=("vulkan-tools") # Vulkan utilities for testing and debugging (vulkaninfo, etc.)
pkgs+=("mesa-vulkan-drivers") # Vulkan drivers for Mesa GPUs (Panfrost, Lima, Radeon, Intel, etc.)
fi
if [[ "${BUILD_DESKTOP}" == "yes" ]]; then # if desktop, add amazingfated's multimedia PPAs and rockchip-multimedia-config utility, chromium, gstreamer, etc

View File

@ -305,7 +305,7 @@ function get_bootscript_info() {
bootscript_info[bootscript_file_contents]=""
bootscript_info[bootscript_file_fullpath]="${SRC}/config/bootscripts/${bootscript_source}"
if [ -f "${USERPATCHES_PATH}/bootscripts/${bootscript_source}" ]; then
if [[ -f "${USERPATCHES_PATH}/bootscripts/${bootscript_source}" ]]; then
bootscript_info[bootscript_file_fullpath]="${USERPATCHES_PATH}/bootscripts/${bootscript_source}"
fi
bootscript_info[bootscript_file_contents]="$(cat "${bootscript_info[bootscript_file_fullpath]}")"
@ -329,8 +329,8 @@ function get_bootscript_info() {
function board_side_bsp_cli_postinst_update_uboot_bootscript() {
if [[ ${BOOTSCRIPT_FORCE_UPDATE} == yes || ! -f /boot/${BOOTSCRIPT_DST} ]]; then
[ -z ${BOOTSCRIPT_BACKUP_VERSION} ] && BOOTSCRIPT_BACKUP_VERSION="$(date +%s)"
if [ -f /boot/${BOOTSCRIPT_DST} ]; then
[[ -z "${BOOTSCRIPT_BACKUP_VERSION}" ]] && BOOTSCRIPT_BACKUP_VERSION="$(date +%s)"
if [[ -f "/boot/${BOOTSCRIPT_DST}" ]]; then
cp -v /boot/${BOOTSCRIPT_DST} /usr/share/armbian/${BOOTSCRIPT_DST}-${BOOTSCRIPT_BACKUP_VERSION}
echo "NOTE: You can find previous bootscript versions in /usr/share/armbian !"
fi
@ -341,23 +341,23 @@ function board_side_bsp_cli_postinst_update_uboot_bootscript() {
rootfstype=$(sed -e 's/^.*rootfstype=//' -e 's/ .*$//' < /proc/cmdline)
# recreate armbianEnv.txt if it and extlinux does not exists
if [ ! -f /boot/armbianEnv.txt ] && [ ! -f /boot/extlinux/extlinux.conf ]; then
if [[ ! -f /boot/armbianEnv.txt && ! -f /boot/extlinux/extlinux.conf ]]; then
cp -v /usr/share/armbian/armbianEnv.txt /boot
echo "rootdev="\$rootdev >> /boot/armbianEnv.txt
echo "rootfstype="\$rootfstype >> /boot/armbianEnv.txt
fi
# update boot.ini if it exists? @TODO: why? who uses this?
[ -f /boot/boot.ini ] && sed -i "s/setenv rootdev.*/setenv rootdev \\"$rootdev\\"/" /boot/boot.ini
[ -f /boot/boot.ini ] && sed -i "s/setenv rootfstype.*/setenv rootfstype \\"$rootfstype\\"/" /boot/boot.ini
[[ -f /boot/boot.ini ]] && sed -i "s/setenv rootdev.*/setenv rootdev \\"$rootdev\\"/" /boot/boot.ini
[[ -f /boot/boot.ini ]] && sed -i "s/setenv rootfstype.*/setenv rootfstype \\"$rootfstype\\"/" /boot/boot.ini
[ -f /boot/boot.cmd ] && mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr > /dev/null 2>&1
[[ -f /boot/boot.cmd ]] && mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr > /dev/null 2>&1
fi
}
function board_side_bsp_cli_preinst() {
# tell people to reboot at next login
[ "$1" = "upgrade" ] && touch /var/run/.reboot_required
[[ "$1" == "upgrade" ]] && touch /var/run/.reboot_required
# fixing ramdisk corruption when using lz4 compression method
sed -i "s/^COMPRESS=.*/COMPRESS=gzip/" /etc/initramfs-tools/initramfs.conf
@ -374,39 +374,39 @@ function board_side_bsp_cli_preinst() {
esac
sysctl -p > /dev/null 2>&1
# replace canonical advertisement
if [ -d "/var/lib/ubuntu-advantage/messages/" ]; then
if [[ -d "/var/lib/ubuntu-advantage/messages/" ]]; then
echo -e "\nSupport Armbian! \nLearn more at https://armbian.com/donate" > /var/lib/ubuntu-advantage/messages/apt-pre-invoke-esm-service-status
cp /var/lib/ubuntu-advantage/messages/apt-pre-invoke-esm-service-status /var/lib/ubuntu-advantage/messages/apt-pre-invoke-no-packages-apps.tmpl
cp /var/lib/ubuntu-advantage/messages/apt-pre-invoke-esm-service-status /var/lib/ubuntu-advantage/messages/apt-pre-invoke-packages-apps
cp /var/lib/ubuntu-advantage/messages/apt-pre-invoke-esm-service-status /var/lib/ubuntu-advantage/messages/apt-pre-invoke-packages-apps.tmpl
fi
# disable deprecated services
[ -f "/etc/profile.d/activate_psd_user.sh" ] && rm /etc/profile.d/activate_psd_user.sh
[ -f "/etc/profile.d/check_first_login.sh" ] && rm /etc/profile.d/check_first_login.sh
[ -f "/etc/profile.d/check_first_login_reboot.sh" ] && rm /etc/profile.d/check_first_login_reboot.sh
[ -f "/etc/profile.d/ssh-title.sh" ] && rm /etc/profile.d/ssh-title.sh
[ -f "/etc/update-motd.d/10-header" ] && rm /etc/update-motd.d/10-header
[ -f "/etc/update-motd.d/30-sysinfo" ] && rm /etc/update-motd.d/30-sysinfo
[ -f "/etc/update-motd.d/35-tips" ] && rm /etc/update-motd.d/35-tips
[ -f "/etc/update-motd.d/40-updates" ] && rm /etc/update-motd.d/40-updates
[ -f "/etc/update-motd.d/98-autoreboot-warn" ] && rm /etc/update-motd.d/98-autoreboot-warn
[ -f "/etc/update-motd.d/99-point-to-faq" ] && rm /etc/update-motd.d/99-point-to-faq
[ -f "/etc/update-motd.d/80-esm" ] && rm /etc/update-motd.d/80-esm
[ -f "/etc/update-motd.d/80-livepatch" ] && rm /etc/update-motd.d/80-livepatch
[ -f "/etc/apt/apt.conf.d/02compress-indexes" ] && rm /etc/apt/apt.conf.d/02compress-indexes
[ -f "/etc/apt/apt.conf.d/02periodic" ] && rm /etc/apt/apt.conf.d/02periodic
[ -f "/etc/apt/apt.conf.d/no-languages" ] && rm /etc/apt/apt.conf.d/no-languages
[ -f "/etc/init.d/armhwinfo" ] && rm /etc/init.d/armhwinfo
[ -f "/etc/logrotate.d/armhwinfo" ] && rm /etc/logrotate.d/armhwinfo
[ -f "/etc/init.d/firstrun" ] && rm /etc/init.d/firstrun
[ -f "/etc/init.d/resize2fs" ] && rm /etc/init.d/resize2fs
[ -f "/lib/systemd/system/firstrun-config.service" ] && rm /lib/systemd/system/firstrun-config.service
[ -f "/lib/systemd/system/firstrun.service" ] && rm /lib/systemd/system/firstrun.service
[ -f "/lib/systemd/system/resize2fs.service" ] && rm /lib/systemd/system/resize2fs.service
[ -f "/usr/lib/armbian/apt-updates" ] && rm /usr/lib/armbian/apt-updates
[ -f "/usr/lib/armbian/firstrun-config.sh" ] && rm /usr/lib/armbian/firstrun-config.sh
[[ -f "/etc/profile.d/activate_psd_user.sh" ]] && rm /etc/profile.d/activate_psd_user.sh
[[ -f "/etc/profile.d/check_first_login.sh" ]] && rm /etc/profile.d/check_first_login.sh
[[ -f "/etc/profile.d/check_first_login_reboot.sh" ]] && rm /etc/profile.d/check_first_login_reboot.sh
[[ -f "/etc/profile.d/ssh-title.sh" ]] && rm /etc/profile.d/ssh-title.sh
[[ -f "/etc/update-motd.d/10-header" ]] && rm /etc/update-motd.d/10-header
[[ -f "/etc/update-motd.d/30-sysinfo" ]] && rm /etc/update-motd.d/30-sysinfo
[[ -f "/etc/update-motd.d/35-tips" ]] && rm /etc/update-motd.d/35-tips
[[ -f "/etc/update-motd.d/40-updates" ]] && rm /etc/update-motd.d/40-updates
[[ -f "/etc/update-motd.d/98-autoreboot-warn" ]] && rm /etc/update-motd.d/98-autoreboot-warn
[[ -f "/etc/update-motd.d/99-point-to-faq" ]] && rm /etc/update-motd.d/99-point-to-faq
[[ -f "/etc/update-motd.d/80-esm" ]] && rm /etc/update-motd.d/80-esm
[[ -f "/etc/update-motd.d/80-livepatch" ]] && rm /etc/update-motd.d/80-livepatch
[[ -f "/etc/apt/apt.conf.d/02compress-indexes" ]] && rm /etc/apt/apt.conf.d/02compress-indexes
[[ -f "/etc/apt/apt.conf.d/02periodic" ]] && rm /etc/apt/apt.conf.d/02periodic
[[ -f "/etc/apt/apt.conf.d/no-languages" ]] && rm /etc/apt/apt.conf.d/no-languages
[[ -f "/etc/init.d/armhwinfo" ]] && rm /etc/init.d/armhwinfo
[[ -f "/etc/logrotate.d/armhwinfo" ]] && rm /etc/logrotate.d/armhwinfo
[[ -f "/etc/init.d/firstrun" ]] && rm /etc/init.d/firstrun
[[ -f "/etc/init.d/resize2fs" ]] && rm /etc/init.d/resize2fs
[[ -f "/lib/systemd/system/firstrun-config.service" ]] && rm /lib/systemd/system/firstrun-config.service
[[ -f "/lib/systemd/system/firstrun.service" ]] && rm /lib/systemd/system/firstrun.service
[[ -f "/lib/systemd/system/resize2fs.service" ]] && rm /lib/systemd/system/resize2fs.service
[[ -f "/usr/lib/armbian/apt-updates" ]] && rm /usr/lib/armbian/apt-updates
[[ -f "/usr/lib/armbian/firstrun-config.sh" ]] && rm /usr/lib/armbian/firstrun-config.sh
# fix for https://bugs.launchpad.net/ubuntu/+source/lightdm-gtk-greeter/+bug/1897491
[ -d "/var/lib/lightdm" ] && (
[[ -d "/var/lib/lightdm" ]] && (
chown -R lightdm:lightdm /var/lib/lightdm
chmod 0750 /var/lib/lightdm
)
@ -423,20 +423,20 @@ function board_side_bsp_cli_postrm() { # not run here
function board_side_bsp_cli_postinst_base() {
# Source the armbian-release information file
# shellcheck source=/dev/null
[ -f /etc/armbian-release ] && . /etc/armbian-release
[[ -f /etc/armbian-release ]] && . /etc/armbian-release
# ARMBIAN_PRETTY_NAME is now set in armbian-base-files.
# Force ramlog to be enabled if it exists. @TODO: why?
[ -f /etc/lib/systemd/system/armbian-ramlog.service ] && systemctl --no-reload enable armbian-ramlog.service
[[ -f /etc/lib/systemd/system/armbian-ramlog.service ]] && systemctl --no-reload enable armbian-ramlog.service
# check if it was disabled in config and disable in new service
if [ -n "$(grep -w '^ENABLED=false' /etc/default/log2ram 2> /dev/null)" ]; then
if [[ -n "$(grep -w '^ENABLED=false' /etc/default/log2ram 2> /dev/null)" ]]; then
sed -i "s/^ENABLED=.*/ENABLED=false/" /etc/default/armbian-ramlog
fi
# fix boot delay "waiting for suspend/resume device"
if [ -f "/etc/initramfs-tools/initramfs.conf" ]; then
if [[ -f "/etc/initramfs-tools/initramfs.conf" ]]; then
if ! grep --quiet "RESUME=none" /etc/initramfs-tools/initramfs.conf; then
echo "RESUME=none" >> /etc/initramfs-tools/initramfs.conf
fi
@ -447,20 +447,20 @@ function board_side_bsp_cli_postinst_finish() {
ln -sf /var/run/motd /etc/motd
rm -f /etc/update-motd.d/00-header /etc/update-motd.d/10-help-text
if [ ! -f "/etc/default/armbian-motd" ]; then
if [[ ! -f "/etc/default/armbian-motd" ]]; then
mv /etc/default/armbian-motd.dpkg-dist /etc/default/armbian-motd
fi
if [ ! -f "/etc/default/armbian-ramlog" ] && [ -f /etc/default/armbian-ramlog.dpkg-dist ]; then
if [[ ! -f "/etc/default/armbian-ramlog" && -f /etc/default/armbian-ramlog.dpkg-dist ]]; then
mv /etc/default/armbian-ramlog.dpkg-dist /etc/default/armbian-ramlog
fi
if [ ! -f "/etc/default/armbian-zram-config" ] && [ -f /etc/default/armbian-zram-config.dpkg-dist ]; then
if [[ ! -f "/etc/default/armbian-zram-config" && -f /etc/default/armbian-zram-config.dpkg-dist ]]; then
mv /etc/default/armbian-zram-config.dpkg-dist /etc/default/armbian-zram-config
fi
if [ ! -f "/etc/default/armbian-firstrun" ]; then
if [[ ! -f "/etc/default/armbian-firstrun" ]]; then
mv /etc/default/armbian-firstrun.dpkg-dist /etc/default/armbian-firstrun
fi
if [ -L "/usr/lib/chromium-browser/master_preferences.dpkg-dist" ]; then
if [[ -L "/usr/lib/chromium-browser/master_preferences.dpkg-dist" ]]; then
mv /usr/lib/chromium-browser/master_preferences.dpkg-dist /usr/lib/chromium-browser/master_preferences
fi

View File

@ -24,7 +24,7 @@ copy_all_packages_files_for() {
for package_src_dir in ${PACKAGES_SEARCH_ROOT_ABSOLUTE_DIRS}; do
local package_dirpath="${package_src_dir}/${package_name}"
if [ -d "${package_dirpath}" ]; then
if [[ -d "${package_dirpath}" ]]; then
display_alert "Adding found files" "${package_dirpath} for '${package_name}'" "info"
run_host_command_logged cp -rv "${package_dirpath}/"* "${destination}/"
else

View File

@ -34,7 +34,7 @@ is_enabled() {
if_enabled_echo() {
if is_enabled "$1"; then
echo -n "$2"
elif [ $# -ge 3 ]; then
elif [[ $# -ge 3 ]]; then
echo -n "$3"
fi
}

View File

@ -23,7 +23,7 @@ function do_main_configuration() {
# common options
declare revision_from="set in env or command-line parameter"
if [[ "${REVISION}" == "" ]]; then
if [ -f "${USERPATCHES_PATH}"/VERSION ]; then
if [[ -f "${USERPATCHES_PATH}/VERSION" ]]; then
REVISION=$(cat "${USERPATCHES_PATH}"/VERSION)
revision_from="userpatches VERSION file"
else
@ -598,13 +598,13 @@ function check_filesystem_compatibility_on_host() {
fi
# For f2fs, check if support for extended attributes is enabled in kernel config (otherwise will fail later when using rsync)
if [ "$ROOTFS_TYPE" = "f2fs" ]; then
if [[ "$ROOTFS_TYPE" == "f2fs" ]]; then
local build_host_kernel_config=""
# Try to find kernel config in different places
if [ -f "/boot/config-$(uname -r)" ]; then
if [[ -f "/boot/config-$(uname -r)" ]]; then
build_host_kernel_config="/boot/config-$(uname -r)"
elif [ -f "/proc/config.gz" ]; then
elif [[ -f "/proc/config.gz" ]]; then
# Try to extract kernel config from /proc/config.gz
if command -v gzip &> /dev/null; then
gzip -dc /proc/config.gz > /tmp/build_host_kernel_config
@ -617,7 +617,7 @@ function check_filesystem_compatibility_on_host() {
fi
# Check if required configurations are set
if [ -n "$build_host_kernel_config" ]; then
if [[ -n "$build_host_kernel_config" ]]; then
if ! grep -q '^CONFIG_F2FS_FS_XATTR=y$' "$build_host_kernel_config" ||
! grep -q '^CONFIG_F2FS_FS_SECURITY=y$' "$build_host_kernel_config"; then
exit_with_error "Required kernel configurations for f2fs filesystem not enabled." "Please enable CONFIG_F2FS_FS_XATTR and CONFIG_F2FS_FS_SECURITY in your host kernel configuration." "err"
@ -638,7 +638,7 @@ function pre_install_distribution_specific__disable_cnf_apt_hook() {
}
function post_post_debootstrap_tweaks__restore_cnf_apt_hook() {
if [ -f "${SDCARD}"/etc/apt/apt.conf.d/50command-not-found.disabled ]; then # (re-enable command-not-found after building rootfs if it's been disabled)
if [[ -f "${SDCARD}/etc/apt/apt.conf.d/50command-not-found.disabled" ]]; then # (re-enable command-not-found after building rootfs if it's been disabled)
display_alert "Enabling command-not-found after build-time " "${BOARD}:${RELEASE}-${BRANCH}" "info"
run_host_command_logged mv "${SDCARD}"/etc/apt/apt.conf.d/50command-not-found.disabled "${SDCARD}"/etc/apt/apt.conf.d/50command-not-found
fi

View File

@ -41,7 +41,7 @@ function prepare_host_noninteractive() {
# The 'offline' variable must always be set to 'true' or 'false'
declare offline=false
if [ "$OFFLINE_WORK" == "yes" ]; then
if [[ "$OFFLINE_WORK" == "yes" ]]; then
offline=true
fi

View File

@ -28,7 +28,7 @@ function fingerprint_image() {
Support: ${VENDORSUPPORT}
EOF
if [ -n "$2" ]; then
if [[ -n "$2" ]]; then
cat <<- EOF >> "${1}"
---------------------------------------------------------------------------
Partitioning configuration: $IMAGE_PARTITION_TABLE offset: $OFFSET

View File

@ -32,7 +32,7 @@ update_initramfs() {
# disabled; if debugging, we want the full output, even if it is huge.
# logging_filter="2>&1 | { grep --line-buffered -v -e '.xz' -e 'ORDER ignored' -e 'Adding binary ' -e 'Adding module ' -e 'Adding firmware ' -e 'microcode bundle' -e ', pf_mask' || true ; }"
fi
if [ "$target_dir" != "" ]; then
if [[ "$target_dir" != "" ]]; then
initrd_kern_ver="$(basename "$target_dir")"
initrd_file="${chroot_target}/boot/initrd.img-${initrd_kern_ver}"
update_initramfs_cmd="TMPDIR=/tmp update-initramfs -u${initrd_debug} -k ${initrd_kern_ver}" # @TODO: why? TMPDIR=/tmp

View File

@ -248,7 +248,7 @@ function prepare_partitions() {
# Check sfdisk version to determine if --sector-size is supported
sfdisk_version=$(sfdisk --version | awk '/util-linux/ {print $NF}')
sfdisk_version_num=$(echo "$sfdisk_version" | awk -F. '{printf "%d%02d%02d\n", $1, $2, $3}')
if [ "$sfdisk_version_num" -ge "24100" ]; then
if [[ "$sfdisk_version_num" -ge "24100" ]]; then
echo "${partition_script_output}" | run_host_command_logged sfdisk --sector-size "$SECTOR_SIZE" "${SDCARD}".raw || exit_with_error "Partitioning failed!"
else
echo "${partition_script_output}" | run_host_command_logged sfdisk "${SDCARD}".raw || exit_with_error "Partitioning failed!"
@ -267,7 +267,7 @@ function prepare_partitions() {
declare -g LOOP
#--partscan is using to force the kernel for scaning partition table in preventing of partprobe errors
if [ "$sfdisk_version_num" -ge "24100" ]; then
if [[ "$sfdisk_version_num" -ge "24100" ]]; then
LOOP=$(losetup --show --partscan --find -b "$SECTOR_SIZE" "${SDCARD}".raw) || exit_with_error "Unable to find free loop device"
else
LOOP=$(losetup --show --partscan --find "${SDCARD}".raw) || exit_with_error "Unable to find free loop device"
@ -482,7 +482,7 @@ function prepare_partitions() {
# recompile .cmd to .scr if boot.cmd exists
if [[ -f "${SDCARD}/boot/boot.cmd" ]]; then
if [ -z ${BOOTSCRIPT_OUTPUT} ]; then
if [[ -z "${BOOTSCRIPT_OUTPUT}" ]]; then
BOOTSCRIPT_OUTPUT=boot.scr
fi
case ${LINUXFAMILY} in

View File

@ -167,7 +167,7 @@ function config_early_init() {
display_alert "Starting single build process" "${BOARD:-"no BOARD set"}" "info"
# Do not initialize an empty array if it exists.
if [ "${KERNEL_DRIVERS_SKIP[*]}" == "" ]; then
if [[ "${KERNEL_DRIVERS_SKIP[*]}" == "" ]]; then
# Prepare array to be filled in by board/family/extensions
declare -g -a KERNEL_DRIVERS_SKIP=()
fi

View File

@ -565,7 +565,7 @@ function install_distribution_agnostic() {
VENDORPRETTYNAME="$VENDORPRETTYNAME" >> "${SDCARD}"/etc/armbian-image-release
# DNS fix. package resolvconf is not available everywhere
if [ -d "${SDCARD}"/etc/resolvconf/resolv.conf.d ] && [ -n "$NAMESERVER" ]; then
if [[ -d "${SDCARD}/etc/resolvconf/resolv.conf.d" && -n "$NAMESERVER" ]]; then
echo "nameserver $NAMESERVER" > "${SDCARD}"/etc/resolvconf/resolv.conf.d/head
fi

View File

@ -79,7 +79,7 @@ function install_distribution_specific() {
install_rclocal
# use list modules INITRAMFS
if [ -f "${SRC}"/config/modules/"${MODULES_INITRD}" ]; then
if [[ -f "${SRC}/config/modules/${MODULES_INITRD}" ]]; then
display_alert "Use file list modules MODULES_INITRD" "${MODULES_INITRD}"
sed -i "s/^MODULES=.*/MODULES=list/" "${SDCARD}"/etc/initramfs-tools/initramfs.conf
cat "${SRC}"/config/modules/"${MODULES_INITRD}" >> "${SDCARD}"/etc/initramfs-tools/modules
@ -111,7 +111,7 @@ function fetch_distro_keyring() {
#FIXME: there may be a point where we need an *older* keyring pkg
# NOTE: this will be most likely an unsupported case like a user wanting to build using an ancient debian/ubuntu release
debian)
if [ -e "${CACHEDIR}/debian-archive-keyring.gpg" ]; then
if [[ -e "${CACHEDIR}/debian-archive-keyring.gpg" ]]; then
display_alert "fetch_distro_keyring($release)" "cache found, skipping" "info"
else
# for details of how this gets into this mirror, see
@ -138,7 +138,7 @@ function fetch_distro_keyring() {
fi
;;
ubuntu)
if [ -e "${CACHEDIR}/ubuntu-archive-keyring.gpg" ]; then
if [[ -e "${CACHEDIR}/ubuntu-archive-keyring.gpg" ]]; then
display_alert "fetch_distro_keyring($release)" "cache found, skipping" "info"
else
PKG_URL="https://github.armbian.com/keyrings/latest-ubuntu-keyring.deb"
@ -203,7 +203,7 @@ function create_sources_list_and_deploy_repo_key() {
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
EOF
if [ ${#security_suites[@]} -gt 0 ]; then
if [[ ${#security_suites[@]} -gt 0 ]]; then
echo "" >> "${basedir}/etc/apt/sources.list.d/${distro}.sources" # it breaks if there is no line space in between
cat <<- EOF >> "${basedir}/etc/apt/sources.list.d/${distro}.sources"
Types: deb

View File

@ -760,10 +760,13 @@ class PatchInPatchFile:
files_to_touch = [f for f in files_to_touch if f not in self.deleted_file_names]
for file_name in files_to_touch:
# log.debug(f"Setting mtime of '{file_name}' to '{final_mtime}'.")
file_path = os.path.join(working_dir, file_name)
try:
os.utime(file_path, (final_mtime, final_mtime))
# Only bump mtime; never lower it. Multiple patches may touch the same file,
# and a later patch with an older timestamp must not override the timestamp
# set by an earlier patch with a newer one (#9028).
if final_mtime > os.path.getmtime(file_path):
os.utime(file_path, (final_mtime, final_mtime))
except FileNotFoundError:
log.warning(f"File '{file_path}' not found in patch {self}, can't set mtime.")

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,62 @@
diff --git a/Makefile b/Makefile
index 4a944e80769044..54c385978feed5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
-SUBLEVEL = 125
+SUBLEVEL = 126
EXTRAVERSION =
NAME = Pinguïn Aangedreven
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 35e14bebbfb2c2..0b491449b022a1 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -165,18 +165,9 @@ void device_set_deferred_probe_reason(const struct device *dev, struct va_format
static inline int driver_match_device(struct device_driver *drv,
struct device *dev)
{
- device_lock_assert(dev);
-
return drv->bus->match ? drv->bus->match(dev, drv) : 1;
}
-static inline int driver_match_device_locked(struct device_driver *drv,
- struct device *dev)
-{
- guard(device)(dev);
- return driver_match_device(drv, dev);
-}
-
static inline void dev_sync_state(struct device *dev)
{
if (dev->bus->sync_state)
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 27f8442a3aa9dd..b97e13a52c3308 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -263,7 +263,7 @@ static ssize_t bind_store(struct device_driver *drv, const char *buf,
int err = -ENODEV;
dev = bus_find_device_by_name(bus, NULL, buf);
- if (dev && driver_match_device_locked(drv, dev)) {
+ if (dev && driver_match_device(drv, dev)) {
err = device_driver_attach(drv, dev);
if (!err) {
/* success */
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 07f1332dd3a440..7e2fb159bb895b 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -1169,7 +1169,7 @@ static int __driver_attach(struct device *dev, void *data)
* is an error.
*/
- ret = driver_match_device_locked(drv, dev);
+ ret = driver_match_device(drv, dev);
if (ret == 0) {
/* no match */
return 0;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -126,7 +126,7 @@
patches.libreelec/rockchip-0125-FROMLIST-v1-dt-bindings-iommu-rockchip-Add-support-f.patch
patches.libreelec/rockchip-0126-FROMLIST-v1-iommu-rockchip-Use-devm_clk_bulk_get_all.patch
patches.libreelec/rockchip-0127-FROMLIST-v1-iommu-rockchip-disable-fetch-dte-time-li.patch
patches.libreelec/rockchip-0128-FROMLIST-v1-PCI-dwc-Make-Link-Up-IRQ-logic-handle-al.patch
-patches.libreelec/rockchip-0128-FROMLIST-v1-PCI-dwc-Make-Link-Up-IRQ-logic-handle-al.patch
patches.libreelec/rockchip-0129-FROMLIST-v7-PCI-Configure-Root-Port-MPS-during-host-.patch
-patches.libreelec/rockchip-0130-FROMLIST-v2-phy-rockchip-inno-usb2-fix-disconnection.patch
-patches.libreelec/rockchip-0131-FROMLIST-v2-phy-rockchip-inno-usb2-fix-communication.patch
@ -134,8 +134,8 @@
-patches.libreelec/rockchip-0133-FROMLIST-v1-ASoC-rockchip-Fix-Wvoid-pointer-to-enum-.patch
-patches.libreelec/rockchip-0134-FROMLIST-v1-pmdomain-rockchip-Fix-init-genpd-as-GENP.patch
patches.libreelec/rockchip-0135-FROMLIST-v1-drm-bridge-dw-hdmi-qp-fix-multi-channel-.patch
patches.libreelec/rockchip-0136-FROMLIST-v2-media-verisilicon-AV1-Fix-enable-cdef-co.patch
patches.libreelec/rockchip-0137-FROMLIST-v2-media-verisilicon-AV1-Fix-tx-mode-bit-se.patch
-patches.libreelec/rockchip-0136-FROMLIST-v2-media-verisilicon-AV1-Fix-enable-cdef-co.patch
-patches.libreelec/rockchip-0137-FROMLIST-v2-media-verisilicon-AV1-Fix-tx-mode-bit-se.patch
patches.libreelec/rockchip-0138-FROMLIST-v1-media-rkvdec-vp9-Fix-probs-struct-alignm.patch
patches.libreelec/rockchip-0139-WIP-SCRAMB-drm-bridge-Add-detect_ctx-hook.patch
patches.libreelec/rockchip-0140-WIP-SCRAMB-drm-bridge-connector-Switch-from-detect-t.patch

View File

@ -1,45 +0,0 @@
config: # This is file 'patch/kernel/spacemit-legacy-6.1/0000.patching_config.yaml'
# PATCH NUMBERING INFO
#
# Patches should be ordered in such a way that general kernel patches are applied first, then SoC-related patches and at last board-specific patches
#
# Patch numbers in this folder are sorted by category:
#
# 000* for general patches
# 0** for Bianbu-Linux-related patches
# 1** for other SoC-related patches
# 5** for board specific patches
# Just some info stuff; not used by the patching scripts
name: spacemit-6.1
kind: kernel
type: vendor # or: vendor
branch: linux-6.1.y
last-known-good-tag: v6.1.15
maintainers:
- { github: none, name: none, email: none, armbian-forum: none }
# .dts files in these directories will be copied as-is to the build tree; later ones overwrite earlier ones.
# This is meant to provide a way to "add a board DTS" without having to null-patch them in.
dts-directories:
- { source: "dt", target: "arch/riscv/boot/dts/spacemit" }
# Every file in these directories will be copied as-is to the build tree; later ones overwrite earlier ones
# This is meant as a way to have overlays, bare, in a directory, without having to null-patch them in.
# @TODO need a solution to auto-Makefile the overlays as well
overlay-directories:
- { source: "overlay", target: "arch/riscv/boot/dts/spacemit/overlay" }
# The Makefile in each of these directories will be magically patched to include the dts files copied
# or patched-in; overlay subdir will be included "-y" if it exists.
# No more Makefile patching needed, yay!
auto-patch-dt-makefile:
- { directory: "arch/riscv/boot/dts/spacemit", config-var: "CONFIG_SOC_SPACEMIT_K1X" }
# Configuration for when applying patches to git / auto-rewriting patches (development cycle helpers)
patches-to-git:
do-not-commit-files:
- "MAINTAINERS" # constant churn, drop them. sorry.
do-not-commit-regexes: # Python-style regexes
- "^arch/([a-zA-Z0-9]+)/boot/dts/([a-zA-Z0-9]+)/Makefile$" # ignore DT Makefile patches, we've an auto-patcher now

View File

@ -1,21 +0,0 @@
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/* Copyright (c) 2024 Spacemit, Inc */
/dts-v1/;
#include "k1-x_deb1.dts"
/ {
model = "BananaPi BPI-F3";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart2>;
status = "disabled";
bluetooth {
compatible = "realtek,rtl8852bs-bt";
device-wake-gpios = <&gpio 64 GPIO_ACTIVE_HIGH>;
};
};

View File

@ -1,45 +0,0 @@
From ba9768cf884ba4f030d9bc006ef4c067575821d0 Mon Sep 17 00:00:00 2001
From: Victor Hassan <victor@allwinnertech.com>
Date: Wed, 22 Feb 2023 17:47:20 +0800
Subject: Bluetooth: btrtl: Add support for RTL8852BS
Add the support for RTL8852BS BT controller on UART interface.
The necessary firmware file will be submitted to linux-firmware.
Signed-off-by: Victor Hassan <victor@allwinnertech.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
drivers/bluetooth/btrtl.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index fb52313a1d45..a42dd93b2900 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -190,6 +190,14 @@ static const struct id_table ic_id_table[] = {
.fw_name = "rtl_bt/rtl8852au_fw.bin",
.cfg_name = "rtl_bt/rtl8852au_config" },
+ /* 8852B with UART interface */
+ { IC_INFO(RTL_ROM_LMP_8852A, 0xb, 0xb, HCI_UART),
+ .config_needed = true,
+ .has_rom_version = true,
+ .has_msft_ext = true,
+ .fw_name = "rtl_bt/rtl8852bs_fw.bin",
+ .cfg_name = "rtl_bt/rtl8852bs_config" },
+
/* 8852B */
{ IC_INFO(RTL_ROM_LMP_8852A, 0xb, 0xb, HCI_USB),
.config_needed = false,
@@ -956,6 +964,8 @@ MODULE_FIRMWARE("rtl_bt/rtl8822b_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8822b_config.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852au_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852au_config.bin");
+MODULE_FIRMWARE("rtl_bt/rtl8852bs_fw.bin");
+MODULE_FIRMWARE("rtl_bt/rtl8852bs_config.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852bu_fw.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852bu_config.bin");
MODULE_FIRMWARE("rtl_bt/rtl8852cu_fw.bin");
--
2.35.3

View File

@ -1,26 +0,0 @@
From 6f639d9aff5e528dd21e9425b2c781dcded6a4ae Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@armbian.com>
Date: Wed, 26 Jun 2024 06:01:30 -0400
Subject: Bluetooth: hci_h5: Add support for RTL8852BS
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
---
drivers/bluetooth/hci_h5.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index 6455bc4fb5bb..7415c7ff55c8 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -1102,6 +1102,8 @@ static const struct of_device_id rtl_bluetooth_of_match[] = {
.data = (const void *)&h5_data_rtl8723bs },
{ .compatible = "realtek,rtl8723ds-bt",
.data = (const void *)&h5_data_rtl8723bs },
+ { .compatible = "realtek,rtl8852bs-bt",
+ .data = (const void *)&h5_data_rtl8723bs },
#endif
{ },
};
--
2.35.3

View File

@ -1,308 +0,0 @@
From 9f72c5c5e6aed7f80d788f37ad846b830ef54fba Mon Sep 17 00:00:00 2001
From: UtsavBalar1231 <utsavbalar1231@gmail.com>
Date: Wed, 17 Jul 2024 04:36:09 -0400
Subject: Fix aes_encrypt() redefinition errors
This fixes function definition conflicts with aes kernel module as
defined in include/crypto/aes.h
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
---
.../realtek/rtl8852bs/core/crypto/aes-ccm.c | 26 +++++++++----------
.../realtek/rtl8852bs/core/crypto/aes-ctr.c | 6 ++---
.../realtek/rtl8852bs/core/crypto/aes-gcm.c | 12 ++++-----
.../rtl8852bs/core/crypto/aes-internal-enc.c | 6 ++---
.../realtek/rtl8852bs/core/crypto/aes-omac1.c | 10 +++----
.../realtek/rtl8852bs/core/crypto/aes.h | 6 ++---
6 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ccm.c b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ccm.c
index dceec778a6d7..3789229717ec 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ccm.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ccm.c
@@ -40,7 +40,7 @@ static void aes_ccm_auth_start(void *aes, size_t M, size_t L, const u8 *nonce,
WPA_PUT_BE16(&b[AES_BLOCK_SIZE - L], plain_len);
wpa_hexdump_key(_MSG_EXCESSIVE_, "CCM B_0", b, AES_BLOCK_SIZE);
- aes_encrypt(aes, b, x); /* X_1 = E(K, B_0) */
+ aes_rtl8852bs_encrypt(aes, b, x); /* X_1 = E(K, B_0) */
if (!aad_len)
return;
@@ -50,12 +50,12 @@ static void aes_ccm_auth_start(void *aes, size_t M, size_t L, const u8 *nonce,
os_memset(aad_buf + 2 + aad_len, 0, sizeof(aad_buf) - 2 - aad_len);
xor_aes_block(aad_buf, x);
- aes_encrypt(aes, aad_buf, x); /* X_2 = E(K, X_1 XOR B_1) */
+ aes_rtl8852bs_encrypt(aes, aad_buf, x); /* X_2 = E(K, X_1 XOR B_1) */
if (aad_len > AES_BLOCK_SIZE - 2) {
xor_aes_block(&aad_buf[AES_BLOCK_SIZE], x);
/* X_3 = E(K, X_2 XOR B_2) */
- aes_encrypt(aes, &aad_buf[AES_BLOCK_SIZE], x);
+ aes_rtl8852bs_encrypt(aes, &aad_buf[AES_BLOCK_SIZE], x);
}
}
@@ -69,13 +69,13 @@ static void aes_ccm_auth(void *aes, const u8 *data, size_t len, u8 *x)
/* X_i+1 = E(K, X_i XOR B_i) */
xor_aes_block(x, data);
data += AES_BLOCK_SIZE;
- aes_encrypt(aes, x, x);
+ aes_rtl8852bs_encrypt(aes, x, x);
}
if (last) {
/* XOR zero-padded last block */
for (i = 0; i < last; i++)
x[i] ^= *data++;
- aes_encrypt(aes, x, x);
+ aes_rtl8852bs_encrypt(aes, x, x);
}
}
@@ -98,14 +98,14 @@ static void aes_ccm_encr(void *aes, size_t L, const u8 *in, size_t len, u8 *out,
for (i = 1; i <= len / AES_BLOCK_SIZE; i++) {
WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i);
/* S_i = E(K, A_i) */
- aes_encrypt(aes, a, out);
+ aes_rtl8852bs_encrypt(aes, a, out);
xor_aes_block(out, in);
out += AES_BLOCK_SIZE;
in += AES_BLOCK_SIZE;
}
if (last) {
WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], i);
- aes_encrypt(aes, a, out);
+ aes_rtl8852bs_encrypt(aes, a, out);
/* XOR zero-padded last block */
for (i = 0; i < last; i++)
*out++ ^= *in++;
@@ -121,7 +121,7 @@ static void aes_ccm_encr_auth(void *aes, size_t M, u8 *x, u8 *a, u8 *auth)
wpa_hexdump_key(_MSG_EXCESSIVE_, "CCM T", x, M);
/* U = T XOR S_0; S_0 = E(K, A_0) */
WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0);
- aes_encrypt(aes, a, tmp);
+ aes_rtl8852bs_encrypt(aes, a, tmp);
for (i = 0; i < M; i++)
auth[i] = x[i] ^ tmp[i];
wpa_hexdump_key(_MSG_EXCESSIVE_, "CCM U", auth, M);
@@ -136,7 +136,7 @@ static void aes_ccm_decr_auth(void *aes, size_t M, u8 *a, const u8 *auth, u8 *t)
wpa_hexdump_key(_MSG_EXCESSIVE_, "CCM U", auth, M);
/* U = T XOR S_0; S_0 = E(K, A_0) */
WPA_PUT_BE16(&a[AES_BLOCK_SIZE - 2], 0);
- aes_encrypt(aes, a, tmp);
+ aes_rtl8852bs_encrypt(aes, a, tmp);
for (i = 0; i < M; i++)
t[i] = auth[i] ^ tmp[i];
wpa_hexdump_key(_MSG_EXCESSIVE_, "CCM T", t, M);
@@ -155,7 +155,7 @@ int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce,
if (aad_len > 30 || M > AES_BLOCK_SIZE)
return -1;
- aes = aes_encrypt_init(key, key_len);
+ aes = aes_rtl8852bs_encrypt_init(key, key_len);
if (aes == NULL)
return -1;
@@ -167,7 +167,7 @@ int aes_ccm_ae(const u8 *key, size_t key_len, const u8 *nonce,
aes_ccm_encr(aes, L, plain, plain_len, crypt, a);
aes_ccm_encr_auth(aes, M, x, a, auth);
- aes_encrypt_deinit(aes);
+ aes_rtl8852bs_encrypt_deinit(aes);
return 0;
}
@@ -186,7 +186,7 @@ int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
if (aad_len > 30 || M > AES_BLOCK_SIZE)
return -1;
- aes = aes_encrypt_init(key, key_len);
+ aes = aes_rtl8852bs_encrypt_init(key, key_len);
if (aes == NULL)
return -1;
@@ -200,7 +200,7 @@ int aes_ccm_ad(const u8 *key, size_t key_len, const u8 *nonce,
aes_ccm_auth_start(aes, M, L, nonce, aad, aad_len, crypt_len, x);
aes_ccm_auth(aes, plain, crypt_len, x);
- aes_encrypt_deinit(aes);
+ aes_rtl8852bs_encrypt_deinit(aes);
if (os_memcmp_const(x, t, M) != 0) {
wpa_printf(_MSG_EXCESSIVE_, "CCM: Auth mismatch");
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ctr.c b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ctr.c
index 6c06851ddc68..702f8ce492d6 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ctr.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-ctr.c
@@ -30,13 +30,13 @@ int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
u8 *pos = data;
u8 counter[AES_BLOCK_SIZE], buf[AES_BLOCK_SIZE];
- ctx = aes_encrypt_init(key, key_len);
+ ctx = aes_rtl8852bs_encrypt_init(key, key_len);
if (ctx == NULL)
return -1;
os_memcpy(counter, nonce, AES_BLOCK_SIZE);
while (left > 0) {
- aes_encrypt(ctx, counter, buf);
+ aes_rtl8852bs_encrypt(ctx, counter, buf);
len = (left < AES_BLOCK_SIZE) ? left : AES_BLOCK_SIZE;
for (j = 0; j < len; j++)
@@ -50,7 +50,7 @@ int aes_ctr_encrypt(const u8 *key, size_t key_len, const u8 *nonce,
break;
}
}
- aes_encrypt_deinit(ctx);
+ aes_rtl8852bs_encrypt_deinit(ctx);
return 0;
}
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-gcm.c b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-gcm.c
index 47088102b9cc..21b71d43a041 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-gcm.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-gcm.c
@@ -154,7 +154,7 @@ static void aes_gctr(void *aes, const u8 *icb, const u8 *x, size_t xlen, u8 *y)
os_memcpy(cb, icb, AES_BLOCK_SIZE);
/* Full blocks */
for (i = 0; i < n; i++) {
- aes_encrypt(aes, cb, ypos);
+ aes_rtl8852bs_encrypt(aes, cb, ypos);
xor_block(ypos, xpos);
xpos += AES_BLOCK_SIZE;
ypos += AES_BLOCK_SIZE;
@@ -164,7 +164,7 @@ static void aes_gctr(void *aes, const u8 *icb, const u8 *x, size_t xlen, u8 *y)
last = x + xlen - xpos;
if (last) {
/* Last, partial block */
- aes_encrypt(aes, cb, tmp);
+ aes_rtl8852bs_encrypt(aes, cb, tmp);
for (i = 0; i < last; i++)
*ypos++ = *xpos++ ^ tmp[i];
}
@@ -175,13 +175,13 @@ static void * aes_gcm_init_hash_subkey(const u8 *key, size_t key_len, u8 *H)
{
void *aes;
- aes = aes_encrypt_init(key, key_len);
+ aes = aes_rtl8852bs_encrypt_init(key, key_len);
if (aes == NULL)
return NULL;
/* Generate hash subkey H = AES_K(0^128) */
os_memset(H, 0, AES_BLOCK_SIZE);
- aes_encrypt(aes, H, H);
+ aes_rtl8852bs_encrypt(aes, H, H);
wpa_hexdump_key(_MSG_EXCESSIVE_, "Hash subkey H for GHASH",
H, AES_BLOCK_SIZE);
return aes;
@@ -275,7 +275,7 @@ int aes_gcm_ae(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len,
/* Return (C, T) */
- aes_encrypt_deinit(aes);
+ aes_rtl8852bs_encrypt_deinit(aes);
return 0;
}
@@ -307,7 +307,7 @@ int aes_gcm_ad(const u8 *key, size_t key_len, const u8 *iv, size_t iv_len,
/* T' = MSB_t(GCTR_K(J_0, S)) */
aes_gctr(aes, J0, S, sizeof(S), T);
- aes_encrypt_deinit(aes);
+ aes_rtl8852bs_encrypt_deinit(aes);
if (os_memcmp_const(tag, T, 16) != 0) {
wpa_printf(_MSG_EXCESSIVE_, "GCM: Tag mismatch");
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-internal-enc.c b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-internal-enc.c
index 69e256be95ce..19410a2fc5b3 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-internal-enc.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-internal-enc.c
@@ -93,7 +93,7 @@ d##3 = TE0(s##3) ^ TE1(s##0) ^ TE2(s##1) ^ TE3(s##2) ^ rk[4 * i + 3]
}
-void * aes_encrypt_init(const u8 *key, size_t len)
+void * aes_rtl8852bs_encrypt_init(const u8 *key, size_t len)
{
u32 *rk;
int res;
@@ -114,7 +114,7 @@ void * aes_encrypt_init(const u8 *key, size_t len)
}
-int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt)
+int aes_rtl8852bs_encrypt(void *ctx, const u8 *plain, u8 *crypt)
{
u32 *rk = ctx;
rijndaelEncrypt(ctx, rk[AES_PRIV_NR_POS], plain, crypt);
@@ -122,7 +122,7 @@ int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt)
}
-void aes_encrypt_deinit(void *ctx)
+void aes_rtl8852bs_encrypt_deinit(void *ctx)
{
os_memset(ctx, 0, AES_PRIV_SIZE);
rtw_mfree(ctx, AES_PRIV_SIZE);
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-omac1.c b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-omac1.c
index 30b52629f4be..826c9043d09a 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-omac1.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes-omac1.c
@@ -50,7 +50,7 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
if (TEST_FAIL())
return -1;
- ctx = aes_encrypt_init(key, key_len);
+ ctx = aes_rtl8852bs_encrypt_init(key, key_len);
if (ctx == NULL)
return -1;
os_memset(cbc, 0, AES_BLOCK_SIZE);
@@ -81,12 +81,12 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
}
}
if (left > AES_BLOCK_SIZE)
- aes_encrypt(ctx, cbc, cbc);
+ aes_rtl8852bs_encrypt(ctx, cbc, cbc);
left -= AES_BLOCK_SIZE;
}
os_memset(pad, 0, AES_BLOCK_SIZE);
- aes_encrypt(ctx, pad, pad);
+ aes_rtl8852bs_encrypt(ctx, pad, pad);
gf_mulx(pad);
if (left || total_len == 0) {
@@ -110,8 +110,8 @@ int omac1_aes_vector(const u8 *key, size_t key_len, size_t num_elem,
for (i = 0; i < AES_BLOCK_SIZE; i++)
pad[i] ^= cbc[i];
- aes_encrypt(ctx, pad, mac);
- aes_encrypt_deinit(ctx);
+ aes_rtl8852bs_encrypt(ctx, pad, mac);
+ aes_rtl8852bs_encrypt_deinit(ctx);
return 0;
}
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes.h b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes.h
index 8ab3de2ee83f..551dd19aab23 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes.h
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/crypto/aes.h
@@ -11,9 +11,9 @@
#define AES_BLOCK_SIZE 16
-void * aes_encrypt_init(const u8 *key, size_t len);
-int aes_encrypt(void *ctx, const u8 *plain, u8 *crypt);
-void aes_encrypt_deinit(void *ctx);
+void * aes_rtl8852bs_encrypt_init(const u8 *key, size_t len);
+int aes_rtl8852bs_encrypt(void *ctx, const u8 *plain, u8 *crypt);
+void aes_rtl8852bs_encrypt_deinit(void *ctx);
void * aes_decrypt_init(const u8 *key, size_t len);
int aes_decrypt(void *ctx, const u8 *crypt, u8 *plain);
void aes_decrypt_deinit(void *ctx);
--
2.35.3

View File

@ -1,57 +0,0 @@
From 3e033a705ea7266609cd7b92cf9d144c2fc30860 Mon Sep 17 00:00:00 2001
From: Luca Barbato <noone@nowhere.com>
Date: Thu, 6 Jun 2024 03:49:34 -0400
Subject: add minimal hwmon support
Signed-off-by: Luca Barbato
---
drivers/thermal/k1x-thermal.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/drivers/thermal/k1x-thermal.c b/drivers/thermal/k1x-thermal.c
index 9c66a0a23b1b..2267bcbce335 100644
--- a/drivers/thermal/k1x-thermal.c
+++ b/drivers/thermal/k1x-thermal.c
@@ -71,7 +71,7 @@ static int init_sensors(struct platform_device *pdev)
if (s->sr[1] >= MAX_SENSOR_NUMBER) {
dev_err(&pdev->dev, "un-fitable sensor range\n");
- return -EINVAL;
+ return -EINVAL;
}
#if 0
@@ -287,15 +287,24 @@ static int k1x_thermal_probe(struct platform_device *pdev)
for (i = s->sr[0]; i <= s->sr[1]; ++i) {
s->sdesc[i].base = s->base;
- s->sdesc[i].tzd = devm_thermal_of_zone_register(dev,
- i, s->sdesc + i, &k1x_of_thermal_ops);
- if (IS_ERR(s->sdesc[i].tzd)) {
- ret = PTR_ERR(s->sdesc[i].tzd);
- dev_err(dev, "faild to register sensor id %d: %d\n",
- i, ret);
+ struct thermal_zone_device *tzd =
+ devm_thermal_of_zone_register(dev, i, s->sdesc + i, &k1x_of_thermal_ops);
+ if (IS_ERR(tzd)) {
+ ret = PTR_ERR(tzd);
+ dev_err_probe(dev, ret, "faild to register sensor id %d", i);
return ret;
}
+ tzd->tzp->no_hwmon = false;
+
+ ret = devm_thermal_add_hwmon_sysfs(tzd);
+ if (ret < 0) {
+ dev_err_probe(dev, ret, "failed to register the hwmon entry");
+ return ret;
+ }
+
+ s->sdesc[i].tzd = tzd;
+
ret = devm_request_threaded_irq(dev, s->irq, k1x_thermal_irq,
k1x_thermal_irq_thread, IRQF_SHARED,
dev_name(&s->sdesc[i].tzd->device), s->sdesc + i);
--
2.35.3

View File

@ -1,47 +0,0 @@
From 042384a5333cba8021275fa27ebb0c4c0e21de19 Mon Sep 17 00:00:00 2001
From: Andy Chiu <andy.chiu@sifive.com>
Date: Tue, 22 Aug 2023 16:49:03 +0000
Subject: riscv: signal: fix sigaltstack frame size checking
The alternative stack checking in get_sigframe introduced by the Vector
support is not needed and has a problem. It is not needed as we have
already validate it at the beginning of the function if we are already
on an altstack. If not, the size of an altstack is always validated at
its allocation stage with sigaltstack_size_valid().
Besides, we must only regard the size of an altstack if the handler of a
signal is registered with SA_ONSTACK. So, blindly checking overflow of
an altstack if sas_ss_size not equals to zero will check against wrong
signal handlers if only a subset of signals are registered with
SA_ONSTACK.
Fixes: 8ee0b41898fa ("riscv: signal: Add sigcontext save/restore for vector")
Reported-by: Prashanth Swaminathan <prashanthsw@google.com>
Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Link: https://lore.kernel.org/r/20230822164904.21660-1-andy.chiu@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
---
arch/riscv/kernel/signal.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
index ffde81cfadb7..f5348292ae79 100644
--- a/arch/riscv/kernel/signal.c
+++ b/arch/riscv/kernel/signal.c
@@ -309,13 +309,6 @@ static inline void __user *get_sigframe(struct ksignal *ksig,
/* Align the stack frame. */
sp &= ~0xfUL;
- /*
- * Fail if the size of the altstack is not large enough for the
- * sigframe construction.
- */
- if (current->sas_ss_size && sp < current->sas_ss_sp)
- return (void __user __force *)-1UL;
-
return (void __user *)sp;
}
--
2.35.3

View File

@ -1,26 +0,0 @@
From 2dda0e6c2d5cba19e1e0445e908ea763a453514c Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@armbian.com>
Date: Wed, 17 Jul 2024 04:30:56 -0400
Subject: wireless: rtl8852bs: CONFIG_RTW_DEBUG = n
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
---
drivers/net/wireless/realtek/rtl8852bs/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtl8852bs/Makefile b/drivers/net/wireless/realtek/rtl8852bs/Makefile
index 357f90d96246..23cf65c872cd 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/Makefile
+++ b/drivers/net/wireless/realtek/rtl8852bs/Makefile
@@ -137,7 +137,7 @@ EXTRA_CFLAGS += -DCONFIG_RTW_ANDROID=$(CONFIG_RTW_ANDROID)
endif
########################## Debug ###########################
-CONFIG_RTW_DEBUG = y
+CONFIG_RTW_DEBUG = n
# default log level is _DRV_INFO_ = 4,
# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level.
CONFIG_RTW_LOG_LEVEL = 2
--
2.35.3

View File

@ -1,26 +0,0 @@
From 7e9cef3496607903a04fb908c84b24ba2b480907 Mon Sep 17 00:00:00 2001
From: Patrick Yavitz <pyavitz@armbian.com>
Date: Wed, 17 Jul 2024 04:33:01 -0400
Subject: wireless: rtl8852bs: remove RTW_WARN_LMT
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
---
drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c b/drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c
index 5d41dc48f1eb..dab9ac8ce621 100644
--- a/drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c
+++ b/drivers/net/wireless/realtek/rtl8852bs/core/rtw_xmit.c
@@ -6681,7 +6681,7 @@ static void fill_txreq_list_skb(_adapter *padapter,
if (skb_total_frag_nr(head_skb) > NUM_PKT_LIST_PER_TXREQ - 2) {
rtw_skb_linearize(head_skb);
- RTW_WARN_LMT("skb total frag nr over %d\n", NUM_PKT_LIST_PER_TXREQ - 2);
+ //RTW_WARN_LMT("skb total frag nr over %d\n", NUM_PKT_LIST_PER_TXREQ - 2);
}
_fill_txreq_list_skb(padapter, txreq, pkt_list, head_skb, &req_sz, &offset);
--
2.35.3

View File

@ -1,12 +0,0 @@
#
# Automatically generated by the script mk_format_patch
#
# https://gitee.com/bianbu-linux/linux-6.1.git
#
patches.bianbu/riscv-signal-fix-sigaltstack-frame-size-checking.patch
patches.bianbu/wireless-rtl8852bs-CONFIG_RTW_DEBUG-n.patch
patches.bianbu/wireless-rtl8852bs-remove-RTW_WARN_LMT.patch
patches.bianbu/Fix-aes_encrypt-redefinition-errors.patch
patches.bianbu/add-minimal-hwmon-support.patch
patches.bianbu/Bluetooth-hci_h5-Add-support-for-RTL8852BS.patch
patches.bianbu/Bluetooth-btrtl-Add-support-for-RTL8852BS.patch

View File

@ -1,13 +0,0 @@
#
# This file is made manually by simply copying text
# from the target series.* files.
# Add (-) at the beginning of the line if the patch should not be applied.
# At the same time, the patch does not need to be deleted.
#
patches.bianbu/riscv-signal-fix-sigaltstack-frame-size-checking.patch
patches.bianbu/wireless-rtl8852bs-CONFIG_RTW_DEBUG-n.patch
patches.bianbu/wireless-rtl8852bs-remove-RTW_WARN_LMT.patch
patches.bianbu/Fix-aes_encrypt-redefinition-errors.patch
patches.bianbu/add-minimal-hwmon-support.patch
patches.bianbu/Bluetooth-hci_h5-Add-support-for-RTL8852BS.patch
patches.bianbu/Bluetooth-btrtl-Add-support-for-RTL8852BS.patch