From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6LDkLGX0l2OwwQAAbAwnHQ (envelope-from ) for ; Tue, 13 Dec 2022 04:41:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oKXTLGX0l2PKzgAAauVa8A (envelope-from ) for ; Tue, 13 Dec 2022 04:41:25 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 28A4A11F88 for ; Tue, 13 Dec 2022 04:41:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4wA5-0008SC-Cj; Mon, 12 Dec 2022 22:40:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4wA3-0008S1-OO for help-guix@gnu.org; Mon, 12 Dec 2022 22:40:55 -0500 Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4wA1-0001Fh-Le for help-guix@gnu.org; Mon, 12 Dec 2022 22:40:55 -0500 Received: by mail-qt1-x82b.google.com with SMTP id ay32so10871720qtb.11 for ; Mon, 12 Dec 2022 19:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Rr9CrOE5cFtRDQRiJy2x0tiA5yQ39ZMpfC2cmfYAHZ8=; b=gDOCDxFM3hzUJesLVKd7GsjQJ93LVNgKYwQgtiidqIyoQZ0I+iHSJk+HXgkBvkXUN6 7BU66834MWb+C5SBZTPE6SzvmhrH1LCVq49TLYSb1rfYr7DqG1ZjMOyABSfP/aRjv760 sFjqa/xYYXcb8jMxzj6Gx5t+iCH6ljtklTyyKrdJ6NKhyBSX/kvDXhwML3WZlWbhxWgH 7grIgBzXZE8e5btwPpiJ8HLPSa3TWKzGKNdTTvW64ruDCXqYsJSal7AvlQjMd5G7vZQc Ch8ioJcynuBgqXGzbgh6Lp79JWB8sUW4aKb2lSfSXspvBoifI3/AA7i5Q+52kyGplPbl hr2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Rr9CrOE5cFtRDQRiJy2x0tiA5yQ39ZMpfC2cmfYAHZ8=; b=WMPLAVSgKUGgah6zSoVgwyiEyR2WoTxGv7zBT6hkuZq4vI0y4vQhfDkWaK5sPoWQ5F ckYiIVlvJmE5L51AMQpY1h5+dhFmpZaXNMhDjK/TJ5FKAq0VhjY0qpC6olwcYwI25hc0 2K57AEkEBHJ/jmbOLHuKbbAwXoAtCv5hX4a8v4SDrNr3G2+9ZrSSUsmY8J6yj/enTip/ gpYEeE5gc6FJALBmdc5yWBGvVn0WQec3zBrDMWWhiwzzJ2JKI4sWWf0nXRwPiVTcgBTk XP4xRw7xntUam/UGCLrcIdHEALbdC/YxlMwHSFaGcmUt/CjaZlZHEEWOUgQ5VYXXQIus cHug== X-Gm-Message-State: ANoB5pm2h6ioPBNuWzGZHS+FPcMRWSKyywGLGMzMtojoGXJBJzY6Pkg1 iNWyRb0lyttmxYR1U4bx54Ibdcpq6uvqVQ== X-Google-Smtp-Source: AA0mqf6urj4oujzWIMO/PgoPG3U/F9nLsnocq++pr4cjkQ8StydtAtA+j3nAc5ncNxdL2SGKaNadDg== X-Received: by 2002:ac8:490e:0:b0:3a5:faa7:3601 with SMTP id e14-20020ac8490e000000b003a5faa73601mr2784229qtq.1.1670902851853; Mon, 12 Dec 2022 19:40:51 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id x18-20020ac87312000000b003a50c9993e1sm6850092qto.16.2022.12.12.19.40.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Dec 2022 19:40:51 -0800 (PST) From: Maxim Cournoyer To: help-guix Subject: Problems running Guix System initrd on an i.MX6 ARM board Date: Mon, 12 Dec 2022 22:40:50 -0500 Message-ID: <87pmco3r99.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670902885; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Rr9CrOE5cFtRDQRiJy2x0tiA5yQ39ZMpfC2cmfYAHZ8=; b=aVUxeKdeuHN3YppoIcfNkxq2zFkXDTgRlooA6/ZiL47RmJXWx0qGiRdyuerjbFgSQzgEI1 yikZ3QQ2sJIlRa7nvrjzkgvuZjbF6DfTXe04+/Mjo92VlfCp9ZyKotFqqZ8Khip4DFzVQG s6sDwwZK0Z7gT7DMzBstMCYyqObyYQxW/R0X5W1fQUo3ymgI01mCCmm2KNB9cL41yYvuyQ 2/wxf4dTBnrqrECLkV1OiBZ3TyarXLRS2LBW6SxITYsL24N2bwV9GxiyNkEa1fPl4TgXW6 lhDN9RdrSHlQXK8t9p4KUeUYIxCEaW9T7om9oyIHrS+mmc78wm2bNWfajieVSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gDOCDxFM; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670902885; a=rsa-sha256; cv=none; b=ioqmYcWr5Z+RdCzN7stgwfve9jYullSHpsL7KQzSSdbQtdNgXAd2AnPvu66b0Y2M3EcZEF cYq6/lEfIuTmVxIgzsIjoCHnELfeOTueQah4HSt9IwAgS/5YK44twgp00BBPh0fLgm3XsU bxyAuGTXMl0R9ATxz37e5vDQNwic1/S8S3L2ENjId3T+kRiyqtEQfIErGoGmnnoEALysCg kivQox5mh5ZUyKcgf+DR380M/Av6Soe7KEudcheuOueGUhxPqX+y8ptxu9CMub1Y4RH1zH JrsVrmBEjuv3jyxmeGS6uZjV3FxCGkC0Ts1mldE3lz1Z5INSmyTD5PUtc6Teug== X-Migadu-Spam-Score: -9.72 X-Spam-Score: -9.72 X-Migadu-Queue-Id: 28A4A11F88 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=gDOCDxFM; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com X-TUID: nFV4b52QSFNs 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. Then it took me some time to figure out that Guile 3.0.7 was segfaulting when running the initrd's init script, which would cause the following kernel panic and backtrace: --8<---------------cut here---------------start------------->8--- [ 5.913371] ALSA device list: [ 5.913374] #0: On-board Codec [ 5.913376] #1: imx-hdmi-soc [ 5.921483] sdhci-esdhc-imx 2190000.usdhc: card claims to support voltages below defined range [ 5.938332] mmc0: new SDIO card at address 0001 [ 5.987225] mmc2: new DDR MMC card at address 0001 [ 5.998025] mmcblk2: mmc2:0001 MMC04G 3.60 GiB [ 6.009623] mmcblk2boot0: mmc2:0001 MMC04G partition 1 16.0 MiB [ 6.020181] mmcblk2boot1: mmc2:0001 MMC04G partition 2 16.0 MiB [ 6.031772] mmcblk2rpmb: mmc2:0001 MMC04G partition 3 128 KiB [ 6.957080] Freeing unused kernel memory: 1024K (80e00000 - 80f00000) [ 6.967865] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008b00 [ 6.967865] [ 6.977015] CPU3: stopping [ 6.979732] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.9.11-tsimx #1 [ 6.986174] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 6.992704] Backtrace: [ 6.995189] [<80111d48>] (dump_backtrace) from [<80111f38>] (show_stack+0x18/0x1c) [ 7.002765] r7:00000000 r6:20000193 r5:00000000 r4:80f2fecc [ 7.008437] [<80111f20>] (show_stack) from [<8054d61c>] (dump_stack+0x80/0x9c) [ 7.015669] [<8054d59c>] (dump_stack) from [<8010d8dc>] (handle_IPI+0xe0/0x178) [ 7.022981] r7:00000000 r6:d80b1f18 r5:00000003 r4:80e7f034 [ 7.028648] [<8010d7fc>] (handle_IPI) from [<801014d8>] (gic_handle_irq+0x70/0x78) [ 7.036222] r7:f4a01100 r6:80f0358c r5:f4a00100 r4:d80b1f18 [ 7.041895] [<80101468>] (gic_handle_irq) from [<80a0a34c>] (__irq_svc+0x6c/0xa8) [ 7.049380] Exception stack(0xd80b1f18 to 0xd80b1f60) [ 7.054434] 1f00: 00000000 00000001 [ 7.062617] 1f20: 59eaf000 dad2fec0 9fdcb41d 9f4ecbfd dad2f1a8 00000000 00000001 00000000 [ 7.070800] 1f40: 00000001 d80b1f9c d80b1f68 d80b1f68 80826350 80826374 60000113 ffffffff [ 7.078981] r7:d80b1f4c r6:ffffffff r5:60000113 r4:80826374 [ 7.084651] [<80826284>] (cpuidle_enter_state) from [<80826488>] (cpuidle_enter+0x1c/0x20) [ 7.092921] r10:d80b1fc0 r9:80e801a0 r8:80f030f4 r7:d80b0000 r6:00000003 r5:80f08cd4 [ 7.100752] r4:dad2f1a8 [ 7.103301] [<8082646c>] (cpuidle_enter) from [<80165ccc>] (call_cpuidle+0x3c/0x40) [ 7.110966] [<80165c90>] (call_cpuidle) from [<80165f48>] (cpu_startup_entry+0x188/0x1a8) [ 7.119149] [<80165dc0>] (cpu_startup_entry) from [<8010d5b8>] (secondary_start_kernel+0x134/0x164) [ 7.128196] r7:80f8d320 r4:80f14490 [ 7.131779] [<8010d484>] (secondary_start_kernel) from [<1010156c>] (0x1010156c) [ 7.139178] r7:80f8d320 r6:10c03c7d r5:00000051 r4:6809806a [ 7.144839] CPU1: stopping [ 7.147554] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.9.11-tsimx #1 [ 7.153996] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 7.160524] Backtrace: [ 7.162999] [<80111d48>] (dump_backtrace) from [<80111f38>] (show_stack+0x18/0x1c) [ 7.170573] r7:00000000 r6:20000193 r5:00000000 r4:80f2fecc [ 7.176242] [<80111f20>] (show_stack) from [<8054d61c>] (dump_stack+0x80/0x9c) [ 7.183471] [<8054d59c>] (dump_stack) from [<8010d8dc>] (handle_IPI+0xe0/0x178) [ 7.190783] r7:00000000 r6:d80adf18 r5:00000001 r4:80e7f034 [ 7.196449] [<8010d7fc>] (handle_IPI) from [<801014d8>] (gic_handle_irq+0x70/0x78) [ 7.204022] r7:f4a01100 r6:80f0358c r5:f4a00100 r4:d80adf18 [ 7.209689] [<80101468>] (gic_handle_irq) from [<80a0a34c>] (__irq_svc+0x6c/0xa8) [ 7.217173] Exception stack(0xd80adf18 to 0xd80adf60) [ 7.222227] df00: 00000000 00000001 [ 7.230410] df20: 59e93000 dad13ec0 9fdcb2cf 9f4ecbfd dad131a8 00000000 00000001 00000000 [ 7.238592] df40: 00000001 d80adf9c d80adf68 d80adf68 80826350 80826374 60000013 ffffffff [ 7.246773] r7:d80adf4c r6:ffffffff r5:60000013 r4:80826374 [ 7.252439] [<80826284>] (cpuidle_enter_state) from [<80826488>] (cpuidle_enter+0x1c/0x20) [ 7.260709] r10:d80adfc0 r9:80e801a0 r8:80f030f4 r7:d80ac000 r6:00000001 r5:80f08cd4 [ 7.268539] r4:dad131a8 [ 7.271082] [<8082646c>] (cpuidle_enter) from [<80165ccc>] (call_cpuidle+0x3c/0x40) [ 7.278746] [<80165c90>] (call_cpuidle) from [<80165f48>] (cpu_startup_entry+0x188/0x1a8) [ 7.286931] [<80165dc0>] (cpu_startup_entry) from [<8010d5b8>] (secondary_start_kernel+0x134/0x164) [ 7.295979] r7:80f8d320 r4:80f14490 [ 7.299560] [<8010d484>] (secondary_start_kernel) from [<1010156c>] (0x1010156c) [ 7.306959] r7:80f8d320 r6:10c03c7d r5:00000051 r4:6809806a [ 7.312621] CPU2: stopping [ 7.315337] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.11-tsimx #1 [ 7.321779] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [ 7.328306] Backtrace: [ 7.330780] [<80111d48>] (dump_backtrace) from [<80111f38>] (show_stack+0x18/0x1c) [ 7.338355] r7:00000000 r6:20000193 r5:00000000 r4:80f2fecc [ 7.344024] [<80111f20>] (show_stack) from [<8054d61c>] (dump_stack+0x80/0x9c) [ 7.351254] [<8054d59c>] (dump_stack) from [<8010d8dc>] (handle_IPI+0xe0/0x178) [ 7.358567] r7:00000000 r6:d80aff18 r5:00000002 r4:80e7f034 [ 7.364232] [<8010d7fc>] (handle_IPI) from [<801014d8>] (gic_handle_irq+0x70/0x78) [ 7.371806] r7:f4a01100 r6:80f0358c r5:f4a00100 r4:d80aff18 [ 7.377472] [<80101468>] (gic_handle_irq) from [<80a0a34c>] (__irq_svc+0x6c/0xa8) [ 7.384956] Exception stack(0xd80aff18 to 0xd80aff60) [ 7.390010] ff00: 00000000 dad24bc0 [ 7.398192] ff20: 00000001 d80ae000 9fdcb6b7 9fca06dd dad211a8 00000001 00000001 00000004 [ 7.406375] ff40: 00000001 d80aff9c d80aff28 d80aff68 8018eb00 80826374 20000013 ffffffff [ 7.414555] r7:d80aff4c r6:ffffffff r5:20000013 r4:80826374 [ 7.420222] [<80826284>] (cpuidle_enter_state) from [<80826488>] (cpuidle_enter+0x1c/0x20) [ 7.428493] r10:d80affc0 r9:80e801a0 r8:80f030f4 r7:d80ae000 r6:00000002 r5:80f08cd4 [ 7.436323] r4:dad211a8 [ 7.438866] [<8082646c>] (cpuidle_enter) from [<80165ccc>] (call_cpuidle+0x3c/0x40) [ 7.446531] [<80165c90>] (call_cpuidle) from [<80165f48>] (cpu_startup_entry+0x188/0x1a8) [ 7.454714] [<80165dc0>] (cpu_startup_entry) from [<8010d5b8>] (secondary_start_kernel+0x134/0x164) [ 7.463761] r7:80f8d320 r4:80f14490 [ 7.467342] [<8010d484>] (secondary_start_kernel) from [<1010156c>] (0x1010156c) [ 7.474742] r7:80f8d320 r6:10c03c7d r5:00000051 r4:6809806a [ 7.480414] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00008b00 [ 7.480414] --8<---------------cut here---------------end--------------->8--- I found that guile would segfault and return an exit code of 139 (perhaps ETXTBSY, per guile sources), by adding bash-static to the initrd and invoking guile from there during the early boot. Luckily, Guile 3.0.8 doesn't have this problem, so the following fixed it: --8<---------------cut here---------------start------------->8--- modified gnu/packages/make-bootstrap.scm @@ -797,7 +797,7 @@ (define %guile-static-stripped ;; A stripped static Guile 3.0 binary, for use in initrds ;; and during bootstrap. (make-guile-static-stripped - (make-guile-static guile-3.0 + (make-guile-static guile-3.0-latest '("guile-2.2-default-utf8.patch" "guile-3.0-linux-syscalls.patch" "guile-3.0-relocatable.patch")))) --8<---------------cut here---------------end--------------->8--- 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" (#>) ())'. 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? -- Thanks, Maxim