Skip to content

Instantly share code, notes, and snippets.

View emolitor's full-sized avatar

Eric Molitor emolitor

View GitHub Profile
@emolitor
emolitor / alpine-chroot.sh
Last active August 25, 2023 23:28
chroot script for testing aarch64
# This simple script is setting up a Alpine Linux installation in a chroot.
# chroot will be placed in the current working directory.
#
# Most parts of this script are written down at
# http://wiki.alpinelinux.org/wiki/Setting_up_the_build_environment_in_chroot
#
# Licensed under GPLv2
#
# Copyright (c) 2011-2019 Fabian Affolter <fabian at affolter-engineering.ch>
cmake \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_EXE_LINKER_FLAGS="-static -lsupc++" \
-DLIBCXXABI_LIBCXX_PATH=~/Development/llvm-project-llvmorg-8.0.0/libcxx \
-DLIBCXXABI_LIBCXX_INCLUDES=~/Development/llvm-project-llvmorg-8.0.0/libcxx/include \
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
-DLIBCXX_LIBCXXABI_INCLUDES_INTERNAL=~/Development/llvm-project-llvmorg-8.0.0/libcxxabi/include \
-DLIBCXX_HAS_MUSL_LIBC=ON \
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
USER="***USER***"
ROOT_PASSWORD="***CHANGEME***"
USER_PASSWORD="***CHANGEME***"
HOST=alpine
cmake -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" ..