使用BeagleBone Black+Bonscript时出现“Kernel does not include CapeMgr module”错误求助
Hey there, let’s work through this frustrating error you’re hitting when using Bonscript with your BeagleBone Black. I’ve run into this exact issue a handful of times, so here’s a step-by-step breakdown of what to check and how to fix it:
1. Verify if the CapeMgr Module is Loaded or Even Exists
First, let’s confirm whether the bone_capemgr module is present on your system:
- Run this command to check if it’s already loaded:
If you get no output, the module isn’t loaded.lsmod | grep bone_capemgr - Try loading it manually with:
If you get an error likesudo modprobe bone_capemgrmodprobe: FATAL: Module bone_capemgr not found in directory /lib/modules/$(uname -r), that confirms your kernel was compiled without this module.
2. Check Your Kernel Configuration
Many newer BeagleBone Black kernels (especially post-Debian 10) disable bone_capemgr by default in favor of newer Device Tree Overlay tools—but Bonscript often relies on the old CapeMgr system. Here’s how to check:
- View your current kernel config with:
If the output showszcat /proc/config.gz | grep CONFIG_BONE_CAPEMGR# CONFIG_BONE_CAPEMGR is not set, the module was excluded from the kernel build.
If You Compiled Your Own Kernel:
- Re-run your kernel configuration tool (like
menuconfigornconfig), navigate to Device Drivers > Staging drivers > Support for the BeagleBone Black Capes, and setCONFIG_BONE_CAPEMGRtom(module) ory(built-in). - Recompile your kernel and modules, then install them on your BBB.
If You’re Using an Official Image:
- Consider switching to an older official image (like Debian 9 Stretch) that still includes
bone_capemgrby default. These images are widely tested with tools like Bonscript. - Alternatively, edit your
/boot/uEnv.txtfile to enable CapeMgr at boot. Add or uncomment this line (depending on your kernel version):
Save the file, reboot, and try loading the module again.capemgr.enabled=1
3. Check Bonscript Compatibility
Make sure your Bonscript version is compatible with your BBB’s kernel:
- Older versions of Bonscript hardcode paths to
/sys/devices/platform/bone_capemgr—if this directory doesn’t exist (because CapeMgr is missing), it’ll throw the error you’re seeing. - If possible, update Bonscript to the latest version (if it’s been updated to support newer Device Tree methods) or roll back to a version that explicitly supports CapeMgr.
Quick Troubleshooting Note
Always back up your important data before modifying kernel settings or switching images—kernel changes can sometimes lead to boot issues if done incorrectly.
内容的提问来源于stack exchange,提问作者user3400975

