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

make work on newer BBB images? #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cozzyd
Copy link

@cozzyd cozzyd commented May 8, 2024

The u-boot overlay detection doesn't seem to work in updated images since the bone_capemgr stuff has all been removed, as far as I can tell. I'm not sure what the best current way to detect them is, but I think perhaps the presence of /proc/device-tree/chosen/overlays may possibly imply a u-boot overlay?

This adds a check for that when detecting device trees, making this library work on more recent images. There are probably more robust/better methods.

@RobertCNelson
Copy link
Contributor

RobertCNelson commented May 8, 2024

@cozzyd yeah that should be safe enough.. Ever since the cape bone_capemgr went away as of 4.5 timeframe, we've used /proc/device-tree/chosen/overlays to help show what overlay was loaded..

debian@21-am335x-bbb:~$ tree /proc/device-tree/chosen/
/proc/device-tree/chosen/
├── base_dtb
├── base_dtb_timestamp
├── bootargs
├── linux,initrd-end
├── linux,initrd-start
├── name
├── overlays
│   ├── BB-ADC-00A0.kernel
│   ├── BB-BONE-eMMC1-01-00A0.kernel
│   ├── BB-HDMI-TDA998x-00A0.kernel
│   └── name
└── stdout-path

1 directory, 11 files

and

debian@21-am335x-bbb:~$ zcat /proc/config.gz | grep CONFIG_OF_OVERLAY
CONFIG_OF_OVERLAY=y

The /proc/device-tree/chosen/overlays conscept also applies to arm64 (BeaglePlay, BBAI64), riscv64 (BeagleV-Ahead, BeagleV-Fire), and the up-coming arm64 (BeagleY-AI)..

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants