Skip to content
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

Fix Hailo-8 firmware path expected since driver v4.19.0 #3721

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

sairon
Copy link
Member

@sairon sairon commented Dec 6, 2024

The new driver now expects the firmware file to contain version number, adjust the path and remove unnecessary makefile step.

Summary by CodeRabbit

  • New Features

    • Streamlined firmware build process for Hailo-8 by removing unnecessary commands.
    • Installation command now directly references the source filename for improved consistency.
  • Bug Fixes

    • Corrected installation command to ensure proper firmware installation without referencing outdated filenames.

The new driver now expects the firmware file to contain version number, adjust
the path and remove unnecessary makefile step.
@sairon sairon added the board/raspberrypi Raspberry Pi Boards label Dec 6, 2024
@sairon sairon requested a review from agners December 6, 2024 12:41
Copy link

coderabbitai bot commented Dec 6, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request focus on the build configuration for the Hailo-8 firmware within the hailo8-firmware.mk file. The primary modification involves the removal of the HAILO8_FIRMWARE_BUILD_CMDS definition, which previously handled the copying of the firmware binary. Additionally, the installation command in the HAILO8_FIRMWARE_INSTALL_TARGET_CMDS section has been updated to reference the original source filename instead of the removed binary file, ensuring consistency in the naming convention.

Changes

File Path Change Summary
buildroot-external/package/hailo8-firmware/hailo8-firmware.mk Removed the HAILO8_FIRMWARE_BUILD_CMDS definition; updated installation command to use $(HAILO8_FIRMWARE_SOURCE) instead of hailo8_fw.bin.

Sequence Diagram(s)

sequenceDiagram
    participant Build as Build System
    participant Source as Source Directory
    participant Target as Target Directory

    Build->>Source: Retrieve Hailo-8 Firmware Source
    Build->>Target: Install Firmware from Source
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between ce1e261 and 7a11d72.

📒 Files selected for processing (1)
  • buildroot-external/package/hailo8-firmware/hailo8-firmware.mk (1 hunks)
🔇 Additional comments (2)
buildroot-external/package/hailo8-firmware/hailo8-firmware.mk (2)

18-18: LGTM! The installation command now correctly handles versioned firmware.

The change properly uses $(HAILO8_FIRMWARE_SOURCE) to maintain the version number in the firmware path, which is required since driver v4.19.0. The removal of the intermediate copy step also simplifies the build process.


Line range hint 1-24: Verify firmware version compatibility

The makefile is well-structured and follows Buildroot package infrastructure conventions. However, let's verify that version 4.19.0 is the minimum required version for the current Home Assistant OS.

✅ Verification successful

Firmware version 4.19.0 appears to be appropriate

Based on the verification results:

  • The firmware package is properly integrated into the build system for Raspberry Pi 5
  • The firmware is required for the Hailo-8 PCIe device found on Raspberry Pi AI Kit and HAT+
  • No explicit minimum version requirements were found in the configuration files
  • Version 4.19.0 is the latest stable release being used with proper SHA256 verification
  • The package depends only on the Hailo kernel driver which is included in the Raspberry Pi's downstream kernel
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for Hailo driver version requirements in kernel config and documentation

# Search for Hailo driver version requirements in kernel configs
rg -l "HAILO" buildroot-external/configs/
rg -l "hailo" buildroot-external/board/*/kernel.config

# Look for version requirements in documentation
rg -l "hailo" "docs/"
rg -l "HAILO" "Documentation/"

Length of output: 246


Script:

#!/bin/bash
# Let's check the content of the defconfig file that mentions HAILO
cat buildroot-external/configs/rpi5_64_defconfig

# Also check kernel config to see Hailo driver configuration
cat buildroot-external/board/raspberrypi/kernel.config

# Let's also search for any other Hailo-related files that might contain version information
rg -l "hailo" .

# And check package dependencies
cat buildroot-external/package/hailo8-firmware/Config.in

Length of output: 7153


Script:

#!/bin/bash
# Let's check the hash file for any version requirements
cat buildroot-external/package/hailo8-firmware/hailo8-firmware.hash

# Check if there are any version-specific comments in the main Config.in
cat buildroot-external/Config.in | rg -A 5 "HAILO"

# Let's also check for any kernel driver version requirements
rg -l "gasket" .
cat buildroot-external/package/gasket/Config.in || true

Length of output: 654


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sairon
Copy link
Member Author

sairon commented Dec 6, 2024

Obviously, this is Raspberry Pi's downstream change, as the official driver still uses hailo8_fw.bin 🙄

@sairon sairon merged commit 017d172 into dev Dec 6, 2024
3 checks passed
@sairon sairon deleted the fix-hailo-fw-path branch December 6, 2024 14:17
@sairon sairon mentioned this pull request Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants