ref: 9129a602ae181370105ef749b628f2b69546ee28 focus/README.md -rw-r--r-- 1.3 KiB
9129a602Jamie Brandon Nit 5 months ago


  • mobile-nixos installed but no config.nix yet

  • host build works

  • cross build works

  • target build is broken - compiler crashes

  • how to setup ssh-over-usb?

  • memory

    • urgency seems broken
    • no touch yet
    • cpu usage is high

#Installing mobile-nixos:


On local:

# base image
pushd mobile-nixos
nix-build --argstr device pine64-pinephone-braveheart -A build.disk-image
dd if=result of=/dev/mmcblk0 bs=8M oflag=sync,direct status=progress

# resize root partition
sudo fdisk /dev/mmcblk0
# d 2, n 2

# bootable root
# download latest from https://hydra.nixos.org/job/mobile-nixos/unstable/examples-demo.aarch64-linux.rootfs
unzstd ~/Downloads/NIXOS_SYSTEM.img.zst
dd if=Downloads/NIXOS_SYSTEM.img of=/dev/mmcblk0p2 bs=8M oflag=sync,direct status=progress

# boot focus
# connect to wifi

On focus:

# password is nixos
# set authorized_keys
sudo date --set="11 APR 2020 14:02:00"
sudo nix-channel --update

Uses config from https://github.com/NixOS/mobile-nixos/blob/master/examples/demo/configuration.nix

Local build:

zig build run

Cross build:

nix-shell --arg cross true
zig build cross
ssh $FOCUS
  cd /home/jamie
  export DISPLAY=:0