unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: phodina via Guix-patches via <guix-patches@gnu.org>
To: 55348@debbugs.gnu.org
Subject: [bug#55348] [PATCH] gnu: Add embedded-controller-hx20.
Date: Tue, 10 May 2022 10:28:37 +0000	[thread overview]
Message-ID: <hkArDpBVH_rMN8Az9OXMvoqup47IIXE3Clr0XELDWqHK9CIl4pkCDI75-mLYiZENReIZdxJKR-LhNVYQNax92lR5BkvLp90ANzST4rqenQw=@protonmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 864 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1311 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-embedded-controller-hx20.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-embedded-controller-hx20.patch, Size: 2353 bytes --]

From eb4dcfad9ad9126941acc0ba9522bbaa9d856fdf Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
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


             reply	other threads:[~2022-05-10 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 10:28 phodina via Guix-patches via [this message]
2022-05-10 12:52 ` [bug#55348] [PATCH] gnu: Add embedded-controller-hx20 Maxime Devos
2022-05-10 12:54 ` Maxime Devos
2022-06-17 20:38 ` Ludovic Courtès
2022-06-18  4:49   ` phodina via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hkArDpBVH_rMN8Az9OXMvoqup47IIXE3Clr0XELDWqHK9CIl4pkCDI75-mLYiZENReIZdxJKR-LhNVYQNax92lR5BkvLp90ANzST4rqenQw=@protonmail.com' \
    --to=guix-patches@gnu.org \
    --cc=55348@debbugs.gnu.org \
    --cc=phodina@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).