File tree Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Expand file tree Collapse file tree 1 file changed +21
-8
lines changed Original file line number Diff line number Diff line change @@ -290,14 +290,27 @@ jobs:
290
290
TOTAL_MEMORY_WITH_SWAP=$(("${TOTAL_AVAILABLE_MEMORY_IN_GB%.*}" + 3))
291
291
292
292
if [[ ${BUILD_ENVIRONMENT} == *"riscv64"* ]]; then
293
- for i in {1..3}; do
294
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
295
- sleep 2
296
- done
297
-
298
- sleep 5
299
- ls -la /proc/sys/fs/binfmt_misc/
300
- cat /proc/sys/fs/binfmt_misc/qemu-riscv64 2>/dev/null || echo "qemu-riscv64 registration failed"
293
+ # EC2 specific setup for RISC-V emulation
294
+ # Ensure binfmt_misc is available
295
+ echo "Mounting binfmt_misc filesystem"
296
+ sudo mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc 2>/dev/null || true
297
+
298
+ echo "QEMU registration: multiarch/qemu-user-static"
299
+ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes || true
300
+ sleep 3
301
+
302
+ # Final verification
303
+ echo "Checking binfmt_misc status:"
304
+ ls -la /proc/sys/fs/binfmt_misc/ 2>/dev/null || echo "Cannot access binfmt_misc directory"
305
+
306
+ if [ -f /proc/sys/fs/binfmt_misc/qemu-riscv64 ]; then
307
+ echo "qemu-riscv64 registration successful"
308
+ cat /proc/sys/fs/binfmt_misc/qemu-riscv64 | head -3
309
+ else
310
+ echo "qemu-riscv64 registration failed - proceeding without emulation"
311
+ echo "This may cause RISC-V builds to fail"
312
+ fi
313
+
301
314
RISCV_DOCKER_ARGS="--privileged"
302
315
else
303
316
RISCV_DOCKER_ARGS=
You can’t perform that action at this time.
0 commit comments