Booting Fedora Linux on RISC-V QEMU emulator in 2022

I wanted to learn about RISCV this holiday break. You can use QEMU to emulate a RISC-V machine environment and you can run Fedora Linux on it. However, it was not straightforward. There are several tutorials online, but things seem to have changed and most of these didn’t successfully boot Linux for me. It took several days, but I finally managed to boot it. Here’s how I did it.

Driving 8250 ACIA without CPU

The goal of the project is to drive an MC8250 ACIA chip and send out “Hello World!” message over a serial connection. I have a Serial I/O card of RC2014 project. Its circuit diagram looks like this: The part that surrounded by the red line is the part we’re interested in. MC68B50 is a faster version of the 6850 chip, and its behavior is practically identical to the original MC6850 in this project.

Android sshd

I have not been a fan of Android File Transfer. I remember there are a few sshd for Android. Someone mentioned about SSHelper. While it doesn’t seem to have source code on Github, it is a GPLed open source software by Paul Lutus. It provides ssh access to your android. pc$ ssh -p 2222. Sshd is running on port 2222. User doesn’t matter. You can log in with password by default.

Sweet Home 3D

I tried to open a Mac app called Sweet Home and it failed. I tried from the command line: $ cd "/Applications/Sweet Home" $ ./SweetHome3D dyld: lazy symbol binding failed: Symbol not found: _CGContextSetAllowsAcceleration Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Libraries/libawt.jnilib Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices dyld: Symbol not found: _CGContextSetAllowsAcceleration Referenced from: /Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Libraries/libawt.jnilib Expected in: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices Abort trap: 6 Solution: Install Java for macOS 2017-001. I did this before, but I had to do it again.

Docker eats Control-p

I realized that I had to type Control-P twice when I connected to a docker container and was using a command line. I’ve created a docker config file under root home directory: // ~root/.docker/config.json - don't type this { "detachKeys": "ctrl-@" } I am not using control-@. This solved the problem.

VIA Yocto notes

setup-environment script OEROOT=sources/poky if [ -e sources/oe-core ]; then OEROOT=sources/oe-core fi ... cd $OEROOT . ./oe-init-build-env $CWD/$1 > /dev/null # if conf/local.conf not generated, no need to go further if [ ! -e conf/local.conf ]; then clean_up && return 1 fi However, this seems not working as intended. Instead, I see the following message on console: Your configuration files at build have not been touched. which is at the end of the script:

Fix docker

I used docker for building Yocto linux images and it used up the space. # docker info ... Data Space Used: 107.4 GB Data Space Total: 107.4 GB Data Space Available: 0 B ... The thin pool (?) is 100GB (107.4GB) and it is full. I found this dicussion on github. You need to increase the pool allowed for your containers. To do this , you will need to remove your var/lib/docker which will destroy all your containers and images.

Modifying Hugo layout

I don’t quite like the layout. The left-side panel is taking too much space to me. The basic structure of the page was like this: Make the author column very narrow. Move the author column to the right. I’ve switched it to use flexbox layout. I’ve edited themes/hugo-minimalist-theme/static/css/styles.css. .container { display: flex; } .author { flex-grow: 0; margin-right: 40px; margin-left: 20px; } .content { flex-grow: 1; margin-left: 40px; margin-right: 20px; } It is not quite there yet, but I like it better than the original.

Play with Mirusan

I was interested in dealing with PDF files in JavaScript. I found Mirusan on github. NOTE: I couldn’t get it work on my mac. It is just a note. Work log It has some python code and it requires python3. However, I didn’t have python3 on my system. Get python3 on a Mac. brew install python3 By using pip3 command, install packages against python3. pip3 install -r requirements.txt requirements.

EasyEDA Export BOM

I wanted to get a list of components from EasyEDA. According to the documentation, I should be able to export it by clicking Export Bom button, but I didn’t see it on the UI. The first issue was that the menu buttons were somehow collapsed for me. By clicking these narrow dot line, you can get the menu expanded. Still I didn’t see the Export Bom button. I needed to have a lot wider window to see it.