[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RISCV porting effort

From: Vagrant Cascadian
Subject: Re: RISCV porting effort
Date: Sun, 13 Jun 2021 10:24:13 -0700

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:

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

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

  guix build hello
  config.status: error: in
  config.status: error: Something went wrong bootstrapping makefile
      for automatic dependency tracking.  Try re-running configure with
      '--disable-dependency-tracking' option to at least be able to
      the package (albeit without support for automatic dependency
  See `config.log' for more details
  "./configure" "CONFIG_SHELL=/gnu/st
  t-install" "--build=riscv64-unknown-linux-gnu" failed with status 1
  note: keeping build directory
  builder for
  failed with exit code 1              build of
  View build log at 
  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:

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

live well,

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]