Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Enable pwm gpio - #10238

#10238
Merged
igorpecovnik merged 2 commits into
armbian:mainarmbian/build:mainfrom
frank-f:enable-pwm-gpiofrank-f/armbian-build:enable-pwm-gpioCopy head branch name to clipboard
Jul 20, 2026
Merged

Enable pwm gpio#10238
igorpecovnik merged 2 commits into
armbian:mainarmbian/build:mainfrom
frank-f:enable-pwm-gpiofrank-f/armbian-build:enable-pwm-gpioCopy head branch name to clipboard

Conversation

@frank-f

@frank-f frank-f commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Description

As part of #9267 the build of pwm-gpio.ko was disabled. It's enabled by default by the Raspberry Pi Foundation Kernel and it is needed to use gpio-fan.ko, which is how I discovered it's missing. It was enabled in the Armbian Kernels up to 6.12.x (currently still available as "legacy"). However, in current and edge it's missing. This minor change enables it.

How Has This Been Tested?

  • Built and installed a current package on a CM4 - it boots and the fan is spinning.
  • Built and installed an edge package on a CM4 - boots and runs the fan just fine as well.

Checklist:

  • My changes generate no new warnings

Summary by CodeRabbit

  • New Features
    • Added support for GPIO-based PWM functionality on compatible hardware.
    • Enabled the PWM driver as a loadable system component in current and edge kernel configurations.

@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release labels Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Both BCM2711 kernel configurations now build the GPIO-based PWM driver as a loadable kernel module.

Changes

GPIO PWM kernel configuration

Layer / File(s) Summary
Enable GPIO PWM driver modules
config/kernel/linux-bcm2711-current.config, config/kernel/linux-bcm2711-edge.config
Adds CONFIG_PWM_GPIO=m to both BCM2711 kernel configurations.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: evilolaf, igorpecovnik

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: enabling the PWM GPIO kernel module.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... labels Jul 19, 2026
@frank-f

frank-f commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

One thing I have to mention, which is not related to my changes or the goal of this PR, is that my package built using the following command, did not install cleanly.

./compile.sh BOARD=rpi4b BRANCH=edge kernel
(or BRANCH=current)

The output looked like this:

# dpkg -i linux-image-edge-bcm2711_26.08.0-trunk_arm64__7.1.3-Sca92-D398d-P0000-C2513-H8200-HK01ba-Vc222-B085a-R448a.deb linux-dtb-edge-bcm2711_26.08.0-trunk_arm64__7.1.3-Sca92-D398d-P0000-C2513-H8200-HK01ba-Vc222-B085a-R448a.deb
Selecting previously unselected package linux-image-edge-bcm2711.
(Reading database ... 45252 files and directories currently installed.)
Preparing to unpack linux-image-edge-bcm2711_26.08.0-trunk_arm64__7.1.3-Sca92-D398d-P0000-C2513-H8200-HK01ba-Vc222-B085a-R448a.deb ...
Armbian 'linux-image-edge-bcm2711' for '7.1.3-edge-bcm2711': 'preinst' starting.
Armbian 'linux-image-edge-bcm2711' for '7.1.3-edge-bcm2711': 'preinst' finishing.
Unpacking linux-image-edge-bcm2711 (26.08.0-trunk) ...
Selecting previously unselected package linux-dtb-edge-bcm2711.
Preparing to unpack linux-dtb-edge-bcm2711_26.08.0-trunk_arm64__7.1.3-Sca92-D398d-P0000-C2513-H8200-HK01ba-Vc222-B085a-R448a.deb ...
Armbian 'linux-dtb-edge-bcm2711' for '7.1.3-edge-bcm2711': 'preinst' starting.
Armbian 'linux-dtb-edge-bcm2711' for '7.1.3-edge-bcm2711': 'preinst' finishing.
Unpacking linux-dtb-edge-bcm2711 (26.08.0-trunk) ...
Setting up linux-image-edge-bcm2711 (26.08.0-trunk) ...
Armbian 'linux-image-edge-bcm2711' for '7.1.3-edge-bcm2711': 'postinst' starting.
update-initramfs: Generating /boot/initrd.img-7.1.3-edge-bcm2711
WARNING: Unsupported initramfs version (7.1.3-edge-bcm2711) - skipping setup
NOTE: Manual boot configuration may be required
WARNING: Unsupported kernel version (7.1.3-edge-bcm2711) - skipping setup
NOTE: Manual boot configuration may be required
Error: No kernel file (Image or vmlinuz-7.1.3-edge-bcm2711) found in /boot!
run-parts: /etc/kernel/postinst.d/zzz-copy-new-files exited with return code 1
dpkg: error processing package linux-image-edge-bcm2711 (--install):
 installed linux-image-edge-bcm2711 package post-installation script subprocess returned error exit status 1
