Skip to content
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

Add support for linux/loong64 #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ENV BASHBREW_ARCHES \
arm64v8 \
darwin-amd64 \
i386 \
loong64 \
mips64le \
ppc64le \
riscv64 \
Expand All @@ -41,7 +42,9 @@ RUN export GNUPGHOME="$(mktemp -d)"; \
\
for bashbrewArch in $BASHBREW_ARCHES; do \
# TODO convince estesp to release riscv64 binaries (https://github.com/estesp/manifest-tool/pull/113 👀)
# also https://github.com/estesp/manifest-tool/pull/274 for loong64 support
if [ "$bashbrewArch" = 'riscv64' ]; then continue; fi; \
if [ "$bashbrewArch" = 'loong64' ]; then continue; fi; \
( \
goEnv="$(bashbrew-arch-to-goenv.sh "$bashbrewArch")"; eval "$goEnv"; \
srcBin="manifest-tool-$GOOS-$GOARCH"; \
Expand Down
1 change: 1 addition & 0 deletions architecture/oci-platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var SupportedArches = map[string]OCIPlatform{
"arm32v7": {OS: "linux", Architecture: "arm", Variant: "v7"},
"arm64v8": {OS: "linux", Architecture: "arm64", Variant: "v8"},
"i386": {OS: "linux", Architecture: "386"},
"loong64": {OS: "linux", Architecture: "loong64"},
"mips64le": {OS: "linux", Architecture: "mips64le"},
"ppc64le": {OS: "linux", Architecture: "ppc64le"},
"riscv64": {OS: "linux", Architecture: "riscv64"},
Expand Down
21 changes: 11 additions & 10 deletions scripts/bashbrew-host-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ elif command -v uname > /dev/null && tryArch="$(uname -m)"; then
fi

case "$arch" in
amd64 | x86_64) found 'amd64' ;;
arm64 | aarch64) found 'arm64v8' ;;
armel) found 'arm32v5' ;;
armv6*) found 'arm32v6' ;;
armv7*) found 'arm32v7' ;;
i[3456]86 | x86) found 'i386' ;;
mips64el) found 'mips64le' ;; # TODO "uname -m" is just "mips64" (which is also "apk --print-arch" on big-endian MIPS) so we ought to disambiguate that somehow
ppc64el | ppc64le) found 'ppc64le' ;;
riscv64) found 'riscv64' ;;
s390x) found 's390x' ;;
amd64 | x86_64) found 'amd64' ;;
arm64 | aarch64) found 'arm64v8' ;;
armel) found 'arm32v5' ;;
armv6*) found 'arm32v6' ;;
armv7*) found 'arm32v7' ;;
i[3456]86 | x86) found 'i386' ;;
loong64 | loongarch64) found 'loong64' ;;
mips64el) found 'mips64le' ;; # TODO "uname -m" is just "mips64" (which is also "apk --print-arch" on big-endian MIPS) so we ought to disambiguate that somehow
ppc64el | ppc64le) found 'ppc64le' ;;
riscv64) found 'riscv64' ;;
s390x) found 's390x' ;;

armhf)
if [ -s /etc/os-release ] && id="$(grep -Em1 '^ID=[^[:space:]]+$' /etc/os-release)"; then
Expand Down