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

Enable HID support by default in GhostBSD #207

Closed
wants to merge 1 commit into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Dec 26, 2024

Added uhid, hid, and hidraw modules to be loaded by default via sysrc.

This ensures better compatibility with USB HID devices for GhostBSD users.

Summary by Sourcery

Build:

  • Enable the uhid, hid, and hidraw kernel modules in the base system configuration.

Added uhid, hid, and hidraw modules to be loaded by default via sysrc.

This ensures better compatibility with USB HID devices for GhostBSD users.
@ghost ghost requested review from a team as code owners December 26, 2024 00:47
Copy link
Contributor

sourcery-ai bot commented Dec 26, 2024

Reviewer's Guide by Sourcery

This pull request enables USB HID support by default in GhostBSD by loading the uhid, hid, and hidraw kernel modules at boot time. This is achieved by modifying the build.sh script to set the corresponding sysrc variables.

Sequence diagram for GhostBSD boot process with HID module loading

sequenceDiagram
    participant Boot as System Boot
    participant RC as RC System
    participant KM as Kernel Module Loader
    participant HID as HID Modules
    participant USB as USB Devices

    Boot->>RC: Start system
    RC->>KM: Load kernel modules
    KM->>HID: Load uhid.ko
    KM->>HID: Load hid.ko
    KM->>HID: Load hidraw.ko
    HID->>USB: Enable HID device support
Loading

File-Level Changes

Change Details Files
Enabled loading of HID modules
  • Added uhid_load=\"YES\" to sysrc in build.sh
  • Added hid_load=\"YES\" to sysrc in build.sh
  • Added hidraw_load=\"YES\" to sysrc in build.sh
build.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @vimanuelt - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines 243 to +248
chroot ${release} sysrc avahi_dnsconfd_enable="YES"
chroot ${release} sysrc ntpd_enable="YES"
chroot ${release} sysrc ntpd_sync_on_start="YES"
chroot ${release} sysrc uhid_load="YES"
chroot ${release} sysrc hid_load="YES"
chroot ${release} sysrc hidraw_load="YES"
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion: Consider using kld_list to load all HID-related modules in a single sysrc call

Instead of separate sysrc calls for each module, you could use: chroot ${release} sysrc kld_list+="hid uhid hidraw". This is more maintainable and slightly more efficient during boot.

Suggested change
chroot ${release} sysrc avahi_dnsconfd_enable="YES"
chroot ${release} sysrc ntpd_enable="YES"
chroot ${release} sysrc ntpd_sync_on_start="YES"
chroot ${release} sysrc uhid_load="YES"
chroot ${release} sysrc hid_load="YES"
chroot ${release} sysrc hidraw_load="YES"
chroot ${release} sysrc avahi_dnsconfd_enable="YES"
chroot ${release} sysrc ntpd_enable="YES"
chroot ${release} sysrc ntpd_sync_on_start="YES"
chroot ${release} sysrc kld_list+="hid uhid hidraw"

@ghost
Copy link
Author

ghost commented Dec 30, 2024

Alex let me know this is an incorrect procedure. Will cancel and submit at a later time.

@ghost ghost closed this Dec 30, 2024
@ghost ghost deleted the vimanuelt-patch-1 branch December 30, 2024 08:11
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

0 participants