Skip to contentSkip to conversation

libretech-cc: Populate SMBIOS information

PATCH In review Tom Rini 5 participants 9 messages Nov 20, 2023 – Nov 22, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 libretech-cc: Populate SMBIOS information

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

---
 .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++++++++++++++++++
 configs/libretech-cc_defconfig                |  2 ++
 2 files changed, 25 insertions(+)
arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi +23 -0
index 39270ea71c8b..e56cd67a9d91 100644
@@ -5,3 +5,26 @@
  */
 
 #include "meson-gxl-u-boot.dtsi"
+
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "libre.computer";
+				product = "Le Potato";
+			};
+
+			baseboard {
+				manufacturer = "libre.computer";
+				product = "Le Potato";
+			};
+
+			chassis {
+				manufacturer = "libre.computer";
+				product = "Le Potato";
+			};
+		};
+	};
+};
configs/libretech-cc_defconfig +2 -0
index baa9b1b3dbc5..24a46f50d0d9 100644
@@ -55,6 +55,8 @@ CONFIG_DM_REGULATOR_FIXED=y
 CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_DEBUG_UART_SKIP_INIT=y
 CONFIG_MESON_SERIAL=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
 CONFIG_USB=y
 CONFIG_DM_USB_GADGET=y
 CONFIG_USB_XHCI_HCD=y
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 7 lines
---
 .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++++++++++++++++++
 configs/libretech-cc_defconfig                |  2 ++
 2 files changed, 25 insertions(+)
maintainer
#2 lore raw
In reply to Tom Rini

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Quoted 15 lines
---
  .../meson-gxl-s905x-libretech-cc-u-boot.dtsi  | 23 +++++++++++++++++++
  configs/libretech-cc_defconfig                |  2 ++
  2 files changed, 25 insertions(+)
arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi +0 -0
index 39270ea71c8b..e56cd67a9d91 100644
@@ -5,3 +5,26 @@
   */
 

arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi line 16

Quoted 10 lines
arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi +9 -0
  #include "meson-gxl-u-boot.dtsi"
+
+/ {
+	smbios {
+		compatible = "u-boot,sysinfo-smbios";
+
+		smbios {
+			system {
+				manufacturer = "libre.computer";
+				product = "Le Potato";

I'll use the real product identifier here instead: AML-S905X-CC

Here's the downstream vendor change:
https://github.com/libre-computer-project/libretech-u-boot/commit/cb68b838f1b80ad201ec02f04d2841ee535b9818

Quoted 19 lines
arch/arm/dts/meson-gxl-s905x-libretech-cc-u-boot.dtsi +14 -0
+			};
+
+			baseboard {
+				manufacturer = "libre.computer";
+				product = "Le Potato";
+			};
+
+			chassis {
+				manufacturer = "libre.computer";
+				product = "Le Potato";
+			};
+		};
+	};
+};
configs/libretech-cc_defconfig +0 -0
index baa9b1b3dbc5..24a46f50d0d9 100644

configs/libretech-cc_defconfig CONFIG_DM_REGULATOR_FIXED=y · line 62

Quoted 8 lines
configs/libretech-cc_defconfig +2 -0
@@ -55,6 +55,8 @@ CONFIG_DM_REGULATOR_FIXED=y
  CONFIG_DEBUG_UART_ANNOUNCE=y
  CONFIG_DEBUG_UART_SKIP_INIT=y
  CONFIG_MESON_SERIAL=y
+CONFIG_SYSINFO=y
+CONFIG_SYSINFO_SMBIOS=y
  CONFIG_USB=y
  CONFIG_DM_USB_GADGET=y
  CONFIG_USB_XHCI_HCD=y

Thanks,
Neil

author
#3 lore raw
Quoted 6 lines · Neil Armstrong

Hi Tom,

Quoted 3 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

Quoted 8 lines
Quoted 5 lines

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

Signature · 1 line
Tom
maintainer
#4 lore raw
Quoted 13 lines · Tom Rini
Quoted 12 lines · Neil Armstrong

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 9 lines
Quoted 2 lines

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:

smbios {
	system {
		manufacturer = "vendor1";
		product = "board-name";
	};

	baseboard {
		manufacturer = "vendor1";
		product = "board-name";
	};

	chassis {
		manufacturer = "vendor1";
		product = "board-name";
	};
};

since the vendor name should be already documented in the linux bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

Neil

author
#5 lore raw
Quoted 49 lines · Neil Armstrong
Quoted 13 lines · Tom Rini
Quoted 12 lines · Neil Armstrong

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 9 lines
Quoted 2 lines

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:

smbios {
	system {
		manufacturer = "vendor1";
		product = "board-name";
	};

	baseboard {
		manufacturer = "vendor1";
		product = "board-name";
	};

	chassis {
		manufacturer = "vendor1";
		product = "board-name";
	};
};
Quoted 5 lines

since the vendor name should be already documented in the linux bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

But I think that since then some thoughts on the subject have changed and that approach might be more welcome now than it was then.

Signature · 1 line
Tom
maintainer
#6 lore raw
Quoted 56 lines · Tom Rini
Quoted 49 lines · Neil Armstrong
Quoted 13 lines · Tom Rini
Quoted 12 lines · Neil Armstrong

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 9 lines
Quoted 2 lines

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:

smbios {
	system {
		manufacturer = "vendor1";
		product = "board-name";
	};

	baseboard {
		manufacturer = "vendor1";
		product = "board-name";
	};

	chassis {
		manufacturer = "vendor1";
		product = "board-name";
	};
};
Quoted 5 lines

since the vendor name should be already documented in the linux bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

Quoted 8 lines

That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

But I think that since then some thoughts on the subject have changed and that approach might be more welcome now than it was then.

Thanks for the pointer, seems I had the exact same idea.
Hope this will be re-spinned, I don't want to add this to the 45 amlogic boards when we have the necessary info already available and documented...

Neil

#7 lore raw

Hi Neil,

Quoted 63 lines · Neil Armstrong
Quoted 61 lines · Tom Rini
Quoted 49 lines · Neil Armstrong
Quoted 13 lines · Tom Rini
Quoted 12 lines · Neil Armstrong

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 9 lines
Quoted 2 lines

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:

smbios {
     system {
             manufacturer = "vendor1";
             product = "board-name";
     };

     baseboard {
             manufacturer = "vendor1";
             product = "board-name";
     };

     chassis {
             manufacturer = "vendor1";
             product = "board-name";
     };
};
Quoted 5 lines

since the vendor name should be already documented in the linux bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 7 lines
Quoted 3 lines

But I think that since then some thoughts on the subject have changed and that approach might be more welcome now than it was then.

Thanks for the pointer, seems I had the exact same idea.
Hope this will be re-spinned, I don't want to add this to the 45 amlogic boards when we have the necessary info already available and documented...

I'll respin the patches Tom mentioned once I find some time to address the comments in v1. Hope to do it by the end of the week

Cheers
/Ilias

Quoted 3 lines

Neil

#8 lore raw
In reply to Neil Armstrong
Quoted 63 lines · Neil Armstrong
Quoted 61 lines · Tom Rini
Quoted 49 lines · Neil Armstrong
Quoted 13 lines · Tom Rini
Quoted 12 lines · Neil Armstrong

Hi Tom,

Quoted 8 lines · Tom Rini

Enable CONFIG_SYSINFO_SMBIOS and populate the nodes so that Linux can eventually display this information

---
Posting this as this was the easiest platform for me to test some SMBIOS related patches on and I needed to populate the nodes so I could check things in dmidecode once Linux was up.

Quoted 9 lines
Quoted 2 lines

Sorry to be late a the party, but can't this be dynamically found from DT's compatible & model ? Since I'll probably need to add this to all boards, it seems like a duplicate of what's already in the DT.

Part of the "fun" as to why we have the binding here is that while we could use the top-level model property, there's not a corresponding one for manufacturer. I'm fine ignoring the patch I posted here and having a longer discussion about populating SMBIOS more usefully, globally, as I think has been suggested a time or two.

I'm ok landing it with the same data as from the vendor.
but couldn't we use the first top-level compatible as default smbios data ?

compatible = "vendor1,board-name", "vendor1,soc-name";

and translate to:

smbios {
     system {
             manufacturer = "vendor1";
             product = "board-name";
     };

     baseboard {
             manufacturer = "vendor1";
             product = "board-name";
     };

     chassis {
             manufacturer = "vendor1";
             product = "board-name";
     };
};
Quoted 5 lines

since the vendor name should be already documented in the linux bindings, same for the board name.
And we would be free to add some custom data in the DT if needed.

Anyway, not sure it's the right place to discuss about that !

That's essentially
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
which had a bunch of comments on 1/2:
https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/

Quoted 7 lines
Quoted 3 lines

But I think that since then some thoughts on the subject have changed and that approach might be more welcome now than it was then.

Thanks for the pointer, seems I had the exact same idea.
Hope this will be re-spinned, I don't want to add this to the 45 amlogic boards when we have the necessary info already available and documented...

Fedora has carried this patch for some time for the same reason, a lot of the tools in distros around support use dmidecode for HW information and reporting "Unknown" meant there was lots of reports against tools all over the place. I'd been asking Ilias to upstream it for a while so I'm in full agreement here and he did mention he would resend it soon :)

Peter