[Buildroot] [PATCH] board/broadcom: add support for BCM4908 platform devices

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Aug 19 21:41:42 UTC 2021


Hello Rafał,

On Thu, 12 Aug 2021 12:52:58 +0200
Rafał Miłecki <zajec5 at gmail.com> wrote:

> From: Rafał Miłecki <rafal at milecki.pl>
> 
> BCM4908 is Broadcom's 64-bit platform with Broadcom's own Brahma-B53
> CPU(s). It's mostly used for home routers.
> 
> Kernel config is a minimal setup required to support on-SoC blocks like
> NAND controller, Ethernet, switch, USB.
> 
> To make kernels 5.12+ boot those boards require a hacky patch modifying
> hyp-stub.S. That booting problem will hopefully get fixes on day in
> upstream kernel code.
> 
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>

Here again this defconfig does not build any bootloader. Most Buildroot
defconfigs normally try to build the whole software stack, including
the bootloader/firmware. Any reason not to do so here? Also why is an
initramfs used?

> ---
>  board/broadcom/bcm4908/linux.config           | 42 +++++++++++++++++++
>  .../0001-arm64-don-t-issue-HVC-on-boot.patch  | 32 ++++++++++++++
>  configs/broadcom_bcm4908_defconfig            | 12 ++++++
>  3 files changed, 86 insertions(+)

board/broadcom/bcm4908/readme.txt needed, as well as an update to the
DEVELOPERS file.


> +++ b/board/broadcom/bcm4908/linux.config
> @@ -0,0 +1,42 @@
> +CONFIG_BLK_DEV_INITRD=y
> +CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio"

Not needed, will be added by Buildroot.


> diff --git a/configs/broadcom_bcm4908_defconfig b/configs/broadcom_bcm4908_defconfig
> new file mode 100644
> index 0000000..c6310de
> --- /dev/null
> +++ b/configs/broadcom_bcm4908_defconfig
> @@ -0,0 +1,12 @@
> +BR2_aarch64=y
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.13.9"
> +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/broadcom/bcm4908/linux.config"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm4908/bcm4906-netgear-r8000p broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1 broadcom/bcm4908/bcm4908-asus-gt-ac5300"
> +BR2_PACKAGE_LINUX_FIRMWARE=y

Added, but no firmware enabled?

> +BR2_PACKAGE_BRIDGE_UTILS=y

Not needed.

> +BR2_TARGET_ROOTFS_INITRAMFS=y
> +# BR2_TARGET_ROOTFS_TAR is not set

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list