Skip to content

make work on newer BBB images?#372

Open
cozzyd wants to merge 1 commit intoadafruit:masterfrom
RNO-G:master
Open

make work on newer BBB images?#372
cozzyd wants to merge 1 commit intoadafruit:masterfrom
RNO-G:master

Conversation

@cozzyd
Copy link
Copy Markdown

@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
Copy Markdown
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