Notes for running Mobian on the DC-ROMA RISC-V Pad II. Unofficial, not related to Mobian or Deepcomputing. https://spacecruft.org/mobian/roma-pad-ii
Find a file
2024-10-21 12:07:30 -06:00
img Add pic of tablet with mobian 2024-10-20 13:00:43 -06:00
.gitignore Ignore tgz 2024-10-20 09:45:09 -06:00
debian-riscv64.yaml Debian sid debos recipe 2024-10-20 09:46:14 -06:00
LICENSE-apache.txt Apache 2.0 2024-10-19 13:30:54 -06:00
README.md works. :) 2024-10-21 12:07:30 -06:00

Mobian on DC-ROMA RISC-V Pad II

Notes on getting Mobian running on the Deepcomputing DC-ROMA RISC-V Pad II.

Mobian Deepcomputing ROMA Pad II

Status

IT IS ALIVE!

Deepcomputing

Mobian

Spacemit

The device has 8x Spacemit X60 CPUs.

Phosh

Phosh is in Debian sid. It works. :)

apt install phosh-full
systemctl disable gdm3
systemctl enable phosh
systemctl stop gdm3
systemctl start phosh

Need to set user roma's password to something numeric for login.

Mobian Repo

Add to /etc/apt/sources.list.d/mobian.list:

deb http://repo.mobian.org/ staging main

Can also install:

apt update
apt install mobian-phosh

Cruft

How this was put together...

  • Make backups using dd of the Debian SD card from Deepcomputing first.
  • Boot SD card.
  • Mount the internal hard drive: mount /dev/mmcblk2p6 /mnt
  • mkdir /mnt/BACKUPS and move the Ubuntu system over there (or just blow it out). Just some of the directories (the ones copied below). Ephemeral directories such as /tmp don't need to be copied. You can skip the empty ones like /srv and /opt too.
  • Copy over the running system (Debian SD card) to the /mnt directory, replacing the old Ubuntu system: cp -a /etc /home /root /usr /var /mnt/
  • Run blkid on /dev/mmcblk2p6 to get the blkid of the new root system.
  • Edit /mnt/etc/fstab to update the blkid to the new one.
  • Same can be done for /boot and /dev/mmcblk2p5.
  • Remove SD card.
  • Reboot.

Build Debian

Notes that will perhaps lead to building a Debian sid RISC-V image.

# Following this repo:
git clone https://github.com/go-debos/debos
# Install dependencies
sudo apt install golang git libglib2.0-dev libostree-dev qemu-system-x86 \
     qemu-user-static debootstrap systemd-container qemu-system-misc

The build script wants systemd-resolved for some reason/

# Not sure why it needs this, but complains when building if not available
# (of course it broke DNS on my build server, such is the nature of systemd):
sudo apt install systemd-resolved

# To fix systemd name resolution, edit this file:
/etc/systemd/resolved.conf

# And add a line for your nameserver, such as:
DNS=192.168.1.1

# Then reload and restart systemd:
systemctl daemon-reload 
systemctl restart systemd-resolved.service 

# Make sure it works:
host deb.debian.org

After fixing borken systemd, proceed thusly:

# Go stuff
mkdir -p /home/`id -un`/go
export GOPATH=/home/`id -un`/go
go install -v github.com/go-debos/debos/cmd/debos@latest
# Perhaps add ~/go/bin to $PATH
# See if it works
~/go/bin/debos --help

Create a debian-riscv64.yaml like so:

{{- $image := or .image "debian.tgz" -}}

architecture: riscv64

actions:
  - action: debootstrap
    suite: sid
    components:
      - main
    mirror: https://deb.debian.org/debian
    variant: minbase

  - action: apt
    packages: [ sudo, openssh-server, adduser, systemd-sysv ]

  - action: run
    chroot: true
    command: echo debian > /etc/hostname

  - action: pack
    file: {{ $image }}
    compression: gz

Build thine image:

~/go/bin/debos debian-riscv64.yaml

Build Mobian

Like building Debian above.

See example recipes for other devices here:

XXX Note, the debos in Debian bookworm doesn't work for this. It doesn't build the librem5 device either. Need to install the debos from go repo and add to $PATH. XXX

Add these deps (maybe not all needed...):

sudo apt install bmap-tools xz-utils android-sdk-libsparse-utils yq
# Maybe
sudo apt install fakemachine squashfs-tools-ng binfmt-support

Setup forked repository:

git clone https://spacecruft.org/mobian/mobian-recipes
cd mobian-recipes/
# Make sure you're on the right branch:
git checkout riscv64

# Run the build:
./build.sh -t roma-pad-ii

Kludge the image onto the device.

  • For now, it can't be dd'd to the device.
  • The bootloader isn't being created.
  • Copy over the rootfs-riscv64-phosh.tar.gz to the device.
  • Boot up from SD card.
  • Move the relevant directories somewhere else.
  • Untar the rootfs-riscv64-phosh.tar.gz file.
  • Copy the contents to the / on the internal drive.
  • Copy over good fstab.
  • User/password: mobian/1234.

License

Apache 2.0.

Unofficial project, not related to upstream projects.

Upstream sources under their respective copyrights.

Copyright © 2024 Jeff Moe.