#!/bin/bash -x IMAGE=2019-09-26-raspbian-buster.img DIST=buster MY_UID=`id -u` MY_GID=`id -g` mkdir -p ${DIST} 7z e ${IMAGE} 1.img pushd ${DIST} 7z x ../1.img popd rm 1.img mkdir -p /tmp/mnt-${DIST} sudo mount 1.img /tmp/mnt-${DIST} sudo cp -ax /tmp/mnt-${DIST}/. ${DIST}/ sudo chown -R ${MY_UID}:${MY_GID} ${DIST} sudo umount /tmp/mnt-${DIST} proot -S ${DIST} -q qemu-arm apt-get -y update proot -S ${DIST} -q qemu-arm apt-get -y upgrade proot -S ${DIST} -q qemu-arm apt-get -y install libxv-dev libx11-dev libxext-dev libxi-dev touch ${DIST}/usr/include/immintrin.h