Received: from mx1.mailbun.net (unknown [170.39.20.100]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id B104C782C43 for <~alpine/devel@lists.alpinelinux.org>; Sat, 24 Apr 2021 04:25:42 +0000 (UTC) Received: from 192.168.8.162 (unknown [107.125.25.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ariadne@dereferenced.org) by mx1.mailbun.net (Postfix) with ESMTPSA id 3D8F2145639; Sat, 24 Apr 2021 04:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dereferenced.org; s=mailbun; t=1619238339; bh=R83j1Wswy0Kp1u9EZ6iucKA8TZzjhYihNZcBaD5NEBk=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=Zd8rSE8NSoWJkf88Nn/sOZwB0Hbl6+8OrtjZR27jAwrIvSsyRbB+ZYsrowTtoz+fv rINWkowZ6ggKDV5fo0RsxrhKonRADFoabHQbXTgoESREOjSNcWYh4pCcfr1LtaAmYF WmkZwVWOgGqtZyehN/STF/if7Cjz3dmf2Md5XiF4iCayFkuIpnHNVvdYPo2E8g29Bf YLLZFqhL3XSRsah1GtSU59uwUmCKtg6n+52o5cQ98rNle1E5JT2849NhcJ92i0g09Z ByuGeCBYlRIiYC2RCFQt68eYs52apiA6TGaSf8I+SS4s8XKdgHHw6AqQDc4rdNI0UG K+UhZMEgmvfEQ== Date: Fri, 23 Apr 2021 22:25:38 -0600 (MDT) From: Ariadne Conill To: Roman Shaposhnik cc: ~alpine/devel@lists.alpinelinux.org Subject: Re: Alpine for riscv64 In-Reply-To: Message-ID: <2f186144-b498-316-1e83-9092693c9d6@dereferenced.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Hello, On Fri, 23 Apr 2021, Roman Shaposhnik wrote: > Hi! > > long time lurker (and user of Alpine in Linux Foundation's Project EVE) > first time poster here! > > Over at Project EVE we're now embarking on a riscv64 port > and it would be super helpful if Alpine had that architecture supported. > > Since that's not that case, I started looking into it by using > aports/scripts/bootstrap.sh > and I have few things to report back. > > First good news -- after some small amount of patching of aports > I was able to run the script and get myself a riscv64 build environment. > I'm attaching the changes I had to make to accomplish this. These > are mostly workaround and I'd love to collaborate with folks interested > in riscv64 to at least clean these things up. > > The workarounds are roughly in the following categories: > 0. stale config.sub (what's an Alpine way of dealing with this?) Something like: prepare() { default_prepare update_config_sub } > 1. nghttp2 binary that is generated with TEXT relocations (not sure > what to do here) I'm not sure. Do you have a build log? > 2. failing to recognize a proper riscv64-alpine-linux-musl so I > have to force riscv64-linux-musl What is failing to recogize that triplet? LLVM? We might need to add it there still. > > And finally, here's the most interesting part in all of this -- it turns out > that an initial gcc is lacking libatomic.so and thus a few packages fail. > In order to workaround it I had to: > 1. restructure bootstrap.sh slightly so that a proper gcc gets built > 2. once #1 happens we add gcc and libatomic to build deps > Not sure what's up with this and would love to know if there's a simpler way. bootstrap.sh is intended to get a runtime environment up on a host, so you can build the rest of the distribution. Accordingly, we don't presently build libatomic when crosscompiling, as we don't need it. But I think we can change that if it would be helpful. > In general, as I said -- I'd love to know if anyone else is also interested > in riscv64 port and what's the best way to collaborate on that. Drew DeVault was working on riscv64, but I'm not sure if he still is working on it. We found that running on physical hardware would be too slow (the builder would have issues keeping up with the other ones). So an option might be to do something with qemu. The Alpine community has some experience with that via postmarketOS and the initial mips64 port. Ariadne