Integrating your hardware drivers upstream¶
As a hardware supplier, submitting your hardware drivers upstream is crucial for seamless integration into AutoSD and the open source Red Hat In-Vehicle OS ecosystem.
To upstream your driver, you must submit your driver module into the same broad, open source upstream community review and acceptance process that Red Hat developers follow:
- Red Hat developers submit code upstream.
- Downstream maintainers for review, test, and accept the code as it “flows” into Fedora, CentOS Stream, and AutoSD.
- Red Hat developers take automotive-specific code and configurations accepted by CentOS Stream maintainers into AutoSD and merge them with a reconfiguration of RHEL to create Red Hat In-Vehicle OS.
Advantages of submitting your drivers upstream¶
By submitting your hardware drivers for review and approval upstream, you embrace the open source approach. You can use the collective knowledge and expertise of the upstream community while fueling your innovation and continuous improvement. Contributing to open source technologies encourages collaboration and knowledge sharing, which enhances the quality and reliability of the solutions we create together.
Submitting your drivers for upstream maintainer review yields the following benefits:
- Increased visibility and market adoption
- Inclusion in the Linux mainline kernel boosts visibility and hardware compatibility, which leads to greater market adoption and brand recognition.
- Improved compatibility
- Inclusion in the Linux mainline kernel ensures broader Linux distribution support and hardware compatibility. In contrast, out-of-tree drivers must manually stay compatible with the baseline.
- Reduced maintenance burden
- Linux community support means a shared responsibility for driver maintenance. You support fewer versions of the OS while benefiting from broader testing, so you can focus your resources on other critical areas.
- Enhanced quality, performance, and reliability
- Community collaboration provides valuable feedback, leading to better drivers.
Submitting a hardware driver to Linux mainline kernel maintainers for review¶
To integrate your hardware driver into AutoSD, submit your hardware driver as a patch to the Linux mainline kernel.
Before you begin, decide whether or not your organization plans to submit your hardware driver to the Linux mainline kernel or ship it independently:
- If you plan to submit your driver for Linux mainline kernel maintainer review and approval, proceed with this procedure.
- If you are not sure, see Advantages of submitting your drivers upstream and Hardware requirements.
- If you do not plan to submit your driver for Linux mainline kernel maintainer review and approval but ship your driver independently instead, see Out-of-tree drivers.
Prerequisites
- git
Procedure
-
Clone the upstream kernel.
Important
Do not make any code changes to this kernel.
-
Navigate to the kernel configuration for your hardware architecture, such as
root/arch/arm64/configs/defconfig
. -
Add calibration options specific to your board or driver.
Important
Do not compile your drivers with the kernel source. If you do, you might mask changes you make to the core parts of the automotive kernel.
-
Confirm that your driver is compatible with the AutoSD automotive kernel by verifying that your driver functions without changing the kernel source code.
-
If your driver does not function with the kernel source code, you can choose one of the following options:
- Modify the architecture of your driver module to avoid the need to change the kernel.
- Propose changes to the upstream kernel community to accommodate the needs of your driver module, which requires that you also contribute the driver code to substantiate the kernel changes.
-
If you are working on kernel drivers intended for use in Red Hat In-Vehicle OS, contact Red Hat for driver requirements.
Additional resources
- Submitting patches: the essential guide to getting your code into the kernel
- Linux kernel patch submission checklist
- Getting the Code Right in A Guide to the Development Process
- Development tools for the kernel
- Kernel Testing Guide
- Static analysis tools
- Checkpatch
- A guide to the Kernel Development Process
- Fedora/ARK Kernel documentation