all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Interest check: U-Boot bootloader support
@ 2016-02-20 20:43 Jookia
  2016-02-21 15:29 ` Andreas Enge
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jookia @ 2016-02-20 20:43 UTC (permalink / raw)
  To: guix-devel

Hey there,

I brought up this topic a long time ago and as since have been thinking about
this, reading the code base and getting accustomed to it. I've had the intention
of porting GuixSD to use the U-Boot bootloader, which I think can be done
without much if any changes to the user-facing configuration.

I'm willing to do the refactor and programming required, but I'm sensing it's
not wanted given the investment in keeping GuixSD using GNU tools for the base
system and the fact GRUB is being ported to ARM (though this is buggy at best.)
The only thing U-Boot support brings to the table is that it works and can be
used to boot Linux on an ARM system. The only hindrance compared to GRUB is that
it doesn't support encrypted partitions, so unencrypted /boot support will need
to be added.

If there's no interest in having U-Boot support in Guix and upstreamed, I'd
rather not waste effort on writing these patches. No hard feelings!

Cheers,
Jookia.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Interest check: U-Boot bootloader support
  2016-02-20 20:43 Interest check: U-Boot bootloader support Jookia
@ 2016-02-21 15:29 ` Andreas Enge
  2016-02-22 16:19 ` Nils Gillmann
  2016-02-23 11:14 ` Interest check: U-Boot bootloader support Ludovic Courtès
  2 siblings, 0 replies; 11+ messages in thread
From: Andreas Enge @ 2016-02-21 15:29 UTC (permalink / raw)
  To: Jookia; +Cc: guix-devel

Hello,

On Sun, Feb 21, 2016 at 07:43:25AM +1100, Jookia wrote:
> I brought up this topic a long time ago and as since have been thinking about
> this, reading the code base and getting accustomed to it. I've had the intention
> of porting GuixSD to use the U-Boot bootloader, which I think can be done
> without much if any changes to the user-facing configuration.

that sounds like a very interesting project! Maybe it will become obsolete
when grub works on ARM (so maybe you should research its status before
investing too much time), but in the meantime, any effort to have GuixSD
also on ARM would be very welcome. It would be nice to eat our own dog food
for the Novena boards in the build farm, for instance.

> I'm willing to do the refactor and programming required, but I'm sensing it's
> not wanted given the investment in keeping GuixSD using GNU tools for the base
> system and the fact GRUB is being ported to ARM (though this is buggy at best.)
> The only thing U-Boot support brings to the table is that it works and can be
> used to boot Linux on an ARM system. The only hindrance compared to GRUB is that
> it doesn't support encrypted partitions, so unencrypted /boot support will need
> to be added.

Personally I think that unencrypted /boot is okay if all the rest is encrypted.
But given my latest experience, that also does not seem to be supported so far.

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Interest check: U-Boot bootloader support
  2016-02-20 20:43 Interest check: U-Boot bootloader support Jookia
  2016-02-21 15:29 ` Andreas Enge
@ 2016-02-22 16:19 ` Nils Gillmann
  2016-02-22 18:01   ` Christopher Allan Webber
  2016-02-23 11:14 ` Interest check: U-Boot bootloader support Ludovic Courtès
  2 siblings, 1 reply; 11+ messages in thread
From: Nils Gillmann @ 2016-02-22 16:19 UTC (permalink / raw)
  To: Jookia; +Cc: guix-devel

Jookia <166291@gmail.com> writes:

> Hey there,
>
> I brought up this topic a long time ago and as since have been thinking about
> this, reading the code base and getting accustomed to it. I've had the intention
> of porting GuixSD to use the U-Boot bootloader, which I think can be done
> without much if any changes to the user-facing configuration.
>
> I'm willing to do the refactor and programming required, but I'm sensing it's
> not wanted given the investment in keeping GuixSD using GNU tools for the base
> system and the fact GRUB is being ported to ARM (though this is buggy at best.)
> The only thing U-Boot support brings to the table is that it works and can be
> used to boot Linux on an ARM system. The only hindrance compared to GRUB is that
> it doesn't support encrypted partitions, so unencrypted /boot support will need
> to be added.
>
> If there's no interest in having U-Boot support in Guix and upstreamed, I'd
> rather not waste effort on writing these patches. No hard feelings!
>
> Cheers,
> Jookia.
>

