From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sAW2JTrsiGNuNwAAbAwnHQ (envelope-from ) for ; Thu, 01 Dec 2022 19:02:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AIDdJDrsiGOmJQAAG6o9tA (envelope-from ) for ; Thu, 01 Dec 2022 19:02:34 +0100 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 30127987D for ; Thu, 1 Dec 2022 19:02:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0nsq-00041d-4m; Thu, 01 Dec 2022 13:02:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0nso-00041N-KQ for guix-patches@gnu.org; Thu, 01 Dec 2022 13:02:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0nso-0004Hn-CP for guix-patches@gnu.org; Thu, 01 Dec 2022 13:02:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0nso-0000B1-13 for guix-patches@gnu.org; Thu, 01 Dec 2022 13:02:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#48314] [PATCH] Install guix system on Raspberry Pi Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Dec 2022 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48314 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Stefan Cc: Vagrant Cascadian , Danny Milosavljevic , Ludovic =?UTF-8?Q?Court=C3=A8s?= , phodina , 48314@debbugs.gnu.org Received: via spool by 48314-submit@debbugs.gnu.org id=B48314.1669917708673 (code B ref 48314); Thu, 01 Dec 2022 18:02:01 +0000 Received: (at 48314) by debbugs.gnu.org; 1 Dec 2022 18:01:48 +0000 Received: from localhost ([127.0.0.1]:41107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0nsZ-0000An-GL for submit@debbugs.gnu.org; Thu, 01 Dec 2022 13:01:47 -0500 Received: from mail-qv1-f51.google.com ([209.85.219.51]:41567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0nsW-0000Ae-RR for 48314@debbugs.gnu.org; Thu, 01 Dec 2022 13:01:45 -0500 Received: by mail-qv1-f51.google.com with SMTP id d13so1847417qvj.8 for <48314@debbugs.gnu.org>; Thu, 01 Dec 2022 10:01:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wCf3/Lkjz2SrBOnIe03NATRnl2NkNtvOep2TnJ1WuaM=; b=U4f9aOoqTzCVJEF/41nv7/u4IMdJAQ8D0NPHAlA3I9p//35LkY9UqDCM3dtBGbuMAc fh/obwdgRLGnNve2fK5DWcKePE9Hg0ipwO3sUwu46TeTqxWB6XEb2AdHqUA/CEECQN8m PGqfBSC5TWacHY/XBnNid+YtvszcR0nHfOyncA76oiWIwq2vGZOE22TVARTXxmDd8mDG kq4KArVDbpefq0jLTUqHE2q6p0pAjA/WeKlkUaygbryc2+iD0gEhpXP2dLyaYAz6v/sM Od+3KDuB1F2Y2tdk3hQUSXNGcEjH7CjJZgAE1oEFGEri7s1Nlf92SOw2HpsxKloUUevx hWPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wCf3/Lkjz2SrBOnIe03NATRnl2NkNtvOep2TnJ1WuaM=; b=fhQ+IQbbpx5kqxmjfk13BUXXdvhbG1tbqzE4a36p6UQsRCG+517hw52jokUS+KbdlS Jzh52V6i0XM4hOZXyu/HbCHDtC9mYFN3AfIjGSB3uzpoFpZUWmZ/go7qHcOt794XCMH7 p8T+iK4qpCfztNT0lOlr6J2WmHrjpYE6NZiBBH3dMyJ5wu5WSAjMfGiTwfnlSgTGIgfX 279GYrb0bTG5bZ8Mfp5vXuhZeAw2yN72CJqvwZAFzRN3C93dGQoAb0c64tVzImm40Zv9 q2hTkPJiy4LXXeAHqCHv7FiFvwalf3cIUBPjVYgAZheedwhVTxmJrI1tl3pn8GZZMmxc CGeg== X-Gm-Message-State: ANoB5pn4gyj9d4t0x+KKPk0b/CQkDgmzh25VoO59pQVmh03JTUqGQKS1 R0R8d6DeCWEhkiM0MGdBPds= X-Google-Smtp-Source: AA0mqf40pRJIj0aUJ9l9Hz6dwVyJmPHIrsL55B40Pd91u/Xux86Ezie6DZXQYB4aypqPC0Oy+7nhzA== X-Received: by 2002:a05:6214:3513:b0:4bb:ddaf:b9e5 with SMTP id nk19-20020a056214351300b004bbddafb9e5mr43366907qvb.52.1669917698801; Thu, 01 Dec 2022 10:01:38 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id bs42-20020a05620a472a00b006b61b2cb1d2sm3918893qkb.46.2022.12.01.10.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 10:01:37 -0800 (PST) From: Maxim Cournoyer References: <2IN6BsQe0_wSC9iwf7LHT5LUk7wXLVXytkDtcg7RIYByyYFTsuC9BZPR_wdv4eDMncsZfy17h7z9jIRRSC6kfV2odXkt0hp4Lilq5sGYdVo=@protonmail.com> <204332DD-AA02-4A31-9B48-FB3FAB9BD8F3@vodafonemail.de> Date: Thu, 01 Dec 2022 13:01:36 -0500 In-Reply-To: <204332DD-AA02-4A31-9B48-FB3FAB9BD8F3@vodafonemail.de> (Stefan's message of "Thu, 22 Sep 2022 18:18:59 +0200") Message-ID: <87edtjhukf.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-TUID: +1eoWeNH9B+e Hi, > gnu: linux: New function to modify the configuration of a Linux kernel. > > From: Stefan > > * gnu/packages/linux.scm (system->linux-srcarch): New function to return = the > relevent folder name below arch/ in the Linux source code. > (modify-linux): New function to make a customized Linux package inherited > from another Linux package, which will be build with an own defconfig or > configuration changes. > (make-defconfig): Function to get a defconfig from an uri. I've renamed it to customize-linux, and streamlined the commit message like so: --8<---------------cut here---------------start------------->8--- gnu: linux: Add a 'customize-linux' procedure. * gnu/packages/linux.scm (linux-srcarch): New procedure. (customize-linux): Likewise. (make-defconfig): Procedure to retrieve a defconfig from an URI. Signed-off-by: Maxim Cournoyer Modified-by: Maxim Cournoyer --8<---------------cut here---------------end--------------->8--- Otherwise, I've made the following changes (exporting procedures explicitly from the modules): --8<---------------cut here---------------start------------->8--- 1 file changed, 25 insertions(+), 25 deletions(-) gnu/packages/linux.scm | 50 +++++++++++++++++++++++++----------------------= --- modified gnu/packages/linux.scm @@ -190,19 +190,19 @@ (define-module (gnu packages linux) #:use-module (srfi srfi-2) #:use-module (srfi srfi-26) #:use-module (ice-9 match) - #:use-module (ice-9 optargs) - #:use-module (ice-9 regex)) + #:use-module (ice-9 regex) + #:export (customize-linux)) =20 -(define-public (linux-srcarch) +(define (linux-srcarch) "Return the linux SRCARCH name, which is set in the toplevel Makefile of -Linux and denotes the architecture specific directory name below arch/ in = its +Linux and denotes the architecture-specific directory name below arch/ in = its source code. Some few architectures share a common folder. It resembles = the definition of SRCARCH based on ARCH in the Makefile and may be used to pla= ce a defconfig file in the proper path." (let ((linux-arch (platform-linux-architecture - (lookup-platform-by-target-or-system - (or (%current-target-system) - (%current-system)))))) + (lookup-platform-by-target-or-system + (or (%current-target-system) + (%current-system)))))) (match linux-arch ("i386" "x86") ("x86_64" "x86") @@ -213,7 +213,7 @@ (define-public (linux-srcarch) =20 (define-public (system->defconfig system) "Some systems (notably powerpc-linux) require a special target for kernel -defconfig. Return the appropriate make target if applicable, otherwise re= turn +defconfig. Return the appropriate Make target if applicable, otherwise re= turn \"defconfig\"." (cond ((string-prefix? "powerpc-" system) "pmac32_defconfig") ((string-prefix? "powerpc64-" system) "ppc64_defconfig") @@ -1271,19 +1271,19 @@ (define-public linux-libre-with-bpf ;;; Linux kernel customization functions. ;;; =20 -(define*-public (modify-linux #:key name - (linux linux-libre) - source - defconfig - (configs "") - extra-version) - "Make a Linux package NAME as a modification of another LINUX package. +(define* (customize-linux #:key name + (linux linux-libre) + source + defconfig + (configs "") + extra-version) + "Make a customized Linux package NAME derived from the LINUX package. =20 If NAME is not given, then it defaults to the same name as the LINUX packa= ge. =20 Unless SOURCE is given the source of LINUX is used. =20 -A DEFCONFIG file to be used can be given as an origin, as a file like obje= ct +A DEFCONFIG file to be used can be given as an origin, as a file-like obje= ct (file-append, local-file etc.), or as a string with the name of a defconfi= g file available in the Linux sources. If DEFCONFIG is not given, then a defconf= ig file will be saved from the LINUX package configuration. @@ -1295,11 +1295,11 @@ (define*-public (modify-linux #:key name defconfig syntax has to be used, but there is a special extension to ease = the removal of configurations. Comment lines are supported as well. =20 -Here is an explaining usage example: +Here is an example: =20 '(;; This string defines the version tail in 'uname -r'. \"CONFIG_LOCALVERSION=3D\\\"-handcrafted\\\" - ;; This '# CONFIG_=E2=80=A6 is not set' syntax has to match exactly! + ;; This '# CONFIG_... is not set' syntax has to match exactly! \"# CONFIG_BOOT_CONFIG is not set\" \"CONFIG_NFS_SWAP=3Dy\" ;; This is a multiline configuration: @@ -1339,13 +1339,13 @@ (define*-public (modify-linux #:key name #$(cond ((not defconfig) #~(begin - ;; Call the original 'configure phase. - (apply (assoc-ref #$phases 'configure) arguments) - ;; Save a defconfig file. - (invoke "make" "savedefconfig") - ;; Move the saved defconfig to the proper locatio= n. - (rename-file "defconfig" - guix_defconfig))) + ;; Call the original 'configure phase. + (apply (assoc-ref #$phases 'configure) arguments) + ;; Save a defconfig file. + (invoke "make" "savedefconfig") + ;; Move the saved defconfig to the proper locati= on. + (rename-file "defconfig" + guix_defconfig))) ((string? defconfig) ;; Use another existing defconfig from the Linux sou= rces. #~(rename-file (string-append configs #$defconfig) --8<---------------cut here---------------end--------------->8--- I'll push it shortly. --=20 Thanks, Maxim