-
-
Notifications
You must be signed in to change notification settings - Fork 48
PKGBUILD: Enable QR Code Panic for GCC compiled kernels #454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Peter Jung <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for enabling the QR Code Panic Screen for GCC-compiled kernels until LLVM (Thin) LTO supports it. Key changes include:
- Adding a conditional block in the prepare() function to enable QR Code Panic via scripts/config when LLVM LTO is not used.
- Installing Rust files in the _package-headers() function when compiling with GCC.
scripts/config -e RUST_IS_AVAILABLE -e CONFIG_RUST -e RUST_FW_LOADER_ABSTRACTIONS -d CONFIG_BLK_DEV_RUST_NULL --set-str DRM_PANIC_SCREEN qr-code \ | ||
-e DRM_PANIC_SCREEN_QR_CODE --set-str DRM_PANIC_SCREEN_QR_CODE_URL https://panic.archlinux.org/panic_report# --set-str DRM_PANIC_SCREEN_QR_VERSION 40 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The scripts/config command that follows spans several options, which makes it difficult to read. Consider refactoring it by either splitting it into multiple lines (with proper line continuations) or assigning the options to a variable for improved maintainability.
scripts/config -e RUST_IS_AVAILABLE -e CONFIG_RUST -e RUST_FW_LOADER_ABSTRACTIONS -d CONFIG_BLK_DEV_RUST_NULL --set-str DRM_PANIC_SCREEN qr-code \ | |
-e DRM_PANIC_SCREEN_QR_CODE --set-str DRM_PANIC_SCREEN_QR_CODE_URL https://panic.archlinux.org/panic_report# --set-str DRM_PANIC_SCREEN_QR_VERSION 40 | |
config_options=( | |
"-e RUST_IS_AVAILABLE" | |
"-e CONFIG_RUST" | |
"-e RUST_FW_LOADER_ABSTRACTIONS" | |
"-d CONFIG_BLK_DEV_RUST_NULL" | |
"--set-str DRM_PANIC_SCREEN qr-code" | |
"-e DRM_PANIC_SCREEN_QR_CODE" | |
"--set-str DRM_PANIC_SCREEN_QR_CODE_URL https://panic.archlinux.org/panic_report#" | |
"--set-str DRM_PANIC_SCREEN_QR_VERSION 40" | |
) | |
scripts/config "${config_options[@]}" |
Copilot uses AI. Check for mistakes.
@@ -656,6 +662,12 @@ _package-headers() { | |||
echo "Installing KConfig files..." | |||
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \; | |||
|
|||
if [ "$_use_llvm_lto" = "none" ]; then | |||
echo "Installing Rust files..." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before installing the Rust files, ensure the target directory ('$builddir/rust') exists (e.g., by creating it with mkdir -p) to avoid potential install errors.
echo "Installing Rust files..." | |
echo "Installing Rust files..." | |
mkdir -p "$builddir/rust" |
Copilot uses AI. Check for mistakes.
@@ -358,6 +358,12 @@ prepare() { | |||
|
|||
echo "Selecting '$_use_llvm_lto' LLVM level..." | |||
|
|||
if [ "$_use_llvm_lto" = "none" ]; then | |||
echo "Enabling QR Code Panic for GCC Kernels" | |||
scripts/config -e RUST_IS_AVAILABLE -e CONFIG_RUST -e RUST_FW_LOADER_ABSTRACTIONS -d CONFIG_BLK_DEV_RUST_NULL --set-str DRM_PANIC_SCREEN qr-code \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/config -e RUST_IS_AVAILABLE -e CONFIG_RUST -e RUST_FW_LOADER_ABSTRACTIONS -d CONFIG_BLK_DEV_RUST_NULL --set-str DRM_PANIC_SCREEN qr-code \ | |
scripts/config -e RUST -e RUST_FW_LOADER_ABSTRACTIONS -d BLK_DEV_RUST_NULL --set-str DRM_PANIC_SCREEN qr-code \ |
I believe RUST_IS_AVAILABLE is automatically flipped if rustc is detected, so we don't need to explicitly enable it here.
Signed-off-by: Peter Jung <[email protected]>
This does enable the QR Code Panic Screen for GCC compiled kernels until LLVM (Thin) LTO does support it.
Not applied to all kernels yes, will do this after review