Monday, November 18, 2019

Run yquake on ChromeOS

Chrome OS provides an ability to run linux in a container and its little bit outdated a `stretch` debian release. Most convenient way for build is cross compile on different host in container with the debian stretch.

First of all, lets create boot strapped environment by such commands:
sudo qemu-debootstrap --arch=arm64 --keyring /usr/share/keyrings/debian-archive-keyring.gpg --variant=buildd --exclude=debfoster stretch debian-arm64 http://ftp.debian.org/debian

After that chroot to directory and install required package for build:
  • sudo cp /usr/bin/qemu-aarch64-static debian-arm64/ -v
  • cd debian-arm64/
  • sudo chroot . ./qemu-aarch64-static /bin/bash
  • apt install -y git make gcc libsdl2-dev libcurl4-gnutls-dev ccache libopenal-dev
And finally build quake:
  • cd root
  • git clone https://github.com/yquake2/yquake2.git
  • cd yquake2
  • CC="ccache gcc " make -j 6
And copy binary files from release directory to the device.