Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3862

Raspberry Pi OS • Re: RISC-V Emulator

$
0
0
Extracting the value of 'Perfect Number #25 ' using RISC-V Alpine container.

Code:

ubu@raspberrypi:~ $ podman run -ti amp24/amp_riscv /bin/sh/ # apk add nano fastfetch rust cargofetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/riscv64/APKINDEX.tar.gzfetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/riscv64/APKINDEX.tar.gz(1/31) Installing jansson (2.14-r4)(2/31) Installing zstd-libs (1.5.6-r0)(3/31) Installing binutils (2.42-r0)(4/31) Installing libgomp (13.2.1_git20240309-r0)(5/31) Installing libatomic (13.2.1_git20240309-r0)(6/31) Installing libgcc (13.2.1_git20240309-r0)(7/31) Installing gmp (6.3.0-r1)(8/31) Installing isl26 (0.26-r1)(9/31) Installing mpfr4 (4.2.1-r0)(10/31) Installing mpc1 (1.3.1-r1)(11/31) Installing libstdc++ (13.2.1_git20240309-r0)(12/31) Installing gcc (13.2.1_git20240309-r0)(13/31) Installing musl-dev (1.2.5-r0)(14/31) Installing libffi (3.4.6-r0)(15/31) Installing xz-libs (5.6.2-r0)(16/31) Installing libxml2 (2.12.7-r0)(17/31) Installing llvm17-libs (17.0.6-r1)(18/31) Installing scudo-malloc (17.0.6-r0)(19/31) Installing rust (1.78.0-r0)(20/31) Installing ca-certificates (20240705-r0)(21/31) Installing brotli-libs (1.1.0-r2)(22/31) Installing c-ares (1.33.1-r0)(23/31) Installing nghttp2-libs (1.62.1-r0)(24/31) Installing libpsl (0.21.5-r1)(25/31) Installing libcurl (8.10.1-r0)(26/31) Installing cargo (1.78.0-r0)(27/31) Installing hwdata-pci (0.382-r0)(28/31) Installing fastfetch (2.13.1-r0)(29/31) Installing ncurses-terminfo-base (6.4_p20240420-r1)(30/31) Installing libncursesw (6.4_p20240420-r1)(31/31) Installing nano (8.0-r0)Executing busybox-1.36.1-r29.triggerExecuting ca-certificates-20240705-r0.triggerOK: 797 MiB in 50 packages/ # cargo new perfect_number    Creating binary (application) `perfect_number` packagenote: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html/ # cd perfect_number//perfect_number # nano Cargo.toml/perfect_number # cd src//perfect_number/src # rm main.rs/perfect_number/src # nano main.rs/perfect_number/src # cd ../perfect_number # dateSat Nov 16 11:07:57 UTC 2024/perfect_number # cargo run    Updating crates.io index  Downloaded autocfg v1.4.0  Downloaded num-traits v0.2.19  Downloaded num-integer v0.1.46  Downloaded num-bigint v0.4.6  Downloaded 4 crates (194.5 KB) in 0.90s   Compiling autocfg v1.4.0   Compiling num-traits v0.2.19   Compiling num-integer v0.1.46   Compiling num-bigint v0.4.6   Compiling perfect_number v0.1.0 (/perfect_number)    Finished `dev` profile [unoptimized + debuginfo] target(s) in 3m 35s     Running `target/debug/perfect_number`The 52nd perfect number has been written to perfect_number_52.txt in chunks./perfect_number # dateSat Nov 16 11:11:45 UTC 2024/perfect_number # fastfetch --logo noneroot@496059bcee3f-----------------OS: Alpine Linux 3.20.2 riscv64Kernel: Linux 6.6.51+rpt-rpi-v8Uptime: 3 days, 20 hours, 23 minsPackages: 50 (apk)Shell: shTerminal: xtermTerminal Font: fixed (8.0pt)CPU: Unknown (4) @ 1.80 GHzMemory: 1.12 GiB / 7.63 GiB (15%)Swap: 0 B / 200.00 MiB (0%)Disk (/): 37.98 GiB / 457.84 GiB (8%) - ext4Local IP (tap0): 10.0.2.100/24 *Locale: C████████████████████████████████████████████████/perfect_number #

Statistics: Posted by geev03 — Sat Nov 16, 2024 11:17 am



Viewing all articles
Browse latest Browse all 3862

Trending Articles