unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* RISCV porting effort
@ 2021-06-07  7:09 Efraim Flashner
  2021-06-07 15:37 ` Christopher Lemmer Webber
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Efraim Flashner @ 2021-06-07  7:09 UTC (permalink / raw)
  To: guix-devel


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

Last week my HiFive Umatched¹ board came and was quite the object of
interest at the local computer store as I picked up a case, PSU and
graphics card.

Couple of observations about the board first:
It boots very slowly. I think it takes about 5 minutes from power-on to
being able to sign in at TTY1.
It has an NVMe slot which I haven't populated yet.
Ubuntu has an image for the board² which booted up just fine and I'm
using, since I didn't want to spend too long getting Debian to run on
the board.
Upstream u-boot support was merged days ago³ so we should be able to add
support to our u-boot package soon-ish™.

Porting Guix comes with two parts: building the bootstrap-tarballs and
adding support for the new architecture in (gnu packages bootstrap).
Support for riscv was added to GCC with 7.1.0 so I had to bump the
bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
known the endianness of riscv64 so instead of patching it I bumped the
bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
spot after signing them and switched over to the riscv machine.

Building Guix from sources is much easier thanks to the work of Vagrant,
I was able to apt install most of the dependencies on riscv. The
packaged version of guile-zlib was too old in 21.04 so I built that from
source (0.1.0 is available in Debian experimental), and I also had to
build gnutls from source for the guile-3.0 bindings. I added the riscv
binaries to (gnu packages bootstrap) and temporarily switched the
raw-build function to look for 3.0 guile libraries instead of 2.0.

Where I'm at right now:
Downloading using the daemon (builtin:download) fails currently, it says
it doesn't have permissions to open-file to write downloaded files to
the store.
I haven't built anything using the bootstrap binaries to see if they
actually work yet.


(ins)efraim@unmatched:~$ neofetch --off
efraim@unmatched
----------------
OS: Ubuntu 21.04 riscv64
Host: SiFive HiFive Unmatched A00
Kernel: 5.11.0-1007-generic
Uptime: 3 days, 15 hours, 57 mins
Packages: 782 (dpkg)
Shell: bash 5.1.4
Terminal: /dev/pts/0
CPU: (4)
GPU: NVIDIA GeForce GT 730
Memory: 350MiB / 15995MiB

(ins)efraim@unmatched:~$ lscpu
Architecture:        riscv64
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  4
Core(s) per socket:  1
Socket(s):           1
L1d cache:           32 KiB
L1i cache:           32 KiB
L2 cache:            2 MiB


¹https://www.sifive.com/boards/hifive-unmatched
²http://cdimage.ubuntu.com/releases/21.04/release/
³https://source.denx.de/u-boot/u-boot/-/commit/d8729a114e1e98806cffb87d2dca895f99a0170a

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #1.2: riscv-make-bootstrap.diff --]
[-- Type: text/plain, Size: 4219 bytes --]

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index bf76d5052f..ef6ea52d6e 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -94,13 +94,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
   (mlambdaq (glibc)
     "Return a variant of GCC that uses the bootstrap variant of GLIBC."
     (package
-      (inherit gcc-5)
+      (inherit gcc-7)
       (outputs '("out")) ;all in one so libgcc_s is easily found
       (inputs
        `( ;; Distinguish the name so we can refer to it below.
          ("bootstrap-libc" ,(glibc-for-bootstrap glibc))
          ("libc:static" ,(glibc-for-bootstrap glibc) "static")
-         ,@(package-inputs gcc-5))))))
+         ,@(package-inputs gcc-7))))))
 
 (define (package-with-relocatable-glibc p)
   "Return a variant of P that uses the libc as defined by
@@ -139,7 +139,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                              (cons (search-path-specification
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
-                                   (package-search-paths gcc-5)))))
+                                   (package-search-paths gcc-7)))))
             ("cross-binutils" ,(cross-binutils target))
             ,@(%final-inputs)))
         `(("libc" ,(glibc-for-bootstrap glibc))
@@ -461,11 +461,11 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
 (define %gcc-static
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
-   (package (inherit gcc-5)
+   (package (inherit gcc-7)
      (name "gcc-static")
      (outputs '("out"))                           ; all in one
      (arguments
-      (substitute-keyword-arguments (package-arguments gcc-5)
+      (substitute-keyword-arguments (package-arguments gcc-7)
         ((#:modules modules %gnu-build-system-modules)
          `((srfi srfi-1)
            (srfi srfi-26)
@@ -515,8 +515,8 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                 #t))))))
      (inputs
       `(("zlib:static" ,zlib "static")
-        ("isl:static" ,isl-0.18 "static")
-        ,@(package-inputs gcc-5)))
+        ("isl:static" ,isl "static")
+        ,@(package-inputs gcc-7)))
      (native-inputs
       (if (%current-target-system)
           `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -529,12 +529,12 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
             ("gmp-native" ,gmp)
             ("mpfr-native" ,mpfr)
             ("mpc-native" ,mpc)
-            ,@(package-native-inputs gcc-5))
-          (package-native-inputs gcc-5))))))
+            ,@(package-native-inputs gcc-7))
+          (package-native-inputs gcc-7))))))
 
 (define %gcc-stripped
   ;; The subset of GCC files needed for bootstrap.
-  (package (inherit gcc-5)
+  (package (inherit gcc-7)
     (name "gcc-stripped")
     (build-system trivial-build-system)
     (source #f)
@@ -869,6 +869,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
   ;; A tarball with the statically-linked, relocatable Guile.
   (tarball-package %guile-static-stripped))
 
+(define %guile-3.0-bootstrap-tarball
+  ;; A tarball with the statically-linked, relocatable Guile.
+  (tarball-package %guile-3.0-static-stripped))
+
 (define %mescc-tools-bootstrap-tarball
   ;; A tarball with statically-linked MesCC binary seed.
   (tarball-package %mescc-tools-static-stripped))
@@ -905,7 +909,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
                                (find-files directory "\\.tar\\."))))
                    %build-inputs)
          #t)))
-    (inputs `(("guile-tarball" ,%guile-bootstrap-tarball)
+    (inputs `(("guile-tarball" ,%guile-3.0-bootstrap-tarball)
               ,@(match (or (%current-target-system) (%current-system))
                   ((or "i686-linux" "x86_64-linux")
                    `(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball)

[-- Attachment #1.3: riscv-bootstrap.diff --]
[-- Type: text/plain, Size: 8208 bytes --]

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c598cedc0a..091ffb2d5a 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -133,18 +133,29 @@
      ("tar"
       ,(base32 "150c8948cz8r208g6qgn2dn4f4zs5kpgbpbg6bwag6yw42rapw2l"))
      ("xz"
-      ,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))))
+      ,(base32 "0v5738idy9pqzcbrjdpxi5c6qs5m78zrpsydmrpx5cfcfzbkxzjh")))
+    ("riscv64-linux"
+     ("bash"
+      ,(base32 "0almlf73k6hbm495kzf4bw1rzsg5qddn7z2rf5l3d1xcapac2hj3"))
+     ("mkdir"
+      ,(base32 "0rg1amdcqfkplcy1608jignl8jq0wqzfkp430mwik3f62959gya6"))
+     ("tar"
+      ,(base32 "17d3x27qhiwk7h6ns0xrvbrq0frxz89mjjh2cdwx2rraq5x6wffm"))
+     ("xz"
+      ,(base32 "0nxn75xf386vdq3igmgm8gnyk4h4x0cm8jv71vlb2jvwxh0cyw1q")))))
 
 (define %bootstrap-executable-base-urls
   ;; This is where the bootstrap executables come from.
   '("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
     "https://alpha.gnu.org/gnu/guix/bootstrap/"
+    "http://flashner.co.il/guix/bootstrap/"
     "http://lilypond.org/janneke/guix/"))
 
 (define (bootstrap-executable-file-name system program)
   "Return the FILE-NAME part of url where PROGRAM can be found for SYSTEM."
   (match system
     ("powerpc64le-linux" (string-append system "/20210106/" program))
+    ("riscv64-linux" (string-append system "/20210606/bin/" program))
     ("i586-gnu" (string-append system "/20200326/" program))
     (_ (string-append system "/" program
                       "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
@@ -347,6 +358,8 @@ or false to signal an error."
                     "/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
                    ("powerpc64le-linux"
                     "/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
+                   ("riscv64-linux"
+                    "/20210606/guile-3.0.2.tar.xz")
                    (_
                     "/20131110/guile-2.0.9.tar.xz"))))
 
@@ -363,6 +376,8 @@ or false to signal an error."
      (base32 "1mi3brl7l58aww34rawhvja84xc7l1b4hmwdmc36fp9q9mfx0lg5"))
     ("powerpc64le-linux"
      (base32 "1rnyfz5q38jyvxddj617443bnnzql4vw0mxzqpj8wz48wx4bhbq0"))
+    ("riscv64-linux"
+     (base32 "12pqmhsbbp7hh9r1bjdl14l3a4q06plpz6dcks9dysb4czay8p9f"))
     ("aarch64-linux"
      (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
     ("i586-gnu"
@@ -419,8 +434,8 @@ or false to signal an error."
                     (lambda (p)
                       (format p "\
 #!~a
-export GUILE_SYSTEM_PATH=~a/share/guile/2.0
-export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/2.0/ccache
+export GUILE_SYSTEM_PATH=~a/share/guile/3.0
+export GUILE_SYSTEM_COMPILED_PATH=~a/lib/guile/3.0/ccache
 exec -a \"~a0\" ~a \"~a@\"\n"
                               bash out out dollar guile-real dollar)))
                   (chmod guile   #o555)
@@ -435,8 +450,8 @@ cd $out
 ~a -dc < $GUILE_TARBALL | ~a xv
 
 # Use the bootstrap guile to create its own wrapper to set the load path.
-GUILE_SYSTEM_PATH=$out/share/guile/2.0 \
-GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/2.0/ccache \
+GUILE_SYSTEM_PATH=$out/share/guile/3.0 \
+GUILE_SYSTEM_COMPILED_PATH=$out/lib/guile/3.0/ccache \
 $out/bin/guile -c ~s $out ~a
 
 # Sanity check.
@@ -498,6 +513,8 @@ $out/bin/guile --version~%"
                                              "/20170217/static-binaries.tar.xz")
                                             ("powerpc64le-linux"
                                              "/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
+                                            ("riscv64-linux"
+                                             "/20210606/static-binaries.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
                                             (_
@@ -520,6 +537,9 @@ $out/bin/guile --version~%"
                               ("powerpc64le-linux"
                                (base32
                                 "0afs2j9z2d1hjq42myz4iwjh0aqgzf59inifw87x6b6p1z9wv92v"))
+                              ("riscv64-linux"
+                               (base32
+                                "0x0xjlpmyh6rkr51p00gp6pscgl6zjida1rsg8vk3rinyi6rrbkg"))
                               ("i586-gnu"
                                (base32
                                 "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
@@ -573,6 +593,8 @@ $out/bin/guile --version~%"
                                              "/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+                                            ("riscv64-linux"
+                                             "/20210606/binutils-2.34.tar.xz")
                                             (_
                                              "/20131110/binutils-2.23.2.tar.xz")))
                                      %bootstrap-base-urls))
@@ -593,6 +615,9 @@ $out/bin/guile --version~%"
                               ("powerpc64le-linux"
                                (base32
                                 "1klxy945c61134mzhqzz2gbk8w0n8jq7arwkrvz78d22ff2q0cwz"))
+                              ("riscv64-linux"
+                               (base32
+                                "0n9qf4vbilfmh1lknhw000waakj4q6s50pnjazr5137skm976z5m"))
                               ("i586-gnu"
                                (base32
                                 "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
@@ -653,6 +678,8 @@ $out/bin/guile --version~%"
                                        "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
                                       ("i586-gnu"
                                        "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+                                      ("riscv64-linux"
+                                       "/20210606/glibc-2.31.tar.xz")
                                       (_
                                        "/20131110/glibc-2.18.tar.xz")))
                                %bootstrap-base-urls))
@@ -673,6 +700,9 @@ $out/bin/guile --version~%"
                         ("powerpc64le-linux"
                          (base32
                           "1a1df6z8gkaq09md3jy94lixnh20599p58p0s856p10xwjaqr1iz"))
+                        ("riscv64-linux"
+                         (base32
+                          "0162c4yfnz4272c9z03l28dzn5km05r7h06m3s730yiv2disldla"))
                         ("i586-gnu"
                          (base32
                           "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
@@ -749,6 +779,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
                                         "/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
                                        ("i586-gnu"
                                         "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+                                       ("riscv64-linux"
+                                        "/20210606/gcc-7.5.0.tar.xz")
                                        (_
                                         "/20131110/gcc-4.8.2.tar.xz")))
                                 %bootstrap-base-urls))
@@ -769,6 +801,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
                          ("powerpc64le-linux"
                           (base32
                            "151kjsai25vz2s667bgzpisx8f281fpl3n9pxz2yrp9jlnadz3m1"))
+                         ("riscv64-linux"
+                          (base32
+                           "0w1gm1pz3nsfxi5s14sd4nlwcbwq7709lma6csgm8gm6l6x5m7pn"))
                          ("i586-gnu"
                           (base32
                            "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))

[-- Attachment #1.4: bootstrap-guix-without-packaging.md --]
[-- Type: text/plain, Size: 2082 bytes --]

We want to build guix from source but not create native packages for all the dependencies. Therefore we will use [GNU Stow](https://www.gnu.org/software/stow/) to install the files to `/usr/local/stow` and then symlink them to `/usr/local`.

http://cdimage.ubuntu.com/releases/21.04/release/
For this, on Ubuntu 21.04, we need to install some packages:

```shell
sudo apt update
sudo apt install git stow autoconf autopoint make g++ gettext pkg-config po4a texinfo help2man guile-3.0 guile-3.0-dev libtasn1-6-dev guile-git guile-json guile-sqlite3 guile-gcrypt guile-lzlib
```

We need to compile gnutls from source to build the guile3.0 bindings

(make took 38 minutes)
```shell
cd /usr/local/src
wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.16.tar.xz
wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.16.tar.xz.sig
gpg --verify gnutls-3.6.16.tar.xz.sig
tar xf ../gnutls-3.6.16.tar.xz
cd gnutls-3.6.16
./configure --with-included-libtasn1 \
        --with-included-unistring \
        --without-p11-kit \
        --disable-dependency-tracking \
        --with-guile-site-dir=/usr/local/share/guile/site/3.0 \
        --with-guile-site-ccache-dir=/usr/local/lib/guile/3.0/site-ccache \
        --with-guile-extension-dir=/usr/local/lib/guile/3.0/extensions
make
sudo make install prefix=/usr/local/stow/gnutls-3.6.16
cd /usr/local/stow
sudo stow gnutls-3.6.16
```

guile-zlib is actually too old, so we build it from source
(make took 43 seconds)
```shell
cd /usr/local/src
git clone https://notabug.org/guile-zlib/guile-zlib
cd guile-zlib
git checkout v0.1.0
autoreconf -vfi
GUILE_LOAD_PATH=/usr/local/share/guile/site/3.0:$GUILE_LOAD_PATH ./configure
make
sudo make install prefix=/usr/local/stow/guile-zlib-0.1.0
ct /usr/local/stow
sudo stow guile-zlib-0.1.0
```

Then we can get started with Guix itself
```shell
git clone https://git.savannah.gnu.org/git/guix.git
cd guix
./bootstrap
GUILE_LOAD_PATH=/usr/local/share/guile/site/3.0:$GUILE_LOAD_PATH ./configure --with-courage
GUILE_LOAD_PATH=/usr/local/share/guile/site/3.0:$GUILE_LOAD_PATH make
```

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-07  7:09 RISCV porting effort Efraim Flashner
@ 2021-06-07 15:37 ` Christopher Lemmer Webber
  2021-06-08 13:43 ` Ludovic Courtès
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Christopher Lemmer Webber @ 2021-06-07 15:37 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Exciting... thanks for this update!  Even if not "usable" quite yet,
it's thrilling to see progress on this. :)


Efraim Flashner writes:

> Last week my HiFive Umatched¹ board came and was quite the object of
> interest at the local computer store as I picked up a case, PSU and
> graphics card.
>
> Couple of observations about the board first:
> It boots very slowly. I think it takes about 5 minutes from power-on to
> being able to sign in at TTY1.
> It has an NVMe slot which I haven't populated yet.
> Ubuntu has an image for the board² which booted up just fine and I'm
> using, since I didn't want to spend too long getting Debian to run on
> the board.
> Upstream u-boot support was merged days ago³ so we should be able to add
> support to our u-boot package soon-ish™.
>
> Porting Guix comes with two parts: building the bootstrap-tarballs and
> adding support for the new architecture in (gnu packages bootstrap).
> Support for riscv was added to GCC with 7.1.0 so I had to bump the
> bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
> known the endianness of riscv64 so instead of patching it I bumped the
> bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
> spot after signing them and switched over to the riscv machine.
>
> Building Guix from sources is much easier thanks to the work of Vagrant,
> I was able to apt install most of the dependencies on riscv. The
> packaged version of guile-zlib was too old in 21.04 so I built that from
> source (0.1.0 is available in Debian experimental), and I also had to
> build gnutls from source for the guile-3.0 bindings. I added the riscv
> binaries to (gnu packages bootstrap) and temporarily switched the
> raw-build function to look for 3.0 guile libraries instead of 2.0.
>
> Where I'm at right now:
> Downloading using the daemon (builtin:download) fails currently, it says
> it doesn't have permissions to open-file to write downloaded files to
> the store.
> I haven't built anything using the bootstrap binaries to see if they
> actually work yet.
>
>
> (ins)efraim@unmatched:~$ neofetch --off
> efraim@unmatched
> ----------------
> OS: Ubuntu 21.04 riscv64
> Host: SiFive HiFive Unmatched A00
> Kernel: 5.11.0-1007-generic
> Uptime: 3 days, 15 hours, 57 mins
> Packages: 782 (dpkg)
> Shell: bash 5.1.4
> Terminal: /dev/pts/0
> CPU: (4)
> GPU: NVIDIA GeForce GT 730
> Memory: 350MiB / 15995MiB
>
> (ins)efraim@unmatched:~$ lscpu
> Architecture:        riscv64
> Byte Order:          Little Endian
> CPU(s):              4
> On-line CPU(s) list: 0-3
> Thread(s) per core:  4
> Core(s) per socket:  1
> Socket(s):           1
> L1d cache:           32 KiB
> L1i cache:           32 KiB
> L2 cache:            2 MiB
>
>
> ¹https://www.sifive.com/boards/hifive-unmatched
> ²http://cdimage.ubuntu.com/releases/21.04/release/
> ³https://source.denx.de/u-boot/u-boot/-/commit/d8729a114e1e98806cffb87d2dca895f99a0170a



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-07  7:09 RISCV porting effort Efraim Flashner
  2021-06-07 15:37 ` Christopher Lemmer Webber
@ 2021-06-08 13:43 ` Ludovic Courtès
  2021-06-08 22:28   ` Gabriel Wicki
  2021-06-10 13:20   ` Efraim Flashner
  2021-06-11 11:16 ` RISCV porting effort Efraim Flashner
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 27+ messages in thread
From: Ludovic Courtès @ 2021-06-08 13:43 UTC (permalink / raw)
  To: guix-devel

Hello!

Efraim Flashner <efraim@flashner.co.il> skribis:

> Porting Guix comes with two parts: building the bootstrap-tarballs and
> adding support for the new architecture in (gnu packages bootstrap).
> Support for riscv was added to GCC with 7.1.0 so I had to bump the
> bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
> known the endianness of riscv64 so instead of patching it I bumped the
> bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
> spot after signing them and switched over to the riscv machine.
>
> Building Guix from sources is much easier thanks to the work of Vagrant,
> I was able to apt install most of the dependencies on riscv. The
> packaged version of guile-zlib was too old in 21.04 so I built that from
> source (0.1.0 is available in Debian experimental), and I also had to
> build gnutls from source for the guile-3.0 bindings. I added the riscv
> binaries to (gnu packages bootstrap) and temporarily switched the
> raw-build function to look for 3.0 guile libraries instead of 2.0.
>
> Where I'm at right now:
> Downloading using the daemon (builtin:download) fails currently, it says
> it doesn't have permissions to open-file to write downloaded files to
> the store.
> I haven't built anything using the bootstrap binaries to see if they
> actually work yet.

Exciting news!  I saw discussions about this ‘guix perform-download’
issue on IRC.  Did you eventually find what the problem is?

If the HiFive works fine, let me remind you that we have budget to buy
hardware, so we could just as well order a couple of these right away
(maybe you’ll have Guix System running by the time we receive them ;-)).

What we need is someone to order the machine(s) and to host it
afterwards, with stable connectivity.  This must be agreed upon by the
Spending Committee (currently Tobias, Ricardo, and myself; email
guix-finance@gnu.org).  You’ll then be reimbursed by the FSF, our
current fiscal sponsor.

Any takers?  Or should we wait until you have more experience with
yours, Efraim?

Thanks,
Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-08 13:43 ` Ludovic Courtès
@ 2021-06-08 22:28   ` Gabriel Wicki
  2021-06-10 13:22     ` Efraim Flashner
  2021-06-11 21:07     ` Ludovic Courtès
  2021-06-10 13:20   ` Efraim Flashner
  1 sibling, 2 replies; 27+ messages in thread
From: Gabriel Wicki @ 2021-06-08 22:28 UTC (permalink / raw)
  To: guix-devel

Hello everyone!

> Efraim Flashner <efraim@flashner.co.il> skribis:
> > Porting Guix comes with two parts: building the bootstrap-tarballs and
> > adding support for the new architecture in (gnu packages bootstrap).
> > Support for riscv was added to GCC with 7.1.0 so I had to bump the
> > bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
> > known the endianness of riscv64 so instead of patching it I bumped the
> > bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
> > spot after signing them and switched over to the riscv machine.

Do i understand correctly that the bootstrap-tarballs can be
cross-compiled and tested (to some extent) in a qemu-system-riscv? Or does
this *have* to fail (by Guix's design) due to it not being bootstrappable?


On Tue, Jun 08, 2021 at 03:43:44PM +0200, Ludovic Courtès wrote:
> If the HiFive works fine, let me remind you that we have budget to buy
> hardware, so we could just as well order a couple of these right away
> (maybe you’ll have Guix System running by the time we receive them ;-)).
> 
> What we need is someone to order the machine(s) and to host it
> afterwards, with stable connectivity.  This must be agreed upon by the
> Spending Committee (currently Tobias, Ricardo, and myself; email
> guix-finance@gnu.org).  You’ll then be reimbursed by the FSF, our
> current fiscal sponsor.
> 
> Any takers?  Or should we wait until you have more experience with
> yours, Efraim?
I could see myself doing that. I've been thinking about getting a HiFive
Unmatched for a while and getting the hardware makes working on it a bit
more exciting!

Do i understand correctly that this machine would then be used to
build Guix packages and serve them? I.e. a worker on ci.guix.gnu.org?


Have a nice week!
gabriel


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-08 13:43 ` Ludovic Courtès
  2021-06-08 22:28   ` Gabriel Wicki
@ 2021-06-10 13:20   ` Efraim Flashner
  2021-06-11 22:07     ` Ludovic Courtès
  2021-06-18 13:05     ` RISCV porting effort (now in stock @mouser) Gabriel Wicki
  1 sibling, 2 replies; 27+ messages in thread
From: Efraim Flashner @ 2021-06-10 13:20 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3412 bytes --]

On Tue, Jun 08, 2021 at 03:43:44PM +0200, Ludovic Courtès wrote:
> Hello!
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > Porting Guix comes with two parts: building the bootstrap-tarballs and
> > adding support for the new architecture in (gnu packages bootstrap).
> > Support for riscv was added to GCC with 7.1.0 so I had to bump the
> > bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
> > known the endianness of riscv64 so instead of patching it I bumped the
> > bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
> > spot after signing them and switched over to the riscv machine.
> >
> > Building Guix from sources is much easier thanks to the work of Vagrant,
> > I was able to apt install most of the dependencies on riscv. The
> > packaged version of guile-zlib was too old in 21.04 so I built that from
> > source (0.1.0 is available in Debian experimental), and I also had to
> > build gnutls from source for the guile-3.0 bindings. I added the riscv
> > binaries to (gnu packages bootstrap) and temporarily switched the
> > raw-build function to look for 3.0 guile libraries instead of 2.0.
> >
> > Where I'm at right now:
> > Downloading using the daemon (builtin:download) fails currently, it says
> > it doesn't have permissions to open-file to write downloaded files to
> > the store.
> > I haven't built anything using the bootstrap binaries to see if they
> > actually work yet.
> 
> Exciting news!  I saw discussions about this ‘guix perform-download’
> issue on IRC.  Did you eventually find what the problem is?

Right now it seems to be some sort of permissions error with writing to
the store. I haven't been able to figure out what's causing it yet.

> If the HiFive works fine, let me remind you that we have budget to buy
> hardware, so we could just as well order a couple of these right away
> (maybe you’ll have Guix System running by the time we receive them ;-)).

On one hand they seem similar to some of our aarch64 boards (but with
16GB of RAM), on the other hand it'd be a coup to announce serious
support for the platform so quickly.

> What we need is someone to order the machine(s) and to host it
> afterwards, with stable connectivity.  This must be agreed upon by the
> Spending Committee (currently Tobias, Ricardo, and myself; email
> guix-finance@gnu.org).  You’ll then be reimbursed by the FSF, our
> current fiscal sponsor.
> 
> Any takers?  Or should we wait until you have more experience with
> yours, Efraim?
> 
> Thanks,
> Ludo’.
> 

I had to pay import tax when I received mine, and I assume those in
Europe did too, so I'd recommend they be hosted in the US since IIRC
they're shipping from Texas. It might be nice to wait until we have it
working for sure, but the lead time is still expected to be 6 months
between ordering and shipping dates.

I suppose if something else comes along that's faster we could always
cancel an order and switch to that.

I have mine sitting in a mini-ITX case, using a libre-respecting NVIDIA
card. Definitely a more serious board than the aarch64 boards I've
bought in the past.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-08 22:28   ` Gabriel Wicki
@ 2021-06-10 13:22     ` Efraim Flashner
  2021-06-11 21:07     ` Ludovic Courtès
  1 sibling, 0 replies; 27+ messages in thread
From: Efraim Flashner @ 2021-06-10 13:22 UTC (permalink / raw)
  To: Gabriel Wicki; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2515 bytes --]

On Wed, Jun 09, 2021 at 12:28:22AM +0200, Gabriel Wicki wrote:
> Hello everyone!
> 
> > Efraim Flashner <efraim@flashner.co.il> skribis:
> > > Porting Guix comes with two parts: building the bootstrap-tarballs and
> > > adding support for the new architecture in (gnu packages bootstrap).
> > > Support for riscv was added to GCC with 7.1.0 so I had to bump the
> > > bootstrap GCC to 7 (and adjust some inputs), and guile-2.0.14 didn't
> > > known the endianness of riscv64 so instead of patching it I bumped the
> > > bootstrap guile to 3.0. I uploaded my bootstrap-tarballs to my regular
> > > spot after signing them and switched over to the riscv machine.
> 
> Do i understand correctly that the bootstrap-tarballs can be
> cross-compiled and tested (to some extent) in a qemu-system-riscv? Or does
> this *have* to fail (by Guix's design) due to it not being bootstrappable?
> 

They get cross compiled from another architecture, using the package
definitions in gnu/packages/make-bootstrap.scm. From what I've seen
online, it should be possible to boot Ubuntu's riscv64 image using qemu.
I haven't tried enabling riscv64 support in my binfmt service and
try building on my main machine.

> 
> On Tue, Jun 08, 2021 at 03:43:44PM +0200, Ludovic Courtès wrote:
> > If the HiFive works fine, let me remind you that we have budget to buy
> > hardware, so we could just as well order a couple of these right away
> > (maybe you’ll have Guix System running by the time we receive them ;-)).
> > 
> > What we need is someone to order the machine(s) and to host it
> > afterwards, with stable connectivity.  This must be agreed upon by the
> > Spending Committee (currently Tobias, Ricardo, and myself; email
> > guix-finance@gnu.org).  You’ll then be reimbursed by the FSF, our
> > current fiscal sponsor.
> > 
> > Any takers?  Or should we wait until you have more experience with
> > yours, Efraim?
> I could see myself doing that. I've been thinking about getting a HiFive
> Unmatched for a while and getting the hardware makes working on it a bit
> more exciting!
> 
> Do i understand correctly that this machine would then be used to
> build Guix packages and serve them? I.e. a worker on ci.guix.gnu.org?
> 
> 
> Have a nice week!
> gabriel
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-07  7:09 RISCV porting effort Efraim Flashner
  2021-06-07 15:37 ` Christopher Lemmer Webber
  2021-06-08 13:43 ` Ludovic Courtès
@ 2021-06-11 11:16 ` Efraim Flashner
  2021-06-13 17:24 ` Vagrant Cascadian
  2021-06-13 21:21 ` Christopher Baines
  4 siblings, 0 replies; 27+ messages in thread
From: Efraim Flashner @ 2021-06-11 11:16 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2052 bytes --]

