Skip to content

potad os release v1

Latest

Choose a tag to compare

@swedishsplidney swedishsplidney released this 09 Nov 04:54
7269a1b

potad os is a minimal, arm64 linux system made with buildroot, designed to run on allwinner h616 or qemu aarch64!!!


first full release!!!!!!!


whats new from last release?

  • lots of bugfixes and optimizations
  • windows instructions to run it

what can this release do?

  • boot into a busybox shell through qemu
  • working and configured u-boot boot manager
  • run nvim and git directly cli
  • weston / drm composited desktop environment that can run doom
  • dhcp networking
  • pid-1 process management
  • zombie process reaping
  • graceful shutdown
  • create and restart supervised services
  • unix control socket
  • kernel log routing
  • root remounting
  • persistent home partition

quickest way to try it (any os, no compiling, but will be much less reliable)

download Image, rootfs.ext4, and home.img from the assets below into one folder, install qemu, and run the command for your os. this is also the recommended route on windows.

install qemu

  • windows: winget install SoftwareFreedomConservancy.QEMU (or the installer from qemu.org), then reopen your terminal. if qemu-system-aarch64 isn't found, add C:\Program Files\qemu to your PATH
  • ubuntu / debian: sudo apt install qemu-system-arm
  • arch: sudo pacman -S qemu-system-aarch64
  • fedora: sudo dnf install qemu-system-aarch64
  • macos: brew install qemu

run it

windows (powershell):

qemu-system-aarch64 -M virt -smp 4 -m 2048M -cpu cortex-a53 `
  -drive file=rootfs.ext4,if=none,format=raw,id=rootdisk -device virtio-blk-pci,drive=rootdisk `
  -drive file=home.img,if=none,format=raw,id=homedisk -device virtio-blk-pci,drive=homedisk `
  -netdev user,id=net0 -device virtio-net-pci,netdev=net0 `
  -kernel Image -append "console=ttyAMA0 root=/dev/vda rw rootwait earlycon init=/sbin/potad_init" `
  -nographic

linux / mac: same command, with \ instead of the backticks.

it runs emulated on windows (no hardware acceleration for arm64 guests on x86), so expect a slower boot than on an arm machine.
to exit qemu: press Ctrl+A, then X. or just type poweroff inside potad.

if it doesnt work:

  • build from source, its a lot more likely to work

build from source

building needs linux. on windows, use WSL2 (wsl --install -d Ubuntu in an admin powershell, then reboot).

prereqs (linux / wsl2 / mac)

  • windows users: do everything below inside the WSL terminal, and clone into your linux home (~/), not /mnt/c/.... building on the windows filesystem is painfully slow and breaks in odd ways
  • build dependencies (ubuntu / debian / wsl):
    sudo apt install build-essential git rsync flex bison bc cpio unzip file wget python3 e2fsprogs libssl-dev libgnutls28-dev uuid-dev qemu-system-arm
  • other distros: install the equivalents, plus qemu from the list above
  • the build script will tell you exactly which tool is missing if you skipped one

note: make sure your path doesn't have spaces in it (buildroot will explode)

build and run:

  • clone the repo:

    git clone https://github.com/swedishsplidney/potad.git
    cd potad
  • build the os image:

    ./scripts/build-app.sh

note: setting up buildroot can take a while! (especially if you have low thread cpu, has been known to take 30+ minutes)

  • run in qemu:
    ./scripts/run-qemu.sh
  • or, if you want to test u-boot:
    ./scripts/run-qemu.sh --uboot
    • then to boot into potadOS, run the following inside the u-boot terminal:
      setenv bootcmd "ext4load virtio 0:0 0x40400000 /boot/Image; booti 0x40400000 - ${fdtcontroladdr}"
      setenv bootargs "console=ttyAMA0 root=/dev/vda rw earlycon init=/sbin/potad_init"
      boot
      
  • for the weston desktop, add --gui (linux / mac; untested on windows)

attached files

Image, rootfs.ext4, home.img, and u-boot.bin are attached so you can skip compiling if you want, they're built by the same script

potadOS built with C₈H₁₀N₄O₂ by SwedishSplidney