Project Description

With Quad SATA HAT[1] you can turn your RPi / RockPi into a nice little NAS. There are some packages[2] for Raspbian/Ubuntu which will allow you to control the disks and the optional fan and OLED display. But what if you want to install Tumbleweed on your box?

Quad SATA HAT top board

Goal for this Hackweek

The goal of this project is to start with a RPi 4 and SATA HAT and end up with a working NAS solution on Tumbleweed. The provided software is only targeting Debian based distros and even in that case the support is not great.

Resources

  1. https://wiki.radxa.com/DualQuadSATA_HAT
  2. https://rock.sh/get-rockpi-sata
  3. https://github.com/baierjan/go-sata-hat
  4. https://build.opensuse.org/package/show/home:jbaier_cz/golang-github-baierjan-sata-hat

The Hacking

Step 1: OS installation

As I already have some experience with Raspbian, it is trivial to grab a new SD card, extract a fresh new image onto the card, put it in the Pi and just boot the system. After a while I am able to log in to the system via SSH. All good.

Now, it is Tumbleweed time. I headed to our RPi4 documentation, the recommended step is to take the JeOS image and extract it as in previous step. I like it, but I need to tweak it a little bit. Ultimately, I do not want to have SD card present as I want to boot the system from connected SSD disk. So, lets grab the JeOS Tumbleweed image and extract it on a fresh new SSD disk connected via USB-SATA connector.

I removed the SD card, put the SSD disk into the SATA slot and I am trying the boot process. Unfortunately, I am unable to see any new device in the DHCP log. Even more unfortunately, the RPi 4 has microHDMI output and I probably do not have any such cable around (and frankly, I am to lazy to do a thorough search). So it is time for my USB-TTL UART converter, the config.txt should contain enable_uart=1 and it might also help to include console=ttyS0,115200n8 into default grub command line parameters. The pinout for RPi can be easily found, in my case I need to connect pins 6, 8 and 10 (GND, TX, RX). For the actual connection, minicom or screen can be used. I am not happy with the result (I do not see anything).

After some blind laboring, I am able to find out, that the Pi is not able to boot from the SATA HAT because it does not see it. After consulting the documentation (i.e. searching on the official forum), I found out that the HAT needs to be "activated" by setting pins 25 and 26 to HIGH. OK, additional search and I know how to solve the issue. At first, I need to boot from SD card (the previously installed Raspbian will do), and update EEPROM configuration.

```

rpi-eeprom-config --edit

[all] BOOTUART=1 WAKEONGPIO=1 ENABLESELFUPDATE=1 BOOTORDER=0xf14

[config.txt] gpio=25,26=op,dh ```

There are several important settings, BOOT_UART=1 will enable serial console during boot. BOOT_ORDER=0xf14 means try USB (4) first, then SD card (1), then repeat (f) if necessary. In my case the USB boot is the SATA HAT. Another useful mode could be 2 for network boot. The most important part are the last two lines, gpio=25,26=op,dh will set pins 25 and 26 to output mode, driving high. That will enable the HAT after power-on, so it will be able to boot from it.

After this, I can successfully boot into the JeOS first boot configuration. As I have already prepared everything for serial console connection, I can do the setup even without monitor and keyboard attached. I can finish the installation, setup network and ssh server.

Step 2: Fan control

There are two controllable fans, one on the board for CPU and one on top for the hard drives. Both are PWM capable and are controlled through pins 12 and 13. The original code uses Python and RPi.GPIO, however that did not work well for me. I also tried another Python libraries for GPIO pins, but was not able to solve performance issues nicely. For the PWM to work correctly, the controlling frequency needs to be high enough to prevent buzzing noises in an audible spectrum from the fans and neither library was able to provide it. After some extended search, I stumbled upon Go-written library go-rpio which was able to do hardware PWM (instead of slower software emulated) and which was able to achieve the optimal 25kHZ frequency.

I created a simple script which allows to set each fan to any of 5 available levels (0%, 25%, 50%, 75%, 100%) and an auto mode, which will read the current CPU temperature and adapt the fan levels. The thresholds are customizable via environment variables. Provided service file for the fan-control utility can read those overrides and start the auto mode upon boot.

Step 3: OLED display

After some fiddling and reverse engineering, I was able to find out, that I need to reset the display before use; the reset procedure is done by flipping pin 22. The display itself is a standard I2C device and instead of deprecated Adafruit Python library, I used a go-based one. Currently, the display can show current time, CPU temperature and disk use percentage. The path for the disk usage can be customized by environment variable OLED_DU_PATH. The output is rotated by 180° by default, which can be disabled by setting OLED_ROTATE=false.

For the I2C to work correctly the appropriate overlay needs to be activated. Inside config.txt or even better inside extraconfig.txt make sure to include line dtparam=i2c1=on.

Step 4: Push button

Pin 17 is connected to the button on the top panel. I was able to use edge detection on the pin to detect push events and use it to turn on/off the OLED display. Maybe in some later version, this could be customisable and can run an arbitrary command. The important part here is to not only switch the pin into an input mode but also activate the pull-up resistor (the button has inverted control -- i.e. pressing the button will trigger the fall-down edge and transition to low state).

Step 5: Combining all together

I created a common module for shared functions and I have two binaries with a corresponding service file to control the fans and the OLED display. The provided spec file will allow OBS to create an installable package for Tumbleweed. After installation, both services need to be enabled (and started) via systemctl enable --now fan-control sys-oled.

Looking for hackers with the skills:

raspberrypi tumbleweed rpm hardware

This project is part of:

Hack Week 23

