singe/makePiRoot.sh
Scott Duensing f9b2be5a2e Starting b10
2020-03-11 19:36:43 -05:00

46 lines
1.3 KiB
Bash
Executable file

#!/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}
sed -i 's/#deb/deb/g' buster/etc/apt/sources.list
sed -i 's/#deb/deb/g' buster/etc/apt/sources.list.d/raspi.list
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 build-dep libsdl2 libsdl2-image libsdl2-mixer libsdl2-ttf ffmpeg
proot -S ${DIST} -q qemu-arm apt-get -y install libdrm-deb libgbm-dev
#proot -S ${DIST} -q qemu-arm apt-get -y install libxv-dev libx11-dev libxext-dev libxi-dev
#proot -S ${DIST} -q qemu-arm apt-get -y install libomxil-bellagio-bin libomxil-bellagio-dev libraspberrypi-dev
#proot -S ${DIST} -q qemu-arm apt-get -y install libopenal-dev libasound2-dev
touch ${DIST}/usr/include/immintrin.h
git clone https://github.com/raspberrypi/tools.git
wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
chmod +x sysroot-relativelinks.py
./sysroot-relativelinks.py buster/
sudo apt-get install lib32z1