All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] board/broadcom: add support for bcm47xx platform devices
@ 2021-10-21  8:55 Rafał Miłecki
  2022-01-13 21:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2021-10-21  8:55 UTC (permalink / raw)
  To: buildroot; +Cc: Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Broadcom's bcm47xx is a family of MIPS SoCs going back to the 2002 and
including e.g. Linksys WRT54G with its BCM4702. It evolved through years
and its latest model BCM4706 is still in use nowadays.

Pretty much all SoCs contain all following components:
1. CPU
2. PCIe controller(s)
3. Ethernet interface(s)
4. USB controllers
5. Serial flash controller
6. GPIO controller (for LEDs and buttons)
7. Watchdog

Upstream kernel includes a pretty much complete support for bcm47xx but
it isn't DTS based. Board detection is handled on runtime so there is
one kernel image to serve all.

Bootloader used in those devices is CFE. It allows booting kernel over
tftp and flashing firmwares using TRX format. It isn't properly open
sourced (except some early versions) and in practice it's irreplaceable.

This commit adds support for building a bootable kernel based on 5.4
stable release:
Starting program at 0x80001000
Linux version 5.4.155 (rmilecki@localhost.localdomain) (gcc version 10.3.0 (Buildroot 2021.08-930-gc0c925605d)) #5 Thu Oct 21 10:16:20 CEST 2021

Linux 5.10 doesn't start booting due to some regression that remains to
be debugged. Adding support for building full images (including rootfs)
is also planned for the future.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 board/broadcom/bcm47xx/linux.config | 28 ++++++++++++++++++++++++++++
 configs/broadcom_bcm47xx_defconfig  |  8 ++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 board/broadcom/bcm47xx/linux.config
 create mode 100644 configs/broadcom_bcm47xx_defconfig

diff --git a/board/broadcom/bcm47xx/linux.config b/board/broadcom/bcm47xx/linux.config
new file mode 100644
index 0000000000..30976759d9
--- /dev/null
+++ b/board/broadcom/bcm47xx/linux.config
@@ -0,0 +1,28 @@
+CONFIG_EMBEDDED=y
+CONFIG_BCM47XX=y
+CONFIG_CPU_MIPS32_R2=y
+# CONFIG_MIPS_FP_SUPPORT is not set
+CONFIG_HIGHMEM=y
+# CONFIG_SUSPEND is not set
+CONFIG_PCI=y
+CONFIG_MTD=y
+CONFIG_MTD_BCM47XX_PARTS=y
+CONFIG_MTD_PARSER_TRX=y
+CONFIG_MTD_BCM47XXSFLASH=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_WATCHDOG=y
+CONFIG_BCM47XX_WDT=y
+CONFIG_BCMA_DRIVER_GMAC_CMN=y
+CONFIG_USB=y
+CONFIG_USB_HCD_BCMA=y
+CONFIG_USB_HCD_SSB=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE="console=ttyS0,115200"
diff --git a/configs/broadcom_bcm47xx_defconfig b/configs/broadcom_bcm47xx_defconfig
new file mode 100644
index 0000000000..7b4aa16429
--- /dev/null
+++ b/configs/broadcom_bcm47xx_defconfig
@@ -0,0 +1,8 @@
+BR2_mipsel=y
+BR2_KERNEL_HEADERS_5_4=y
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.155"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/broadcom/bcm47xx/linux.config"
+BR2_LINUX_KERNEL_VMLINUX=y
-- 
2.31.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] board/broadcom: add support for bcm47xx platform devices
  2021-10-21  8:55 [Buildroot] [PATCH] board/broadcom: add support for bcm47xx platform devices Rafał Miłecki
@ 2022-01-13 21:42 ` Thomas Petazzoni
  2022-01-13 21:56   ` Rafał Miłecki
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2022-01-13 21:42 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: Rafał Miłecki, buildroot

Hello Rafał,

On Thu, 21 Oct 2021 10:55:40 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Broadcom's bcm47xx is a family of MIPS SoCs going back to the 2002 and
> including e.g. Linksys WRT54G with its BCM4702. It evolved through years
> and its latest model BCM4706 is still in use nowadays.
> 
> Pretty much all SoCs contain all following components:
> 1. CPU
> 2. PCIe controller(s)
> 3. Ethernet interface(s)
> 4. USB controllers
> 5. Serial flash controller
> 6. GPIO controller (for LEDs and buttons)
> 7. Watchdog
> 
> Upstream kernel includes a pretty much complete support for bcm47xx but
> it isn't DTS based. Board detection is handled on runtime so there is
> one kernel image to serve all.
> 
> Bootloader used in those devices is CFE. It allows booting kernel over
> tftp and flashing firmwares using TRX format. It isn't properly open
> sourced (except some early versions) and in practice it's irreplaceable.
> 
> This commit adds support for building a bootable kernel based on 5.4
> stable release:
> Starting program at 0x80001000
> Linux version 5.4.155 (rmilecki@localhost.localdomain) (gcc version 10.3.0 (Buildroot 2021.08-930-gc0c925605d)) #5 Thu Oct 21 10:16:20 CEST 2021
> 
> Linux 5.10 doesn't start booting due to some regression that remains to
> be debugged. Adding support for building full images (including rootfs)
> is also planned for the future.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
>  board/broadcom/bcm47xx/linux.config | 28 ++++++++++++++++++++++++++++
>  configs/broadcom_bcm47xx_defconfig  |  8 ++++++++
>  2 files changed, 36 insertions(+)
>  create mode 100644 board/broadcom/bcm47xx/linux.config
>  create mode 100644 configs/broadcom_bcm47xx_defconfig

Thanks for this contribution, but it doesn't seem to be really useful
as it is: the root filesystem generated as a tarball is not even used,
and there is no readme.txt. We prefer to have directly useful defconfig
files.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] board/broadcom: add support for bcm47xx platform devices
  2022-01-13 21:42 ` Thomas Petazzoni
@ 2022-01-13 21:56   ` Rafał Miłecki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2022-01-13 21:56 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Rafał Miłecki, buildroot

On 13.01.2022 22:42, Thomas Petazzoni wrote:
> Thanks for this contribution, but it doesn't seem to be really useful
> as it is: the root filesystem generated as a tarball is not even used,
> and there is no readme.txt. We prefer to have directly useful defconfig
> files.

Thank you for your feedback, I'm still "learning" buildroot.

I aim to upstream 3 Broadcom platforms support and I already learnt
about kernel + rootfs + readme.txt in another patch review. I didn't
send V2 for bcm47xx yet, I plan to get back to working on it once I
(hopefully) get:
[PATCH V2] board/broadcom: add support for BCM4908 platform devices

accepted (V2 or another one). I want to learn on 1 platform and then
get other ones. So I'll work on bcm47xx V2 a bit later.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-13 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21  8:55 [Buildroot] [PATCH] board/broadcom: add support for bcm47xx platform devices Rafał Miłecki
2022-01-13 21:42 ` Thomas Petazzoni
2022-01-13 21:56   ` Rafał Miłecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.