-
Notifications
You must be signed in to change notification settings - Fork 372
added fw_util support to program custom contents in a flash device #353
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
added fw_util support to program custom contents in a flash device #353
Conversation
|
@joancaneus has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
@arajeev-ARISTA -- We use the linter below to format code at meta Lint code: CLANGFORMAT There are some lints failing on this diff which I will format, but for future reference (when you done with those PR) can you please look into how you can possibly use that linter as well? |
Will do, thanks! |
|
@arajeev-ARISTA has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
|
@arajeev-ARISTA has updated the pull request. You must reimport the pull request before landing. |
eed00ef to
4ee8580
Compare
|
@arajeev-ARISTA has updated the pull request. You must reimport the pull request before landing. |
|
@ezeob002 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
…acebook#353) Summary: ### Background During BIOS upgrade in Darwin48V systems, `DMI_BOARD_NAME` needs to be updated through Aboot aconf programming. Previously we achieved this by adding the aconf programming logic to the `fw_util` config file. However, a recent refactoring of the `fw_util` prevents adding arbitrary shell commands in the config file. This change addresses the issue by adding the support to program custom contents in a flash device which is updated through `flashrom`. ### Summary of changes - Added two optional arguments `custom_content` and `custom_content_offset` in the Thrift description for `FlashromConfig` - If a `flashrom` command description with both `custom_content` and `custom_content_offset` are found in the `fw_util` config file, a temporary binary file will be created. The binary file will have `custom_content` written at `custom_content_offset`. A `flashrom` command would then be constructed using this temporary binary file instead of the firmware image. The regions in the flash memory which will be updated are restricted by specifying the layout - The command to program the custom content will be in addition to the existing command to program the firmware binary. We are able to specify multiple commands because it’s allowed by the thrift description for upgrade operation ### Testing Upgraded BIOS in a Darwin48V system with fw_util and verified that DMI_BOARD_NAME was programmed. Pull Request resolved: facebook#353 Reviewed By: joancaneus Differential Revision: D72034772 Pulled By: ezeob002 fbshipit-source-id: 97968aba4425e90b309e5cd1eedb66dd6cb4bdaa
Background
During BIOS upgrade in Darwin48V systems,
DMI_BOARD_NAMEneeds to be updated through Aboot aconf programming. Previously we achieved this by adding the aconf programming logic to thefw_utilconfig file.However, a recent refactoring of the
fw_utilprevents adding arbitrary shell commands in the config file. This change addresses the issue by adding the support to program custom contents in a flash device which is updated throughflashrom.Summary of changes
custom_contentandcustom_content_offsetin the Thrift description forFlashromConfigflashromcommand description with bothcustom_contentandcustom_content_offsetare found in thefw_utilconfig file, a temporary binary file will be created. The binary file will havecustom_contentwritten atcustom_content_offset. Aflashromcommand would then be constructed using this temporary binary file instead of the firmware image. The regions in the flash memory which will be updated are restricted by specifying the layoutTesting
Upgraded BIOS in a Darwin48V system with fw_util and verified that DMI_BOARD_NAME was programmed.