Jump to content

Recommended Posts

Posted

@alexc

I tested the modified kernel and asked Claude to report it, he reported it like this.

System Refinement and Build Optimization Report

Feedback

1. MSI Fix Confirmed Working

Details: The MSI fix has been verified and successfully tested on Hailo8L (sun60iw2/A733 platform).

Result: Massive reduction in system load: load avg dropped from 18+ to ~12, and Frigate CPU usage plummeted from 485% to 83% during real-world inference.

High Priority

2. sunxi-autogen.h in .gitignore

Issue: This file is currently ignored by .gitignore, yet it is strictly required for the build to succeed and is not automatically generated.

Solution: Either implement automatic generation of this file inside the Makefile OR properly document the creation steps in the README.

3. Undocumented LOCALVERSION Behavior

Issue: Building from a dirty Git tree automatically appends a + suffix to the kernel version string, leading to a critical vermagic mismatch for compiled modules.

Solution: Document this behavior in the README or enforce proper default behavior in the default configuration file.

Medium Priority

4. Missing BSP_TOP Export

Issue: Running make olddefconfig crashes unless BSP_TOP=bsp/ is explicitly passed as an environment variable.

Solution: Add path auto-detection directly into the root Makefile to make the build self-contained.

5. Missing DKMS Config for hailo_pci

Issue: Since this is an out-of-tree module, users must manually rebuild it after every routine kernel update.

Solution: Provide a DKMS configuration to automate the rebuild process on the OS level.

Low Priority

6. hailo_pci Driver Integration in initramfs

Issue: The module is not automatically included in the initramfs image during the build phase.

Solution: Create a dedicated hook script or add a section in the documentation explaining manual configuration via modules-load.d and update-initramfs.

7. Overly Permissive /dev/hailo0 Permissions (World-Writable)

Issue: The device node permissions are set to crw-rw-rw- (anyone can write to it), which poses a security risk.

Solution: Deploy a standard udev rule to restrict permissions and grant access safely via a dedicated system group.

 

!!! At the moment, I confirm that it works with these edits.

Posted (edited)

@Sand_Death

Really interesting read! Would it be possible to submit these changes through GitHub or as a kernel patch? We'd love to see the full context of the changes—the code actually provides such a clear picture of what's happening (even more so than the docs!), so a proper review of the diff would be great.

 

EDIT: Looking at the description, it seems Claude addressed the issue on the Hailo driver side rather than fixing it in the PCIe driver. Personally, I don't think that's the ideal approach, since the BSP PCIe driver appears to be the root cause. If you get a chance to try my patch instead, I'd be interested to hear how it works for you.

Edited by alexc

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines