starfive-tech / u-boot

44 stars 33 forks source link

Default value of fdtoverlay_addr_r #26

Closed mkszuba closed 1 year ago

mkszuba commented 3 years ago

Unless I have missed something, declaring this at build time is the only way of having u-boot support device-tree overlays when distro boot is in use. Would be nice to have this included officially... For what it's worth, what I did on my end (i.e. with self-compiled u-boot on a BeagleV Starlight beta board) was, in include/configs/starfive-jh7100.h, bump ramdisk_addr_r to 0x88400000 and set fdtoverlay_addr_r to 0x88300000 - and it seems to work fine.

tekkamanninja commented 3 years ago

Unless I have missed something, declaring this at build time is the only way of having u-boot support device-tree overlays when distro boot is in use. Would be nice to have this included officially... For what it's worth, what I did on my end (i.e. with self-compiled u-boot on a BeagleV Starlight beta board) was, in include/configs/starfive-jh7100.h, bump ramdisk_addr_r to 0x88400000 and set fdtoverlay_addr_r to 0x88300000 - and it seems to work fine.

Hi @mkszuba , Great thanks for your info , we have moved ramdisk_addr_r to the uEnv.txt file in /boot/ of 'boot' partition, you can find this file in our latest image, so if you need this fdtoverlay_addr_r , we should set it up in our image but not u-boot.

FYI : https://github.com/starfive-tech/u-boot/blob/847782ca05298a73d5a022c60c597436d21bb694/include/configs/starfive-jh7100.h#L69

https://fedora.starfivetech.com/pub/downloads/BeagleV-release/Fedora-riscv64-developer-xfce-with-esp-Rawhide-20210824.n.0-sda.raw.zst

tekkamanninja commented 3 years ago

We will test: ramdisk_addr_r=0x88400000 fdtoverlay_addr_r=0x88300000 if this works well, we will put it into the uEnv.txt file of our image

tekkamanninja commented 3 years ago

We will test: ramdisk_addr_r=0x88400000 fdtoverlay_addr_r=0x88300000 if this works well, we will put it into the uEnv.txt file of our image

@mkszuba I have tried it , but since we are using grub to boot linux. we don't need those variables , and also can boot Fedora. So we can add

ramdisk_addr_r=0x88400000
fdtoverlay_addr_r=0x88300000

if you really need it . and I would like to know how you use it, since I never use it before .

MichaIng commented 1 year ago

IMO it still makes sense to set this in the default U-Boot environment. It does not hurt even if it remains unused. It is about making this U-Boot build as compatible as possible, and for extlinux, it is the required standard for making use of the fdtoverlays directive.

MichaIng commented 1 year ago

PR up to add it for the VisionFive 2: #44

The variable is btw listed as "required" in upstream U-Boot docs, so to comply is another argument to add it: https://github.com/u-boot/u-boot/blob/master/doc/develop/distro.rst#required-environment-variables

JamiKettunen commented 1 year ago

@MichaelZhuxx thanks for the merges for VisionFive V2!

I believe this should still be re-opened as it remains an issue on the VisionFive V1 (which it was originally reported against)? #31 (and seems also #32) exists to address it afaik