From 76952ff1721daa8531e481b076a5672cef30d7e5 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 26 Jan 2018 18:19:55 +0100 Subject: initial checkin, building crosstool-ng --- build_cross.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 build_cross.sh (limited to 'build_cross.sh') diff --git a/build_cross.sh b/build_cross.sh new file mode 100755 index 0000000..997d68e --- /dev/null +++ b/build_cross.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +# Prepare the cross-compiler for the destination platform, in our +# case i486. + +if test ! "$(getent group cross)"; then + groupadd cross +fi + +if test ! "$(getent passwd cross)"; then + useradd -m -g cross cross +fi + +# add 'cross' user as sudoer without password +if test ! -f /etc/sudoers.d/cross; then + echo "cross ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/cross +fi + +if test ! -x /usr/local/bin/ct-ng; then + su - cross <