Last active
April 6, 2022 03:05
-
-
Save waynevanson/6d308e70b34353686431e8a5d96a9ff4 to your computer and use it in GitHub Desktop.
Builds void-linux for use with rpi4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# DO NOT RUN AS SUDO | |
# AS XBPS-SRC WILL THROW AN ERROR | |
DIR="$HOME/void-rpi4" | |
[ -d "$DIR" ] || mkdir "$DIR" | |
DIR_PACKAGES="$DIR/void-packages" | |
[ -d "$DIR_PACKAGES" ] || git clone https://github.com/void-linux/void-packages.git "$DIR_PACKAGES" | |
DIR_MKLIVE="$DIR/void-mklive" | |
[ -d "$DIR_MKLIVE" ] || git clone https://github.com/void-linux/void-mklive.git "$DIR_MKLIVE" | |
PULL="pull --ff -Xtheirs --no-edit" | |
GIT="git -C $DIR_PACKAGES" | |
$GIT remote add piraty https://github.com/piraty/void-packages.git | |
$GIT checkout -f -B rpi4 | |
$GIT $PULL piraty rpi-kernel-flavor-subpackage | |
GIT="git -C $DIR_MKLIVE" | |
$GIT remote add piraty https://github.com/piraty/void-mklive.git | |
$GIT checkout -f -B rpi4 | |
$GIT $PULL piraty rpi4 | |
XBPS_SRC="$DIR_PACKAGES/xbps-src" | |
"$XBPS_SRC" -a aarch64-musl binary-bootstrap | |
"$XBPS_SRC" -a aarch64-musl pkg rpi4-base | |
DATE=$(date '+%Y%m%d') | |
sudo -i make -C "$DIR_MKLIVE" XBPS_REPOSITORY="-r $DIR_PACKAGES/hostdir/binpkgs/rpi4" "void-aarch64-musl-ROOTFS-$DATE.tar.xz" "void-rpi4-musl-$DATE.img.xz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're running this on the raspberry pi or an aarch64 architecture it will fail with the -a aarch64 selected with a error:
So just omit the
-a aarch64-musl
, if that's the case