Open
Conversation
when enable bootconfig feature (with kernel's CONFIG_BOOT_CONFIG) Kernel command line paramaters will be expaned with colons so let's strip it before passing to internal parser for exmaple, part of the dmesg: [ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc2-x86_64 bootconfig [ 0.021594] Kernel command line: root="UUID=bf1b071c-fc73-4d8d-8114-bcec0c4e0e5c" BOOT_IMAGE=/boot/vmlinuz-5.19.0-rc2-x86_64 bootconfig splash console="ttyS0" Signed-off-by: Yixun Lan <dlan@gentoo.org>
add --bootconfig to support append bootconfig data into initramfs Closes: https://bugs.gentoo.org/852845 Signed-off-by: Yixun Lan <dlan@gentoo.org>
robbat2
reviewed
Jun 21, 2022
| CMDLINE=$(cat /proc/cmdline 2>/dev/null) | ||
| for x in ${CMDLINE} | ||
| do | ||
| x=${x//\"/} |
There was a problem hiding this comment.
Ok, I realized there IS a problem here.
If there are arguments with significant double-quotes, e.g. due to embedded whitespace, this would break them.
They are probably also partially broken already, so now is a good time to fix them.
Author
There was a problem hiding this comment.
I haven't thought about the embedded whitespace, so do you have any better solution for this? (my knowledge with bash is kind of limited)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with this patch, we can make the genkernel appending bootconfig data when generating initramfs image
https://bugs.gentoo.org/852845