Bing fails to install Minecraft on VisionFive 2

prompted Bing in compose mode with

installing minecraft java edition on risc-v sbc visionfive 2

and this is the result

How to Install Minecraft Java Edition on RISC-V SBC VisionFive 2

Minecraft is one of the most popular sandbox games in the world, with millions of players across different platforms. Minecraft Java Edition is the original version of the game, which runs on any computer that supports Java. However, if you want to play Minecraft on a RISC-V single-board computer (SBC) like VisionFive 2, you will need some extra steps to make it work.

RISC-V is an open-source instruction set architecture (ISA) that can be implemented by anyone without paying royalties or fees. RISC-V offers many advantages over other ISAs, such as modularity, scalability, and efficiency. VisionFive 2 is a powerful RISC-V SBC that features a quad-core processor, 8GB of RAM, and a Mali-G52 GPU. It can run Linux and Android operating systems and supports various peripherals and expansion modules.

To install Minecraft Java Edition on VisionFive 2, you will need to follow these steps:

  1. Download and install OpenJDK 16 for RISC-V from this link:
  2. Extract the tar.gz file to a folder of your choice and set the JAVA_HOME environment variable to point to it.
  3. Download and install LWJGL 3 for RISC-V from this link:
  4. Extract the zip file to a folder of your choice and set the LWJGL_HOME environment variable to point to it.
  5. Download and install Minecraft Launcher for Linux from this link:
  6. Install the deb file using sudo dpkg -i Minecraft.deb
  7. Run Minecraft Launcher from your applications menu or terminal and log in with your Mojang account.
  8. Edit your installation settings and add these JVM arguments: -Dorg.lwjgl.librarypath=$LWJGL_HOME/native/linux -Dorg.lwjgl.system.jni.nativespath=$LWJGL_HOME/native/linux
  9. Save your settings and launch Minecraft Java Edition.

You should now be able to play Minecraft Java Edition on your VisionFive 2 SBC with decent performance and graphics quality. Enjoy!

Impressive. Incorrect, but sounds good.

step 1: the riscv64 openjdk download link does not exist 🙁. There ARE riscv64 java versions, including one directly from the debian repos, but it missed that.

step 3: talks about the minecraft launcher, try it and:

sudo dpkg -i Minecraft.deb
dpkg: error processing archive Minecraft.deb (--install):
package architecture (amd64) does not match system (riscv64)
Errors were encountered while processing:

what actually worked?

Minecraft Java Edition Server runs on the VisionFive 2

Configured to run, along with an old windows 10 machine.

on the windows 10 machine, start the minecraft launcher, (need an account) and download the server.jar, by going to the installations tab, click “New installation”, and click the down arrow next to SERVER:

you then need to copy the server.jar to the visionfive 2

On the visionfive 2

  • sudo apt install openjdk-21-jre-headless
  • mkdir minecraft_server
  • cd minecraft_server
  • copy the server.jar to minecraft_server dir

will need to accept eula by editing eula.txt; simplest way is to run the server twice:

  • java -jar server.jar
  • will stop with message, edit the eula.txt and set to true and rerun the server
  • java -jar server.jar

then connect from the windows machine, with the IP of the visionfive 2.

notes. above java command just uses defaults; if you want to give more memory, you can with

java -Xmx4096M -Xms2048M -jar server.jar

this is not a fast machine, will see errors like

[13:59:15] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 2469ms or 49 ticks behind

so not for any major games, but useful to try it out. Similar to a raspberry pi, so all the “tweaks” from that will also work

Posted in risc-v, tech | Leave a comment

VisionFive 2 Python and Pygame

Installed python, pygame, jupyter-lab (and matplotlib).

Sound works via hdmi (sort of). There is sound coming from the TV, but not totally clear, sort of garbled, as if timing is a bit off, but fine for beeps and explosions from simple games. When previously using the headphone jack, was no distortion.

downloaded Python-Games from github. One note, debian is case sensitive, so some games looked for Fonts not fonts, or similar … so had to edit a few of the scripts. Simple ones (tetris) were playable, some of the more complex ones, were slow.

For Jupyter Lab, found installing the pure apt packages worked best, often got some compile/dependency errors when trying to just use pip install

Posted in risc-v, tech | Leave a comment

Firefox Built on VisionFive 2

Unmodified firefox build (from this weekend) built on Debian on the VisionFive 2 !

