Skip to content

Bug/rdkb 65469 bootstrap fix#357

Open
Suganya-Sugumar wants to merge 5 commits into
developfrom
bug/RDKB-65469_bootstrap_fix
Open

Bug/rdkb 65469 bootstrap fix#357
Suganya-Sugumar wants to merge 5 commits into
developfrom
bug/RDKB-65469_bootstrap_fix

Conversation

@Suganya-Sugumar

@Suganya-Sugumar Suganya-Sugumar commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Added code changes to regenerate bootstrap.json if /nvram/bootstrap.json and /opt/secure/bootstrap.json are both empty. This is to address the issue reported in https://ccp.sys.comcast.net/browse/RDKB-65469.

Test Log:

root@Docsis-Gateway:~# > /nvram/bootstrap.json
root@Docsis-Gateway:~# > /opt/secure/bootstrap.json
root@Docsis-Gateway:~# echo 1 > /nvram/ClearUnencryptedData_flags
root@Docsis-Gateway:~# cat /nvram/ClearUnencryptedData_flags
1
root@Docsis-Gateway:~# cat /opt/secure/bootstrap.json
root@Docsis-Gateway:~# cat /nvram/bootstrap.json
root@Docsis-Gateway:~# ls -l /nvram/bootstrap.json
-rw-r--r--    1 root     root             0 Jun 29 10:27 /nvram/bootstrap.json
root@Docsis-Gateway:~# ls -l /opt/secure/bootstrap.json
-rw-r--r--    1 root     root             0 Jun 29 10:27 /opt/secure/bootstrap.json
root@Docsis-Gateway:~# reboot

root@Docsis-Gateway:~# ls -l /nvram/bootstrap.json
-rw-r--r--    1 root     root             0 Jun 29 10:27 /nvram/bootstrap.json
root@Docsis-Gateway:~# ls -l /opt/secure/bootstrap.json
-rw-r--r--    1 root     root         22335 Apr 28  2022 /opt/secure/bootstrap.json
root@Docsis-Gateway:~# cat /nvram/ClearUnencryptedData_flags
1

@Suganya-Sugumar Suganya-Sugumar requested review from a team as code owners June 29, 2026 10:59
Copilot AI review requested due to automatic review settings June 29, 2026 10:59
Comment thread source/scripts/init/src/apply_system_defaults/apply_system_defaults.c Dismissed
Comment thread source/scripts/init/src/apply_system_defaults_helper.c Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds recovery logic to regenerate /opt/secure/bootstrap.json when both the secure bootstrap and its /nvram backup are empty, addressing RDKB-65469 during boot/default-application.

Changes:

  • Updates bootstrap recovery path to initialize bootstrap when /nvram/bootstrap.json exists but is empty.
  • Adds a guard in writeToJson() to avoid writing empty payloads to JSON files.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
source/scripts/init/src/apply_system_defaults/apply_system_defaults.c Adjusts bootstrap recovery flow when /opt/secure/bootstrap.json is missing/empty and /nvram/bootstrap.json exists but is empty.
source/scripts/init/src/apply_system_defaults_helper.c Prevents writing empty strings/NULL data to JSON output files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/scripts/init/src/apply_system_defaults_helper.c
Comment thread source/scripts/init/src/apply_system_defaults/apply_system_defaults.c Dismissed
Copilot AI review requested due to automatic review settings June 30, 2026 05:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants