Date: Sat, 30 Sep 2017 23:00:37 +0200 From: Nick Hibma <nick@van-laarhoven.org> To: =?utf-8?Q?=E2=80=9CFreeBSD_Embedded_Mailing_List=E2=80=9D?= <freebsd-embedded@FreeBSD.org> Subject: Dual NanoBSD partitions on RPi3 - partially solved Message-ID: <5484657D-C8C4-4E26-BAC5-B8C10FDA1883@van-laarhoven.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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. [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5484657D-C8C4-4E26-BAC5-B8C10FDA1883>