Similar to what I said in private, I think GuixSD has only things
to gain from the added support. When it does arrive in GRUB, the
workaround can be changed then.
For now, it would be a great thing to have in GuixSD.

-- 
ng

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Interest check: U-Boot bootloader support
  2016-02-22 16:19 ` Nils Gillmann
@ 2016-02-22 18:01   ` Christopher Allan Webber
  2016-02-22 18:42     ` Nils Gillmann
  2016-02-22 19:19     ` Guix on Mobile (Was: Interest check: U-Boot bootloader support) Jookia
  0 siblings, 2 replies; 11+ messages in thread
From: Christopher Allan Webber @ 2016-02-22 18:01 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: guix-devel

Nils Gillmann writes:

> Jookia <166291@gmail.com> writes:
>
>> Hey there,
>>
>> I brought up this topic a long time ago and as since have been thinking about
>> this, reading the code base and getting accustomed to it. I've had the intention
>> of porting GuixSD to use the U-Boot bootloader, which I think can be done
>> without much if any changes to the user-facing configuration.
>>
>> I'm willing to do the refactor and programming required, but I'm sensing it's
>> not wanted given the investment in keeping GuixSD using GNU tools for the base
>> system and the fact GRUB is being ported to ARM (though this is buggy at best.)
>> The only thing U-Boot support brings to the table is that it works and can be
>> used to boot Linux on an ARM system. The only hindrance compared to GRUB is that
>> it doesn't support encrypted partitions, so unencrypted /boot support will need
>> to be added.
>>
>> If there's no interest in having U-Boot support in Guix and upstreamed, I'd
>> rather not waste effort on writing these patches. No hard feelings!
>>
>> Cheers,
>> Jookia.
>>
>
> Similar to what I said in private, I think GuixSD has only things
> to gain from the added support. When it does arrive in GRUB, the
> workaround can be changed then.
> For now, it would be a great thing to have in GuixSD.

If we would like to also be able to deploy Guix to mobile devices, this
could really be great.  I'm sure a number of us would like to imagine a
world in which we can run Guix and more a GNU-ish type environment in
userspace on our mobile computers (how I miss my Nokia N900!)

