Add parsers for arm mkuboot.sh and syscallnr.sh#125
Open
Add parsers for arm mkuboot.sh and syscallnr.sh#125
Conversation
Add support to targets that depends on those commands: bash .../scripts/mkuboot.sh -A arm -O linux ... -d <input> <output> sh .../arch/arm/tools/syscallnr.sh <input.tbl> <output.h> Add _parse_mkuboot_command: mkuboot.sh is a thin wrapper around mkimage(1); the input file is the argument to the -d flag. Add _parse_syscallnr_command: follows the same positional convention as the existing syscalltbl.sh parser, positionals[2] is the input syscall table file. Register both in SINGLE_COMMAND_PARSERS alongside the other ARM/sh script entries. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
augelu-tng
reviewed
May 6, 2026
| (re.compile(r"sh (.*/)?gen_initramfs\.sh\b"), _parse_gen_initramfs_command), | ||
| (re.compile(r"sh (.*/)?checkundef\.sh\b"), _parse_noop), | ||
| (re.compile(r"(bash|sh) (.*/)?mkuboot\.sh\b"), _parse_mkuboot_command), | ||
| (re.compile(r"sh (.*/)?(arch/)?arm/tools/syscallnr\.sh\b"), _parse_syscallnr_command), |
Contributor
There was a problem hiding this comment.
Is this regex too strict ?
There are 3 equally named scripts:
scripts/syscallnr.sharch/arm/tools/syscallnr.sharch/mips/kernel/syscalls/syscallnr.sh
Can we use r"sh (.*/)?syscallnr\.sh\b" ?
augelu-tng
reviewed
May 6, 2026
| def _parse_mkuboot_command(command: str) -> list[PathStr]: | ||
| command_parts = _tokenize_single_command(command) | ||
| # mkuboot.sh passes all args to mkimage; -d specifies the data/input image file | ||
| # e.g.: bash .../scripts/mkuboot.sh -A arm -O linux -C none -T kernel -a 0x8000 -e 0x8000 -n 'name' -d arch/arm/boot/zImage arch/arm/boot/uImage |
Contributor
There was a problem hiding this comment.
Instead of this comment please add tests for mkuboot.sh and syscallnr.sh example commands to the test_savedcmd_parser.py file.
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.
Add support to targets that depends on those commands:
bash .../scripts/mkuboot.sh -A arm -O linux ... -d
sh .../arch/arm/tools/syscallnr.sh <input.tbl> <output.h>
Add _parse_mkuboot_command: mkuboot.sh is a thin wrapper around mkimage(1); the input file is the argument to the -d flag.
Add _parse_syscallnr_command: follows the same positional convention as the existing syscalltbl.sh parser, positionals[2] is the input syscall table file.
Register both in SINGLE_COMMAND_PARSERS alongside the other ARM/sh script entries.
Solves: