[PATCH 1/1] sunxi: Pine64-LTS: SMBIOS properties
Heinrich Schuchardt
xypron.glpk at gmx.de
Thu Oct 8 15:10:02 CEST 2020
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 at 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
>>>>
>>>
>>
>
More information about the U-Boot
mailing list