All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
@ 2020-06-01 13:56 Heinrich Schuchardt
  2020-06-01 14:43 ` André Przywara
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2020-06-01 13:56 UTC (permalink / raw)
  To: u-boot

Provide accurate values of the manufacturer and the product name.

PINE Microsystems Inc. is referred to on https://www.pine64.org/contact/.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 configs/pine64-lts_defconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
index ef108a1a31..a8ff34a376 100644
--- a/configs/pine64-lts_defconfig
+++ b/configs/pine64-lts_defconfig
@@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
 CONFIG_MMC0_CD_PIN=""
 CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_SPL_SPI_SUNXI=y
+CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
 CONFIG_SUN8I_EMAC=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_OHCI_HCD=y
+CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
--
2.26.2

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

* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
  2020-06-01 13:56 [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties Heinrich Schuchardt
@ 2020-06-01 14:43 ` André Przywara
  2020-06-01 16:20   ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: André Przywara @ 2020-06-01 14:43 UTC (permalink / raw)
  To: u-boot

On 01/06/2020 14:56, Heinrich Schuchardt wrote:
> Provide accurate values of the manufacturer and the product name.
> 
> PINE Microsystems Inc. is referred to on https://www.pine64.org/contact/.

While this patch looks alright, I wonder if we can just use the "model"
property in the DT's root node, at least for the product name? This
would not only avoid every defconfig to be touched, but would also cover
all other platforms (at least ARM based ones, probably PPC and MIPS as
well).

The manufacturer is less straight-forward to handle generically, but the
string before the comma in the DT root's compatible property should give
a hint. The Linux kernel contains a machine readable list of those
prefixes: Documentation/devicetree/bindings/vendor-prefixes.yaml
So we could pick the vendor at compile time based on that.
Of course any config could still overwrite this.

Does that make sense?
If people agree, I could try to make a patch for that.

Cheers,
Andre.

> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  configs/pine64-lts_defconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
> index ef108a1a31..a8ff34a376 100644
> --- a/configs/pine64-lts_defconfig
> +++ b/configs/pine64-lts_defconfig
> @@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
>  CONFIG_MMC0_CD_PIN=""
>  CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>  CONFIG_SPL_SPI_SUNXI=y
> +CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
>  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
>  CONFIG_SUN8I_EMAC=y
>  CONFIG_USB_EHCI_HCD=y
>  CONFIG_USB_OHCI_HCD=y
> +CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
> --
> 2.26.2
> 

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

* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
  2020-06-01 14:43 ` André Przywara
@ 2020-06-01 16:20   ` Heinrich Schuchardt
  2020-06-14 15:48     ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2020-06-01 16:20 UTC (permalink / raw)
  To: u-boot

On 6/1/20 4:43 PM, Andr? Przywara wrote:
> On 01/06/2020 14:56, Heinrich Schuchardt wrote:
>> Provide accurate values of the manufacturer and the product name.
>>
>> PINE Microsystems Inc. is referred to on https://www.pine64.org/contact/.
>
> While this patch looks alright, I wonder if we can just use the "model"
> property in the DT's root node, at least for the product name? This
> would not only avoid every defconfig to be touched, but would also cover
> all other platforms (at least ARM based ones, probably PPC and MIPS as
> well).

The relevant code is in lib/smbios.c. For boards that follow the driver
model you could read the model node here. But that would unnecessarily
increase the code size of the resulting binary. I doubt this would find
Tom's sympathy. So you would have to generate the value at compile time.
I have no clue how to do that.

The model property for the PINE A64 LTS is "Pine64 LTS" while the board
is called "PINE A64-LTS" by the manufacturer
(https://www.pine64.org/devices/single-board-computers/pine-a64-lts/).
So this approach does not lead to the correct result.

>
> The manufacturer is less straight-forward to handle generically, but the
> string before the comma in the DT root's compatible property should give
> a hint. The Linux kernel contains a machine readable list of those
> prefixes: Documentation/devicetree/bindings/vendor-prefixes.yaml
> So we could pick the vendor at compile time based on that.
> Of course any config could still overwrite this.

SMBIOS_MANUFACTURER defaults to SYS_VENDOR which is defined as "sunxi".

The Linux vendor-prefix exists for ARM64 and is missing for the ARM
architecture. So this cannot be a general solution.

For the Pine64 A64-LTS the vendor-prefix is "allwinner". Neither "sunxi"
nor "Allwinner" is the manufacturer of the PINE A64-LTS board.

You have to set SMBIOS_MANUFACTURER on the board level.

>
> Does that make sense?
> If people agree, I could try to make a patch for that.

Please, reconsider the patch as is.

Best regards

Heinrich

>
> Cheers,
> Andre.
>
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>> ---
>>  configs/pine64-lts_defconfig | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
>> index ef108a1a31..a8ff34a376 100644
>> --- a/configs/pine64-lts_defconfig
>> +++ b/configs/pine64-lts_defconfig
>> @@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
>>  CONFIG_MMC0_CD_PIN=""
>>  CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>>  CONFIG_SPL_SPI_SUNXI=y
>> +CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
>>  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>>  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
>>  CONFIG_SUN8I_EMAC=y
>>  CONFIG_USB_EHCI_HCD=y
>>  CONFIG_USB_OHCI_HCD=y
>> +CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
>> --
>> 2.26.2
>>
>

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

* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
  2020-06-01 16:20   ` Heinrich Schuchardt
@ 2020-06-14 15:48     ` Heinrich Schuchardt
  2020-10-08 13:10       ` Heinrich Schuchardt
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2020-06-14 15:48 UTC (permalink / raw)
  To: u-boot

On 6/1/20 6:20 PM, Heinrich Schuchardt wrote:
> On 6/1/20 4:43 PM, Andr? Przywara wrote:
>> On 01/06/2020 14:56, Heinrich Schuchardt wrote:
>>> Provide accurate values of the manufacturer and the product name.
>>>
>>> PINE Microsystems Inc. is referred to on https://www.pine64.org/contact/.
>>
>> While this patch looks alright, I wonder if we can just use the "model"
>> property in the DT's root node, at least for the product name? This
>> would not only avoid every defconfig to be touched, but would also cover
>> all other platforms (at least ARM based ones, probably PPC and MIPS as
>> well).
>
> The relevant code is in lib/smbios.c. For boards that follow the driver
> model you could read the model node here. But that would unnecessarily
> increase the code size of the resulting binary. I doubt this would find
> Tom's sympathy. So you would have to generate the value at compile time.
> I have no clue how to do that.
>
> The model property for the PINE A64 LTS is "Pine64 LTS" while the board
> is called "PINE A64-LTS" by the manufacturer
> (https://www.pine64.org/devices/single-board-computers/pine-a64-lts/).
> So this approach does not lead to the correct result.
>
>>
>> The manufacturer is less straight-forward to handle generically, but the
>> string before the comma in the DT root's compatible property should give
>> a hint. The Linux kernel contains a machine readable list of those
>> prefixes: Documentation/devicetree/bindings/vendor-prefixes.yaml
>> So we could pick the vendor at compile time based on that.
>> Of course any config could still overwrite this.
>
> SMBIOS_MANUFACTURER defaults to SYS_VENDOR which is defined as "sunxi".
>
> The Linux vendor-prefix exists for ARM64 and is missing for the ARM
> architecture. So this cannot be a general solution.
>
> For the Pine64 A64-LTS the vendor-prefix is "allwinner". Neither "sunxi"
> nor "Allwinner" is the manufacturer of the PINE A64-LTS board.
>
> You have to set SMBIOS_MANUFACTURER on the board level.
>
>>
>> Does that make sense?
>> If people agree, I could try to make a patch for that.
>
> Please, reconsider the patch as is.

Hello Andr+e

any comments?

Best regards

Heinrich

>
> Best regards
>
> Heinrich
>
>>
>> Cheers,
>> Andre.
>>
>>>
>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>> ---
>>>   configs/pine64-lts_defconfig | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/configs/pine64-lts_defconfig b/configs/pine64-lts_defconfig
>>> index ef108a1a31..a8ff34a376 100644
>>> --- a/configs/pine64-lts_defconfig
>>> +++ b/configs/pine64-lts_defconfig
>>> @@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
>>>   CONFIG_MMC0_CD_PIN=""
>>>   CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>>>   CONFIG_SPL_SPI_SUNXI=y
>>> +CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
>>>   CONFIG_SUN8I_EMAC=y
>>>   CONFIG_USB_EHCI_HCD=y
>>>   CONFIG_USB_OHCI_HCD=y
>>> +CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
>>> --
>>> 2.26.2
>>>
>>
>

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

* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
  2020-06-14 15:48     ` Heinrich Schuchardt
@ 2020-10-08 13:10       ` Heinrich Schuchardt
  2020-10-08 13:26         ` André Przywara
  0 siblings, 1 reply; 6+ messages in thread
From: Heinrich Schuchardt @ 2020-10-08 13:10 UTC (permalink / raw)
  To: u-boot

On 14.06.20 17:48, Heinrich Schuchardt wrote:
> On 6/1/20 6:20 PM, Heinrich Schuchardt wrote:
>> On 6/1/20 4:43 PM, Andr? Przywara wrote:
>>> On 01/06/2020 14:56, Heinrich Schuchardt wrote:
>>>> Provide accurate values of the manufacturer and the product name.
>>>>
>>>> PINE Microsystems Inc. is referred to on
>>>> https://www.pine64.org/contact/.
>>>
>>> While this patch looks alright, I wonder if we can just use the "model"
>>> property in the DT's root node, at least for the product name? This
>>> would not only avoid every defconfig to be touched, but would also cover
>>> all other platforms (at least ARM based ones, probably PPC and MIPS as
>>> well).
>>
>> The relevant code is in lib/smbios.c. For boards that follow the driver
>> model you could read the model node here. But that would unnecessarily
>> increase the code size of the resulting binary. I doubt this would find
>> Tom's sympathy. So you would have to generate the value at compile time.
>> I have no clue how to do that.
>>
>> The model property for the PINE A64 LTS is "Pine64 LTS" while the board
>> is called "PINE A64-LTS" by the manufacturer
>> (https://www.pine64.org/devices/single-board-computers/pine-a64-lts/).
>> So this approach does not lead to the correct result.
>>
>>>
>>> The manufacturer is less straight-forward to handle generically, but the
>>> string before the comma in the DT root's compatible property should give
>>> a hint. The Linux kernel contains a machine readable list of those
>>> prefixes: Documentation/devicetree/bindings/vendor-prefixes.yaml
>>> So we could pick the vendor at compile time based on that.
>>> Of course any config could still overwrite this.
>>
>> SMBIOS_MANUFACTURER defaults to SYS_VENDOR which is defined as "sunxi".
>>
>> The Linux vendor-prefix exists for ARM64 and is missing for the ARM
>> architecture. So this cannot be a general solution.
>>
>> For the Pine64 A64-LTS the vendor-prefix is "allwinner". Neither "sunxi"
>> nor "Allwinner" is the manufacturer of the PINE A64-LTS board.
>>
>> You have to set SMBIOS_MANUFACTURER on the board level.
>>
>>>
>>> Does that make sense?
>>> If people agree, I could try to make a patch for that.
>>
>> Please, reconsider the patch as is.
>
> Hello Andr+e
>
> any comments?
>
> Best regards
>
> Heinrich


Hello Andre,

did you work on your idea of using the model property? Or can Jagan take
the patch as is?

Best regards

Heinrich

>
>>
>> Best regards
>>
>> Heinrich
>>
>>>
>>> Cheers,
>>> Andre.
>>>
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>>> ---
>>>> ? configs/pine64-lts_defconfig | 2 ++
>>>> ? 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/configs/pine64-lts_defconfig
>>>> b/configs/pine64-lts_defconfig
>>>> index ef108a1a31..a8ff34a376 100644
>>>> --- a/configs/pine64-lts_defconfig
>>>> +++ b/configs/pine64-lts_defconfig
>>>> @@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
>>>> ? CONFIG_MMC0_CD_PIN=""
>>>> ? CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>>>> ? CONFIG_SPL_SPI_SUNXI=y
>>>> +CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
>>>> ? # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>>>> ? CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
>>>> ? CONFIG_SUN8I_EMAC=y
>>>> ? CONFIG_USB_EHCI_HCD=y
>>>> ? CONFIG_USB_OHCI_HCD=y
>>>> +CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
>>>> --
>>>> 2.26.2
>>>>
>>>
>>
>

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

* [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
  2020-10-08 13:10       ` Heinrich Schuchardt
@ 2020-10-08 13:26         ` André Przywara
  0 siblings, 0 replies; 6+ messages in thread
From: André Przywara @ 2020-10-08 13:26 UTC (permalink / raw)
  To: u-boot

On 08/10/2020 14:10, Heinrich Schuchardt wrote:

Hi,

> On 14.06.20 17:48, Heinrich Schuchardt wrote:
>> On 6/1/20 6:20 PM, Heinrich Schuchardt wrote:
>>> On 6/1/20 4:43 PM, Andr? Przywara wrote:
>>>> On 01/06/2020 14:56, Heinrich Schuchardt wrote:
>>>>> Provide accurate values of the manufacturer and the product name.
>>>>>
>>>>> PINE Microsystems Inc. is referred to on
>>>>> https://www.pine64.org/contact/.
>>>>
>>>> While this patch looks alright, I wonder if we can just use the "model"
>>>> property in the DT's root node, at least for the product name? This
>>>> would not only avoid every defconfig to be touched, but would also cover
>>>> all other platforms (at least ARM based ones, probably PPC and MIPS as
>>>> well).
>>>
>>> The relevant code is in lib/smbios.c. For boards that follow the driver
>>> model you could read the model node here. But that would unnecessarily
>>> increase the code size of the resulting binary. I doubt this would find
>>> Tom's sympathy. So you would have to generate the value at compile time.
>>> I have no clue how to do that.
>>>
>>> The model property for the PINE A64 LTS is "Pine64 LTS" while the board
>>> is called "PINE A64-LTS" by the manufacturer
>>> (https://www.pine64.org/devices/single-board-computers/pine-a64-lts/).
>>> So this approach does not lead to the correct result.
>>>
>>>>
>>>> The manufacturer is less straight-forward to handle generically, but the
>>>> string before the comma in the DT root's compatible property should give
>>>> a hint. The Linux kernel contains a machine readable list of those
>>>> prefixes: Documentation/devicetree/bindings/vendor-prefixes.yaml
>>>> So we could pick the vendor at compile time based on that.
>>>> Of course any config could still overwrite this.
>>>
>>> SMBIOS_MANUFACTURER defaults to SYS_VENDOR which is defined as "sunxi".
>>>
>>> The Linux vendor-prefix exists for ARM64 and is missing for the ARM
>>> architecture. So this cannot be a general solution.
>>>
>>> For the Pine64 A64-LTS the vendor-prefix is "allwinner". Neither "sunxi"
>>> nor "Allwinner" is the manufacturer of the PINE A64-LTS board.
>>>
>>> You have to set SMBIOS_MANUFACTURER on the board level.
>>>
>>>>
>>>> Does that make sense?
>>>> If people agree, I could try to make a patch for that.
>>>
>>> Please, reconsider the patch as is.
>>
>> Hello Andr+e
>>
>> any comments?
>>
>> Best regards
>>
>> Heinrich
> 
> 
> Hello Andre,
> 
> did you work on your idea of using the model property? Or can Jagan take
> the patch as is?

No, I didn't have time to tackle this yet.

So yes, please Jagan, take this patch as it.

Cheers,
Andre

>>
>>>
>>> Best regards
>>>
>>> Heinrich
>>>
>>>>
>>>> Cheers,
>>>> Andre.
>>>>
>>>>>
>>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>>>>> ---
>>>>> ? configs/pine64-lts_defconfig | 2 ++
>>>>> ? 1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/configs/pine64-lts_defconfig
>>>>> b/configs/pine64-lts_defconfig
>>>>> index ef108a1a31..a8ff34a376 100644
>>>>> --- a/configs/pine64-lts_defconfig
>>>>> +++ b/configs/pine64-lts_defconfig
>>>>> @@ -8,8 +8,10 @@ CONFIG_DRAM_ZQ=3881949
>>>>> ? CONFIG_MMC0_CD_PIN=""
>>>>> ? CONFIG_MMC_SUNXI_SLOT_EXTRA=2
>>>>> ? CONFIG_SPL_SPI_SUNXI=y
>>>>> +CONFIG_SMBIOS_PRODUCT_NAME="PINE A64-LTS"
>>>>> ? # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
>>>>> ? CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-lts"
>>>>> ? CONFIG_SUN8I_EMAC=y
>>>>> ? CONFIG_USB_EHCI_HCD=y
>>>>> ? CONFIG_USB_OHCI_HCD=y
>>>>> +CONFIG_SMBIOS_MANUFACTURER="PINE Microsystems Inc."
>>>>> --
>>>>> 2.26.2
>>>>>
>>>>
>>>
>>
> 

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

end of thread, other threads:[~2020-10-08 13:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-01 13:56 [PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties Heinrich Schuchardt
2020-06-01 14:43 ` André Przywara
2020-06-01 16:20   ` Heinrich Schuchardt
2020-06-14 15:48     ` Heinrich Schuchardt
2020-10-08 13:10       ` Heinrich Schuchardt
2020-10-08 13:26         ` André Przywara

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.