From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34954) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHDD3-0000hr-5A for guix-patches@gnu.org; Fri, 11 May 2018 14:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHDD0-0007Wc-4b for guix-patches@gnu.org; Fri, 11 May 2018 14:56:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHDD0-0007WX-0q for guix-patches@gnu.org; Fri, 11 May 2018 14:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fHDCz-0004Sx-NW for guix-patches@gnu.org; Fri, 11 May 2018 14:56:01 -0400 Subject: [bug#31404] Add installer support for u-boot imx6 boards. Resent-Message-ID: From: Vagrant Cascadian In-Reply-To: <20180511122926.15ed71b7@scratchpost.org> References: <87h8nfwgfp.fsf@aikidev.net> <20180511122926.15ed71b7@scratchpost.org> Date: Fri, 11 May 2018 11:55:22 -0700 Message-ID: <877eoavx7p.fsf@aikidev.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Danny Milosavljevic Cc: 31404@debbugs.gnu.org --=-=-= Content-Type: text/plain On 2018-05-11, Danny Milosavljevic wrote: > On Thu, 10 May 2018 10:47:54 -0700 > Vagrant Cascadian wrote: >> It should be noted that the offsets for installing u-boot.img on imx6 >> targets conflict with a typical GPT partition table header; works fine >> with dos partition table headers. I'm not sure what safeguards could be >> added to detect that. This also may not be unique to imx6 targets >> (e.g. pine64 u-boot/atf also has a similar issue). > > Yeah, and Allwinner A10, A20, R40 etc have the same problem. I've talked > to parted upstream about it so that at least the new partition tables are > not created in a stupid way - but movement is slow. > >> Also, the novena patch has a known flaw, in that it requires copying the >> u-boot.img file to the first partition rather than writing it to a raw >> offset on the mmc device. > > Yeah, I guess it's fine to use mtools in the installer. The novena also supports loading u-boot.img off of ext2/3/4, so simply symlinking it to /u-boot.img would work... if / was mounted from the first microSD partition and /gnu/store was on the same partition. Also, novena supports SATA, so you'd still need to support putting u-boot.img on the microSD. Though SPL could be fixed to support loading u-boot.img off of SATA as well... Of course, creating a separate fat partition on the microSD would also work. >> Not sure how to handle that exactly, as partitioning is typically a >> manual process in guixsd? > > Yeah, for a first step we could just check sanity (in this case check > whether mcat failed or not). > >> If nothing else, merging only the wandboard and mx6cuboxi patches and >> only including the u-boot target for novena might make sense. Another >> option would be to patch novena to load u-boot.img from an offset rather >> than a filesystem, though I doubt that will be accepted in u-boot >> upstream. > > There are lots of boards which need that setup anyway - most notably > x86_64 UEFI systems - so we have to handle the case anyway. > > I vote for using mtools. Ok, the next immediate change that occurs to me is to make gnu/bootloaders/u-boot.scm install-u-boot-imx take arguments of weather to install spl and u-boot.img, defaulting to true in both cases, and setting the u-boot.img portion to false for novena... There are also some imx targets which don't have SPL but do install u-boot.img to the same offset. That can probably be auto-detected by the presence of the SPL file... maybe that's simpler than a true/false flag. I'll work on some follow-up patches for those. > I applied your patches to guix master. Thanks! live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcDardHbDotegGFCHt4uC1IFLkbYFAlr15xoACgkQt4uC1IFL kbbB8xAAshOeYKxQX9NjMWDL/gbjBnx41ppj+Rgy/MysMF0AkrVQUbqx3N8tCnBZ g+WmtLRo4S2pyiXPBEKKK5Jfen8Zhj6CFgWzHTdwPH97lvwOcX3TCHqobCXm21r8 2Qep9TyC8aK10kSTHARxMgRki9ou+p33iUypIBQN+cQJIthX6AdmCwWsUThxQP/j YYWy/rUBhZ0XdAhZ/BQQLisxIp9Mpef1tE4NmI+6AGztRciWD3YQJo/yKol3ajCk TtI08B4ZlsxitX2D/gbdvD8ln7YvBOM11EexbeweYVKoOxZVZchydSAI609J0x1q 9AwAa0RgdGvWy0opEi2Mh0dvj8+rIfmtUfQkoCCVFWycgglg1ueGdBUm0++uGQO4 Ugv3uqcbxZBkm8IX3J6i7hw/mgYIj3wIBgFEf3Jdo96Mr/m3vuzSNGR/WPFlwzi8 O7j3/Y1NvThSTAcqfAiJF8XmOQ9uKtlAMz9rhzvTtbo5FYdp/LiTM4K2NDc897WJ Hw6/bYwOhDmDPMfTcTySnxjTKPWqELt3XOKe2BEG++6iqVndV8Tg+7Xj32WVzFfj 5UjBBM2NwMLDA4qrlFfQw0g1CXu9k+RLoPyzhDU9VRUQMguKfuS36wbFlfAgGcaq kAeaJ+1NGA/vDcGNAXYa/tXDr5ckVa5H5085xdUayRrhSn7/FKw= =oX97 -----END PGP SIGNATURE----- --=-=-=--