-
Notifications
You must be signed in to change notification settings - Fork 2
How to build a ScreenInvader sd card image
Amir Hassan edited this page Dec 12, 2021
·
29 revisions
This a guide for how to build a ScreenInvader sd card image. There are 2 targets: release and debug. "release" builds an armhf image that you can write to a sd card and boot with your Bananapi. "debug" builds a x86_64 image suitable for booting with QEMU only. If you want to test or implement new features you are strongly adviced to build a "debug" image.
We will start with building a debian jessie chroot with all required tools and dependencies and use that to create the actual Screeninvader image.
debootstrap --variant=buildd --arch amd64 bullseye ScreenInvaderBuild/ http://ftp.at.debian.org/debian/
mount --bind /dev ScreenInvaderBuild/dev
modprobe binfmt_misc
modprobe loop maxpart=63
chroot ScreenInvaderBuild
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
mount -t proc none proc
mount -t sysfs none sys
mount -t tmpfs none tmp
dpkg --add-architecture aarch64
apt-get update
apt-get install binfmt-support qemu qemu-user-static debootstrap dosfstools parted kpartx apt-cacher-ng whois extlinux git-core dpkg-sig nodejs u-boot-tools libncurses5-dev npm sshpass node-ws gcc-arm-none-eabi sudo vim
/etc/init.d/apt-cacher-ng start
/etc/init.d/binfmt-support start
You may first need to install rng-tools to generate enough entropy in the debroot:
apt-get install rng-tools
echo HRNGDEVICE=/dev/urandom >> /etc/default/rng-tools
/etc/init.d/rng-tools start
Then, generate a key:
gpg --gen-key
git clone https://github.com/screeninvader/ScreenInvader.git
cd ScreenInvader
make debug
screeninvader.dd file will now contain a bootable virtual image for your needs: