unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: help-guix <help-guix@gnu.org>
Cc: Efraim Flashner <efraim@flashner.co.il>, jbranso@dismail.de
Subject: Re: Problems running Guix System initrd on an i.MX6 ARM board
Date: Mon, 27 Feb 2023 20:47:09 -0500	[thread overview]
Message-ID: <87lekik1cy.fsf@gmail.com> (raw)
In-Reply-To: <Y6Ngwop2G894e+Hl@3900XT> (Efraim Flashner's message of "Wed, 21 Dec 2022 21:38:42 +0200")

Hello!

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

> On Mon, Dec 12, 2022 at 10:40:50PM -0500, Maxim Cournoyer wrote:
>> Hi Guix!
>> 
>> I've been trying for some time to run Guix System on an ARM board (a
>> TS-7970 with an i.MX6 Cortex A9 CPU).  I wanted to cross-compile the
>> image for speed and efficiency, and stumbled upon some problems on the
>> way, such as https://issues.guix.gnu.org/44924, fixed on core-updates.

[...]

>> The initrd now runs, but it fails with the following error:
>> 
>> --8<---------------cut here---------------start------------->8---
>> [    8.448448] ALSA device list:
>> [    8.451472]   #0: On-board Codec
>> [    8.454768]   #1: imx-hdmi-soc
>> [    8.461095] Freeing unused kernel memory: 1024K (80e00000 - 80f00000)
>> GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
>> GC Warning: Couldn't read /proc/stat
>> [    8.481168] mmc0: new SDIO card at address 0001
>> Welcome, this is GNU's early boot Guile.
>> Use 'gnu.repl' for an initrd REPL.
>> 
>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> Throw to key `record-abi-mismatch-error' with args `(abi-check "~a: record ABI mismatch; recompilation needed" (#<record-type <file-system>>) ())'.
>> 
>> Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
>> GNU Guile 3.0.8
>> Copyright (C) 1995-2021 Free Software Foundation, Inc.
>> 
>> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
>> This program is free software, and you are welcome to redistribute it
>> under certain conditions; type `,show c' for details.
>> 
>> Enter `,help' for help.
>> scheme@(guile-user)>
>> --8<---------------cut here---------------end--------------->8---
>> 
>> The .go modules appear to be correctly cross-compiled for
>> arm-linux-gnueabihf (they run fine on the same target using a different
>> OS that I can boot with).
>> 
>> Ideas?
>
> Perhaps you'll need to compile more with guile-3.0-latest. If it's not
> too much I suppose you could try moving guile-3.0-latest to guile-3.0.
> Otherwise I guess you'll need to find where <file-system> is being
> compiled and replace that guile-3.0 with guile-3.0-latest too, and then
> see where the next failure is.

I've tried that on master, with the following patch applied:

--8<---------------cut here---------------start------------->8---
1 file changed, 17 insertions(+), 31 deletions(-)
gnu/packages/guile.scm | 48 +++++++++++++++++-------------------------------

modified   gnu/packages/guile.scm
@@ -310,15 +310,15 @@ (define-public guile-3.0
   (package
     (inherit guile-2.2)
     (name "guile")
-    (version "3.0.7")
+    (version "3.0.9")
     (source (origin
               (inherit (package-source guile-2.2))
-              (patches '())     ; We no longer need the patches.
+              (patches '())             ;no longer needed
               (uri (string-append "mirror://gnu/guile/guile-"
                                   version ".tar.xz"))
               (sha256
                (base32
-                "1dwiwsrpm4f96alfnz6wibq378242z4f16vsxgy1n9r00v3qczgm"))
+                "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))
               ;; Replace the snippet because the oom-test still
               ;; fails on some 32-bit architectures.
               (snippet '(begin
@@ -334,6 +334,11 @@ (define-public guile-3.0
        (delete "gmp" "libltdl")))
     (arguments
      (substitute-keyword-arguments (package-arguments guile-2.0)
+       ;; Guile 3.0.9 is bit-reproducible when built in parallel, thanks to
+       ;; its multi-stage build process for cross-module inlining, except when
+       ;; cross-compiling.
+       ((#:parallel-build? _ #f)
+        (not (%current-target-system)))
        ((#:configure-flags flags ''())
         ;; XXX: JIT-enabled Guile crashes in obscure ways on GNU/Hurd.
         `(cons* ,@(if (hurd-target?)
@@ -365,19 +370,19 @@ (define-public guile-3.0
                      (lambda _
                        ;; Upstream knows about suggested solution.
                        ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
-                       (substitute* "bootstrap/Makefile.in"
+                       ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
+                       (substitute* "stage0/Makefile.in"
                          (("^GUILE_OPTIMIZATIONS.*")
                           "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
                  '())
            ,@(if (or (target-ppc32?)
                      (target-riscv64?))
-               `((add-after 'unpack 'skip-failing-fdes-test
-                   (lambda _
-                     ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9)))
-                     (substitute* "test-suite/tests/ports.test"
-                       (("fdes not closed\"" all) (string-append all "(exit 77)")))
-                     #t)))
-               '())))))
+                 `((add-after 'unpack 'skip-failing-fdes-test
+                     (lambda _
+                       ;; ERROR: ((system-error "seek" "~A" ("Bad file descriptor") (9)))
+                       (substitute* "test-suite/tests/ports.test"
+                         (("fdes not closed\"" all) (string-append all "(exit 77)"))))))
+                 '())))))
 
     (native-search-paths
      (list (search-path-specification
@@ -398,26 +403,7 @@ (define-public guile-3.0-latest
                                   version ".tar.xz"))
               (sha256
                (base32
-                "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments guile-3.0)
-       ;; Guile 3.0.9 is bit-reproducible when built in parallel, thanks to
-       ;; its multi-stage build process for cross-module inlining, except when
-       ;; cross-compiling.
-       ((#:parallel-build? _ #f)
-        (not (%current-target-system)))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           ,@(if (target-ppc32?)
-               `((replace 'adjust-bootstrap-flags
-                   (lambda _
-                     ;; Upstream knows about suggested solution.
-                     ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
-                     ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223#46
-                     (substitute* "stage0/Makefile.in"
-                       (("^GUILE_OPTIMIZATIONS.*")
-                        "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n")))))
-               '())))))))
+                "03bm1mnfc9kkg2ls942a0js7bxrdzmcffgrgg6anwdmjfan2a9hs"))))))
 
 ;;; The symbol guile-3.0/fixed should be used when guile-3.0 needs fixes
 ;;; (security or else) and this deprecation could be removed.
--8<---------------cut here---------------end--------------->8---

Unfortunately after rebuilding the world, the situation is unchanged:

--8<---------------cut here---------------start------------->8---
[    2.887460] can: raw protocol
[    2.887469] can: broadcast manager protocol
[    2.887481] can: netlink gateway - max_hops=1
[    2.887931] Key type dns_resolver registered
[    2.893941] ThumbEE CPU extension supported.
[    2.946659] Registering SWP/SWPB emulation handler
[    2.952239] Loading compiled-in X.509 certificates
[    2.957525] zswap: loaded using pool lzo/zbud
[    2.970069] ata1: SATA link down (SStatus 0 SControl 300)
[    2.975623] ahci-imx 2200000.sata: no device found, disabling link.
[    2.981907] ahci-imx 2200000.sata: pass ahci_imx..hotplug=1 to enable hotplug
[    3.012850] mmc1: new high speed SDHC card at address 59b4
[    3.020229] mmcblk1: mmc1:59b4 USD   7.51 GiB 
[    3.029086]  mmcblk1: p1
[    3.366035] mmc2: new DDR MMC card at address 0001
[    3.372617] mmcblk2: mmc2:0001 MMC04G 3.60 GiB 
[    3.383743] mmcblk2boot0: mmc2:0001 MMC04G 16.0 MiB 
[    3.391245] mmcblk2boot1: mmc2:0001 MMC04G 16.0 MiB 
[    3.398194] mmcblk2rpmb: mmc2:0001 MMC04G 128 KiB, chardev (236:0)
[    3.601340] mxs_phy 20c9000.usbphy: Data pin can't make good contact.
[    3.612016] imx_usb 2184200.usb: No over current polarity defined
[    3.623526] ci_hdrc ci_hdrc.1: EHCI Host Controller
[    3.628468] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
[    3.665367] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[    3.672464] hub 1-0:1.0: USB hub found
[    3.676376] hub 1-0:1.0: 1 port detected
[    3.685422] imx_thermal 20c8000.anatop:tempmon: Extended Commercial CPU temperature grade - max:105C critical:100C passive:95C
[    3.706165] Freeing unused kernel image (initmem) memory: 2048K
[    3.735853] Run /init as init process
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
GC Warning: Couldn't read /proc/stat
[    3.985294] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    4.186425] hub 1-1:1.0: USB hub found
[    4.190308] hub 1-1:1.0: 4 ports detected
Welcome, this is GNU's early boot Guile.
Use 'gnu.repl' for an initrd REPL.

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `record-abi-mismatch-error' with args `(abi-check "~a: record ABI mismatch; recompilation needed" (#<record-type <file-system>>) ())'.

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> [   13.932250] platform regulator_wlan_vmmc: deferred probe pending
,bt
In gnu/build/linux-boot.scm:
   554:14  1 (_)
In ice-9/boot-9.scm:
  1685:16  0 (raise-exception _ #:continuable? _)
scheme@(guile-user)> [  320.255299] random: crng init done
--8<---------------cut here---------------end--------------->8---

I'm out of ideas for now.

-- 
Thanks,
Maxim


      reply	other threads:[~2023-02-28  1:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  3:40 Problems running Guix System initrd on an i.MX6 ARM board Maxim Cournoyer
2022-12-19 23:48 ` jbranso
2022-12-21 19:38 ` Efraim Flashner
2023-02-28  1:47   ` Maxim Cournoyer [this message]

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=87lekik1cy.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=efraim@flashner.co.il \
    --cc=help-guix@gnu.org \
    --cc=jbranso@dismail.de \
    /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.
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).