From owner-freebsd-embedded@freebsd.org Sat Sep 30 21:00:50 2017 Return-Path: Delivered-To: freebsd-embedded@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A682CE2F465 for ; Sat, 30 Sep 2017 21:00:50 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from valery.hibma.org (valery.hibma.org [178.21.114.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3D65D80A51 for ; Sat, 30 Sep 2017 21:00:46 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from [IPv6:2001:980:530a:1:2936:b33:791e:48b9] (unknown [IPv6:2001:980:530a:1:2936:b33:791e:48b9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by valery.hibma.org (Postfix) with ESMTPSA id 490996E0A14 for ; Sat, 30 Sep 2017 23:00:39 +0200 (CEST) From: Nick Hibma Content-Type: multipart/signed; boundary="Apple-Mail=_9BB76411-DCF2-4C88-BDDF-B69820A07283"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Dual NanoBSD partitions on RPi3 - partially solved Message-Id: <5484657D-C8C4-4E26-BAC5-B8C10FDA1883@van-laarhoven.org> Date: Sat, 30 Sep 2017 23:00:37 +0200 To: =?utf-8?Q?=E2=80=9CFreeBSD_Embedded_Mailing_List=E2=80=9D?= X-Mailer: Apple Mail (2.3273) X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Sep 2017 21:00:50 -0000 --Apple-Mail=_9BB76411-DCF2-4C88-BDDF-B69820A07283 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Right, I spent quite some time figuring this out (and learning how to use = U-boot, neat stuff!). The problem was I was trying to create an image to = load on a Raspberry Pi 3, using U-boot and the (crochet) examples. It = kept failing to load my disk image, but did load others, most notably = the RaspBSD one. It failed wiith 'failed to mount ext2 filesystem' in my = case. I figured out that I had marked the second partition, the first UFS one, = as active, instead of the FAT partition. I want to mark that partition = active because I need to be able to choose between the second and third = partitions, both UFS root partitions. But the scan_dev_for_boot_part = macro in U-Boot uses fstype to figure out bootable partitions and tries = to open that partition as an ext2 partition which produces that error. = And it only tries boot using EFI from those bootable partitions and = completely forgets about the first partition on which the EFI stuff is = stored in our case. I resolved this by changing the mmc_boot macro like so: setenv mmc_boot "setenv devtype mmc; setenv distro_bootpart 1; = run scan_dev_for_efi" I haven't quite figured out how to switch to the second UFS root = partition yet. I assume that can be done the usual way, by marking the = other partition active. EFI then picks that one I hope. But that's for = some other time. Just wanted to get this solution into the lists. Cheers, Nick Hibma nick@van-laarhoven.org -- Open Source: We stand on the shoulders of giants. --Apple-Mail=_9BB76411-DCF2-4C88-BDDF-B69820A07283 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - https://gpgtools.org iQIzBAEBCgAdFiEETFbRZ/gKjBgO10CrH3Ic7sY0duAFAlnQBfYACgkQH3Ic7sY0 duB2bBAAlqBhqTRbNLZa0cWbxxtuzdVH6+kb2Q5R2bX1/BtuxeI8uZAb2J2SqE9/ raIUkMTp5LZjxdyPg9HE/iC6jWkzMnS9TzuX37eRlMAy1Q5AimHV1m3V3vBE5oiF pd+Sy1gZnAd844JbWBvTccuLWhkL9c+gJx1e4oRyZkgISxe6FVo/9jmol1ELOB0F gL0ap34ExxR580x1LCbr6Ka0PyRF9H4qdN17LXlRHXorVdIbbimYBddTaOu7cOtP btRTICfuwPniigechIfDNmj3/CQm65lx0jQ8MLQRxxyiw0qqdAHUDfGX5gJA/02M SpTmyX1BdDXJXByU3rDX8mWjb+PvFUHnzhgfbJy7sP7DoZD7/I88NgSLr6kkLU16 32LNCLxnHorQ3hTMOTdSym3HpUR0T0JB4Ob6Cn7fu8SFYQZKgwY/Orl8Nw5YN80C YaC6JwMnR2D7EceJGIPpHunIq/0Xkm9fmAKKbzDFC4nU88J+svfxgGe4k1yNb4Kr 5q43sFZdzU4jc/yn6+32PYKa2pqqLDewcN9sfyXYenkqDN9X0fB+DMMR2Wj+qzR8 CozQmgDA1mdeGjlZzWc/yoYubeitdi6D6ZKD6dTMZpKUbMQ7DsXJ60GkoQHXCA/s LzQbgpq9Cdp/GWE63lRnxY1R6oBEVkPC7fJsxqc+AUsSOWnVp/M= =oZbO -----END PGP SIGNATURE----- --Apple-Mail=_9BB76411-DCF2-4C88-BDDF-B69820A07283--