From owner-freebsd-arm@freebsd.org Wed Mar 27 20:22:07 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 331291559F81 for ; Wed, 27 Mar 2019 20:22:07 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from mout0.freenet.de (mout0.freenet.de [IPv6:2001:748:100:40::2:2]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (Client CN "*.freenet.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9456E8D709 for ; Wed, 27 Mar 2019 20:22:06 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from [195.4.92.165] (helo=mjail2.freenet.de) by mout0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.90_1 #2) id 1h9F3l-0005ME-Ju for freebsd-arm@freebsd.org; Wed, 27 Mar 2019 21:22:05 +0100 Received: from [::1] (port=46392 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1h9F3l-0004EH-7q for freebsd-arm@freebsd.org; Wed, 27 Mar 2019 21:22:05 +0100 Received: from sub8.freenet.de ([195.4.92.127]:57350) by mjail2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1h9F1b-0000MH-Gy for freebsd-arm@freebsd.org; Wed, 27 Mar 2019 21:19:51 +0100 Received: from p4fd9f530.dip0.t-ipconnect.de ([79.217.245.48]:31151 helo=freebsd-t450.fritz.box) by sub8.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 587) (Exim 4.90_1 #2) id 1h9F1b-0007xG-OX for freebsd-arm@freebsd.org; Wed, 27 Mar 2019 21:19:51 +0100 Date: Wed, 27 Mar 2019 21:19:49 +0100 From: Manuel =?iso-8859-15?Q?St=FChn?= To: freebsd-arm@freebsd.org Subject: Re: efi-loader ignores dtb files? Message-ID: <20190327201949.GA71432@freebsd-t450.fritz.box> References: <20190327192320.GA64908@freebsd-t450.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-Originated-At: 79.217.245.48!31151 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 20:22:07 -0000 On Wed, Mar 27, 2019 at 02:35:26PM -0500, Kyle Evans wrote: >On Wed, Mar 27, 2019 at 2:26 PM Manuel Stühn wrote: >> >> While trying to get FreeBSD 12.0 up and running on a NanoPI NEO2 >> (aarch64 Allwinner H5) I'm stumbling over issues with >> loader/loader.conf. FreeBSD starts fine, but it uses the >> devicetree-blob provided by uboot/EFI. I've tried to load the FreeBSD >> one by adding these lines to loader.conf: >> >> sun50i-h5-nanopi-neo2.dtb_load="YES" >> sun50i-h5-nanopi-neo2.dtb_type="dtb" >> >> and put the dtb file into /boot/dtb/sun50i-h5-nanopi-neo2.dtb, but this >> did not work at all. It got completely ignored by loader. The rest of >> the file was read and applied correctly (kernel-modules i'd added for >> testing purposes were loaded correctly). >> >> I tried to load it by hand like this: >> >> load -t dtb sun50i-h5-nanopi-neo2.dtb >> >> which worked, the dtb file was loaded and used. After consulting >> loader.conf(5) i found this way to load modules: >> >> dtbfile_load="YES" >> dtbfile_type="dtb" >> dtbfile_name="sun50i-h5-nanopi-neo2.dtb" >> >> and this finally triggered loader(8) to actually load the dtb. >> Unfortunatley the problem occurred again when i tried to add overlays. >> Those are, again, not recognized at all: >> >> /boot/loader.conf: >> fdt_overlays="sun50i-nanopi-neo2-codec.dtbo,sun50i-nanopi-neo2-sid.dtbo,sun50i-nanopi-neo2-ths.dtbo" >> >> Any ideas? > >Yes- for your first problem, loader doesn't recognize a period as a >valid module name, so those directives would not have gotten >recognized as modules to load. > >I'm not sure off-hand why fdt_overlays were not recognized. I would >drop to loader prompt and double check that it actually ended up in >the environment, but I don't see any reason off-hand that it wouldn't. >It might be a good idea to drop to loader prompt and trigger overlay >application. No output at all? Output right after the screen-cleaning: Loading kernel... /boot/kernel/kernel text=0x8dec2b data=0x181cf8+0x7998d4 syms=[0x8+0x11dc60+0x8+0x11017c] Loading configured modules... sun50i-h5-nanopi-neo2.dtb.../boot/dtb/sun50i-h5-nanopi-neo2.dtb size=0x587a /boot/entropy.../boot/entropy size=0x1000 Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB from loaded file '/boot/dtb/sun50i-h5-nanopi-neo2.dtb'. EHCI failed to shut down host controller. EHCI failed to shut down host controller. ---<>--- Copyright (c) 1992-2018 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 12.0-RELEASE #25 5e1256de69f(feature/NanoPI-NEO2)-dirty: Wed Mar 27 18:32:11 CET 2019 root@nanopi-neo2:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) VT: init without driver. Starting CPU 1 (1) Starting CPU 2 (2) Starting CPU 3 (3) [...] >> BTW, is there a way to keep the u-boot logs printed before the >> FreeBSD-boot-menu gets drawn? The console gets cleared and erases some >> (valuable?) information. I was always to slow to stop the boot right >> after the last line of u-boot and the first of EFI. > >Any reason you need to keep the loader menu? Only for debugging puroposes. I would've liked to see what the output was right before the screen got cleared. I tried to disable the menu but this did now stop the clearing. > Disabling it >(beastie_disable="YES") and lack of password prompts will stop the >screen clearing in recent-ish versions of the lua scripts from head. > >Thanks, > >Kyle Evans Thanks! -- Manuel