On Mon, Jun 07, 2021 at 10:09:44AM +0300, Efraim Flashner wrote:
> Upstream u-boot support was merged days ago³ so we should be able to add
> support to our u-boot package soon-ish™.

I added u-boot-sifive-unmatched, although Vagrant pointed out that I may
be missing opensbi as an input. I haven't had a chance to test it yet.

> Where I'm at right now:
> Downloading using the daemon (builtin:download) fails currently, it says
> it doesn't have permissions to open-file to write downloaded files to
> the store.
> I haven't built anything using the bootstrap binaries to see if they
> actually work yet.

I've had some time to play with these parts. I tried the qemu-binfmt
emulation on my Guix System machine and I was able to start building out
the packages while emulating riscv64-linux, so that's a good sign.

As for writing to the store goes, I believe it's a permissions issue
somewhere. With some help on IRC I modified the downloading code and
wrote out some files using the builtin:download function to a file in my
home directory. I also used a minimal reproducer to write a file to the
store:

scheme@(guile-user)> (use-modules (guix gexp)(guix store)(guix monad-repl))
scheme@(guile-user)> ,enter-store-monad
store-monad@(guile-user) [1]> (text-file "foo" "Hello!\n")
$2 = "/gnu/store/r4bq7f7aikj0dlzjcl2cjgal5wvdhvk1-foo"

(ins)efraim@unmatched:~$ cat /gnu/store/r4bq7f7aikj0dlzjcl2cjgal5wvdhvk1-foo
Hello!

So that works. Could it be that I messed up creating the guixbuild
users? I copy/pasted from the manual, command history shows me I ran:
root@unmatched:/home/efraim# for i in $(seq -w 1 10);   do     useradd -g guixbuild -G guixbuild                       -d /var/empty -s $(which nologin)               -c "Guix build user $i" --system                guixbuilder$i;   done


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-08 22:28   ` Gabriel Wicki
  2021-06-10 13:22     ` Efraim Flashner
@ 2021-06-11 21:07     ` Ludovic Courtès
  1 sibling, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2021-06-11 21:07 UTC (permalink / raw)
  To: Gabriel Wicki; +Cc: guix-devel

Hi!

Gabriel Wicki <gabriel@erlikon.ch> skribis:

> On Tue, Jun 08, 2021 at 03:43:44PM +0200, Ludovic Courtès wrote:
>> If the HiFive works fine, let me remind you that we have budget to buy
>> hardware, so we could just as well order a couple of these right away
>> (maybe you’ll have Guix System running by the time we receive them ;-)).
>> 
>> What we need is someone to order the machine(s) and to host it
>> afterwards, with stable connectivity.  This must be agreed upon by the
>> Spending Committee (currently Tobias, Ricardo, and myself; email
>> guix-finance@gnu.org).  You’ll then be reimbursed by the FSF, our
>> current fiscal sponsor.
>> 
>> Any takers?  Or should we wait until you have more experience with
>> yours, Efraim?
> I could see myself doing that. I've been thinking about getting a HiFive
> Unmatched for a while and getting the hardware makes working on it a bit
> more exciting!
>
> Do i understand correctly that this machine would then be used to
> build Guix packages and serve them? I.e. a worker on ci.guix.gnu.org?

Yes, that’s the idea.  It would belong to the project and its primary
use would be continuous builds.

Thanks,
Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-10 13:20   ` Efraim Flashner
@ 2021-06-11 22:07     ` Ludovic Courtès
  2021-06-18 13:05     ` RISCV porting effort (now in stock @mouser) Gabriel Wicki
  1 sibling, 0 replies; 27+ messages in thread
From: Ludovic Courtès @ 2021-06-11 22:07 UTC (permalink / raw)
  To: guix-devel

Hello!

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Tue, Jun 08, 2021 at 03:43:44PM +0200, Ludovic Courtès wrote:

[...]

>> If the HiFive works fine, let me remind you that we have budget to buy
>> hardware, so we could just as well order a couple of these right away
>> (maybe you’ll have Guix System running by the time we receive them ;-)).
>
> On one hand they seem similar to some of our aarch64 boards (but with
> 16GB of RAM), on the other hand it'd be a coup to announce serious
> support for the platform so quickly.

I’m not saying we should announce anything, but rather that we get ready
for when the port is functional (especially if there’s typically 6
months between ordering and shipping).

> I had to pay import tax when I received mine, and I assume those in
> Europe did too, so I'd recommend they be hosted in the US since IIRC
> they're shipping from Texas. It might be nice to wait until we have it
> working for sure, but the lead time is still expected to be 6 months
> between ordering and shipping dates.

OK.  I don’t doubt “working for sure” will eventually happen; I wouldn’t
be surprised if it takes less than 6 months even.  :-)

(I’m not talking about the reduced bootstrap seeds, just the gross
bootstrap as currently done on ARM.)

> I suppose if something else comes along that's faster we could always
> cancel an order and switch to that.
>
> I have mine sitting in a mini-ITX case, using a libre-respecting NVIDIA
> card. Definitely a more serious board than the aarch64 boards I've
> bought in the past.

Good!

Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-07  7:09 RISCV porting effort Efraim Flashner
                   ` (2 preceding siblings ...)
  2021-06-11 11:16 ` RISCV porting effort Efraim Flashner
@ 2021-06-13 17:24 ` Vagrant Cascadian
  2021-06-14  7:27   ` Efraim Flashner
  2021-06-13 21:21 ` Christopher Baines
  4 siblings, 1 reply; 27+ messages in thread
From: Vagrant Cascadian @ 2021-06-13 17:24 UTC (permalink / raw)
  To: Efraim Flashner, guix-devel

[-- Attachment #1: Type: text/plain, Size: 4211 bytes --]

On 2021-06-07, Efraim Flashner wrote:
> Last week my HiFive Umatched¹ board came
...
> Ubuntu has an image for the board² which booted up just fine and I'm
> using, since I didn't want to spend too long getting Debian to run on
> the board.

I, on the other hand, went straight for Debian, of course! I stole the
vendor kernel and u-boot and built a Debian rootfs... and after a few
tries got it running.


> Upstream u-boot support was merged days ago³ so we should be able to add
> support to our u-boot package soon-ish™.

I haven't gotten u-boot working on Debian yet; builds fine, but has some
problem setting up reserved memory in the device-tree when booting. I
should try updating the guix u-boot-sifive-unmatched package and see if
that works any differently (different toolchain versions sometimes has
an effect).

There may be patches not yet upstreamed from:

  https://github.com/sifive/meta-sifive/tree/2021.05/recipes-bsp/u-boot/files/unmatched

Those are applied against u-boot 2021.01 ... and I haven't found any
that are likely related to the issue with reserved memory in the device-tree.


> Building Guix from sources is much easier thanks to the work of Vagrant,
> I was able to apt install most of the dependencies on riscv. The
> packaged version of guile-zlib was too old in 21.04 so I built that from
> source (0.1.0 is available in Debian experimental), and I also had to
> build gnutls from source for the guile-3.0 bindings. I added the riscv
> binaries to (gnu packages bootstrap) and temporarily switched the
> raw-build function to look for 3.0 guile libraries instead of 2.0.

I've managed to get so far as applying the patches from wip-riscv to the
guix 1.3.0 package in Debian and built it! It even runs, for the most
part!

That said, it was absurdly slow ... ~5 hours to build guix (not
including tests, which I disabled!) even though it was built entirely
within a tmpfs filesystem (what else would you do with 16GB of
ram?). Makes me worry how fast guix pull will perform...

I tried both with guile 3.0 (which required rebuilding guile-gnutls
against guile-3.0) and guile 2.2 (though I missed some of the patches,
so it didn't work too well).

I did get so far as trying to build hello, but fails building
diffutils-boot0:

  guix build hello
  ...
  config.status: error: in
  `/tmp/guix-build-diffutils-boot0-3.7.drv-0/diffutils-3.7':
  config.status: error: Something went wrong bootstrapping makefile
  fragments
      for automatic dependency tracking.  Try re-running configure with
  the
      '--disable-dependency-tracking' option to at least be able to
  build
      the package (albeit without support for automatic dependency
  tracking).
  See `config.log' for more details
  command
  "/gnu/store/0bxdn94rl7fvqksgf60vffsjn6h8fky8-bootstrap-binaries-0/bin/bash"
  "./configure" "CONFIG_SHELL=/gnu/st
  ore/0bxdn94rl7fvqksgf60vffsjn6h8fky8-bootstrap-binaries-0/bin/bash"
  "SHELL=/gnu/store/0bxdn94rl7fvqksgf60vffsjn6h8fky8-bootstrap-binaries-0/bin/bash"
  "--prefix=/gnu/store/5x2c8fgmw6hw5njish7n5ll28wink9fl-diffutils-boot0-3.7"
  "--enable-fas
  t-install" "--build=riscv64-unknown-linux-gnu" failed with status 1
  note: keeping build directory
  `/tmp/guix-build-diffutils-boot0-3.7.drv-1'
  builder for
  `/gnu/store/a3dn372lr9pgn3mb7j5s423x0ja1893q-diffutils-boot0-3.7.drv'
  failed with exit code 1              build of
  /gnu/store/a3dn372lr9pgn3mb7j5s423x0ja1893q-diffutils-boot0-3.7.drv
  failed
  View build log at '/var/log/guix/drvs/a3/dn372lr9pgn3mb7j5s423x0ja1893q-diffutils-boot0-3.7.drv.bz2'.
  ...
  cannot build derivation
  `/gnu/store/62l68kz6zz8m008qa8d0c5ariz7fd97z-hello-2.10.drv': 1
  dependencies couldn't be built
  guix build: error: build of
  `/gnu/store/62l68kz6zz8m008qa8d0c5ariz7fd97z-hello-2.10.drv' failed


I didn't find anything obvious to me in the build log or config.log, but
maybe someone else will:

  https://www.aikidev.net/~vagrant/riscv64/guix/


Some other boot-* stuff downloaded and/or built successfully, but this
appears to block any further progress for me at the moment...


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-07  7:09 RISCV porting effort Efraim Flashner
                   ` (3 preceding siblings ...)
  2021-06-13 17:24 ` Vagrant Cascadian
@ 2021-06-13 21:21 ` Christopher Baines
  2021-06-20 15:37   ` Ludovic Courtès
  4 siblings, 1 reply; 27+ messages in thread
From: Christopher Baines @ 2021-06-13 21:21 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel, guix-sysadmin

[-- Attachment #1: Type: text/plain, Size: 657 bytes --]


Efraim Flashner <efraim@flashner.co.il> writes:

> Last week my HiFive Umatched¹ board came and was quite the object of
> interest at the local computer store as I picked up a case, PSU and
> graphics card.

I also recently received a HiFive Umatched board which I ordered months
ago.

While I don't really have the time right at the moment to actually do
much with it, I've got it connected to the internet and can consider
offering SSH access to anyone who could make use of it for porting Guix
to RISCV.

I brought it with building things for Guix in mind, if people would
prefer it being owned by guix-europe, I'm open to selling it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-13 17:24 ` Vagrant Cascadian
@ 2021-06-14  7:27   ` Efraim Flashner
  2021-06-15  1:00     ` Vagrant Cascadian
  0 siblings, 1 reply; 27+ messages in thread
