From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLqVr-00063r-45 for guix-patches@gnu.org; Fri, 16 Jun 2017 08:38:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLqVm-0003WY-ED for guix-patches@gnu.org; Fri, 16 Jun 2017 08:38:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dLqVm-0003WS-9r for guix-patches@gnu.org; Fri, 16 Jun 2017 08:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dLqVm-00066r-3d for guix-patches@gnu.org; Fri, 16 Jun 2017 08:38:02 -0400 Subject: [bug#27327] [PATCH] bootloader: Add u-boot. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <20170611105838.24708-1-dannym@scratchpost.org> <87zid8gwag.fsf@gnu.org> <20170616110434.7640597f@scratchpost.org> Date: Fri, 16 Jun 2017 14:37:00 +0200 In-Reply-To: <20170616110434.7640597f@scratchpost.org> (Danny Milosavljevic's message of "Fri, 16 Jun 2017 11:04:34 +0200") Message-ID: <87h8zgglcj.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: 27327@debbugs.gnu.org Hello, Danny Milosavljevic skribis: > On Fri, 16 Jun 2017 10:40:39 +0200 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> > + (package #f) >> > + (installer #f)))=20=20 >>=20 >> I still find it weird to use #f for these two fields. >>=20 >> I would find it more reasonable to have, say, a =E2=80=98make-u-boot-boo= tloader=E2=80=99 >> that returns a with all the fields appropriately set (not >> #f). Otherwise it sounds like we=E2=80=99re going to have to deal with = support >> requests #about =E2=80=9Cwrong type to apply: #f=E2=80=9D, and I=E2=80= =99d like to avoid that. >> :-) > > Yeah, but I think Mathieu added explicit support for leaving those #f. > >> Can=E2=80=99t we just say that =E2=80=98package=E2=80=99 is always a =20 > > Difficult. U-Boot is more like a BIOS is on PCs. That means in normal o= peration you'd not flash it. If there was a mistake in the flashed U-Boot = often you can't fix it again without electronics knowledge and gear (if at = all - serial pads must be available on the board). There's no extra BIOS. = U-Boot does it all: RAM initialization, keyboard initialization, display = initialization etcetc. > > Sometimes flashing is only possible via serial cable (or worse) from an e= xternal machine. > > Also, there are lots of forks of U-Boot. Since U-Boot is licensed under = GPL the package should be available somewhere - but not necessarily in the = U-Boot master branch (and often it's in fact not available there). > > In short, we should add U-Boot packages gradually, and only after testing= each U-Boot package on the hardware. > > That means in the beginning we'd have a LOT of (package #f) - but that's = still preferrable to bricking. > >>and that >> =E2=80=98installer=E2=80=99 is always a procedure? > > Yeah, the installation procedure could probably check (if package (invoke= "...")).=20=20 Yeah, I think so. I mean, you could run =E2=80=9Cguix system reconfigure --no-bootloader=E2= =80=9D or, if you want to be sure you don=E2=80=99t flash your device inadvertently, you = could use =E2=80=98u-boot-noop-bootloader=E2=80=99 or similar, which is like =E2=80=98u-boot-bootloader=E2=80=99 except that it never installs anything = beyond its config file. > I've submitted this minimal patch mostly to make clear how U-Boot would e= xtend extlinux. I think it's good to have it in place as a guard against t= oo-much-syslinux-bias :) Yup, makes sense! > That said, it should actually make GuixSD boot on a machine with U-Boot a= lready installed. That=E2=80=99s pretty cool. Looking forward to GuixSD on ARM! Ludo=E2=80=99.