[Feature Request]: Add support for Banana Pi BPI-M2 Berry
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 3.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 204
Description
### Which feature would you like to have?
I was able to boot Armbian on my BPI-M2 Berry using the M2 Ultra image. A change in the used Device Tree also enabled HDMI output and removed the non existent audio input device.
It would be great benefit to officially support M2 Berry as a target, but we should find the most efficient way...
I started with a PR #10478 but missed the supporting board image.
Further, there was the suggestion to use automatic board detection.
The BPI-M2 Berry and Ultra share the exact same R40/V40 SoC architecture. To my mind the primary hardware distinction is the onboard eMMC (MMC2) and audio mic on the Ultra, which are missing on the Berry.
Since Bananapi_M2_Ultra_defconfig (with CONFIG_MMC_SUNXI_SLOT_EXTRA=2) boots fine on the Berry (the missing eMMC simply fails gracefully during MMC probing), we can use a single unified image.
We can dynamically detect the board by checking for eMMC presence (either via U-Boot board.c or in the boot.cmd script) and set fdtfile accordingly to either sun8i-r40-bananapi-m2-ultra.dtb or sun8i-v40-bananapi-m2-berry.dtb. That will solve the Berry HDMI issue without breaking the Ultra.
Should I proceed with the bootscript detection approach, or do you prefer a C-level patch in U-Boot?
And if I should proceed with the bootscript detection, should I extend the existing "boot-sunxi.cmd" or switch to a unique "boot-bananapim2r40.cmd"?
### Funding
- [ ] [I am willing to cover expenses](https://www.armbian.com/contact/)
Contributor guide
Assessment
This issue has not been assessed yet.