From: Efraim Flashner @ 2021-06-14  7:27 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

On Sun, Jun 13, 2021 at 10:24:13AM -0700, Vagrant Cascadian wrote:
> On 2021-06-07, Efraim Flashner wrote:
> > Last week my HiFive Umatched¹ board came
> ...
> > Ubuntu has an image for the board² which booted up just fine and I'm
> > using, since I didn't want to spend too long getting Debian to run on
> > the board.
> 
> I, on the other hand, went straight for Debian, of course! I stole the
> vendor kernel and u-boot and built a Debian rootfs... and after a few
> tries got it running.
> 
> live well,
>   vagrant

Do you have notes on what you did? Right now I was thinking of taking
the Ubuntu image, keeping /boot with their kernel and u-boot and
replacing the rest of it with Debian. (And copying the device-tree dtb
files to /boot/firmware/kernel-version)


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-14  7:27   ` Efraim Flashner
@ 2021-06-15  1:00     ` Vagrant Cascadian
  2021-06-15 12:37       ` Efraim Flashner
  0 siblings, 1 reply; 27+ messages in thread
From: Vagrant Cascadian @ 2021-06-15  1:00 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2604 bytes --]

On 2021-06-14, Efraim Flashner wrote:
> On Sun, Jun 13, 2021 at 10:24:13AM -0700, Vagrant Cascadian wrote:
>> On 2021-06-07, Efraim Flashner wrote:
>> > Last week my HiFive Umatched¹ board came
>> ...
>> > Ubuntu has an image for the board² which booted up just fine and I'm
>> > using, since I didn't want to spend too long getting Debian to run on
>> > the board.
>> 
>> I, on the other hand, went straight for Debian, of course! I stole the
>> vendor kernel and u-boot and built a Debian rootfs... and after a few
>> tries got it running.
>> 
>> live well,
>>   vagrant
>
> Do you have notes on what you did? Right now I was thinking of taking
> the Ubuntu image, keeping /boot with their kernel and u-boot and
> replacing the rest of it with Debian. (And copying the device-tree dtb
> files to /boot/firmware/kernel-version)

I didn't take notes, but off the top of my head something like this:

  Booted the OE image that shipped with it on the microSD

  add partition for new rootfs (cfdisk /dev/mmcblk?)

  mkfs.ext4 /dev/mmcblkXpY
  mount -o noatime /dev/mmcblkXpY /mnt

  git clone https://salsa.debian.org/installer-team/debootstrap
  cd deboostrap
  sudo DEBOOTSTRAP_DIR=$(pwd) ./deboostrap --arch=riscv64 sid /mnt http://deb.debian.org/debian-ports
  echo 'UUID=...  / ext4 errors=remount-ro 0 1' > /mnt/etc/fstab
  echo 'tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0' >> /mnt/etc/fstab

  sudo chroot /mnt adduser vagrant --gecos ,,,
  sudo chroot /mnt adduser vagrant sudo
  sudo chroot /mnt passwd vagrant

  add another entry to /boot/extlinux/extlinux.conf using the
  appropriate root=/dev/mmcblkXpY and/or root=UUID=...

Probably missed something, but that's the jist.

Then, to build guix...

  git clone https://salsa.debian.org/debian/guix/
  cd guix
  git remote add originguix https://git.savannah.gnu.org/git/guix.git
  git fetch
  git format-patch -o debian/patches originguix/master..originguix/wip-riscv
  # add new patches to debian/patches/series
  
  # adjust debian/rules and debian/control to use guile-3.0...

  # build the package!
  DEB_BUILD_OPTIONS='nocheck parallel=5' sbuild --chroot-mode=unshare -d UNRELEASED -c sid 

Upgrading to use guile-3.0 required a manually rebuilt guile-gnutls
against guile-3.0 as well...

Just pushed debian/wip-riscv64 to https://salsa.debian.org/debian/guix/
if you want to look at my most recent attempt.

Notably, this is just the wip-riscv patches applied against guix 1.3.0;
maybe building against guix master will be more successful?


live well,
  vagrant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-15  1:00     ` Vagrant Cascadian
@ 2021-06-15 12:37       ` Efraim Flashner
  0 siblings, 0 replies; 27+ messages in thread
From: Efraim Flashner @ 2021-06-15 12:37 UTC (permalink / raw)
  To: Vagrant Cascadian; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3836 bytes --]

On Mon, Jun 14, 2021 at 06:00:21PM -0700, Vagrant Cascadian wrote:
> On 2021-06-14, Efraim Flashner wrote:
> > On Sun, Jun 13, 2021 at 10:24:13AM -0700, Vagrant Cascadian wrote:
> >> On 2021-06-07, Efraim Flashner wrote:
> >> > Last week my HiFive Umatched¹ board came
> >> ...
> >> > Ubuntu has an image for the board² which booted up just fine and I'm
> >> > using, since I didn't want to spend too long getting Debian to run on
> >> > the board.
> >> 
> >> I, on the other hand, went straight for Debian, of course! I stole the
> >> vendor kernel and u-boot and built a Debian rootfs... and after a few
> >> tries got it running.
> >> 
> >> live well,
> >>   vagrant
> >
> > Do you have notes on what you did? Right now I was thinking of taking
> > the Ubuntu image, keeping /boot with their kernel and u-boot and
> > replacing the rest of it with Debian. (And copying the device-tree dtb
> > files to /boot/firmware/kernel-version)
> 
> I didn't take notes, but off the top of my head something like this:
> 
>   Booted the OE image that shipped with it on the microSD
> 
>   add partition for new rootfs (cfdisk /dev/mmcblk?)

Not a bad idea. I tried flashing a new SD card with their 2021.05 image
but it gave me kernel panics over the serial console so I reflashed it
with 2021.03. Actually, after flashing it I deleted everything in
/dev/sda4 and did debootstrap there and left extlinux setup as-is.

>   mkfs.ext4 /dev/mmcblkXpY
>   mount -o noatime /dev/mmcblkXpY /mnt
> 
>   git clone https://salsa.debian.org/installer-team/debootstrap
>   cd deboostrap
>   sudo DEBOOTSTRAP_DIR=$(pwd) ./deboostrap --arch=riscv64 sid /mnt http://deb.debian.org/debian-ports

I added --include=openssh-server,sudo

>   echo 'UUID=...  / ext4 errors=remount-ro 0 1' > /mnt/etc/fstab
>   echo 'tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0' >> /mnt/etc/fstab
> 
>   sudo chroot /mnt adduser vagrant --gecos ,,,
>   sudo chroot /mnt adduser vagrant sudo
>   sudo chroot /mnt passwd vagrant
> 
>   add another entry to /boot/extlinux/extlinux.conf using the
>   appropriate root=/dev/mmcblkXpY and/or root=UUID=...
> 
> Probably missed something, but that's the jist.

You forgot to mention what password you used ;P jkjk

echo "unmatched" > /etc/hostname
cat >>/etc/network/interfaces <<EOF
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
EOF

> Then, to build guix...
> 
>   git clone https://salsa.debian.org/debian/guix/
>   cd guix
>   git remote add originguix https://git.savannah.gnu.org/git/guix.git
>   git fetch
>   git format-patch -o debian/patches originguix/master..originguix/wip-riscv
>   # add new patches to debian/patches/series
>   
>   # adjust debian/rules and debian/control to use guile-3.0...
> 
>   # build the package!
>   DEB_BUILD_OPTIONS='nocheck parallel=5' sbuild --chroot-mode=unshare -d UNRELEASED -c sid 
> 
> Upgrading to use guile-3.0 required a manually rebuilt guile-gnutls
> against guile-3.0 as well...
> 
> Just pushed debian/wip-riscv64 to https://salsa.debian.org/debian/guix/
> if you want to look at my most recent attempt.
> 
> Notably, this is just the wip-riscv patches applied against guix 1.3.0;
> maybe building against guix master will be more successful?
> 
> 
> live well,
>   vagrant

I'm actually thinking of moving my reprepro setup off my g4 and hosting
it on my desktop (where I can get my gpg key more easily) and then
rsyncing it up to my server. If I setup pbuilder on the hifive unmatched
then I'll add those packages to the ones I already have online.



-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort (now in stock @mouser)
  2021-06-10 13:20   ` Efraim Flashner
  2021-06-11 22:07     ` Ludovic Courtès
@ 2021-06-18 13:05     ` Gabriel Wicki
  1 sibling, 0 replies; 27+ messages in thread