How complex do you think it would be?

 - Chris

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Interest check: U-Boot bootloader support
  2016-02-22 18:01   ` Christopher Allan Webber
@ 2016-02-22 18:42     ` Nils Gillmann
  2016-02-22 19:19     ` Guix on Mobile (Was: Interest check: U-Boot bootloader support) Jookia
  1 sibling, 0 replies; 11+ messages in thread
From: Nils Gillmann @ 2016-02-22 18:42 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> Nils Gillmann writes:
>
>> Jookia <166291@gmail.com> writes:
>>
>>> Hey there,
>>>
>>> I brought up this topic a long time ago and as since have been thinking about
>>> this, reading the code base and getting accustomed to it. I've had the intention
>>> of porting GuixSD to use the U-Boot bootloader, which I think can be done
>>> without much if any changes to the user-facing configuration.
>>>
>>> I'm willing to do the refactor and programming required, but I'm sensing it's
>>> not wanted given the investment in keeping GuixSD using GNU tools for the base
>>> system and the fact GRUB is being ported to ARM (though this is buggy at best.)
>>> The only thing U-Boot support brings to the table is that it works and can be
>>> used to boot Linux on an ARM system. The only hindrance compared to GRUB is that
>>> it doesn't support encrypted partitions, so unencrypted /boot support will need
>>> to be added.
>>>
>>> If there's no interest in having U-Boot support in Guix and upstreamed, I'd
>>> rather not waste effort on writing these patches. No hard feelings!
>>>
>>> Cheers,
>>> Jookia.
>>>
>>
>> Similar to what I said in private, I think GuixSD has only things
>> to gain from the added support. When it does arrive in GRUB, the
>> workaround can be changed then.
>> For now, it would be a great thing to have in GuixSD.
>
> If we would like to also be able to deploy Guix to mobile devices, this
> could really be great.  I'm sure a number of us would like to imagine a
> world in which we can run Guix and more a GNU-ish type environment in
> userspace on our mobile computers (how I miss my Nokia N900!)
>
> How complex do you think it would be?
>
>  - Chris

I think mobile support is a feature one could add later.. it
would be one more point I could add to the list of Guix analysis
for EDN as a possible tails-like operating system.
If one could ship the "GNUnet system" on mobile, and have
platforms supporting it, that would be good. Although it sounds
too complex for one person to do.
In practice this would also mean, if we can live with a small
amount of blobs, we could have a basis for a theroretical
GuixMobile, with more trust and freedom than todays appstores.

-- 
ng

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Guix on Mobile (Was: Interest check: U-Boot bootloader support)
  2016-02-22 18:01   ` Christopher Allan Webber
  2016-02-22 18:42     ` Nils Gillmann
@ 2016-02-22 19:19     ` Jookia
  2016-02-22 20:17       ` Danny Milosavljevic
  1 sibling, 1 reply; 11+ messages in thread
From: Jookia @ 2016-02-22 19:19 UTC (permalink / raw)
  To: Christopher Allan Webber; +Cc: guix-devel

On Mon, Feb 22, 2016 at 10:01:15AM -0800, Christopher Allan Webber wrote:
> If we would like to also be able to deploy Guix to mobile devices, this
> could really be great.  I'm sure a number of us would like to imagine a
> world in which we can run Guix and more a GNU-ish type environment in
> userspace on our mobile computers (how I miss my Nokia N900!)
> 
> How complex do you think it would be?

On the Neo900 it might be easy to do, but given most phones don't have a
keyboard it'd require another bootloader than U-boot or GRUB. Which is okay,
I've been thinking about this anyway and plan to make one eventually. Basically
the bootloader would just be Linux to do some hardware init (touch screen, etc)
then you'd select which Guix generation to load and it'd get kexec'd. This would
also allow full disk encryption if the bootloader were on a different chip to
root.

I've toyed with the idea of such a bootloader ('GuixBoot') for a bit in my head
and seen some interest for it. It'd solve a lot of issues of my own even on
systems with GRUB and U-Boot as Linux tends to initialize hardware better than
them (neither U-Boot nor Libreboot like either of the EDID values of my screen!)
and would probably allow faster bootup given you're not initializing the
hardware twice.

The biggest problem with this would be size, a typical kernel and initrd is
around 12 megabytes together while a 'good' flash chip is probably 8 megabytes,
though I know some Libreboot machines have 4 megabytes. I also don't know of any
open hardware boards that have flash chips for loading kernels or bootloaders,
so perhaps it isn't an issue if we put this as an unencrypted /boot. I solve
this dilemma on my machine but using a fully encrypted SSD coupled with an
unencrypted /boot on an SD card.

Perhaps booting off a USB key in general would be a better habit to get in to,
which works on all machines and allows full disk encryption and allows me to
somewhat verify my machine hasn't been tampered with.

Anyways, I plan to try the idea sometime once I have a Guix system setup. If I
can get it small enough (I have no knowledge how, don't hold your breath) it'd
be useful as a payload in Libreboot I've heard.

>  - Chris

Jookia.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Guix on Mobile (Was: Interest check: U-Boot bootloader support)
  2016-02-22 19:19     ` Guix on Mobile (Was: Interest check: U-Boot bootloader support) Jookia
@ 2016-02-22 20:17       ` Danny Milosavljevic
  2016-02-22 20:28         ` Leo Famulari
                           ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Danny Milosavljevic @ 2016-02-22 20:17 UTC (permalink / raw)
  To: Jookia; +Cc: guix-devel

Hi,

On Tue, 23 Feb 2016 06:19:27 +1100
Jookia <166291@gmail.com> wrote:

> Basically the bootloader would just be Linux to do some hardware init (touch screen, etc)

Actually, on ARM you usually have to do basic hardware init before Linux runs. 
Linux doesn't do it all. Often, booting Linux without U-Boot doesn't work.

On linux-sunxi, U-Boot initializes some clocks, memory, important regulators, USB, MMC and the framebuffer (I'm sure I forgot some). 

U-Boot started out as just a tiny copy of Linux, but it has diverged a bit since.

There are also weird things like you aren't allowed to turn stuff you need later off (in, say, U-Boot), because once it's off, you can't turn it on again (because it's off, duh) without rebooting. So kexeced Linux can find itself in a world of hurt. 

