-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
build sсript: The error of applying Wi-Fi driver patches has been fixed. #8273
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: main
Are you sure you want to change the base?
Conversation
…it exists If the array exists in this location, initializing an empty array will destroy all the data that was stored in it. Do not initialize an empty KERNEL_DRIVERS_SKIP array if it exists. This allows us to create an array anywhere in the script, including the user configuration, in a secure way.
WalkthroughThe changes introduce conditional logic in two shell scripts. In Suggested labels
Suggested reviewers
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
lib/functions/main/config-prepare.sh (1)
169-173
: Optional refactor: use array-length check for emptiness
Instead of string comparison onKERNEL_DRIVERS_SKIP[*]
, consider using the array length to detect unset or empty cases:-if [ "${KERNEL_DRIVERS_SKIP[*]}" == "" ]; then - declare -g -a KERNEL_DRIVERS_SKIP=() -fi +if (( ${#KERNEL_DRIVERS_SKIP[@]} == 0 )); then + declare -g -a KERNEL_DRIVERS_SKIP=() +fiThis approach is more idiomatic and robust.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
patch/misc/wireless-uwe5622/uwe5622-fix-timer-api-changes-for-6.15-only-sunxi.patch
is excluded by!patch/**
📒 Files selected for processing (2)
lib/functions/compilation/patch/drivers_network.sh
(1 hunks)lib/functions/main/config-prepare.sh
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
lib/functions/compilation/patch/drivers_network.sh (1)
lib/functions/compilation/patch/patching.sh (1)
process_patch_file
(89-107)
🔇 Additional comments (1)
lib/functions/compilation/patch/drivers_network.sh (1)
527-533
: Conditional patch application fordriver_uwe5622
is correct
The added block cleanly selects the sunxi-specific timer API patch for v6.15+ and falls back to the generic patch otherwise.
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.
LGTM
Not sure if the nitpick of Rabbit makes sense. Otherwise lgtm |
Description
config-prepare: Initialize an empty KERNEL_DRIVERS_SKIP array unless it exists
If the array exists in this location, initializing an empty array
will destroy all the data that was stored in it.
Do not initialize an empty KERNEL_DRIVERS_SKIP array if it exists.
This allows us to create an array anywhere in the script,
including the user configuration, in a secure way.
patch: misc: uwe5622: fix timer api changes for 6.15 (only sunxi)
How Has This Been Tested?
The sequence of patch application is defined here:
lib/functions/compilation/patch/drivers-harness.sh
I have created an array in the user configuration file.
This allowed the build system to apply only those patches that go up to driver_uwe5622
and therefore allows me to make fixes by applying patches for driver_uwe5622 manually.
As
./compile.sh test kernel-patch
Here, the
test
is the name of my custom configuration.this pull request must be combined before doing this 8270.