guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#45020] [PATCH 0/2] image: Add system field.


From: Ludovic Courtès
Subject: [bug#45020] [PATCH 0/2] image: Add system field.
Date: Sun, 13 Dec 2020 15:15:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Hi!

zimoun <zimon.toutoune@gmail.com> skribis:

> On Sat, 12 Dec 2020 at 09:30, Mathieu Othacehe <othacehe@gnu.org> wrote:
>
>> When using Yocto, Buildroot or even OpenWrt, you say "build me an image
>> for that board/machine" and not, "build me an image for that board by
>> cross-compiling to this mysterious triplet".
>
> I confirm that the triplet is still mysterious to me.  Since I do not do
> that often, each time I am trying, I need to browse the doc, when I am
> not asking again and again on IRC.

The triplet is a stringy DSL to designate a CPU architecture, hardware
vendor, and operating system; nowadays people often piggy-back
information to distinguish “OS” from “kernel”, to specify the ABI, etc.
(info "(autoconf) Specifying Target Triplets").

It was designed at a time where things were quite different (nowadays
the “vendor” part is almost always useless), and it’s primarily for
userland software.  It’s well-documented though, no mystery.  ;-)

Now, a triplet does not capture all the things we’re interested in, like
details of the boot-up sequence of the ARM board, preferred bootloader,
Binutils tweaks, etc.

>From a Guix System viewpoint, we could define an abstract
architecture/platform/target as something that embodies the info
contained in triplets and more, say:

--8<---------------cut here---------------start------------->8---
;; Description of a platform supported by the GNU system.
(define-record-type* <platform> platform make-platform
  platform?
  (triplet            platform-triplet)            ;"x86_64-linux-gnu"
  (system-type        platform-system-type)        ;"x86_64-linux"
  (linux-architecture platform-linux-architecture) ;"amd64"
  (kernel             platform-kernel)             ;<package>
  (ld.so              platform-ld.so)              ;"ld-linux-x86-64.so.2"
  (gcc                platform-gcc)                ;<package>
  (binutils           platform-binutils)           ;<package>
  (libc               platform-transform-libc))    ;<package>
--8<---------------cut here---------------end--------------->8---

Currently that info is scattered in various pieces in Guix: in base.scm,
cross-base.scm, linux.scm, bootstrap.scm, etc.  Having all that in a
single place would be an improvement.

Of course this is going beyond what was originally discussed in this
thread and I’m not claiming this is the solution to work on right now.
It might be a general direction to follow longer-term, though.

Thoughts?

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]