riecoind and rieMiner on Pinephone using postmarketOS

Discussion about anything else making use of Riecoin or featuring the project. Going to integrate Riecoin in your next project? We would love to hear about it and be glad to support you!
Forum rules
Discussion about anything making use of Riecoin (except stores and marketplaces) or featuring it. Do not hesitate to promote your project here!
Post Reply
yerus
Posts: 4
Joined: 2023-11-11 21:30:12

riecoind and rieMiner on Pinephone using postmarketOS

Post by yerus »

I'm sorry if this is in the wrong forum. Here's a write-up for an interesting project I'm working on.

Riecoin Core and rieMiner on Pinephone/Postmarket OS 23.06

Background: Pinephone is a smartphone built to be a Linux phone utilizing the Allwinner A64 chip-set. postmarketOS(pmOS) is based on Alpine Linux and is designed to be installed on smartphones and tablets.

Goal: To re-purpose old phones and tablets to be Riecoin nodes and/or miners.

Considerations: While there has been success with running Riecoin and Rieminer directly on Android, these Android devices are or will no longer supported by Android. This may leave these devices wide open to be exploited in the future. pmOS seeks to run mainline Linux kernel and will allow the devices to receive updates into the foreseeable future, which is important for an always-on/always-connected device.

Steps:
Step 1 - Run Riecoind, and/or rieMiner on Pinephone running postmarketOS.
Step 2 - Install pmOS on an old Samsung Galaxy Tab S I have on hand.
Step 3 – Run riecoind and/or rieMiner on Tablet.

If successful, this can serve as a model for others to do likewise. pmOS has great community support and documentation for many different mobile device chip-sets(SoC’s).

This could potentially keep a lot of still functional devices out of landfills.

While phones and tablets are not the most powerful, some of them are comparable in power to PI’s with the added benefit of not having to purchase a new device.

Results for Phase 1:

Installing and booting postmarketOS on Pinephone was trivial. Just flashed the image to eMMC and powered on.

Alpine Linux, and pmOS, does not use glibc but musl, so the binaries would not execute as is.

Fortunately, Alpine’s documentation lists a few options to run glibc programs.

Flatpak is the preferred choice for graphical programs but since riecoin-qt is not necessary to achieve the goal of the project, I was able to skip that option.

The easiest path to follow for my smoother brain was to Chroot a Debian Bootstrap kernel in conjunction with the app Bubblewrap.

I followed the steps in the documentation exactly, besides having to change the kernel architecture to arm64.

After this I was able to execute both the official Linux arm64 riecoind and rieMiner binaries without having to recompile.

Both seemed to be functioning appropriately, I even managed to reach a blazing(emphasis on hot) 0.4 Ric/d at 250 c/s!

Step 2: Upcoming, Attempting to install pmOS on Samsung Galaxy Tab S and then repeat steps to run riecoind and rieMiner.

Thanks for your time and happy mining!
User avatar
Pttn
Forum Staff
Forum Staff
Posts: 226
Joined: 2021-02-18 21:32:13
Location: Switzerland
Riecoin Address: ric1qpttn5u8u9470za84kt4y0lzz4zllzm4pyzhuge
Contact:

Re: riecoind and rieMiner on Pinephone using postmarketOS

Post by Pttn »

This is an interesting and fun project, reusing old devices like that is also well in line with the Riecoin's useful PoW.

I heard of Musl when I tried to find how to Statically Link GlibC for rieMiner, I wonder if it would be possible and practical to do so with Musl and solve once for all the annoying issues with incompatible GlibC versions...

External/Others is more appropriate for this Topic as it is more about running Riecoin Software on some third party OS than the Riecoin Software itself, so I moved it, but don't worry about this.
Riecoin developer
Stelo.xyz pool operator
pashino
Beginner
Beginner
Posts: 8
Joined: 2023-11-15 20:44:43

Re: riecoind and rieMiner on Pinephone using postmarketOS

Post by pashino »

Хороший проект! Молодец, Успехов тебе
yerus
Posts: 4
Joined: 2023-11-11 21:30:12

Re: riecoind and rieMiner on Pinephone using postmarketOS

Post by yerus »

Thanks for moving thread to the appropriate place!

An update, I took considerable time trying to get postmarketOS to boot unto the tablet, a Samsung Galaxy Tab S codename: "Chagallwifi".

The postmarket Wiki said the device was supported but perhaps the latest edge release broke something and no previous images were avaliable.

Samsung stopped supporting the tablet after Android 6, so even Termux was not an option without extra work.

I then looked into the de-Googled, Android alternatives: LineageOS and /e/OS and was able to get an image of /e/OS to boot and this version was based on Android 7 which allows Termux install.

Next step was trying to setup a development environment on Termux to compile Riecoin and Rieminer and here is where I discovered the fatal error.

The processor on the tablet is 32-bit! I really didn't expect a device from 2014 to be 32-bit, but oh well.

Project on hold for now, I'll source a suitable phone or tablet, 64-bit this time, and try again.

Thanks for your time.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests