Skip to content

Instantly share code, notes, and snippets.

@shaardie
Last active November 11, 2016 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaardie/986c1ff62e21a84119efd37eeadd7568 to your computer and use it in GitHub Desktop.
Save shaardie/986c1ff62e21a84119efd37eeadd7568 to your computer and use it in GitHub Desktop.
Create a rpi3 debian imge
#!/bin/bash
set -x
set -u
set -e
apt-get update
apt -y install debootstrap debian-archive-keyring qemu-user-static binfmt-support dosfstools rsync bmap-tools whois git ca-certificates curl psmisc build-essential bc dbus
dpkg --add-architecture armhf
echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/arm.list
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
apt-get update
apt -y install crossbuild-essential-armhf
if [ -d rpi23-gen-image ]
then
git -C rpi23-gen-image pull
else
git clone https://github.com/drtyhlpr/rpi23-gen-image.git
fi
(
cd rpi23-gen-image
rm -rf images
APT_SERVER="httpredir.debian.org" \
RPI_MODEL=3 \
ENABLE_XORG=true \
ENABLE_INITRAMFS=true \
BUILD_KERNEL=true \
./rpi23-gen-image.sh
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment