ni_provisioning: target disk from answers file#986
Merged
chaitu236 merged 2 commits intoni:nilrt/master/nextfrom Apr 17, 2026
Merged
Conversation
0f482fb to
746a0cc
Compare
chaitu236
reviewed
Apr 14, 2026
chaitu236
reviewed
Apr 14, 2026
There was a problem hiding this comment.
Pull request overview
Adds support for explicitly selecting the provisioning target disk via an answers file and introduces an interactive (-i) disk selection mode for devices with multiple internal disks.
Changes:
- Introduces
set_target_from_answer_file()to overrideTARGET_DISKfrom an answers-file value. - Adds
-iargument andselect_target_block_device()for interactive disk selection. - Refactors
ni_provisioningto source the user answers file once near startup.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| recipes-core/initrdscripts/files/ni_provisioning.common | Adds answer-file target override helper, interactive disk selection, and -i flag parsing/behavior. |
| recipes-core/initrdscripts/files/ni_provisioning | Moves user answer-file sourcing earlier and applies the answer-file disk override. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
746a0cc to
0fee7ae
Compare
Update the ni_provisioning script to be able to select the target disk through the answers file by adding the PROVISION_TARGET_DISK variable. Adding this variable to the answers file will overwrite the TARGET_DISK variable set by the -t script argument. Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
0fee7ae to
b1cd363
Compare
gratian
approved these changes
Apr 16, 2026
Contributor
gratian
left a comment
There was a problem hiding this comment.
LGTM, just a small nitpick on the location for sourcing the answer file.
b1cd363 to
856736a
Compare
Add a new -i script argument to ni_provisioning that enables interactive disk selection. When used, the provisioning script will list each block device that is a valid provisioning target and prompt the user to select one. Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
856736a to
7643d97
Compare
chaitu236
approved these changes
Apr 17, 2026
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.
Summary of Changes
There are two primary changes:
The default behavior is unchanged, which is to say that if the default provisioning option is selected and no answer file is present, then the first valid block device that is found will be selected for provisioning.
Justification
These changes will help support the upcoming Kinabalu devices that have multiple internal disks and require a way to select which one should be provisioned.
AB#3813755
Testing
For all of the testing I set up a cRIO-9033 and added an SD card that could be provisioned.
bitbake packagefeed-ni-core)Procedure