diff mbox series

package/linux-firmware: Add new option for Marvell prestera firmware

Message ID 20230831081517.546751-1-kory.maincent@bootlin.com
State Accepted
Headers show
Series package/linux-firmware: Add new option for Marvell prestera firmware | expand

Commit Message

Kory Maincent Aug. 31, 2023, 8:15 a.m. UTC
From: Kory Maincent <kory.maincent@bootlin.com>

Add the Marvell prestera ethernet cards firmwares.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
 package/linux-firmware/Config.in         | 5 +++++
 package/linux-firmware/linux-firmware.mk | 5 +++++
 2 files changed, 10 insertions(+)

Comments

Thomas Petazzoni Sept. 2, 2023, 8:24 a.m. UTC | #1
Hello Köry,

On Thu, 31 Aug 2023 10:15:16 +0200
Köry Maincent via buildroot <buildroot@buildroot.org> wrote:

> From: Kory Maincent <kory.maincent@bootlin.com>
> 
> Add the Marvell prestera ethernet cards firmwares.
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
>  package/linux-firmware/Config.in         | 5 +++++
>  package/linux-firmware/linux-firmware.mk | 5 +++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in
> index 3ae72564cc..402e75c890 100644
> --- a/package/linux-firmware/Config.in
> +++ b/package/linux-firmware/Config.in
> @@ -513,6 +513,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169
>  	help
>  	  Firmware files for Realtek 8169 gigabit ethernet cards
>  
> +config BR2_PACKAGE_LINUX_FIRMWARE_MARVELL_PRESTERA
> +	bool "Marvell Prestera"
> +	help
> +	  Firmware files for Marvell Prestera ethernet cards
> +

Alphabetic ordering here was not correct so I fixed that up.

> +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MARVELL_PRESTERA),y)
> +LINUX_FIRMWARE_FILES += \
> +	mrvl/prestera/mvsw_prestera_fw*.img

You forgot the license file here, and adding its hash. I fixed that up
as well.

One thing I wondered is:

-rw-r--r--. 1 thomas thomas 17M  4 août  12:33 mvsw_prestera_fw_arm64-v4.1.img
-rwxr-xr-x. 1 thomas thomas 14M  4 août  12:33 mvsw_prestera_fw-v2.0.img
-rwxr-xr-x. 1 thomas thomas 14M  4 août  12:33 mvsw_prestera_fw-v3.0.img
-rw-r--r--. 1 thomas thomas 15M  4 août  12:33 mvsw_prestera_fw-v4.0.img
-rw-r--r--. 1 thomas thomas 15M  4 août  12:33 mvsw_prestera_fw-v4.1.img

i.e, each FW file is ~15 MB, but only one will actually be loaded by
the driver. Not sure if this warrants a Config.in for each FW version,
or if we just let people remove the firmware files they don't use in a
post-build script.

Anyway, I applied your patch to next, with the fixes described above.

Thanks!

Thomas
diff mbox series

Patch

diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in
index 3ae72564cc..402e75c890 100644
--- a/package/linux-firmware/Config.in
+++ b/package/linux-firmware/Config.in
@@ -513,6 +513,11 @@  config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169
 	help
 	  Firmware files for Realtek 8169 gigabit ethernet cards
 
+config BR2_PACKAGE_LINUX_FIRMWARE_MARVELL_PRESTERA
+	bool "Marvell Prestera"
+	help
+	  Firmware files for Marvell Prestera ethernet cards
+
 endmenu
 
 menu "DVB firmware"
diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
index 01718fa1e0..d4850307ca 100644
--- a/package/linux-firmware/linux-firmware.mk
+++ b/package/linux-firmware/linux-firmware.mk
@@ -616,6 +616,11 @@  LINUX_FIRMWARE_FILES += \
 	rtl_nic/rtl8411-2.fw
 endif
 
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MARVELL_PRESTERA),y)
+LINUX_FIRMWARE_FILES += \
+	mrvl/prestera/mvsw_prestera_fw*.img
+endif
+
 ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_XCx000),y)
 LINUX_FIRMWARE_FILES += \
 	dvb-fe-xc4000-1.4.1.fw \