Activity

  • about 1 year ago: binary_sequence liked this project.
  • about 1 year ago: jgoldschmidt liked this project.
  • about 1 year ago: jbaier_cz added keyword "raspberrypi" to this project.
  • about 1 year ago: jbaier_cz added keyword "tumbleweed" to this project.
  • about 1 year ago: jbaier_cz added keyword "rpm" to this project.
  • about 1 year ago: jbaier_cz added keyword "hardware" to this project.
  • about 1 year ago: ggardet_arm liked this project.
  • about 1 year ago: mbrugger liked this project.
  • about 1 year ago: harrisonbc joined this project.
  • about 1 year ago: jbaier_cz started this project.
  • about 1 year ago: jbaier_cz originated this project.

  • Comments

    • harrisonbc
      about 1 year ago by harrisonbc | Reply

      Hi - I have one of these HATs and am happy to help test it out with Tumbleweed

      • jbaier_cz
        about 1 year ago by jbaier_cz | Reply

        The first version of the software, which should be able to control fan speed is available in my repository. The documentation is lacking, but the simple systemctl enable --now fan-control should enable the automatic mode.

    Similar Projects

    Tumbleweed on Mars-CM (RISC-V board) by ph03nix

    RISC-V is awesome, Tumbleweed is awesome, chocolate cake is awesome. I'm planning to combine all of them in one project.

    Project Description

    I recently purchased a MILK-V Mars CM and managed to setup it up already using Debian Linux. My project for this Hackweek is to see how far I can get to run Tumbleweed on this compute module board.

    Goal for this Hackweek

    • Run Tumbleweed on the Compute Module

    Resources

    • http://milkv.io/mars-cm
    • https://en.opensuse.org/HCL:VisionFive2


    Update Haskell ecosystem in Tumbleweed to GHC-9.10.x by psimons

    Description

    We are currently at GHC-9.8.x, which a bit old. So I'd like to take a shot at the latest version of the compiler, GHC-9.10.x. This is gonna be interesting because the new version requires major updates to all kinds of libraries and base packages, which typically means patching lots of packages to make them build again.

    Goals

    Have working builds of GHC-9.10.x and the required Haskell packages in 'devel:languages:haskell` so that we can compile:

    • git-annex
    • pandoc
    • xmonad
    • cabal-install

    Resources

    • https://build.opensuse.org/project/show/devel:languages:haskell/
    • https://github.com/opensuse-haskell/configuration/
    • #discuss-haskell
    • https://www.twitch.tv/peti343


    Switch software-o-o to parse repomd data by hennevogel

    Currently software.opensuse.org search is using the OBS binary search for everything, even for packages inside the openSUSE distributions. Let's switch this to use repomd data from download.opensuse.org


    A CLI for Harvester by mohamed.belgaied

    [comment]: # Harvester does not officially come with a CLI tool, the user is supposed to interact with Harvester mostly through the UI [comment]: # Though it is theoretically possible to use kubectl to interact with Harvester, the manipulation of Kubevirt YAML objects is absolutely not user friendly. [comment]: # Inspired by tools like multipass from Canonical to easily and rapidly create one of multiple VMs, I began the development of Harvester CLI. Currently, it works but Harvester CLI needs some love to be up-to-date with Harvester v1.0.2 and needs some bug fixes and improvements as well.

    Project Description

    Harvester CLI is a command line interface tool written in Go, designed to simplify interfacing with a Harvester cluster as a user. It is especially useful for testing purposes as you can easily and rapidly create VMs in Harvester by providing a simple command such as: harvester vm create my-vm --count 5 to create 5 VMs named my-vm-01 to my-vm-05.

    asciicast

    Harvester CLI is functional but needs a number of improvements: up-to-date functionality with Harvester v1.0.2 (some minor issues right now), modifying the default behaviour to create an opensuse VM instead of an ubuntu VM, solve some bugs, etc.

    Github Repo for Harvester CLI: https://github.com/belgaied2/harvester-cli

    Done in previous Hackweeks

    • Create a Github actions pipeline to automatically integrate Harvester CLI to Homebrew repositories: DONE
    • Automatically package Harvester CLI for OpenSUSE / Redhat RPMs or DEBs: DONE

    Goal for this Hackweek

    The goal for this Hackweek is to bring Harvester CLI up-to-speed with latest Harvester versions (v1.3.X and v1.4.X), and improve the code quality as well as implement some simple features and bug fixes.

    Some nice additions might be: * Improve handling of namespaced objects * Add features, such as network management or Load Balancer creation ? * Add more unit tests and, why not, e2e tests * Improve CI * Improve the overall code quality * Test the program and create issues for it

    Issue list is here: https://github.com/belgaied2/harvester-cli/issues

    Resources

    The project is written in Go, and using client-go the Kubernetes Go Client libraries to communicate with the Harvester API (which is Kubernetes in fact). Welcome contributions are:

    • Testing it and creating issues
    • Documentation
    • Go code improvement

    What you might learn

    Harvester CLI might be interesting to you if you want to learn more about:

    • GitHub Actions
    • Harvester as a SUSE Product
    • Go programming language
    • Kubernetes API


    SUSE Prague claw machine by anstalker

    Project Description

    The idea is to build a claw machine similar to e.g. this one:

    example image

    Why? Well, it could be a lot of fun!

    But also it's a great way to dispense SUSE and openSUSE merch like little Geekos at events like conferences, career fairs and open house events.

    Goal for this Hackweek

    Build an arcade claw machine.

    Resources

    In French, an article about why you always lose in claw machine games:

    We're looking for handy/crafty people in the Prague office:

    • woodworking XP or equipment
    • arduino/raspi embedded programming knowledge
    • Anthony can find a budget for going to GM and buying servos and such ;)


    Build a split keyboard from scratch by mpagot

    Description

    I'm getting older... this summer I experienced an annoying and persistent tingling in one hand and arm. That was the initial motivation to get more interested in ergonomic work gadgets, and from that to split keyboards. And that was the entrance in a rabbit hole.

    Which keyboard I like to create:

    • Split keyboard for ergonomic (I'm not primary interested in having it portable)
    • I have big hands: I like it to fit as much as possible my hands measures
    • Columnar stagger keys position
    • Not too few keys (at the moment I'm at 24 + 24)
    • One row thumb cluster
    • No wireless, not to have batteries and for security reason
    • CherryMX, or generally speaking no low profile/corne choc
    • Hot swap Socket switches

    Goals

    • Create PCB design for a split keyboard
    • Get it produced
    • Mount it
    • Evaluate FWs

    Resources

    Progress

    Day1

    Get the existing Ergogen project working on my TW machine Get Kicad as flatpack Go back to the https://flatfootfox.com/ergogen-part3-pcbs/ Join the #ergogen Discord channel and ask for help about the nets

    Day2

    Redesign the keyboard matrix on Inkscape Implement it in the Ergogen YAML format Create a Kicad PCB file Start routing it Iterate over the matrix arrangement to try to implement it like 2 layer board and ideally with not vias Get some Kicad tutorials

    Day3

    Get my hand dirty building a 2x2 key matrix --> welcome to nne Look at ZKM and how to configure it --> https://github.com/michelepagot/zmk-config-nne Get the FW built by github, try to flash it: get matrix scan pulse but no keys to the PC Get in contact with ceoloide, an Ergogen maintainer, about net issue.


    Framework laptop integration by nkrapp

    Project Description

    Although openSUSE does run on the Framework laptops out-of-the-box, there is still room to improve the experience. The ultimate goal is to get openSUSE on the list of community supported distros

    Goal for this Hackweek

    The goal this year is to at least package all of the soft- and firmware for accessories like the embedded controller, Framework 16 inputmodule and other tools. I already made some progress by packaging the inputmodule control software, but the firmware is still missing

    Resources

    As I only have a Framework laptop 16 and not a 13 I'm looking for people with hardware that can help me test

    Progress:

    Update 1:

    The project lives under my home for now until I can get an independent project on OBS: Framework Laptop project

    Also, the first package is already done, it's the cli for the led-matrix spacer module on the Framework Laptop 16. I am also testing this myself, but any feedback or questions are welcome.

    You can test the package on the Framework 16 by adding this repo and installing the package inputmodule-control

    Update 2:

    I finished packaging the python cli/gui for the inputmodule. It is using a bit of a hack because one of the dependencies (PySimpleGUI) recently switched to a noncommercial license so I cannot ship it. But now you can actually play the games on the led-matrix (the rust package doesn't include controls for the games). I'm also working on the Framework system tools now, which should be more interesting for Framework 13 users.

    You can test the package on the Framework 16 by installing python311-framework16_inputmodule and then running "ledmatrixctl" from the command line.

    Update 3:

    I packaged the framework_tool, a general application for interacting with the system. You can find it some detailed information what it can do here. On my system everything related to the embedded controller functionality doesn't work though, so some help testing and debugging would be appreciated.

    Update 4:

    Today I finished the qmk interface, which gives you a cli (and gui) to configure your Framework 16 keyboard. Sadly the Python gui is broken upstream, but I added the qmk_hid package with the cli and from my testing it works well.

    Final Update:

    All the interesting programs are now done, I decided to exclude the firmware for now since upstream also recommends using fwupd to update it. I will hack on more things related to the Framework Laptops in the future so if there are any ideas to improve the experience (or any bugs to report) feel free to message me about it.

    As a final summary/help for everyone using a Framework Laptop who wants to use this software:

    The source code for all packages can be found in repositories in the Framework organization on Github

    All software can be installed from this repo (Tumbleweed)

    The available packages are:

    • framework-inputmodule-control (FW16) - play with the inputmodules on your Framework 16 (b1-display, led-matrix, c1-minimal)

    • python-framework16_inputmodule (FW16) - same as inputmodule-control but is needed if you want to play and crontrol the built-in games in the led-matrix (call with ledmatrixctl or ledmatrixgui)

    • framework_tool (FW13 and FW 16) - use to see and configure general things on your framework system. Commands using the embedded controller might not work, it looks like there are some problems with the kernel module used by the EC. Fixing this is out of scope for this hackweek but I am working on it

    • qmk_hid (FW16) - a cli to configure the FW16 qmk keyboard. Sadly the gui for this is broken upstream so only the cli is usable for now


    Capyboard, ESP32 Development Board for Education by emiler

    Description

    Capyboard 3D

    Capyboard is an ESP32 development board built to accept individual custom-made modules. The board is created primarily for use in education, where you want to focus on embedded programming instead of spending time with connecting cables and parts on a breadboard, as you would with Arduino and other such devices. The board is not limited only to education and it can be used to build, for instance, a very powerful internal meteo-station and so on.

    I already have one initial prototype ready and tested. The next iteration addresses several issues the first prototype had. I am planning on finishing up the mainboard and one of the modules this week.

    This project is also a part of my master's thesis.

    Goals

    • Finish testing of a new prototype
    • Publish source files
    • Documentation completion
    • Finish writing thesis

    Resources