From: Gabriel Wicki @ 2021-06-18 13:05 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

So i checked mouser (europe) and it seems they have it in stock (361
in Munich right now). Not sure whether this was real i ordered one
and it seems it will be shipped next week.. Now i have to rush to
buy a case and a PSU (i already have a freedom respecting video
card) ;)

So everybody: if you want one: order now!


On Thu, Jun 10, 2021 at 04:20:42PM +0300, Efraim Flashner wrote:
> [...] but the lead time is still expected to be 6 months
> between ordering and shipping dates.
"Factory Lead Time" is still at about 6 months, but since the first
batch has not yet sold out... Also: if you ordered last November (in
reaction to SiFive's pre-order announcement) they already announced
first shipment to be no earlier than February.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-13 21:21 ` Christopher Baines
@ 2021-06-20 15:37   ` Ludovic Courtès
  2022-06-16  1:46     ` Pjotr Prins
  0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2021-06-20 15:37 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel, guix-sysadmin

Christopher Baines <mail@cbaines.net> skribis:

> I also recently received a HiFive Umatched board which I ordered months
> ago.

Nice!

> While I don't really have the time right at the moment to actually do
> much with it, I've got it connected to the internet and can consider
> offering SSH access to anyone who could make use of it for porting Guix
> to RISCV.
>
> I brought it with building things for Guix in mind, if people would
> prefer it being owned by guix-europe, I'm open to selling it.

Something to discuss with guix-sysadmin, but why not!

I think in general it’s best to have collective control over project
assets such as hardware and domain names, for the sake of clarity and
transparency, which in turns implies project ownership.

Thanks,
Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2021-06-20 15:37   ` Ludovic Courtès
@ 2022-06-16  1:46     ` Pjotr Prins
  2022-06-16 18:12       ` Maxim Cournoyer
  2022-06-17 16:08       ` Ludovic Courtès
  0 siblings, 2 replies; 27+ messages in thread
From: Pjotr Prins @ 2022-06-16  1:46 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Christopher Baines, guix-devel, guix-sysadmin

Most of you are probably aware that a RISC-V effort is going on in GNU
Guix.

Ekaitz is working on the GNU Mes bootstrap and Efraim is porting
packages (gcc and clang are ported), both NLNet projects. Also with
our NSF project we are using GNU Guix for emulators and running on
bare metal! We have submitted two talks at ISCA 2022 and both got
accepted in workshops.

https://www.iscaconf.org/isca2022/program/workshops.php

The Case for Using Guix to Solve the gem5 Packing Problem
https://www.gem5.org/events/isca-2022

The Case for Using Guix to Enable Reproducible RISC-V Software &
Hardware
https://carrv.github.io/2022/

I'll help co-present our GNU Guix effort in New York. It is very
exciting to present to these open hardware and industry people because
RISC-V is a heterogeneous platform and I hope they get interested in
GNU Guix to solve their portable software development challenges!

Pj.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-16  1:46     ` Pjotr Prins
@ 2022-06-16 18:12       ` Maxim Cournoyer
  2022-06-17 16:08       ` Ludovic Courtès
  1 sibling, 0 replies; 27+ messages in thread
From: Maxim Cournoyer @ 2022-06-16 18:12 UTC (permalink / raw)
  To: Pjotr Prins
  Cc: Ludovic Courtès, Christopher Baines, guix-devel,
	guix-sysadmin

Hello Pjotr,

Pjotr Prins <pjotr.public12@thebird.nl> writes:

> Most of you are probably aware that a RISC-V effort is going on in GNU
> Guix.
>
> Ekaitz is working on the GNU Mes bootstrap and Efraim is porting
> packages (gcc and clang are ported), both NLNet projects. Also with
> our NSF project we are using GNU Guix for emulators and running on
> bare metal! We have submitted two talks at ISCA 2022 and both got
> accepted in workshops.
>
> https://www.iscaconf.org/isca2022/program/workshops.php
>
> The Case for Using Guix to Solve the gem5 Packing Problem
> https://www.gem5.org/events/isca-2022
>
> The Case for Using Guix to Enable Reproducible RISC-V Software &
> Hardware
> https://carrv.github.io/2022/
>
> I'll help co-present our GNU Guix effort in New York. It is very
> exciting to present to these open hardware and industry people because
> RISC-V is a heterogeneous platform and I hope they get interested in
> GNU Guix to solve their portable software development challenges!

Congrats for the acceptance of the talks and to everyone involved!  It's
exciting!

Thanks,

Maxim


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-16  1:46     ` Pjotr Prins
  2022-06-16 18:12       ` Maxim Cournoyer
@ 2022-06-17 16:08       ` Ludovic Courtès
  2022-06-17 22:52         ` Pjotr Prins
  1 sibling, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2022-06-17 16:08 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: Christopher Baines, guix-devel

Hi!

Pjotr Prins <pjotr.public12@thebird.nl> skribis:

> The Case for Using Guix to Solve the gem5 Packing Problem
> https://www.gem5.org/events/isca-2022
>
> The Case for Using Guix to Enable Reproducible RISC-V Software &
> Hardware
> https://carrv.github.io/2022/

Congrats, it’s exciting to see hardware & software folks talk together,
and it’s even more exciting that you’re bringing Guix, reproducibility,
and bootstrapping issues on the table!  I can’t wait to view the slides
or videos.

And… I think one of you will have to come and present all this work in
Paris: <https://10years.guix.gnu.org/>.  Who’s in?  :-)

Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-17 16:08       ` Ludovic Courtès
@ 2022-06-17 22:52         ` Pjotr Prins
  2022-06-20  7:45           ` Pjotr Prins
  0 siblings, 1 reply; 27+ messages in thread
From: Pjotr Prins @ 2022-06-17 22:52 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Pjotr Prins, Christopher Baines, guix-devel

On Fri, Jun 17, 2022 at 06:08:18PM +0200, Ludovic Courtès wrote:
> And… I think one of you will have to come and present all this work in
> Paris: <https://10years.guix.gnu.org/>.  Who’s in?  :-)

We should all show up :) 



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-17 22:52         ` Pjotr Prins
@ 2022-06-20  7:45           ` Pjotr Prins
  2022-06-22 13:37             ` Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: Pjotr Prins @ 2022-06-20  7:45 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: Ludovic Courtès, Christopher Baines, guix-devel

Chris Batten created the slides and presented twice. He writes:

We presented our work on using Guix in computer architecture research at the gem5 users workshop an
d the Workshop on Computer Architecture Research with RISC-V ... it was awesome to have Pjotr join
in person for CARRV too! Pjotr did a great job at CARRV advocating for Guix ... people seemed inter
ested. Links to slides:

 - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-carrv2022.pdf
 - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-gem5workshop2022.pdf

Thanks to all of you for all of your help in preparing the two workshop presentations. I am looking
 forward to continuing to collaborate on this in the future!


On Sat, Jun 18, 2022 at 12:52:11AM +0200, Pjotr Prins wrote:
> On Fri, Jun 17, 2022 at 06:08:18PM +0200, Ludovic Courtès wrote:
> > And… I think one of you will have to come and present all this work in
> > Paris: <https://10years.guix.gnu.org/>.  Who’s in?  :-)
> 
> We should all show up :) 
> 


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-20  7:45           ` Pjotr Prins
@ 2022-06-22 13:37             ` Ludovic Courtès
  2022-06-22 15:19               ` Ekaitz Zarraga
  2022-06-24  6:37               ` Pjotr Prins
  0 siblings, 2 replies; 27+ messages in thread
From: Ludovic Courtès @ 2022-06-22 13:37 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: Christopher Baines, guix-devel

Pjotr Prins <pjotr.public12@thebird.nl> skribis:

> Chris Batten created the slides and presented twice. He writes:
>
> We presented our work on using Guix in computer architecture research at the gem5 users workshop an
> d the Workshop on Computer Architecture Research with RISC-V ... it was awesome to have Pjotr join
> in person for CARRV too! Pjotr did a great job at CARRV advocating for Guix ... people seemed inter
> ested. Links to slides:
>
>  - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-carrv2022.pdf
>  - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-gem5workshop2022.pdf

Nice, thanks for sharing!

Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-22 13:37             ` Ludovic Courtès
@ 2022-06-22 15:19               ` Ekaitz Zarraga
  2022-06-28  8:54                 ` Efraim Flashner
  2022-06-24  6:37               ` Pjotr Prins
  1 sibling, 1 reply; 27+ messages in thread
From: Ekaitz Zarraga @ 2022-06-22 15:19 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Pjotr Prins, Christopher Baines, guix-devel

Also, hi!

We kinda have a working bootstrappable GCC.

If you want to know more you can read here:

https://ekaitz.elenq.tech/bootstrapGcc4.html

:)


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-22 13:37             ` Ludovic Courtès
  2022-06-22 15:19               ` Ekaitz Zarraga
