From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eFPqJhl8fmJc4wAAbAwnHQ (envelope-from ) for ; Fri, 13 May 2022 17:41:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MEPFJhl8fmKNdwAA9RJhRA (envelope-from ) for ; Fri, 13 May 2022 17:41:13 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2F4F33F1AF for ; Fri, 13 May 2022 17:41:13 +0200 (CEST) Received: from localhost ([::1]:45322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npXPj-0005Bt-Tj for larch@yhetil.org; Fri, 13 May 2022 11:41:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npXMg-0000UY-TX for guix-patches@gnu.org; Fri, 13 May 2022 11:38:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50801) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npXMg-0007Lh-Ks for guix-patches@gnu.org; Fri, 13 May 2022 11:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1npXMg-0003Iw-IG for guix-patches@gnu.org; Fri, 13 May 2022 11:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55227] [PATCH core-updates v3 2/8] gnu: commencement: Add stage0-posix. Resent-From: "Jan (janneke) Nieuwenhuizen" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 May 2022 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55227 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55227@debbugs.gnu.org Received: via spool by 55227-submit@debbugs.gnu.org id=B55227.165245622312540 (code B ref 55227); Fri, 13 May 2022 15:38:02 +0000 Received: (at 55227) by debbugs.gnu.org; 13 May 2022 15:37:03 +0000 Received: from localhost ([127.0.0.1]:44687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npXLj-0003G6-7K for submit@debbugs.gnu.org; Fri, 13 May 2022 11:37:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npXLN-0003Dq-DY for 55227@debbugs.gnu.org; Fri, 13 May 2022 11:36:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npXLI-0007Fv-5K; Fri, 13 May 2022 11:36:36 -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=iMehz5vSzqHwRdfqNEF7nAS+iw9dzfUaYNRXLG23J8s=; b=dtfi8HZvPqJEwCvWUUlS V+2NXMWvH9hKAG8IZgt7E1UHgE7mDn6fDAx9rX6p3gzYrNcSbTSgP694gC3z7wXatRS2pVSsbI0b6 iBo56GB2JITYIbRC+BSmwNnI3VHO3BDGLZYzsUf6DFWFe3Cg8CI+CRxLSIsbzq4qoamIH9/6VjvrP ffihHNTtMsF0nSBR2w30bH+qTOsj9DeR96JjQhDVMBXKHxVvXpqfpj5YHbHdQIhW3FZuRDySH1KiK wfME3k0z8NyNelkAhVFqzoiQH8sIqJ0vHB93U9mxy8fWuJUK3X62yZ6sNnMvdRWHnSde72/AhUZxI XOcpyW8uI6ZNEQ==; Received: from 2a02-a462-da03-1-fa3e-1174-c33f-9485.fixed6.kpn.net ([2a02:a462:da03:1:fa3e:1174:c33f:9485]:47912 helo=drakenbij.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1npXLH-0006qU-JX; Fri, 13 May 2022 11:36:35 -0400 From: "Jan (janneke) Nieuwenhuizen" Date: Fri, 13 May 2022 17:36:25 +0200 Message-Id: <20220513153631.13052-2-janneke@gnu.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220513153631.13052-1-janneke@gnu.org> References: <20220513153631.13052-1-janneke@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652456473; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=iMehz5vSzqHwRdfqNEF7nAS+iw9dzfUaYNRXLG23J8s=; b=epsh2eCUkmM7dcS130UmRrcTxDyUcRInWfr/dj3aTwQX5/2dSB6PBf3FoIqMGvpW4jU0LV eAjPp/BmYKjROL50sqLDZZWcpk2iGny5JT9Gq0FcOhkALWJlWvYYSUQ5hvrTRpyvmKqiez wNePuSLlhaZ+VzzYkUo6iis1Ywu6v8Lmht6bt50MvTTCPjDfw8lHpSzXOqCX0NznjI3JA/ 00/ROAt7wKOnUk/0ppLZejJV/4nx1T4/y/6x6ObzKoHoP80Vhq0Z5vlmO6vBwtCDZ9abfi jKC4uenZGFSgPlVaITJR1Jq73QkMFmaxuCDaNwiZIauwnzxvi3mO8WZFU35izQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652456473; a=rsa-sha256; cv=none; b=B+23nXgJNbF+Gr6HLVyIYoWxglId1AF4Nk8rrQL3WGiyvEppK2BFGWzxHy5wbf4jHV4pSt 89QUYyGIOJeSJ7DAehzy+pf57dspSN24Tv8yYL/GOf9w+TSHFNmpCDZPAwCTLAFjjSyP1X HeM8bRHD3kbPqJ2MWVxYtMJiMOdVAlc8A5GPyEmhuCpHzxFoJMevAIMX77LxzVlcIZ73jK lOMp7E40ZnHAyXPFKHeiabQWYtaW76wQw6dnqO7Jld2UI427y8gavRkDko8M2SIpEy+j2/ KnsRLqHxiqRgNaZ+lbRhZMqd+ZuGBozjR3znhu2KwcHh7awXXkhKjc/gxDxw/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=dtfi8HZv; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.53 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=dtfi8HZv; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 2F4F33F1AF X-Spam-Score: -3.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1LCNLFdZRSn8 Stage0-posix is a skeleton for bootstrapping all of Stage0 for POSIX systems. On x86-linux, from the 357-byte hex0-seed binary from the bootstrap-seeds, it builds hex0, kaem, hex1, catm, hex2, M0, cc_x86, M1, M2, get_machine, (mescc-tools), and M2-Planet. * gnu/packages/commencement.scm (stage0-posix): New variable. --- gnu/packages/commencement.scm | 117 ++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index ebb4ea98f1..cf3b356543 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -306,6 +306,123 @@ (define bootstrap-seeds hex1, hex2, M1, and M2-Planet.") (license license:gpl3+))) +(define stage0-posix + ;; The initial bootstrap package: no binary inputs except those from + ;; `bootstrap-seeds, for x86 a 357 byte binary seed: `x86/hex0-seed'. + (let* ((mescc-tools-version "1.4.0") + (m2-planet-version "1.9.0") + (mescc-tools + (origin + (method url-fetch) + (uri (list + (string-append + "mirror://gnu/guix/mirror/" + "mescc-tools-" mescc-tools-version ".tar.gz") + (string-append + "https://lilypond.org/janneke/guix/20220502/" + "mescc-tools-" mescc-tools-version ".tar.gz"))) + (sha256 + (base32 + "1xi6f48pf5bhajhfis189gpizxij7nbp1vzvsb1aafhz4skkiqvg")))) + (m2-planet + (origin + (method url-fetch) + (uri (list + (string-append + "mirror://gnu/guix/mirror/" + "M2-Planet-" m2-planet-version ".tar.gz") + (string-append + "https://lilypond.org/janneke/guix/20220502/" + "M2-Planet-" m2-planet-version ".tar.gz"))) + (sha256 + (base32 + "1xrn69sc5nz4hwaishqyrcidp1ncxwib9zswl45x378ddz3mmk7g"))))) + (package + (name "stage0-posix") + (version "1.4") + (source (origin + (method url-fetch) + (uri (list + (string-append "mirror://gnu/guix/mirror/" + "stage0-posix-" version ".tar.gz") + (string-append + "https://lilypond.org/janneke/guix/20220502/" + "stage0-posix-" version ".tar.gz"))) + (sha256 + (base32 + "1ammifkj33205qrpfm84yb1c99lwgbn4jsl1hd08aab8c9ffz6p4")))) + (supported-systems '("i686-linux" "x86_64-linux" + "armhf-linux" "aarch64-linux" + "riscv64-linux")) + (native-inputs + `(("bootstrap-seeds" ,bootstrap-seeds) + ,@(%boot-gash-inputs))) + (build-system trivial-build-system) + (arguments + (list + #:guile %bootstrap-guile + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let* ((bootstrap-seeds (assoc-ref %build-inputs "bootstrap-seeds")) + (source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "bootar")) + (bash (assoc-ref %build-inputs "bash")) + (coreutils (assoc-ref %build-inputs "coreutils")) + (guile (assoc-ref %build-inputs "guile")) + (out (assoc-ref %outputs "out")) + (bindir (string-append out "/bin")) + (target (or #$(%current-target-system) + #$(%current-system))) + (stage0-cpu + (cond + ((or #$(target-x86-64?) #$(target-x86-32?)) + "x86") + (#$(target-arm?) + "armv7l") + (else + (error "stage0-posix: system not supported" target)))) + (kaem (string-append "../bootstrap-seeds/POSIX/" + stage0-cpu "/kaem-optional-seed"))) + (setenv "PATH" (string-append tar "/bin:" + coreutils "/bin:" + bash "/bin")) + (invoke "tar" "xvf" source) + (chdir (string-append "stage0-posix-" #$version)) + (copy-recursively bootstrap-seeds "bootstrap-seeds") + (invoke "tar" "xvf" #$mescc-tools) + (rmdir "mescc-tools") + (symlink (string-append "mescc-tools-" #$mescc-tools-version) + "mescc-tools") + (invoke "tar" "xvf" #$m2-planet) + (rmdir "M2-Planet") + (symlink (string-append "M2-Planet-" #$m2-planet-version) + "M2-Planet") + (rmdir "M2libc") + (symlink "M2-Planet/M2libc" "M2libc") + (mkdir-p bindir) + (with-directory-excursion stage0-cpu + (with-output-to-file "mes-m2.kaem" + (lambda _ (display ""))) + (with-output-to-file "mescc-tools-extra.kaem" + (lambda _ (display ""))) + (invoke kaem "kaem.run")) + (with-directory-excursion "bin" + (install-file "hex2" bindir) + (install-file "M1" bindir) + (install-file "blood-elf" bindir) + (install-file "kaem" bindir) + (install-file "get_machine" bindir) + (install-file "M2-Planet" bindir)))))) + (home-page "https://github.com/oriansj/stage0-posix/") + (synopsis "The initial bootstrap package, builds stage0 up to M2-Planet") + (description "Starting from the 357-byte hex0-seed binary provided by +the bootstrap-seeds, the stage0-posix package first builds hex0 and then all +the way up: hex1, catm, hex2, M0, cc_x86, M1, M2, get_machine (that's all of +MesCC-Tools), and finally M2-Planet.") + (license license:gpl3+)))) + (define %bootstrap-mes-rewired (package (inherit mes) -- 2.35.1