Linux starfive 5.15.0-starfive #1 SMP Mon Feb 27 14:03:14 EST 2023 riscv64 GNU/Linux

not optimized, and not with the JIT, just the default build.

A few notes, if someone wants to replicate.

Using 202302 debian build. Enabled remote ssh.

  • updated /etc/apt/sources.list to pull from regular location

#deb unstable main
deb unstable main

(this did “break” my X startup, so have to manually start Xorg from ssh session)

  • installed rustc 1.67.1 via rustup
  • installed node 19 from experimental tier
  • had to build cairo from source, the one installed from apt gave error
    # error Cairo was not compiled with support for GObject

then Build Firefox on Linux

did have to install a lot of dependencies with apt.

further note: do have an nvme installed, and put the code on that, but left the root system on SD card. So very slow, took ~6 hours (with a few stops in between to add dependencies)

result: Firefox runs!

./firefox --version
Mozilla Firefox 112.0a1

Not very quick as the system is not optimized, and didn’t install the jit.

Youtube worked, and sound via headset (no hdmi sound).
a bit slow, so reduced resolution to lowest to get smooth video.
not bad for no GPU at all!

next project, to move root onto the nvme so system is faster. (and fix X again so boots properly)

Posted in tech | Leave a comment

first RISC-V board: StarFive VisionFive 2

arrived this week:

StarFive VisionFive 2 board

VisionFive 2 Box

Picked up the 8 Gig dual network version from AmeriDroid.

Not had time to do much; Downloaded the 202302 debian image onto SD card. One hint: the board did not come configured to boot from SD: had to move the small switches to enable:

Once had figured that out, everything came up fine. Mine had no problems booting, and displaying on my HDMI monitor. Don’t intend initially to use it that way, so just installed ssh server, and unplugged. Now on my network and running headless (the little lights are flashing by the power). Am using my official Raspberry PI USB3 power supply, it has just the 3A power required.

uname -a
Linux starfive 5.15.0-starfive #1 SMP Mon Feb 27 14:03:14 EST 2023 riscv64 GNU/Linux

more updates to come!

Posted in tech | Leave a comment

Pinephone Pro camera, outside shots

Out on a sunny day, took a few outdoor shots with the pinephone pro and pinhole app.

Posted in Art, tech | Leave a comment

Sun Dog at the beach

Walked down to Woodbine beach, where there were some public art displays, and there was one in the sky.

It faded fast, so only just caught it with the camera.
For those who don’t know the area, the small pointy thing between the trees on the lower right is the CN Tower, the Lake Ontario would be on the left of the picture.

Posted in nature | Leave a comment

Pinephone Pro mobian camera and pinhole

sudo apt install pinhole

and “show all apps” (apparently camera is not mobile friendly yet)

click the camera app, and get the following pic!

left it sideways, since didn’t want to put up a “modified” picture.
the colours are also good.

Progress is moving quicker than I thought!

saw the update on mobian’s mastadon channel: here

Posted in tech | Leave a comment

Pinephone Pro and libcamera on mobian

Working, sort of?

This is my first time really looking at libcamera, I’m not a C person, so have not built much with C, so just trying out the basic build and utilities.

Downloaded the git repo and all the dependencies, and built on the phone.

above is another picture of the test image, on the pinebook pro using qcam. The colours are not modified by me, came directly from the qcam app. So better than megapixels out of the box.

But, the ui is not great, on my setup. The app screen image is very transparent, I can see the desktop image through the picture. Searching the web, seemed to indicate this may be a known issue? The lag is not bad, similar to megapixels. Now I have the pinephone keyboard connected, so I can type the filename into qcam interface without much difficulty, not sure how usable qcam is without it.

the cam cli seems to work also, if you make it capture 10 images, seemed to hang if you pass --capture=1 .

Did also seem to control the focus, managed to make some very blurry images, then some sort of clear ones. Will need to try to reproduce that; was switching between the older v4l-utils cli and libcamera, and think the settings bleed into each other.

I’m more of a python person, so will try to build and play with the python extensions to get more control, and if that fails, try some (very bad) c code. Before anyone mentions them, I have downloaded the libcamera-apps, which should give more cli control, but they give me errors when trying to capture images, so likely need to be modified (or the mobian distro itself?). As mentioned I’m not a C expert, so will try the python stuff before digging into C/C++ directly.

note, mobian uname -a says:

