aps/altools/chroot-al

12 lines
340 B
Text
Raw Normal View History

#!/bin/sh
mount -t proc /proc $1/proc
mount -t sysfs /sys $1/sys
mount -o bind /dev $1/dev
mount -o bind /run $1/run
mount -o bind /sys/firmware/efi/efivars $1/sys/firmware/efi/efivars
cp /etc/resolv.conf $1/etc/resolv.conf
export MAKEFLAGS="-j$(nproc)"
export CFLAGS="-O2 -pipe -march-native"
export CXXFALGS="${CFLAGS}"
chroot $1 /bin/sh