Received: from zmail.florianheigl.me (zmail.florianheigl.me [202.61.252.102]) by gbr-app-1.alpinelinux.org (Postfix) with ESMTPS id CBA23226218 for <~alpine/devel@lists.alpinelinux.org>; Fri, 22 Mar 2024 21:33:43 +0000 (UTC) Received: from zmail.florianheigl.me (localhost [127.0.0.1]) by zmail.florianheigl.me (Postfix) with ESMTPS id CAA33E4268 for <~alpine/devel@lists.alpinelinux.org>; Fri, 22 Mar 2024 21:33:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zmail.florianheigl.me (Postfix) with ESMTP id 99407E44BC for <~alpine/devel@lists.alpinelinux.org>; Fri, 22 Mar 2024 21:33:42 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 zmail.florianheigl.me 99407E44BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=florianheigl.me; s=3633B5F0-2F83-11EB-9D93-E183F679DC2E; t=1711143222; bh=BfoBwW20lp+sImxuagxrro4RqoS1eDhYoyD9l4AeOpw=; h=Date:From:To:Message-ID:MIME-Version; b=lozF6ERNvez8iLSnI7VS1ecvbftHprBpnn4suHmH8qgCeLkHdmw2fgYB+aeuV33pH Bzy/ugl39a+x+hjupsahfbZr3hFrsTuDcr66AFsmtjYEhO/4+MZ3n7p5z8WHPB23kT fFwdNtZ0aN/3CkGuiNG8TU3MU5FNxhGEd7AZQiwHdhdEGHGoHoqgWVq5qbpL5xP/kV rYzYwY28iK1YapQGDryMtJ0ZGORIWJtb5ThX03Wy5j6W43Wg7V9bN0aP/IyReYakLQ aMbgrwXs7rKwdXVuf1X051stixyk50rBATIvYUhfJpTLBAl40glzwpM1i9UDMkThPt X6VkB4tDG7Ldw== Received: from zmail.florianheigl.me ([127.0.0.1]) by localhost (zmail.florianheigl.me [127.0.0.1]) (amavis, port 10026) with ESMTP id LGgs5nLmWF7W for <~alpine/devel@lists.alpinelinux.org>; Fri, 22 Mar 2024 21:33:42 +0000 (UTC) Received: from zmail.florianheigl.me (zmail.florianheigl.me [172.16.20.44]) by zmail.florianheigl.me (Postfix) with ESMTP id 6A067E4268 for <~alpine/devel@lists.alpinelinux.org>; Fri, 22 Mar 2024 21:33:42 +0000 (UTC) Date: Fri, 22 Mar 2024 21:33:42 +0000 (UTC) From: Florian Heigl To: ~alpine/devel@lists.alpinelinux.org Message-ID: <1007996746.2202.1711143222184.JavaMail.zimbra@florianheigl.me> Subject: RISC-V 64 Sig4 on Milk-V Duo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.20.44] X-Mailer: Zimbra 9.0.0_ZEXTRAS_20220402 (ZimbraWebClient - GC122 (Mac)/8.8.15_GA_4007) X-Authenticated-User: me@florianheigl.me Thread-Index: W3Sln+0WIo0FLIk2JLXnctk3zn1LYA== Thread-Topic: RISC-V 64 Sig4 on Milk-V Duo Hi, there's some instruction failure on the tiny Milk-V board. I suppose whatever builder Alpine uses has an instruction that the CPU in the Milk-V doesn't. You'll encounter like this: milkv-duo:/etc/etckeeper# clang-16 PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump: 0. Program arguments: clang-16 1. Compilation construction Illegal instruction It's not related to clang though, as you'll see here: milkv-duo:~# cmake Usage cmake [options] [...] Run 'cmake --help' for more information. Illegal instruction The failing instruction looks like this: [77733.086004] cmake[3462]: unhandled signal 4 code 0x1 at 0x0000002ac83d34c8 in cmake[2ac8299000+940000] [77733.096046] CPU: 0 PID: 3462 Comm: cmake Tainted: GF O 5.10.4-tag- #1 [77733.104202] epc: 0000002ac83d34c8 ra : 0000002ac83d34c8 sp : 0000003ffff13e20 [77733.111665] gp : 0000002ac8bf77f0 tp : 0000003fde6a1d98 t0 : 00000000422d0000 [77733.119165] t1 : 0000003fde69f8c0 t2 : 0000000000000030 s0 : 0000003fddcdc9d0 [77733.126656] s1 : 0000003fddce3ad0 a0 : 0000003fddcdca18 a1 : 0000000000000005 [77733.134144] a2 : 0000000000000000 a3 : 0000000000000020 a4 : 0000003fddcdca18 [77733.141633] a5 : 0000003fddcdc9d0 a6 : 000000003fffffff a7 : 0000002ac8c0da5c [77733.149121] s2 : 0000003fddce3b20 s3 : ffffffffffffffff s4 : 0000003fddcdc440 [77733.156609] s5 : 0000000000000011 s6 : 0000003fddcd6070 s7 : 0000003fddcd6538 [77733.164097] s8 : 0000003fddcd60b8 s9 : 0000000000000230 s10: 0000003fde6a1888 [77733.171586] s11: 0000002ad9bca478 t3 : 0000003fde62bd5e t4 : 0000000000000000 [77733.179073] t5 : 0000000000000069 t6 : 0000000061700000 [77733.184590] status: 8000000201804020 badaddr: 000000008330000f cause: 0000000000000002 I looked at the ISA manual but don't understand how to decode it into an instruction. First time I could have made use of this stuff I learned in school but it's been ~25 years now ;-) Also, I don't know what I'd have to do afterwards. I understand I can probably just bootstrap all packages in cross compiling via their sdk, making sure whatever instruction or memory fencing-thing isn't used. But that'd leave a gap open in upstream. And also, I have no idea how to find out afterwards *what* I needed to exclude. A footnote is that this is still running a vendor kernel, they're in the progress of upstreaming all their drivers, but i think it's only 20% accepted in upstream, so far. milkv-duo:~# uname -a Linux milkv-duo 5.10.4-tag- #1 PREEMPT Tue Oct 24 10:20:29 UTC 2023 riscv64 Linux Is there anything I can provide to help make this fully supported? I can put the little thing in a DMZ for remote tinkering or sponsor one... Best wishes, Florian