@ 2022-06-24  6:37               ` Pjotr Prins
  1 sibling, 0 replies; 27+ messages in thread
From: Pjotr Prins @ 2022-06-24  6:37 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Pjotr Prins, Christopher Baines, guix-devel

The paper for gem5 is also published online:

The Case for Using Guix to Solve the gem5 Packaging Problem
https://www.gem5.org/project/2022/05/23/guix.html

What is exciting to me is that RISCV allows for creating specialised
hardware modules that can be SOC'd next to the RISCV cores using the
network on a chip. So, think of it as optimised software in hardware.

We are working on applications in graph processing and matrix
computations. There was also an interesting talk on having memory
garbage collectors handled by a module (for managed languages,
such as python) and get 20% speedups of code.

The first step is to emulate such modules with software, such as gem5.

Because of its open source architecture a whole RISCV industry is
appearing that designs and tapes out these modules for special
purposes and Guix can play an important role in harnessing complex
software dependencies. 

Pj.

On Wed, Jun 22, 2022 at 03:37:46PM +0200, Ludovic Courtès wrote:
> Pjotr Prins <pjotr.public12@thebird.nl> skribis:
> 
> > Chris Batten created the slides and presented twice. He writes:
> >
> > We presented our work on using Guix in computer architecture research at the gem5 users workshop an
> > d the Workshop on Computer Architecture Research with RISC-V ... it was awesome to have Pjotr join
> > in person for CARRV too! Pjotr did a great job at CARRV advocating for Guix ... people seemed inter
> > ested. Links to slides:
> >
> >  - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-carrv2022.pdf
> >  - https://www.csl.cornell.edu/~cbatten/pdfs/batten-guix-slides-gem5workshop2022.pdf
> 
> Nice, thanks for sharing!
> 
> Ludo’.
> 


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-22 15:19               ` Ekaitz Zarraga
@ 2022-06-28  8:54                 ` Efraim Flashner
  2022-06-30 12:01                   ` Ludovic Courtès
  0 siblings, 1 reply; 27+ messages in thread
From: Efraim Flashner @ 2022-06-28  8:54 UTC (permalink / raw)
  To: Ekaitz Zarraga
  Cc: Ludovic Courtès, Pjotr Prins, Christopher Baines, guix-devel

[-- Attachment #1: Type: text/plain, Size: 8047 bytes --]

On Wed, Jun 22, 2022 at 03:19:43PM +0000, Ekaitz Zarraga wrote:
> Also, hi!
> 
> We kinda have a working bootstrappable GCC.
> 
> If you want to know more you can read here:
> 
> https://ekaitz.elenq.tech/bootstrapGcc4.html
> 
> :)
> 

I haven't been keeping much of a log of where I'm at, but here's the
result of running 'guix weather' against my machine.

(ins)efraim@3900XT ~/workspace/guix$ time ./pre-inst-env guix weather -s riscv64-linux --substitute-urls="http://localhost:3000" -c100
computing 15,205 package derivations for riscv64-linux...
looking for 15,948 store items on http://localhost:3000...
http://localhost:3000
  14.3% substitutes available (2,274 out of 15,948)
  unknown substitute sizes
  12,540.3 MiB on disk (uncompressed)
  0.033 seconds per request (525.2 seconds in total)
  30.4 requests per second
  (continuous integration information unavailable)
4659 packages are missing from 'http://localhost:3000' for 'riscv64-linux', among which:
  6434	rust@1.39.0	/gnu/store/61j2d2i6x8ppyqrq9l9mk49iq19vxnbs-rust-1.39.0-cargo /gnu/store/3wdwsfq3fgmcd3b1y3hiw19ircxbpr18-rust-1.39.0
  1438	ghc@7.10.2	/gnu/store/3y6d44cbgkl17gs5j82yxfgnjk8sap45-ghc-7.10.2-doc /gnu/store/qly5mgmipmxspnc4fgp4lvnkklz492mx-ghc-7.10.2
  1149	go@1.4-bootstrap-20171003	/gnu/store/cmldbfr2lrdrxp5qf2axaancsm970zxz-go-1.4-bootstrap-20171003-doc /gnu/store/4dj7715iyg7qpvbdzvwjdhhqg2mqflr0-go-1.4-bootstrap-20171003 /gnu/store/yr8a1g6bkxyhczsismwllwnzglplfx98-go-1.4-bootstrap-20171003-tests
  1090	postgresql@13.6/gnu/store/zvkkdqz0m7kk6hxy9pxciqz03c4ijqfn-postgresql-13.6
  1019	libunwind@1.5.0/gnu/store/j8nq3nlpmh8mfx84lidsraksdbbkzx7m-libunwind-1.5.0
   759	valgrind@3.17.0/gnu/store/7sda8rwv5jaxqasfpvvbihfbyznqp5xz-valgrind-3.17.0-doc /gnu/store/wajixlncl3915qval3ipsx71mqnixjdl-valgrind-3.17.0
   639	classpath@0.93	/gnu/store/skbpf6pn077qia0rh83mjj0wb4kgb1qh-classpath-0.93
   597	libatomic-ops@7.6.10	/gnu/store/xn2nfq5rsnc9ngwpflna2dy43kmvy0wr-libatomic-ops-7.6.10-debug /gnu/store/k66nqxnd5lmplj91jnaxg398ipb64a37-libatomic-ops-7.6.10
   486	sbcl-flexi-streams@1.0.19	/gnu/store/p0lrgja4k3f5radbsmfhdpm5kxbg25rw-sbcl-flexi-streams-1.0.19
   434	python-attrs@21.2.0	/gnu/store/35hnb2yxkc70i3igaaibxl0lmwxibhbr-python-attrs-21.2.0
   394	tbb@2021.5.0	/gnu/store/ni817qivyqriygfcyd81s1fry3lds0k7-tbb-2021.5.0
   317	sbcl-cffi@0.24.1	/gnu/store/pw0dp4glvc50gsgpkcxi9zmbldhnymnf-sbcl-cffi-0.24.1
   307	cl-trivial-backtrace@1.1.0-1.6eb65bd	/gnu/store/0ivylbjp19vs992flg9nys0c6fd0dwnq-cl-trivial-backtrace-1.1.0-1.6eb65bd
   282	emacs-dash@2.19.1	/gnu/store/ymca65i1phq9k45xc6np6ary5iwvbll4-emacs-dash-2.19.1
   273	openlibm@0.7.4	/gnu/store/abf1nfdgl8cilbj3b8lgjvy3fmihprc6-openlibm-0.7.4
   272	libunwind-julia@1.3.1	/gnu/store/ag87bkgg8gyaqbsyfzai83has0v4s1ps-libunwind-julia-1.3.1
   263	eigen@3.3.8	/gnu/store/7s2fpnsqx666c8fsjmbhi5yiy8vgp2rx-eigen-3.3.8
   222	emacs@28.1	/gnu/store/7lnkc3abxp33lrqdgfv4r9imkp12f6sw-emacs-28.1
   222	postgresql@13.6/gnu/store/zvkkdqz0m7kk6hxy9pxciqz03c4ijqfn-postgresql-13.6
   204	cl-hu.dwim.stefil@0.0.0-2.414902c	/gnu/store/mhyvzdp4m8r51mxwxz64wpjhj59bhvg4-cl-hu.dwim.stefil-0.0.0-2.414902c
   191	node@10.24.1	/gnu/store/15gy69cskj0zxzmxyrlazanq4alhwfw5-node-10.24.1
   186	libunwind@1.5.0/gnu/store/j8nq3nlpmh8mfx84lidsraksdbbkzx7m-libunwind-1.5.0
   183	icu4c@70.1	/gnu/store/qzj7817x1g61a5cz4qw14gz9v309b905-icu4c-70.1
   172	python-tornado@6.1	/gnu/store/mvgv54nx1k338vdxm0snkp5v16cjc0a6-python-tornado-6.1
   171	python-pandas@1.4.2	/gnu/store/6nnf4l6w17pymbs9bgaw47wyx7d55hin-python-pandas-1.4.2
   158	python-parso@0.8.3	/gnu/store/aw7kxbgnwrjfwqq3bqk0z3irvbii714p-python-parso-0.8.3
   153	trytond-country@6.0.1	/gnu/store/fhi8kxvad42nfr0mb4kdldv3995gwc2j-trytond-country-6.0.1
   147	trytond-currency@6.0.1	/gnu/store/38xd4nmdx3kmkdqz9577yfryw5rmcr5g-trytond-currency-6.0.1
   143	gconf@3.2.6	/gnu/store/s9ldmz47da5hgc266gdzq4sbqly6p02z-gconf-3.2.6
   141	python-testscenarios-bootstrap@0.5.0	/gnu/store/a88b42xxgyrds2iw9fmk8khc0sixkdk9-python-testscenarios-bootstrap-0.5.0
   136	emacs-shut-up@0.3.3	/gnu/store/jwshj5y4qdawy49w6pgph9qbcwqx01bh-emacs-shut-up-0.3.3
   130	camlboot@0.0.0-1.45045d0	/gnu/store/6slbf5bihlyackrrnpwfbv7d2h3418g4-camlboot-0.0.0-1.45045d0
   129	gnome-mime-data@2.18.0	/gnu/store/a423f1pwwdcfvnqys5kmn007kca755dh-gnome-mime-data-2.18.0
   128	libbonobo@2.32.1	/gnu/store/vr4gr7s89bxp7bw39v59rrpgmzj356s5-libbonobo-2.32.1
   127	python-itsdangerous@2.0.1	/gnu/store/nmg1854ichi2wja31lsgb0kc3yn2hh17-python-itsdangerous-2.0.1
   127	python-astor@0.8.1	/gnu/store/k5b2z98c62d3c24yg2hhani3q0jkfyvi-python-astor-0.8.1
   127	taglib@1.12	/gnu/store/369jf6qaijhkgwh39j0xksz3inc6k5ma-taglib-1.12
   126	libgnomecanvas@2.30.3	/gnu/store/81zsxqmf7z8x972fjrqs25zab6vw093c-libgnomecanvas-2.30.3
   126	libmodplug@0.8.9.0	/gnu/store/pfwmwd8iwv6jgfik0dy9iav0c0rsvp5r-libmodplug-0.8.9.0
   125	mpg123@1.28.2	/gnu/store/rg54jv54gyzrlcyjx1qqjwafg01wgdw4-mpg123-1.28.2
   121	gtksourceview@2.10.5	/gnu/store/5wmanhmb3vn9km9yp2j50h4aky4fry52-gtksourceview-2.10.5
   120	python-curio@1.5	/gnu/store/garr7dkd5q303kgkpfpm8ww3f0h8khsb-python-curio-1.5
   119	tini@0.19.0	/gnu/store/55xi1h9khssf05v2gfgsmfcfrimsx81m-tini-0.19.0
   117	python-tqdm@4.62.3	/gnu/store/7vryqfzrmcbn0hc8zk5hjxmdr6p24ipv-python-tqdm-4.62.3
   116	gnuplot@5.4.3	/gnu/store/7wv950s9g0ng2c2vn91ixixc98yidd1l-gnuplot-5.4.3
   116	ao@1.2.2-5-g20dc8ed	/gnu/store/1rbf934rk5jp0hkap3m04rx57dhgqdmg-ao-1.2.2-5-g20dc8ed
   114	hwloc@2.7.1	/gnu/store/08cgryw6gkrdm42nn6gfj76m0dkbigxa-hwloc-2.7.1-debug /gnu/store/af434fxgnh9ixygpvaxr6hs7qy79nx1w-hwloc-2.7.1-doc /gnu/store/yvryx12bg0i0lp9qnihjjr6jzrrhg7fq-hwloc-2.7.1-lib /gnu/store/bznxn2nldbi4wj68i281s33c4hw2ka1a-hwloc-2.7.1
   113	ocaml-cppo@1.6.9	/gnu/store/4qkcp8qm2zgxj2fba73ralag7nsnr73b-ocaml-cppo-1.6.9
   111	python-sqlparse@0.4.2	/gnu/store/cb7x6c94li98rrm83bmraw109r1zcjwl-python-sqlparse-0.4.2
   110	startup-notification@0.12	/gnu/store/qzv1fnh244mbhk6463czxnrfjm32dl5n-startup-notification-0.12
   110	ocaml-bigarray-compat@1.1.0	/gnu/store/3cq3fvbrdah0x9dgq3pmx4jpwgcaiqgj-ocaml-bigarray-compat-1.1.0
   110	libsodium@1.0.18	/gnu/store/717c1w080zk9ccjrvqj3xvmyr7n2s69q-libsodium-1.0.18
   109	ocaml-seq@0.1	/gnu/store/hw77kargqcxyzw20wf3kkpfwag6aiix4-ocaml-seq-0.1
   109	jack2@1.9.21	/gnu/store/5fiyvy82cja63k1ppfq32j6rky5d9x1b-jack2-1.9.21
   108	python-argon2-cffi@20.1.0	/gnu/store/v7l03xws8xp89pqi9bzk297m0nlnjvjg-python-argon2-cffi-20.1.0
   108	openh264@2.1.1	/gnu/store/xhkm8xhh71z5985bb3n7lgdpggw8djr2-openh264-2.1.1
   107	python-objgraph@3.4.1	/gnu/store/wwr253m9l19nmx71ir47qy82s7gmw934-python-objgraph-3.4.1
   106	python-tblib@1.6.0	/gnu/store/kfmqhcx9ikxfdpjd7c9bydf4ysw5hhl5-python-tblib-1.6.0
   104	cl-named-readtables@0.9-3.585a28e	/gnu/store/9x4hwjpks13qxaigdwy5mar26b9f6i67-cl-named-readtables-0.9-3.585a28e
   104	xorg-rgb@1.0.6	/gnu/store/r0lxyx4pyr685vjcmlfd3czy9r078lkr-xorg-rgb-1.0.6
   101	fltk@1.3.6	/gnu/store/1cq2wpljwchq1i2brbs8s3q8whlilv8s-fltk-1.3.6
   101	guile@2.2.7	/gnu/store/b5an0vs7psjkx1rncmx8g907sxaqx2g4-guile-2.2.7-debug /gnu/store/33cj2zfvmxx0y5km6b1akw988b2q34zn-guile-2.2.7

