Am Freitag, 13. Oktober 2017, 12:10:47 CEST schrieb Andreas Färber: > Am 13.10.2017 um 11:22 schrieb Alexander Graf: > > On 13.10.17 11:17, Frank Kunz wrote: > >> I'm doing some test with EFI boot on an olinuxino board here: https:// > >> build.opensuse.org/package/show/home:frank_kunz:branches:openSUSE:Factory > >> :ARM/ JeOS-olinuxinolime > >> > >> The image works and the kernel has a device-tree visible under > >> /proc/device- tree. With non EFI configurations the device-tree is > >> loaded by uboot from the boot partition dtb directory and is then passed > >> to the kernel by boot command. For EFI there is no dtb directory. Also I > >> haven't found a *.dtb file on the filesystem anywhere. > >> > >> How does the kernel get the device-tree in EFI boot mode? > > > > It gets it from either a device tree that gets loaded from /boot/dtb or > > if none is found from the built-in device tree that U-Boot contains.
I successfully tried that by compiling a dtb file out of the upstream kernel tree and copied it to the target board. U-boot then u-boot tries to load the file from the first partition, which is the EFI partition. So then the correct path on Linux is then /boot/efi/dtb. > > > >> The background is that some hardware specific configurations need to be > >> done per use case in the device-tree. E.g. adding a battery or a touch > >> screen. Without the device-tree settings the kernel will not probe the > >> devices. Enabling that on u-boot boot mode can be done by either > >> modifying the device-tree file or create overlays and load them by > >> u-boot script with "fdt apply" command. How can this be configured in > >> EFI mode? > > > > There are a couple of approaches. I think by now you can add dt overlays > > on demand even after the kernel is loaded, so you could just have a > > systemd service adding them for you. > > Please provide proof of such a feature - I don't believe it's in 4.13, > and I haven't noticed it in 4.14-rc yet. Patchsets have been around for > a long time... > > Depending on what overlay operation is desired, fdt apply could just > operate on $fdtcontroladdr for the internal tree today. So far the only some u-boot configurations have the OF_LIBFDT_OVERLAY configuration set. Without that the "fdt apply" command is not supported. Also the distroboot environment is not supporting "fdt apply" yet. I think with that, for the moment, supporting fdt overlays would be then a opensuse specific configuration in boot.scr. That is then similar as raspibian and armbian are doing it. They read a *Env.txt file which contains a list of overlay file names. Br, Frank -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
