Page 1 of 1

SABnzbd on Ubuntu on emulated RISC-V / riscv64: howto

Posted: May 1st, 2021, 2:16 pm
by sander
SABnzbd on Ubuntu on emulated RISC-V / riscv64 is easy:

Based on https://wiki.ubuntu.com/RISC-V

Get stuff:

Code: Select all

sudo apt install qemu-system-misc opensbi u-boot-qemu qemu-utils

wget https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-riscv64.img.xz
xz -dk ubuntu-20.04.2-preinstalled-server-riscv64.img.xz
Start the Ubuntu on RISC64:

Code: Select all

qemu-system-riscv64 -machine virt -nographic -m 2048 -smp 4 -bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_jump.elf -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf -device virtio-net-device,netdev=eth0 -netdev user,id=eth0,hostfwd=tcp::18080-:8080 -drive file=ubuntu-20.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio 

Within the Ubuntu:

Code: Select all

sudo apt update
sudo apt install sabnzbdplus
sabnzbdplus -l2 -b0 -s 0.0.0.0
... even sabyenc for RISC64 gets installed.

Code: Select all

[email protected]:~$ file /usr/lib/python3/dist-packages/sabyenc3.cpython-38-riscv64-linux-gnu.so
/usr/lib/python3/dist-packages/sabyenc3.cpython-38-riscv64-linux-gnu.so: ELF 64-bit LSB shared object, UCB RISC-V, version 1 (SYSV), dynamically linked, BuildID[sha1]=bc08631364832c0836639b1e23e18d17510fdb01, stripped
SAB is reachable from the host on http://127.0.0.1:18080/sabnzbd/

Re: SABnzbd on Ubuntu on emulated RISC-V / riscv64: howto

Posted: May 22nd, 2021, 3:40 pm
by sander
With SABnzbd 3.3.0 or later, you will see the CPU architecture in the sabnzbd.log file:

Code: Select all

2021-05-22 20:29:28,063::INFO::[SABnzbd:1176] Dockerized = False
2021-05-22 20:29:28,070::INFO::[SABnzbd:1177] CPU architecture = riscv64
2021-05-22 20:29:28,286::INFO::[SABnzbd:1180] Platform = posix - Linux-5.8.0-14-generic-riscv64-with-glibc2.28