From patchwork Tue May 10 10:28:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: phodina X-Patchwork-Id: 39197 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 3C77927BBEA; Tue, 10 May 2022 11:41:20 +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,FREEMAIL_FROM,HTML_MESSAGE,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 A943027BBE9 for ; Tue, 10 May 2022 11:41:19 +0100 (BST) Received: from localhost ([::1]:37702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1noNIs-0001Jw-Qe for patchwork@mira.cbaines.net; Tue, 10 May 2022 06:41:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noN7z-0000SR-79 for guix-patches@gnu.org; Tue, 10 May 2022 06:30:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38284) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1noN7y-0003Iz-Tp for guix-patches@gnu.org; Tue, 10 May 2022 06:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1noN7y-0004y6-O3 for guix-patches@gnu.org; Tue, 10 May 2022 06:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55348] [PATCH] gnu: Add embedded-controller-hx20. Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 May 2022 10:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55348 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55348@debbugs.gnu.org X-Debbugs-Original-To: Guix Patches Received: via spool by submit@debbugs.gnu.org id=B.165217854418996 (code B ref -1); Tue, 10 May 2022 10:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 May 2022 10:29:04 +0000 Received: from localhost ([127.0.0.1]:60414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noN72-0004wJ-0q for submit@debbugs.gnu.org; Tue, 10 May 2022 06:29:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:32838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1noN6z-0004w0-Kd for submit@debbugs.gnu.org; Tue, 10 May 2022 06:29:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noN6r-0008Ry-Bw for guix-patches@gnu.org; Tue, 10 May 2022 06:28:57 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:11835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1noN6o-0003Bc-EP for guix-patches@gnu.org; Tue, 10 May 2022 06:28:52 -0400 Date: Tue, 10 May 2022 10:28:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1652178520; bh=oCLtPa9HzoecEESpdOtYHHGN2NrXOSFrjdeMUtkjIrM=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=h4nBXpiezoa2/SUnVZgkNnB2/T957ULoWc3Tvai+YHr/ICoN67Tubloy2rFdaJSI/ cMjOutLt4UM5nbrL6nAXmxUd3tCHpusETEhiL5iKN1Y+EUUbJRERHwxPRCTfVrD5Uy BpEzSAx4XJirdFXWXtrJ7Zhl5EWOFZpXKWriFhJZj30W4g5+hjMfRiiM6Z+w5PGmF3 moVNXR0v5iIRwI2V+JI/cxXpufn7+IHlrEZMbXQGXWM/3ZTvZqhlMG8F9ovMgA68Fx EJ/wKOGQ7Ce7LT3gzelesT6SRZUFIfZkdJHSPpsf1Zg8jq4wQEw74QpGejBqIWWP04 SqkcrTOpiifdg== Message-ID: Feedback-ID: 14143818:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.134; envelope-from=phodina@protonmail.com; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches X-Patchwork-Original-From: phodina via Guix-patches via From: phodina X-getmail-retrieved-from-mailbox: Patches Hi, here's a patch that brings firmware for the Embedded Controller on Framework laptops. I wanted to put this package into gnu/packages/firmware.scm but due to arm-none-eabi toolchain and the usage of embedded.scm module the build generates only errors due to inclusion. Therefore I temporarily placed the package to gnu/packages/embedded.scm. I'm unfortunately not an owner of Framework laptop so I can't test the built firmware. I also don't want to ask people to reflash the EC as incorrectly built binary can result in a bricked computer. Therefore I'd like to open the discussion what should be the steps to include EC [1][2] in general into Guix so that more parts of the firmware will be open source where possible. [1] https://chromium.googlesource.com/chromiumos/platform/ec/https://github.com/system76/ec[2] https://github.com/system76/ec ---- Petr From eb4dcfad9ad9126941acc0ba9522bbaa9d856fdf Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Fri, 28 Jan 2022 19:29:56 +0100 Subject: [PATCH] gnu: Add embedded-controller-hx20. * gnu/packages/embedded.scm (embedded-controller-hx20): New variable. diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index de8d2944bc..8b5dd99dc8 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -70,6 +70,42 @@ (define-module (gnu packages embedded) #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) + +(define-public embedded-controller-hx20 +(let ((commit "8109392adb17a2cd7d30a74eee8613a0cb72ee7d") + (revision "1")) + (package + (name "embedded-controller-hx20") + (version (git-version "0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/FrameworkComputer/EmbeddedController") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "16y6v886ci97yxn8q54iwm9clx0kgvszrxp5vjh0hdldc9pamaij")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:make-flags '("BOARD=hx20" "CROSS_COMPILE=arm-none-eabi-") + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'install)))) + (native-inputs (list arm-none-eabi-toolchain-7-2018-q2-update + base:coreutils + perl pkg-config python python-2)) + (inputs (list libftdi inetutils inetutils libusb)) + (synopsis "Embedded Controller firmware for the Framework Laptop") + (description "The Embedded Controller on your Framework Laptop handles low +level functions, including power sequencing the system. Modifying the EC code +can cause your system to not power on or boot or cause damage to the mainboard, +battery, or other parts of the system or devices attached to the system.") + (home-page "https://github.com/FrameworkComputer/EmbeddedController") + (license license:bsd-3)))) ;; We must not use the released GCC sources here, because the cross-compiler ;; does not produce working binaries. Instead we take the very same SVN ;; revision from the branch that is used for a release of the "GCC ARM -- 2.34.0