-
Notifications
You must be signed in to change notification settings - Fork 29
feat: add loong64 support #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @msojocs. Thanks for the pull request. It uses quay.io/msojocs and loongcr.lcpu.dev. How can we know that we can trust them? It would be better to use only official Alpine containers. |
|
Thanks for your reply. loongcr.lcpu.dev is matained by Because the offiaial docker image not support loong64 yet, so I use this temporarily. Maybe it is not safe.
Maybe this pr should keep in draft until the official qemu image to support loongarch? |
|
I think I can use Arch docker image and chroot_build.sh to complete it. I will try it later. |
cdbfe43 to
c31e586
Compare
|
I did not find the stable release of alpine minirootfs for loongarch, so I am using the edge version. |
|
Thanks @msojocs. It is good to use only official Alpine files. We would like to use the same Alpine release for all builds, so we should wait until loong64 support is in a Alpine release (not edge). https://wiki.alpinelinux.org/wiki/Loongarch64 says it is "planned". Hopefully it will be ready soon. Question: Should the file extension be We will also need to add it around |
probonopd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Need to decide on loongarch64 vs loong64
- Need to wait until it is in Alpine release
- NOTE: Need to also patch appimagetool
|
reference: loong-or-loongarch(chinese)
Many Linux distributions use Of course, I also think Loongarch is a bit of a mess right now.
|
|
http://dl-cdn.alpinelinux.org/alpine/v3.20/releases/ still doesn't have this architecture. Will it arrive soon? |
|
https://wiki.alpinelinux.org/wiki/Loongarch64
|
|
Tempted to reject since we don't even have the hardware and nobody is committed to maintaining this specific architecture. Edit: please create an issue beforehand next time. I have just peeked at your changes, it would take at least 10 minutes to explain all the necessary changes. But we have not even decided whether we would want to support this at all. |
|
loong64 might become popular, particular in China. So supporting it would be welcome in principle, even though I currently have no hardware to test it with. loong64 is only supported in Alpine starting from 3.21. Currently our Dockerfile uses Hence, independently from this PR, we would need to get things going on 3.21 first before we can even consider supporting loong64. |
|
Alpine 3.21 works now, so we may consider this. Let's continue discussion in |
|
|
||
| wget "http://dl-cdn.alpinelinux.org/alpine/v3.17/releases/${ARCHITECTURE}/alpine-minirootfs-3.17.2-${ARCHITECTURE}.tar.gz" | ||
| if [ "$ARCHITECTURE" = "loong64" ];then | ||
| wget -c "https://dev.alpinelinux.org/~loongarch/edge/releases/loongarch64/alpine-minirootfs-edge-240514-loongarch64.tar.gz" -O alpine-minirootfs-edge-240514-loong64.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can switch to 3.21 and in fact unify the download logic here by parameterizing the version number. See #111 for an approach.
| exit 1 | ||
| fi | ||
|
|
||
| if [ "$ARCHITECTURE" == "" ] && [ "$1" != "" ];then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC, POSIX sh seems to only support [ xxx = yy ] i.e. single equal sign.
| uname -m | ||
| apk update | ||
| if [ "$ARCHITECTURE" == "loong64" ];then | ||
| # only loong64 can install this package, other arch can not install it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not because LoongArch is special, only that its Alpine baseline is different than others -- the package is also needed for other architectures if they're switched to Alpine 3.21.
For now though, the comment can be removed as having no additional info is better than inaccurate info, and the intent behind the code is at least kinda clear. Also, moving the installation of extra packages after the common ones should be more intuitive.
| if [ -d "./miniroot" ];then | ||
| sudo umount miniroot/proc miniroot/sys miniroot/dev | ||
| fi | ||
| # sudo rm -rf ./miniroot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this remnant of debugging code? It could be better to remove it before submitting for review.
chroot_build.shworks fine. And I add loong64 support in it, the script works fine on Arch.But ubuntu-latest of github action does not support loongarch64.So I use docker to complete it.Now I use the latest version of qemu-user-static to complete it.
Local Arch Linux
Github Actions