Some notes:
* rust is definitely TODO
* GHC shouldn't be there on the list.
* gccgo should replace go@1.4. Currently I can't use gccgo@10 to build
  go@1.16.15, 1.17.9 or 1.17.11 on riscv64. gccgo@10 works for
  go@1.16.15 and 1.17.11.
* postgresql@13.6 I think is missing a patch currently
* libunwind isn't supported until 1.6.*
* valgrind isn't supported
* classpath@0.93 is the java bootstrap path
* openlibm, tbb and libunwind-julia are for julia
* node@10 doesn't (yet) recognize riscv64

After that I don't remember offhand. I'm not sure I've tried yet to
build anything after ~170 so those can be ignored.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-28  8:54                 ` Efraim Flashner
@ 2022-06-30 12:01                   ` Ludovic Courtès
  2022-07-03  9:07                     ` Efraim Flashner
  0 siblings, 1 reply; 27+ messages in thread
From: Ludovic Courtès @ 2022-06-30 12:01 UTC (permalink / raw)
  To: Ekaitz Zarraga; +Cc: Pjotr Prins, Christopher Baines, guix-devel

Howdy,

Efraim Flashner <efraim@flashner.co.il> skribis:

> (ins)efraim@3900XT ~/workspace/guix$ time ./pre-inst-env guix weather -s riscv64-linux --substitute-urls="http://localhost:3000" -c100
> computing 15,205 package derivations for riscv64-linux...
> looking for 15,948 store items on http://localhost:3000...
> http://localhost:3000
>   14.3% substitutes available (2,274 out of 15,948)

Not bad!

Was it all built on a HiFive, or through emulated builds?

> Some notes:
> * rust is definitely TODO
> * GHC shouldn't be there on the list.
> * gccgo should replace go@1.4. Currently I can't use gccgo@10 to build
>   go@1.16.15, 1.17.9 or 1.17.11 on riscv64. gccgo@10 works for
>   go@1.16.15 and 1.17.11.
> * postgresql@13.6 I think is missing a patch currently
> * libunwind isn't supported until 1.6.*
> * valgrind isn't supported
> * classpath@0.93 is the java bootstrap path
> * openlibm, tbb and libunwind-julia are for julia
> * node@10 doesn't (yet) recognize riscv64
>
> After that I don't remember offhand. I'm not sure I've tried yet to
> build anything after ~170 so those can be ignored.

My guess is that upstream doesn’t go much further than you did, so
thumbs up!

Ludo’.


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: RISCV porting effort
  2022-06-30 12:01                   ` Ludovic Courtès
@ 2022-07-03  9:07                     ` Efraim Flashner
  0 siblings, 0 replies; 27+ messages in thread
From: Efraim Flashner @ 2022-07-03  9:07 UTC (permalink / raw)
  To: Ludovic Courtès
  Cc: Ekaitz Zarraga, Pjotr Prins, Christopher Baines, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1912 bytes --]

On Thu, Jun 30, 2022 at 02:01:19PM +0200, Ludovic Courtès wrote:
> Howdy,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > (ins)efraim@3900XT ~/workspace/guix$ time ./pre-inst-env guix weather -s riscv64-linux --substitute-urls="http://localhost:3000" -c100
> > computing 15,205 package derivations for riscv64-linux...
> > looking for 15,948 store items on http://localhost:3000...
> > http://localhost:3000
> >   14.3% substitutes available (2,274 out of 15,948)
> 
> Not bad!
> 
> Was it all built on a HiFive, or through emulated builds?

All on the HiFive. For some of the longer builds, like when I was
fiddling with llvm@9 and llvm@12 I emulated riscv64 on my machine so the
build was ~2 hours instead of ~6 hours, but after it built I garbage
collected it and rebuilt it on the native hardware.

> > Some notes:
> > * rust is definitely TODO
> > * GHC shouldn't be there on the list.
> > * gccgo should replace go@1.4. Currently I can't use gccgo@10 to build
> >   go@1.16.15, 1.17.9 or 1.17.11 on riscv64. gccgo@10 works for
> >   go@1.16.15 and 1.17.11.
> > * postgresql@13.6 I think is missing a patch currently
> > * libunwind isn't supported until 1.6.*
> > * valgrind isn't supported
> > * classpath@0.93 is the java bootstrap path
> > * openlibm, tbb and libunwind-julia are for julia
> > * node@10 doesn't (yet) recognize riscv64
> >
> > After that I don't remember offhand. I'm not sure I've tried yet to
> > build anything after ~170 so those can be ignored.
> 
> My guess is that upstream doesn’t go much further than you did, so
> thumbs up!

I just bumped libunwind on staging to 1.6.2 so that'll be available
eventually.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-07-03  9:47 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  7:09 RISCV porting effort Efraim Flashner
2021-06-07 15:37 ` Christopher Lemmer Webber
2021-06-08 13:43 ` Ludovic Courtès
2021-06-08 22:28   ` Gabriel Wicki
2021-06-10 13:22     ` Efraim Flashner
2021-06-11 21:07     ` Ludovic Courtès
2021-06-10 13:20   ` Efraim Flashner
2021-06-11 22:07     ` Ludovic Courtès
2021-06-18 13:05     ` RISCV porting effort (now in stock @mouser) Gabriel Wicki
2021-06-11 11:16 ` RISCV porting effort Efraim Flashner
2021-06-13 17:24 ` Vagrant Cascadian
2021-06-14  7:27   ` Efraim Flashner
2021-06-15  1:00     ` Vagrant Cascadian
2021-06-15 12:37       ` Efraim Flashner
2021-06-13 21:21 ` Christopher Baines
2021-06-20 15:37   ` Ludovic Courtès
2022-06-16  1:46     ` Pjotr Prins
2022-06-16 18:12       ` Maxim Cournoyer
2022-06-17 16:08       ` Ludovic Courtès
2022-06-17 22:52         ` Pjotr Prins
2022-06-20  7:45           ` Pjotr Prins
2022-06-22 13:37             ` Ludovic Courtès
2022-06-22 15:19               ` Ekaitz Zarraga
2022-06-28  8:54                 ` Efraim Flashner
2022-06-30 12:01                   ` Ludovic Courtès
2022-07-03  9:07                     ` Efraim Flashner
2022-06-24  6:37               ` Pjotr Prins

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).