On 13.10.17 11:17, Frank Kunz wrote: > Hi, > > 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. > 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. You could also create a custom boot.scr that gets picked up from $bootcmd in U-Boot and which you can then use to assemble your device tree from the base + overlays and then jump into efi boot code. Or you could take the device tree from Linux (dtc -I fs -O dts /proc/device-tree), add the bits you need and put the resulting file in /boot/dtb/<$fdtname in U-Boot>.dtb. To see the U-Boot variables, just abort the boot by pressing a key very early and type "printenv". Alex -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
