From 6fb6cf14fba142abe073459ebfaffea7c7916a9c Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Tue, 31 Dec 2024 20:44:06 +0000 Subject: [PATCH 1/2] Add loongarch64 support --- README.adoc | 2 +- action.yml | 2 +- binfmts/qemu-loongarch64 | 8 ++++++++ setup-alpine.sh | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 binfmts/qemu-loongarch64 diff --git a/README.adoc b/README.adoc index b877fa0..4479d9f 100644 --- a/README.adoc +++ b/README.adoc @@ -57,7 +57,7 @@ Default: _see link:action.yml[]_ [[arch]] arch:: CPU architecture to emulate using https://www.qemu.org/docs/master/user/main.html[QEMU user space emulator]. -Allowed values are: `x86_64` (native), `x86` (native), `aarch64`, `armhf` footnote:[armhf is armv6 with hard-float.], `armv7`, `ppc64le`, `riscv64` footnote:[riscv64 is available since v3.20.], and `s390x`. +Allowed values are: `x86_64` (native), `x86` (native), `aarch64`, `armhf` footnote:[armhf is armv6 with hard-float.], `armv7`, `loongarch64` footnote:[loongarch64 is available since v3.21.], `ppc64le`, `riscv64` footnote:[riscv64 is available since v3.20.], and `s390x`. + Default: `x86_64` diff --git a/action.yml b/action.yml index 28bb814..61dd1d3 100644 --- a/action.yml +++ b/action.yml @@ -16,7 +16,7 @@ inputs: arch: description: > CPU architecture to emulate using QEMU. Allowed values are: `x86_64` (native), `x86` (native), - `aarch64`, `armhf` (armv6 with hard-float), `armv7`, `ppc64le`, `riscv64` (available since v3.20), and `s390x` + `aarch64`, `armhf` (armv6 with hard-float), `armv7`, `loongarch64` (available since v3.21), `ppc64le`, `riscv64` (available since v3.20), and `s390x` required: false default: x86_64 branch: diff --git a/binfmts/qemu-loongarch64 b/binfmts/qemu-loongarch64 new file mode 100644 index 0000000..f9779ea --- /dev/null +++ b/binfmts/qemu-loongarch64 @@ -0,0 +1,8 @@ +package none +interpreter /usr/local/bin/qemu-loongarch64 +magic \x7f\x45\x4c\x46\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02\x01 +offset 0 +mask \xff\xff\xff\xff\xff\xff\xff\xfc\x00\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff +credentials yes +fix_binary yes +preserve yes diff --git a/setup-alpine.sh b/setup-alpine.sh index 5720c31..6862376 100755 --- a/setup-alpine.sh +++ b/setup-alpine.sh @@ -138,9 +138,9 @@ case "$INPUT_APK_TOOLS_URL" in esac case "$INPUT_ARCH" in - x86_64 | x86 | aarch64 | armhf | armv7 | ppc64le | riscv64 | s390x) ;; # valid + x86_64 | x86 | aarch64 | armhf | armv7 | loongarch64 | ppc64le | riscv64 | s390x) ;; # valid *) die 'Invalid input parameter: arch' \ - "Expected one of: x86_64, x86, aarch64, armhf, armv7, ppc64le, riscv64, s390x, but got: $INPUT_ARCH." + "Expected one of: x86_64, x86, aarch64, armhf, armv7, loongarch64, ppc64le, riscv64, s390x, but got: $INPUT_ARCH." esac case "$INPUT_BRANCH" in From 2a2381a356e35eb560a5999598265c1d1dcb17a1 Mon Sep 17 00:00:00 2001 From: Adeel Mujahid <3840695+am11@users.noreply.github.com> Date: Wed, 1 Jan 2025 01:01:06 +0200 Subject: [PATCH 2/2] Add LA64 key --- ...ne-devel@lists.alpinelinux.org-66ba20fe.rsa.pub | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 keys/alpine-devel@lists.alpinelinux.org-66ba20fe.rsa.pub diff --git a/keys/alpine-devel@lists.alpinelinux.org-66ba20fe.rsa.pub b/keys/alpine-devel@lists.alpinelinux.org-66ba20fe.rsa.pub new file mode 100644 index 0000000..e8bb476 --- /dev/null +++ b/keys/alpine-devel@lists.alpinelinux.org-66ba20fe.rsa.pub @@ -0,0 +1,14 @@ +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAtfB12w4ZgqsXWZDfUAV/ +6Y4aHUKIu3q4SXrNZ7CXF9nXoAVYrS7NAxJdAodsY3vPCN0g5O8DFXR+390LdOuQ ++HsGKCc1k5tX5ZXld37EZNTNSbR0k+NKhd9h6X3u6wqPOx7SIKxwAQR8qeeFq4pP +rt9GAGlxtuYgzIIcKJPwE0dZlcBCg+GnptCUZXp/38BP1eYC+xTXSL6Muq1etYfg +odXdb7Yl+2h1IHuOwo5rjgY5kpY7GcAs8AjGk3lDD/av60OTYccknH0NCVSmPoXK +vrxDBOn0LQRNBLcAfnTKgHrzy0Q5h4TNkkyTgxkoQw5ObDk9nnabTxql732yy9BY +s+hM9+dSFO1HKeVXreYSA2n1ndF18YAvAumzgyqzB7I4pMHXq1kC/8bONMJxwSkS +Ym6CoXKyavp7RqGMyeVpRC7tV+blkrrUml0BwNkxE+XnwDRB3xDV6hqgWe0XrifD +YTfvd9ScZQP83ip0r4IKlq4GMv/R5shcCRJSkSZ6QSGshH40JYSoiwJf5FHbj9ND +7do0UAqebWo4yNx63j/wb2ULorW3AClv0BCFSdPsIrCStiGdpgJDBR2P2NZOCob3 +G9uMj+wJD6JJg2nWqNJxkANXX37Qf8plgzssrhrgOvB0fjjS7GYhfkfmZTJ0wPOw +A8+KzFseBh4UFGgue78KwgkCAwEAAQ== +-----END PUBLIC KEY-----