guix-devel
[Top][All Lists]
Advanced

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

Re: Rock64 segfaults (was: Merging ‘staging’?)


From: Timotej Lazar
Subject: Re: Rock64 segfaults (was: Merging ‘staging’?)
Date: Fri, 15 Jul 2022 12:52:45 +0200

Hi,

sorry to hijack the thread – I found your post when debugging random
segfaults on the rock64, and just wanted to post a possible solution for
anyone having the same problem.

"pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> [2022-06-09 
19:19:30+0200]:
> (The build of llvm@11 also needed a few retries because gcc randomly
> fails sometimes (once with a segfault).  That is not a Guix bug
> though, I think, but peculiarities of the rock64.)

This seems to be a hardware issue that can be fixed by downclocking the
memory¹. Mainline u-boot has two variants of the rk3328-sdram-lpddr3
.dtsi file, so I just did

    (define u-boot-rock64-rk3328/666
      (package
        (inherit u-boot-rock64-rk3328)
        (arguments
         (substitute-keyword-arguments (package-arguments u-boot-rock64-rk3328)
           ((#:phases phases)
            `(modify-phases ,phases
               (add-after 'unpack 'change-ddr-clock
                 (lambda _
                   (substitute* "arch/arm/dts/rk3328-rock64-u-boot.dtsi"
                     (("rk3328-sdram-lpddr3-1600.dtsi") 
"rk3328-sdram-lpddr3-666.dtsi"))))))))))

and used that for the bootloader:

    (bootloader
      (bootloader-configuration
        (bootloader
          (bootloader
            (inherit u-boot-rock64-rk3328-bootloader)
            (package u-boot-rock64-rk3328/666)))
        …

With this I was able to compile both gcc and llvm several times; before,
compilation would reliably crash within an hour unless it was done using
a single core. I assume performance with the lower memory rate is
considerably worse, but I haven’t done any measurements.

It’s very nice that I can include this in my OS configuration and then
pretty much forget about it. Big thanks to all guix for a system where
making such changes is so simple!

Regards,
Timotej

¹ https://forum.armbian.com/topic/15082-rock64-focal-fossa-memory-frequency/



reply via email to

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