╙─ Manuel Groß └─ Weblog └─ Projects └─ Notes └─ About

Slingdeck Shoshin

└─ projects
  └─ slingdeck shoshin

Table of contents

manu-san Slingdeck Shoshin

I’m making a slingdeck. That’s a word I made up from “cyberdeck” and “slingbag”.

What?

It’s a small single-board-computer with a screen attached to a slingbag I own, in a way that’s quickly detachable. A keyboard can be stored inside the bag and still leaves room for other stuff to carry around. A rechargable battery also provides power on the go.

Why?

I came up with the idea during CCCamp19, when I was barely using my 12" notebook, but instead used my phone extensively to reschedule angel shifts and so on. I wanted something a little more than a phone to use on the go. Also, when I bought the “Tanker” sling-bag I fell in love with, I wanted to use it and also bring a computer. That bag doesn’t fit a 12" notebook though.
It’s also aimed to be a little experiment for myself to test whether a RaspberryPi 4 would be enough as a daily driver for me.

How?

Hardware

I depend a lot on already available parts. The core of the deck is a SmartiPi Touch 2 case on a Vesa quick-release mount that’s attached to the bag.

Software

Disclaimer: I’m just some dude on the internet that documents how he got it to work. That doesn’t mean it has to work for you. Understand what you want to do, how you could achieve that, and how you decide to solve it. Don’t just copy and paste it from here.

I’m using Arch Linux as my daily driver, so this build gets this as well. There’s a RaspberryPi 4 port available at archlinuxarm.org. I used their installation guide, except for the encrypted root partition.

After that, I needed to chroot into the image to make some changes:

# cryptsetup luksOpen /dev/mmcblk0p2 cryptroot
# mount /dev/mapper/cryptroot root
# mount /dev/mmcblk0p1 root/boot
$ yay -S binfmt-qemu-static
# cp -p /usr/bin/qemu-arm-static root/usr/bin/
# arch-chroot root qemu-arm-static /bin/bash

Added/replaced in the front of /boot/cmdline.txt:

cryptdevice=/dev/mmcblk0p2:root root=/dev/mapper/root […]

Edit the hooks in /etc/mkinitcpio.conf:

HOOKS=(base udev modconf block filesystems keyboard autodetect keymap encrypt lvm2 fsck)

It’s important to place keyboard before autodetect here! Then regenerate the initramfs. You can just re-install (or update) the package linux-raspberrypi4 for that. For me it ran the following:

mkinitcpio -k 4.19.81-1-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img

Extend /etc/crypttab with the following line:

root	/dev/mmcblk0p2	none	luks

And then add it to /etc/fstab:

/dev/mapper/root	/	ext4	defaults,noatime	0	1

This should get you a basic Arch setup that lets you enter a password to decrypt the root partition on startup.

Now, since I want to use sway, I need to add to the /boot/config.txt:

dtoverlay=vc4-fkms-v3d

Now I unmounted everything and plugged it into the Pi. That’s where I am right now.

Todo