Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/snagrecover/firmware/firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def run_firmware(port, fw_name: str, subfw_name: str = ""):
from snagrecover.firmware.bcm import bcm_run
Copy link
Collaborator

Choose a reason for hiding this comment

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

commit-wide comment: the commit history of Snagboot should be bisectable as much as possible, meaning each commit should allow Snagboot to run without errors.

In this commit, you're adding references to modules which don't exist yet.

I'd prefer if you reordered the commits so that each one is valid Python. So in this specific case, the commits adding the protocol and firmware code should come before this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will rearrange the code so it's self contained and does not require any future code.


bcm_run(port, fw_name, fw_blob, subfw_name)
elif soc_family == "ambarella":
from snagrecover.firmware.amba_fw import run_firmware as amba_run

amba_run(port, fw_name, subfw_name)
else:
raise Exception(f"Unsupported SoC family {soc_family}")
logger.info(f"Done installing firmware {fw_name}")
10 changes: 10 additions & 0 deletions src/snagrecover/supported_socs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ tested:
family: bcm
bcm2712:
family: bcm
cv22:
family: ambarella
untested:
a10:
family: sunxi
Expand Down Expand Up @@ -154,3 +156,11 @@ untested:
family: sunxi
v853:
family: sunxi
cv22:
Copy link
Collaborator

Choose a reason for hiding this comment

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

SoC models should only appear once in supported_socs.yaml, either in the "tested" section or the "untested" one. This one appears in both.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay will keep the cv22 under tested, rest untested as I don't have the HW.

family: ambarella
cv25:
family: ambarella
cv28:
family: ambarella
cv35:
family: ambarella
4 changes: 4 additions & 0 deletions src/snagrecover/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ def get_recovery(soc_family: str):
from snagrecover.recoveries.bcm import main as bcm_recovery

return bcm_recovery
elif soc_family == "ambarella":
from snagrecover.recoveries.ambarella import main as ambarella_recovery
Copy link
Collaborator

Choose a reason for hiding this comment

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

I didn't see main defined in your recovery implementation.


return ambarella_recovery
else:
cli_error(f"unsupported board family {soc_family}")

Expand Down