[PATCH v5 00/17] Basic StarFive JH7110 RISC-V SoC support

yanhong wang yanhong.wang at starfivetech.com
Thu May 4 04:35:09 CEST 2023



On 2023/5/2 21:24, Heinrich Schuchardt wrote:
> On 5/2/23 15:11, Andreas Schwab wrote:
>> On Mai 02 2023, Matthias Brugger wrote:
>>
>>> I'm not sure I get your point. The devicetree will be passed to the kernel
>>> via a pointer in a register, the kernel does not need to load the
>>> devicetree into memory, it will use the one passed by U-Boot.
>>
>> But U-Boot needs to load it, and the kernel is the authority in
>> providing it.
>>
> 
> To make it a bit clearer:
> 
> Several U-Boot boot methods use the value of environment variable $fdtfile to load a device-tree from file. The same holds true for the boot.scr file created by Debian's flash-kernel package.
> 
> A good solution would be to read the EEPROM to determine the exact board version, to set $fdtfile accordingly and update U-Boots control dtb as needed.
> 

The patcheset have implemented the reading of PCB versions from EEPROM and the 
configuration of gmac device tree nodes according to different PCB versions, 
which can achieve a bin file compatible with both versions 1.2A and 1.3B.

The patcheset link:
https://patchwork.ozlabs.org/project/uboot/cover/20230428022515.29393-1-yanhong.wang@starfivetech.com/

> Best regards
> 
> Heinrich


More information about the U-Boot mailing list