(There's a special data-passing mechanism between U-Boot and Linux in order to mitigate that problem - but does it work between Linux and kexec-Linux?)

> systems with GRUB and U-Boot as Linux tends to initialize hardware better than
> them (neither U-Boot nor Libreboot like either of the EDID values of my screen!)
> and would probably allow faster bootup given you're not initializing the
> hardware twice.

I also have a screen with wrong EDID. I have a DVI<->HDMI adapter by ATI which contains an EDID chip in order to fake the data in order to get it to work. How insane is that?

That said, on the general interest: guix is already slooow on a fairly modern X200. If that ran on an armv7, it would probably be much slower. Not fun. 

But might be worth a try. Did someone try the non-GuixSD armv7 thing? Is the speed acceptable?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Guix on Mobile (Was: Interest check: U-Boot bootloader support)
  2016-02-22 20:17       ` Danny Milosavljevic
@ 2016-02-22 20:28         ` Leo Famulari
  2016-02-22 20:29         ` Jookia
  2016-02-22 21:12         ` Andreas Enge
  2 siblings, 0 replies; 11+ messages in thread
From: Leo Famulari @ 2016-02-22 20:28 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Mon, Feb 22, 2016 at 09:17:56PM +0100, Danny Milosavljevic wrote:
> Hi,
> 
> On Tue, 23 Feb 2016 06:19:27 +1100
> Jookia <166291@gmail.com> wrote:
> 
> > Basically the bootloader would just be Linux to do some hardware init (touch screen, etc)
> 
> Actually, on ARM you usually have to do basic hardware init before Linux runs. 
> Linux doesn't do it all. Often, booting Linux without U-Boot doesn't work.
> 
> On linux-sunxi, U-Boot initializes some clocks, memory, important regulators, USB, MMC and the framebuffer (I'm sure I forgot some). 
> 
> U-Boot started out as just a tiny copy of Linux, but it has diverged a bit since.
> 
> There are also weird things like you aren't allowed to turn stuff you need later off (in, say, U-Boot), because once it's off, you can't turn it on again (because it's off, duh) without rebooting. So kexeced Linux can find itself in a world of hurt. 
> 
> (There's a special data-passing mechanism between U-Boot and Linux in order to mitigate that problem - but does it work between Linux and kexec-Linux?)
> 
> > systems with GRUB and U-Boot as Linux tends to initialize hardware better than
> > them (neither U-Boot nor Libreboot like either of the EDID values of my screen!)
> > and would probably allow faster bootup given you're not initializing the
> > hardware twice.
> 
> I also have a screen with wrong EDID. I have a DVI<->HDMI adapter by ATI which contains an EDID chip in order to fake the data in order to get it to work. How insane is that?
> 
> That said, on the general interest: guix is already slooow on a fairly modern X200. If that ran on an armv7, it would probably be much slower. Not fun. 
> 
> But might be worth a try. Did someone try the non-GuixSD armv7 thing? Is the speed acceptable?

I used a Cubieboard 2 (Allwinner A20 SOC) as a home server for a while,
with Guix on Debian. To be honest, it was not much fun for a lot of
reasons.

For Guix specifically, the experience led me to conclude that copyleft
licensing isn't worth much if you can't actually compile from source on
your hardware.

The Allwinner A20 as used in the Cubieboard 2 is unstable when fully
loaded [0]. So, you have to do things like restrict the compilation to a
single core, or even just part of a single core. And this was after I
installed a heatsink.

Systemd makes this really easy; it exposes cgroups to services, so I
limited the guix-daemon and all its children that way.

Of course, you can cross-compile, or use substitutes from a more
powerful armv7 machine that you own. We use the Novena in our build
farm, so it *is* possible to get armv7 hardware that is worth using. But
you must choose the right hardware.

[0] I've heard good things about Olimex's Allwinner implementations.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Guix on Mobile (Was: Interest check: U-Boot bootloader support)
  2016-02-22 20:17       ` Danny Milosavljevic
  2016-02-22 20:28         ` Leo Famulari
@ 2016-02-22 20:29         ` Jookia
  2016-02-22 21:12         ` Andreas Enge
  2 siblings, 0 replies; 11+ messages in thread
From: Jookia @ 2016-02-22 20:29 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Mon, Feb 22, 2016 at 09:17:56PM +0100, Danny Milosavljevic wrote:
> Hi,

Hey!

> > Basically the bootloader would just be Linux to do some hardware init (touch screen, etc)

> Actually, on ARM you usually have to do basic hardware init before Linux runs. 
> Linux doesn't do it all. Often, booting Linux without U-Boot doesn't work.
> 
> On linux-sunxi, U-Boot initializes some clocks, memory, important regulators, USB, MMC and the framebuffer (I'm sure I forgot some). 
> 
> U-Boot started out as just a tiny copy of Linux, but it has diverged a bit since.

This is true, I should've said that it'd go from u-boot -> linux. Rather than,
u-boot -> grub -> linux. The advantage here is Linux can do initialization of
things like the screen or touchpad.

> There are also weird things like you aren't allowed to turn stuff you need later off (in, say, U-Boot), because once it's off, you can't turn it on again (because it's off, duh) without rebooting. So kexeced Linux can find itself in a world of hurt. 
> 
> (There's a special data-passing mechanism between U-Boot and Linux in order to mitigate that problem - but does it work between Linux and kexec-Linux?)

Not sure you'd need to do that if you're already in a set up Linux?

> > systems with GRUB and U-Boot as Linux tends to initialize hardware better than
> > them (neither U-Boot nor Libreboot like either of the EDID values of my screen!)
> > and would probably allow faster bootup given you're not initializing the
> > hardware twice.
> 
> I also have a screen with wrong EDID. I have a DVI<->HDMI adapter by ATI which contains an EDID chip in order to fake the data in order to get it to work. How insane is that?

Insane!

> That said, on the general interest: guix is already slooow on a fairly modern X200. If that ran on an armv7, it would probably be much slower. Not fun. 
> 
> But might be worth a try. Did someone try the non-GuixSD armv7 thing? Is the speed acceptable?

I already run NixOS on ARM as my desktop machine, not sure how much slower
GuixSD would be. On a phone, though it could be much worse.

Jookia.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Guix on Mobile (Was: Interest check: U-Boot bootloader support)
  2016-02-22 20:17       ` Danny Milosavljevic
  2016-02-22 20:28         ` Leo Famulari
  2016-02-22 20:29         ` Jookia
@ 2016-02-22 21:12         ` Andreas Enge
  2 siblings, 0 replies; 11+ messages in thread
From: Andreas Enge @ 2016-02-22 21:12 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

On Mon, Feb 22, 2016 at 09:17:56PM +0100, Danny Milosavljevic wrote:
> That said, on the general interest: guix is already slooow on a fairly modern X200. If that ran on an armv7, it would probably be much slower. Not fun. 
> But might be worth a try. Did someone try the non-GuixSD armv7 thing? Is the speed acceptable?

I am running it over Debian on my Novena, where it is quite usable - this is
the machine from which I am writing this e-mail! I do not know whether it is
actually slower than on the X200. The four cores help; in the background
I am building Qt, and the machine is still usable. In any case, there is
no reason that Guix(SD) should be slower than any other GNU/Linux distribution.

I also tried KDE, which I found too slow; under Xfce, I am quite happy.
(Of course, I am using substitutes.)

Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Interest check: U-Boot bootloader support
  2016-02-20 20:43 Interest check: U-Boot bootloader support Jookia
  2016-02-21 15:29 ` Andreas Enge
  2016-02-22 16:19 ` Nils Gillmann
@ 2016-02-23 11:14 ` Ludovic Courtès
  2 siblings, 0 replies; 11+ messages in thread
From: Ludovic Courtès @ 2016-02-23 11:14 UTC (permalink / raw)
  To: Jookia; +Cc: guix-devel

Hi!

As I wrote earlier, I have a preference for using GRUB everywhere.  So
for ARM, I encourage people to first check whether GRUB could work.

However, if GRUB doesn’t support a device, I think it’s perfectly fine
to use U-Boot instead.  This wouldn’t be wasted effort!

Cheers,
Ludo’.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-02-23 11:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-20 20:43 Interest check: U-Boot bootloader support Jookia
2016-02-21 15:29 ` Andreas Enge
2016-02-22 16:19 ` Nils Gillmann
2016-02-22 18:01   ` Christopher Allan Webber
2016-02-22 18:42     ` Nils Gillmann
2016-02-22 19:19     ` Guix on Mobile (Was: Interest check: U-Boot bootloader support) Jookia
2016-02-22 20:17       ` Danny Milosavljevic
2016-02-22 20:28         ` Leo Famulari
2016-02-22 20:29         ` Jookia
2016-02-22 21:12         ` Andreas Enge
2016-02-23 11:14 ` Interest check: U-Boot bootloader support Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.