From owner-freebsd-arm@freebsd.org Thu Mar 28 18:06:16 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 D985615647F6 for ; Thu, 28 Mar 2019 18:06:15 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from mout2.freenet.de (mout2.freenet.de [195.4.92.92]) (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 D0DE984ABA; Thu, 28 Mar 2019 18:06:14 +0000 (UTC) (envelope-from freebsdnewbie@freenet.de) Received: from [195.4.92.163] (helo=mjail0.freenet.de) by mout2.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (port 25) (Exim 4.90_1 #2) id 1h9ZPi-00024F-A1; Thu, 28 Mar 2019 19:06:06 +0100 Received: from [::1] (port=50274 helo=mjail0.freenet.de) by mjail0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1h9ZPi-0008Bq-8g; Thu, 28 Mar 2019 19:06:06 +0100 Received: from sub7.freenet.de ([195.4.92.126]:50404) by mjail0.freenet.de with esmtpa (ID freebsdnewbie@freenet.de) (Exim 4.90_1 #2) id 1h9ZNc-0003e4-Dp; Thu, 28 Mar 2019 19:03:56 +0100 Received: from p4fd9f268.dip0.t-ipconnect.de ([79.217.242.104]:43459 helo=freebsd-t450.fritz.box) by sub7.freenet.de with esmtpsa (ID freebsdnewbie@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.90_1 #2) id 1h9ZNc-0008BU-6i; Thu, 28 Mar 2019 19:03:56 +0100 Date: Thu, 28 Mar 2019 19:03:55 +0100 From: Manuel =?ISO-8859-1?Q?St=FChn?= To: Kyle Evans Cc: "freebsd-arm@freebsd.org" Subject: Re: efi-loader ignores dtb files? Message-Id: <20190328190355.1459c85b48211905f8a3e04a@freenet.de> In-Reply-To: References: <20190327192320.GA64908@freebsd-t450.fritz.box> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Originated-At: 79.217.242.104!43459 X-Rspamd-Queue-Id: D0DE984ABA X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of freebsdnewbie@freenet.de designates 195.4.92.92 as permitted sender) smtp.mailfrom=freebsdnewbie@freenet.de X-Spamd-Result: default: False [-2.17 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.4.92.0/23]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[freenet.de]; MX_GOOD(-0.01)[cached: emig.freenet.de]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.81)[-0.807,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[92.92.4.195.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[freenet.de]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:5430, ipnet:195.4.0.0/16, country:DE]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.954,0]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[104.242.217.79.zen.spamhaus.org : 127.0.0.10]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freenet.de]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-0.50)[ip: (-0.87), ipnet: 195.4.0.0/16(-0.83), asn: 5430(-0.79), country: DE(-0.01)]; RWL_MAILSPIKE_POSSIBLE(0.00)[92.92.4.195.rep.mailspike.net : 127.0.0.17] 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: Thu, 28 Mar 2019 18:06:16 -0000 On Wed, 27 Mar 2019 14:35:26 -0500 Kyle Evans wrote: > On Wed, Mar 27, 2019 at 2:26 PM Manuel St=FChn = 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=3D"YES" > > sun50i-h5-nanopi-neo2.dtb_type=3D"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=3D"YES" > > dtbfile_type=3D"dtb" > > dtbfile_name=3D"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=3D"sun50i-nanopi-neo2-codec.dtbo,sun50i-nanopi-neo2-sid.dt= bo,sun50i-nanopi-neo2-ths.dtbo" > > > > Any ideas? >=20 > 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. Should it work without period (it does not)? sun50i-h5-nanopi-neo2_load=3D"YES" sun50i-h5-nanopi-neo2_type=3D"dtb" > 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. I tried to load the overlays from loader prompt by hand like this: load -t dtbo sun50i-nanopi-neo2-codec.dtbo load -t dtbo sun50i-nanopi-neo2-sid.dtbo load -t dtbo sun50i-nanopi-neo2-ths.dtbo and they got applied correctly and the corresponding devices appeared in th= e OS. As another test I did was to not load the base dtb file via loader.conf but= to use the one provided by u-boot/EFI.=20 The output looked like this [...] Using DTB provided by EFI at 0x47ef8000. Loading DTB overlays: 'sun50i-nanopi-neo2-codec.dtbo,sun50i-nanopi-neo2-sid= ,sun50i-nanopi-neo2-ths.dtbo' /boot/dtb/overlays/sun50i-nanopi-neo2-codec.dtbo size=3D0x11a /boot/dtb/overlays/sun50i-nanopi-neo2-sid.dtbo size=3D0x1f5 /boot/dtb/overlays/sun50i-nanopi-neo2-ths.dtbo size=3D0x3c5 applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-codec.dtbo' applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-sid.dtbo' applying DTB overlay '/boot/dtb/overlays/sun50i-nanopi-neo2-ths.dtbo' failed to apply overlay: FDT_ERR_NOTFOUND [...] In this case the overlays were found and loaded, but did most likely not ma= tch the u-boot dtb file. Is there an issue with loading overlays in conjunction with manually loadin= g dtb files via loader.conf? > It might be a good idea to drop to loader prompt and trigger overlay > application. No output at all? >=20 > > 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. >=20 > Any reason you need to keep the loader menu? Disabling it > (beastie_disable=3D"YES") and lack of password prompts will stop the > screen clearing in recent-ish versions of the lua scripts from head. >=20 > Thanks, >=20 > Kyle Evans --=20 Manuel