From patchwork Wed Sep 7 12:46:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 42267 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8F31227BBEA; Wed, 7 Sep 2022 13:48:52 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E603B27BBE9 for ; Wed, 7 Sep 2022 13:48:51 +0100 (BST) Received: from localhost ([::1]:48950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVuU7-0006AP-2k for patchwork@mira.cbaines.net; Wed, 07 Sep 2022 08:48:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVuTM-0005g6-2S for guix-patches@gnu.org; Wed, 07 Sep 2022 08:48:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36974) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVuTL-00077v-PT for guix-patches@gnu.org; Wed, 07 Sep 2022 08:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVuTL-0002YD-LY for guix-patches@gnu.org; Wed, 07 Sep 2022 08:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57643] [PATCH 2/3] doc: Add a "Platforms" chapter. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Sep 2022 12:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57643 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57643@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 57643-submit@debbugs.gnu.org id=B57643.16625548419648 (code B ref 57643); Wed, 07 Sep 2022 12:48:03 +0000 Received: (at 57643) by debbugs.gnu.org; 7 Sep 2022 12:47:21 +0000 Received: from localhost ([127.0.0.1]:53886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVuSf-0002VY-0y for submit@debbugs.gnu.org; Wed, 07 Sep 2022 08:47:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34748) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVuSc-0002V6-Ex for 57643@debbugs.gnu.org; Wed, 07 Sep 2022 08:47:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVuSX-00071s-6u for 57643@debbugs.gnu.org; Wed, 07 Sep 2022 08:47:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=yrL0WRd+LiRmFSYAc1zBfZax+8x78ik/+8hVp0GCZdc=; b=g48hourL2okV7I47fwzj KTF75KH4NAGZbIHxNDQ/rflUHCM6gMzLtMU9uCgDb2l6GRD6DKN3DwxcOwRnUiwqApG9aBKSptMNL Gdk5niNKDc4tm+asLYVksSEwA6YuOa6OlM42IZxgquKuKtaZXFvcp3biJGphakFr4H/71JsRm3Gpu uFVeh7XZi/DUsffbdBPvxrPKx2Jxo1V2pfHcS6fq3pBEHI8svGV+qjjApcxiM6ED3KC6cl59iCEpU pEAD/pSvg60/BR3TYa9sPY9Ev0GrCKbMbmT12fk3P8djjn9PkAYx+m9E+b1G2QTu0m7Rt9x9ImEJK XewjNK86t6mMfA==; Received: from ppp079167215024.access.hol.gr ([79.167.215.24]:46736 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVuSW-0002jZ-IX; Wed, 07 Sep 2022 08:47:13 -0400 From: Mathieu Othacehe Date: Wed, 7 Sep 2022 14:46:32 +0200 Message-Id: <20220907124633.17013-2-othacehe@gnu.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220907124633.17013-1-othacehe@gnu.org> References: <20220907124633.17013-1-othacehe@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi ("Platforms"): New chapter. ("Porting"): Link it. --- doc/guix.texi | 103 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 102 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 20abfee772..a24278e431 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -182,6 +182,7 @@ Weblate} (@pxref{Translating Guix}). * System Configuration:: Configuring the operating system. * Home Configuration:: Configuring the home environment. * Documentation:: Browsing software user manuals. +* Platforms:: Defining platforms. * Installing Debugging Files:: Feeding the debugger. * Using TeX and LaTeX:: Typesetting. * Security Updates:: Deploying security fixes quickly. @@ -405,6 +406,11 @@ Defining Services * Shepherd Services:: A particular type of service. * Complex Configurations:: Defining bindings for complex configurations. +Platforms + +* platform Reference:: Detail of platform declarations. +* Supported Platforms:: Description of the supported platforms. + Installing Debugging Files * Separate Debug Info:: Installing 'debug' outputs. @@ -41140,6 +41146,101 @@ reader,, info-stnd, Stand-alone GNU Info}) and its Emacs counterpart bindings to navigate manuals. @xref{Getting Started,,, info, Info: An Introduction}, for an introduction to Info navigation. +@node Platforms +@chapter Platforms + +The packages and systems built by Guix are intended, like most computer +programs, to run on a CPU with a specific instruction set. Those +programs are often also targeting a specific kernel and system library. +Those constraints are captured by Guix in @code{platform} records. + +@menu +* platform Reference:: Detail of platform declarations. +* Supported Platforms:: Description of the supported platforms. +@end menu + +@node platform Reference +@section @code{platform} Reference + +@deftp {Data Type} platform +This is the data type representing a platform. + +@table @asis +@item @code{target} +The 'target' field must be a valid +@uref{https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Specifying-Target-Triplets.html, +GNU triplet}, as a string. It can be for instance, +@code{"aarch64-linux-gnu"} and is used for cross-compilation purposes +(@pxref{Cross-Compilation}). + +@item @code{system} +The name of the corresponding system as defined in the @code{(gnu +packages bootstrap)} module. It can be for instance +@code{"aarch64-linux"} or @code{"armhf-linux"}. It is used to emulate a +different host architecture, for instance @code{"i686-linux"} on +@code{"x86_64-linux"}, or @code{"armhf-linux"} on @code{"x86_64-linux"}, +using the QEMU binfmt transparent emulation mechanism (@pxref{Native +Builds}). + +@item @code{linux-architecture} (default: @code{#false}) +This optional string field is only relevant if the kernel is Linux. In +that case, it corresponds to the ARCH variable used when building Linux, +@code{"mips"} for instance. + +@item @code{glibc-dynamic-linker} +This field is the name of Glibc's dynamic linker for the corresponding +system, as a string. It can be @code{"/lib/ld-linux-armhf.so.3"}. + +@end table +@end deftp + +@node Supported Platforms +@section Supported Platforms + +@defvr {Scheme Variable} armv7-linux +Platform targeting ARM v7 CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} aarch64-linux +Platform targeting ARM v8 CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} mips64-linux +Platform targeting MIPS 64 bits little endian CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} powerpc-linux +Platform targeting PowerPC 32 bits CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} powerpc64le-linux +Platform targeting PowerPC 64 bits little endian CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} riscv64-linux +Platform targeting RISC-V 64 bits CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} i686-linux +Platform targeting x86 CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} x86_64-linux +Platform targeting x86 64 bits CPUs running GNU/Linux. +@end defvr + +@defvr {Scheme Variable} i686-mingw +Platform targeting x86 CPUs running WIN32. +@end defvr + +@defvr {Scheme Variable} x86_64-mingw +Platform targeting x86 64 bits CPUs running WIN32. +@end defvr + +@defvr {Scheme Variable} hurd +Platform targeting x86 CPUs running GNU/Hurd. +@end defvr + @node Installing Debugging Files @chapter Installing Debugging Files @@ -41879,7 +41980,7 @@ connection between a GNU triplet (@pxref{Specifying Target Triplets, GNU configuration triplets,, autoconf, Autoconf}), the equivalent @var{system} in Nix notation, the name of the @var{glibc-dynamic-linker}, and the corresponding Linux architecture -name if applicable. +name if applicable (@pxref{Platforms}). Once the bootstrap tarball are built, the @code{(gnu packages bootstrap)} module needs to be updated to refer to these binaries on the