-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add fixboard to firmware reflash #29
base: main
Are you sure you want to change the base?
Conversation
3bc5de8
to
4cd5e98
Compare
@@ -127,6 +139,15 @@ def reflash_ipu(self) -> None: | |||
else: | |||
self.logger.info("Skipping flash_spi_image") | |||
|
|||
self.logger.info("Step 5: apply_fixboard") | |||
if self.should_run("apply_fixboard"): | |||
should_fixboard = self.fixboard_is_needed() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make fixboard_is_needed() return an optional bool?
In my mind this could be simplified a bit.
if self.fixboard_is_needed():
self.apply_fixboard()
else:
# assume fixboard has already been applied, or the user does not want to apply this (though I'm not sure if the user has a knob to tell fwup to only run a subset of the steps anyways right now).
If we hit an exception when trying to determine if we should apply fixboard, something is wrong and we should bail out with an error code.
|
||
def fixboard_is_needed(self) -> Optional[bool]: | ||
full_address = f"root@{self.imc_address}" | ||
try: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we expect this to fail?
This will be useful for traversing through the server for fixboard pre-built board config binaries
We often want to avoid host checking and such so it would be nice to have a function that abstract all those flags and runs the command on the remote host
apply_fixboard
4cd5e98
to
7d210e5
Compare
We need unique MAC addresses for each IPU, and to make that happen, we use pre-built fixboard images that need to be flashed after the firmware is applied. To support this, I added these pre-built images to our ARM server and wrote functions to interact with them, making it easier to add unique MAC addresses. I also created functions to check if the fixboard process needs to be applied and handle the flashing if it does.
On top of that, I added a new ssh_run function to simplify running commands on remote hosts, since that’s a pretty common task and it made sense to make it easier and more consistent.