Linux mobian 6.1-rockchip #1 SMP PREEMPT_DYNAMIC Fri Feb 3 05:58:59 UTC 2023 aarch64 GNU/Linux

Posted in tech | Leave a comment

Pinephone Pro camera: smooth out the triangle dots.

Zooming in and looking at the triangle dot pattern, it is very regular. Changed the image type to png, which is non lossy, and see there are pairs of dots, in the regular pattern, on the green layer.

used GIMP to locate them

here we see the first pixel at 26,29.
the set of four are (in the box):

these then repeat, at 16 pixel intervals (both horizontal and vertical)

now check to see if is in the raw data file.

using numpy from python, can read the raw file, and using a jupyter notebook, as well as matplotlib and PIL, can display in the notebook the raw data (code pasted here, image of notebook below)

from PIL import Image
import numpy as np
from matplotlib import pyplot as plt
raw = np.fromfile('/home/mobian/Pictures/frame.raw', np.uint8)
# size
# read single dimensional raw image data array into square array
# starting at px, py, size square x square
plotarray=np.eye(square) # initialize square array
for y in range(0,square):
    for x in range(0,square):
        value = raw[w*(x + px) + (y + py)]
        plotarray[x][y] = int(value)
im = Image.fromarray(np.uint8(plotarray))
plt.rcParams['figure.figsize'] = (6,6)

and it also has the pairs of dots (screen shot of notebook below, with my specific frame.raw file)

now using the measurements, lets calculate the locations of all the dots, the 4 set of co-ordinates, repeated at 16 pixel (x) and 32 pixel (y) intervals

g=16 #gap
for x in range(0,w-4*g,g):
    for y in range(0,h-4*g,g*2):
        raw[26+x+(29+y)*w]= 255
        raw[25+x+(32+y)*w]= 255
        raw[34+x+(45+y)*w]= 255
        raw[33+x+(48+y)*w]= 255

and make them light. Rerun the same plot (slightly bigger and larger, but the same display code from above:

so now how to “remove” them?
simple test: replace with average of 4 “nearest” neighbours. Now due to how the colours are arranged, is not actually the pixel directly next to it, but 2 away (pasted code, but wraps, below screenshot)

for x in range(0,w-g*4,g):
    for y in range(0,h-g*4,g*2):
        #      y     x                  y-2                       y+2                             x-2                       x+2
        raw[w*(29+y)+26+x]= ( int(raw[w*(27+y)+26+x]) + int(raw[w*(31+y)+26+x]) + int(raw[w*(29+y)+24+x]) + int(raw[w*(29+y)+28+x]) ) /4
        raw[w*(32+y)+25+x]= ( int(raw[w*(30+y)+25+x]) + int(raw[w*(34+y)+25+x]) + int(raw[w*(32+y)+23+x]) + int(raw[w*(32+y)+27+x]) ) /4
        raw[w*(45+y)+34+x]= ( int(raw[w*(43+y)+34+x]) + int(raw[w*(47+y)+34+x]) + int(raw[w*(45+y)+32+x]) + int(raw[w*(45+y)+36+x]) ) /4
        raw[w*(48+y)+33+x]= ( int(raw[w*(46+y)+33+x]) + int(raw[w*(50+y)+33+x]) + int(raw[w*(48+y)+31+x]) + int(raw[w*(48+y)+35+x]) ) /4


looks smooth!

the last line writes out to a new numpy.raw file.

which we then process with the same ffmpeg commands from the previous post:

original unprocessed / colour balanced + numpy fix

WordPress will let you zoom in to the full size images, if you want to look at the dots.

Still do not know where the dots come from, if someone with better imx258 docs, can send me a link?

I assume I need to set the sensor with different commands…

and still need to fix the focus

Could add these numpy and imagemagick commands to megapixels post processing…

p.s. all of the above (except GIMP) was run on the pinephone pro, including the jupyter notebook.

Posted in tech | Leave a comment

Pinephone Pro camera colour cli adjustments

Continue to play with the camera

still have the triangular dots, but did find an imagemagick command to adjust the colours

here is a shot of page 37 from The Art of Color by Johannes Itten.
initial raw image with the greenish tone


convert input.jpg \( +clone -channel RGB -equalize \) -average output.jpg

(all on one line)

and we get:

Looks closer to what it should.

still todo:

the little dots

update: a few more recognizable brands with their colours; I think it is a bit too dark blue for the Tetley box..

Posted in Art, tech | Leave a comment