8000 Intel keembay by phodina · Pull Request #60 · bootlin/snagboot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Intel keembay #60

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

Merged
merged 3 commits into from
Jun 11, 2025
Merged

Intel keembay #60

merged 3 commits into from
Jun 11, 2025

Conversation

phodina
Copy link
Contributor
@phodina phodina commented May 1, 2025

These patches add support for Intel Keembay SoC.

The SoC boots from eMMC ATF+u-boot stored in the boot bank and with support for the fastboot protocol.

@phodina
Copy link
Contributor Author
phodina commented May 1, 2025

Here's asciinema of the process.

https://asciinema.org/a/HRmpyzDv9MigwubXmeHW456L7

@phodina
Copy link
Contributor Author
phodina commented May 7, 2025

Hi @rgantois, could I ask you for a review and to let me know if there are any specific tests you'd want to run as the Keembay is not that common?

@rgantois
Copy link
Collaborator
rgantois commented May 9, 2025

Hi @phodina, thanks a bunch for the contribution! I'm a bit short on time at the moment but I'll do my best to review it next week.

About the tests to be run on the target SoCs, I'd say that a basic snagrecover run should be sufficient, but I'll tell you if I think of something else.

@rgantois
Copy link
Collaborator

Hello, I've skimmed across this PR and there is one glaring issue: you're adding flashing code to snagrecover.

Snagrecover should only handle recovery, i.e. getting a bootloader to run on the target without flashing anything to non-volatile storage. Anything that happens after this is out of scope for snagrecover, and will be handled by snagflash.

So in your case, only the FIP step should be implemented in snagrecover. Once a bootloader is running in RAM and exposing a fastboot gadget, everything else can be handled in a board-agnostic way using snagflash commands.

This is something that needs to be fixed before I review this PR further, since it will probably involve removing a lot of code from your current proposal.

@phodina
Copy link
Contributor Author
phodina commented May 14, 2025

Okay, thanks for the comment . Will move the flashing code from snagrecover and move it to the snagflash.

@phodina
Copy link
Contributor Author
phodina commented May 16, 2025

Cleanup the code to use snagrecover utilities and improved commit messages.

snagrecover -s keembay -F "{'fip': {'path': 'fip-dm3370-r5m2e5.bin'}}"
2025-05-16 10:32:22,158 [INFO] Starting recovery of keembay board
2025-05-16 10:32:22,163 [INFO] Flashing FIP from fip-dm3370-r5m2e5.bin
2025-05-16 10:32:22,416 [INFO] fastboot OKAY
2025-05-16 10:32:22,417 [INFO] FIP flashed successfully
2025-05-16 10:32:22,417 [INFO] Waiting for device to reboot into fastboot mode...
2025-05-16 10:32:32,418 [INFO] USB retry 1/9
2025-05-16 10:32:33,419 [INFO] USB retry 2/9
2025-05-16 10:32:34,420 [INFO] USB retry 3/9
2025-05-16 10:32:35,422 [INFO] USB retry 4/9
2025-05-16 10:32:36,423 [INFO] USB retry 5/9
2025-05-16 10:32:37,423 [INFO] Found fastboot device at 7-1!
2025-05-16 10:32:37,424 [INFO] Done recovering keembay board
2025-05-16 10:32:37,424 [INFO] Done recovering keembay board

@phodina
Copy link
Contributor Author
phodina commented May 17, 2025
snagflash -P fastboot -p 8087:da00 -f boot.img -f flash:boot_a
snagflash -P fastboot -p 8087:da00 -f boot.img -f flash:boot_b
snagflash -P fastboot -p 8087:da00 -f data.img -f flash:data
snagflash -P fastboot -p 8087:da00 --timeout 120000 -f flash_sparse:system_sparse.img:system_b
snagflash -P fastboot -p 8087:da00 --timeout 120000 -f flash_sparse:system_sparse.img:system_a
snagflash -P fastboot -p 8087:da00 -f reboot

Copy link
Collaborator
@rgantois rgantois left a comment

Choose a reason for hiding this comment

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

Nice work! I've pointed out a few changes I'd like you to make before I merge this.

@phodina
Copy link
Contributor Author
phodina commented May 27, 2025

@rgantois what about the udev rules? I assume to also remove the fastboot mode VID:PID, right?

@phodina
Copy link
Contributor Author
phodina commented May 27, 2025

Reworked most of the comments, just need to test it again with real HW + test at least 2 devices for the issue above

@rgantois
Copy link
Collaborator

@rgantois what about the udev rules? I assume to also remove the fastboot mode VID:PID, right?

Yes indeed, that would be preferable.

@phodina
Copy link
Contributor Author
phodina commented May 30, 2025

@rgantois LTGM

snagrecover -s keembay -F "{'fip': {'path': 'fip-dm3370-r5m2e5.bin'}}"
2025-05-30 13:21:39,280 [INFO] Starting recovery of keembay board
2025-05-30 13:21:39,284 [INFO] Installing firmware fip
2025-05-30 13:21:39,284 [INFO] Searching for partition id...
2025-05-30 13:21:39,284 [INFO] Downloading file...
2025-05-30 13:21:39,531 [INFO] fastboot OKAY
2025-05-30 13:21:39,531 [INFO] Done
2025-05-30 13:21:39,531 [INFO] Done installing firmware fip
2025-05-30 13:21:39,531 [INFO] Done recovering keembay board

fastboot devices
1952301681545109	 Android Fastboot

@phodina phodina requested a review from rgantois May 30, 2025 16:08
phodina added 2 commits June 5, 2025 17:20
Added udev rule to allow access to Intel Keembay USB devices
by default. This rule sets proper permissions and adds the "uaccess"
tag for the following device:

  - Vendor ID 8087, Product ID 0b39 (recovery mode)

Signed-off-by: Petr Hodina <petr.hodina@luxonis.com>
Extended documentation to include Intel Keembay SoC support:
- Updated the list of supported SoCs in the README
- Added a new section in board_setup.md explaining how to enter
  recovery mode and identifying USB device states
- Added details in fw_binaries.md about the required firmware
  image packages (FIP) and expected filenames per board type

Signed-off-by: Petr Hodina <petr.hodina@luxonis.com>
@phodina phodina force-pushed the intel_keembay branch 2 times, most recently from d224a67 to 78abc5e Compare June 9, 2025 05:54
Add initial support for Intel Keembay boards in Snagrecover.

- Device specific recovery implementation in `recoveries/keembay.py`, which
  handles download of the Firmware Image Package (FIP)
- Integration of the Keembay USB vendor/product ID (8087:0b39) into
  `config.py`.
- Addition of Keembay to the `supported_socs.yaml` list.
- New firmware configuration template `keembay-generic.yaml` covering FIP
- Hooking Keembay into the recovery dispatcher in `utils.py`.

Signed-off-by: Petr Hodina <petr.hodina@luxonis.com>
@phodina phodina requested a review from rgantois June 11, 2025 04:57
@rgantois rgantois merged commit b9683d2 into bootlin:main Jun 11, 2025
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.

2 participants
0