Setting up linux-dtb-edge-bcm2711 (26.08.0-trunk) ...
Armbian 'linux-dtb-edge-bcm2711' for '7.1.3-edge-bcm2711': 'postinst' starting.
Armbian: DTB: symlinking /boot/dtb to /boot/dtb-7.1.3-edge-bcm2711...
'dtb' -> 'dtb-7.1.3-edge-bcm2711'
Armbian 'linux-dtb-edge-bcm2711' for '7.1.3-edge-bcm2711': 'postinst' finishing.
Errors were encountered while processing:
 linux-image-edge-bcm2711

Problem is, that the kernel image is not called /boot/vmlinuz-7.1.3-edge-bcm2711 but instead /boot/vmlinux-7.1.3-edge-bcm2711. After renaming the file and re-running /etc/kernel/postinst.d/zzz-copy-new-files 7.1.3-edge-bcm2711, everything is fine and the system can boot up.

I did not investigate why this is happening, could well be a problem with my build system or my Armbian setup, but I am very sure it's not related to me enabling this one Kernel module.

@iav iav left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why not.

@github-actions github-actions Bot added the Ready to merge Reviewed, tested and ready for merge label Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot removed the Needs review Seeking for review label Jul 19, 2026
@iav

iav commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

The name is decided by the build environment, not kbuild itself: make install looks for /sbin/installkernel first; the official build container has it (the classic Debian script), which always installs vmlinuz-<version> regardless of compression. Without it — e.g. on a native build — the fallback arch/arm64/boot/install.sh installs an uncompressed Image as vmlinux-<version>; your vmlinux- is the marker of that path. The zzz-copy-new-files hook only knows /boot/Image and /boot/vmlinuz-<abi>, and the /boot/Image symlink is created by the postinst after run-parts — so a manual dpkg -i of such a package on a live system fails; image builds don't show it because there the hook runs as a separate later step. Meanwhile the hook already receives the exact installed image path as $2 (run-parts --arg=<version> --arg=/boot/<file>) — cp "$2" ... would cover both namings.

@igorpecovnik — is this worth fixing?

@igorpecovnik

Copy link
Copy Markdown
Member

is this worth fixing?

Low priority, but yes.

@igorpecovnik
igorpecovnik merged commit 3397914 into armbian:main Jul 20, 2026
13 checks passed
@frank-f

frank-f commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

The name is decided by the build environment, not kbuild itself: make install looks for /sbin/installkernel first; the official build container has it (the classic Debian script), which always installs vmlinuz-<version> regardless of compression. Without it — e.g. on a native build — the fallback arch/arm64/boot/install.sh installs an uncompressed Image as vmlinux-<version>; your vmlinux- is the marker of that path.

Looking at my build system, I'm not sure if i'm understanding this correctly. It's an up-to-date Debian 13, I am using an account with sudo permissions, Docker is not installed, /sbin/installkernel exists. Like this, shouldn't I be seeing "vmlinuz" already?
Should I need to build another Kernel package in the future, would it make more sense to just install Docker instead of debugging this further?

@frank-f
frank-f deleted the enable-pwm-gpio branch July 20, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Hardware Hardware related like kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.