When building kernels with KERNEL_COMPILER=clang, compiler warnings
were displayed without color despite -fdiagnostics-color=always being
set in KCFLAGS. This GCC-native flag is not reliably honored by clang
when invoked through ccache and the kernel build system with LLVM=1.
Add -fcolor-diagnostics (clang's native flag) to the clang-specific
extra_warnings to ensure colored warning output.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In Linux 6.19, net_device->dev_addr is const unsigned char *.
Clang with -Werror,-Wincompatible-pointer-types-discards-qualifiers
rejects passing dev_addr to non-const parameters and memcpy into it.
Fix by:
- Replacing memcpy(dev->dev_addr, ...) with dev_addr_set()
- Using local buffer + ether_addr_copy for sprdwl_set_mac_addr call
that needs mutable addr (the function modifies it in-place)
- Changing u8 *mac pointer to u8 mac[ETH_ALEN] array in cfg80211.c
where dev_addr was assigned to a non-const pointer
Relates to #9049
Replace verbose "1 day, 6 hours, 17 minutes" format with compact
"1d 6h" style for better readability. Fix alignment with Load
and Local users fields. Reads uptime directly from /proc/uptime.
The paste -sd', ' - command treats each character as a separate
delimiter to alternate between, resulting in inconsistent spacing.
Fix by using single comma delimiter then adding spaces with sed.
- Simplify printf format string and fix invalid %-0s specifier
- Use underscore for intentionally unused sudo variable
- Add proper color formatting to commands
- Improve alignment of command output
- Replace unquoted variable parsing with IFS+read for proper splitting
- Quote all variables to prevent word splitting and globbing
- Use proper [[ test ]] instead of [ test ] for consistency
- Fix printf format string to use proper argument passing
- Add short-circuit evaluation for "true" conditions to avoid eval
- Maintain same functionality with improved security
Fixes "printf: : invalid number" error when ambient temperature or board
temperature values are empty on systems without temperature sensors.
Adds error suppression and fallback to "0" for temperature formatting
to prevent script errors on systems without these sensors.
From https://lore.kernel.org/all/20251230-ncm-refactor-v1-0-793e347bc7a7@google.com/
To fix slow startup, and the issue where the system fails
to release ncm devices when shutting down after plugging
or unplugging a usb hub, which references a null pointer
This is important for devices without serial ports,
such as the Elixir, because they enable NCM
by default for headless debugging,
making it easy to trigger related bugs.
Signed-off-by: CodeChenL <2540735020@qq.com>
Add extension that enables 32-bit compat vDSO for arm64 kernels.
Without vDSO, 32-bit applications using gettimeofday() syscall heavily
suffer significant performance penalty on arm64 systems.
The extension:
- Adds gcc-arm-linux-gnueabi as build dependency
- Sets CROSS_COMPILE_COMPAT for kernel make
- Enables CONFIG_COMPAT_VDSO in kernel config
Enable with: ENABLE_EXTENSIONS=arm64-compat-vdso
Refs: https://github.com/armbian/build/issues/9216
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a new extension hook point in run_kernel_make_internal() that allows
extensions to modify kernel make parameters before compilation.
Extensions can now modify:
- common_make_params_quoted - parameters passed to make
- common_make_envs - environment variables for make
This enables features like CROSS_COMPILE_COMPAT for 32-bit compat vDSO
on arm64 builds without modifying core build scripts.
Refs: https://github.com/armbian/build/issues/9216
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mainline TF-A doesn't initialize SGRF_SOC_CON8-CON15 which control
DMAC0 and DMAC1 configuration. Without this, the PL330 DMA controllers
cannot be accessed from Linux and PERIPH_ID reads as 0x0.
The fix configures SGRF registers to set DMAC manager threads to
running state and non-secure mode, then pulses DMAC reset to apply
the new configuration.
Based on community reverse-engineering:
- https://lists.denx.de/pipermail/u-boot/2023-April/514267.html
- https://gist.github.com/CrystalGamma/a68333fa4c9fda7eb6c09d30ad4937fe
Tested on Helios64 (RK3399).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>