diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-16 09:52:46 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-03-16 09:52:46 +0000 |
commit | 315ec6614a58a250f864e21ee86ff081cd5f6280 (patch) | |
tree | 27f90d372819e33997e7bdd6e43079798c7fff83 /baserock-bootstrap | |
parent | 8af6ae20a6f942a3a16a0cb561b3bc079494481a (diff) | |
parent | b574e357509f553b5ea4a5261398827a7cdeb40a (diff) | |
download | morph-315ec6614a58a250f864e21ee86ff081cd5f6280.tar.gz |
Merge branch 'master' into rm/morph-pass1-merge
Diffstat (limited to 'baserock-bootstrap')
-rwxr-xr-x | baserock-bootstrap | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/baserock-bootstrap b/baserock-bootstrap index 45062f9d..1187b747 100755 --- a/baserock-bootstrap +++ b/baserock-bootstrap @@ -12,7 +12,12 @@ tools="$LFS/tools" buildwhat="$1" export LC_ALL=C -export LFS_TGT=$(uname -m)-lfs-linux-gnu + +if (uname -m | grep arm) >/dev/null; then + export LFS_TGT=$(uname -m)-lfs-linux-gnueabi +else + export LFS_TGT=$(uname -m)-lfs-linux-gnu +fi HOST_CAT=`which cat` HOST_CP=`which cp` @@ -20,7 +25,7 @@ HOST_MKDIR=`which mkdir` HOST_CHMOD=`which chmod` export CCACHE_DIR="/var/tmp/ccache" -export PATH="$tools/bin:$tools/sbin:/usr/lib/ccache:/usr/bin:/bin" +export PATH="$tools/lib/ccache:$tools/bin:$tools/sbin:/usr/lib/ccache:/usr/bin:/bin" pass1_directories() { @@ -45,6 +50,27 @@ pass1_directories() mknod -m 644 "$LFS/dev/urandom" c 1 9 } +pass1_ccache() +{ + echo "Building ccache" + if [ ! -e "$tools/bin/ccache" ] + then + unpack ccache-3.1.7 + cd "$sources/ccache-3.1.7" + ./configure --prefix="$tools" + make -j1 + make install + + mkdir "$tools/lib/ccache" + for name in cc c++ gcc gcc-4.6.1 g++ g++-4.6.1; do + ln -s "$tools/bin/ccache" "$tools/lib/ccache/$name" + ln -s "$tools/bin/ccache" "$tools/lib/ccache/$LFS_TGT-$name" + done + + rm -rf "$sources/ccache-3.1.7" + fi +} + pass1_get_sources_with_morph() { cd $LFS/baserock/gits/morph @@ -374,31 +400,31 @@ EOF echo "Bootstrapping Baserock development environment" echo "LFS_TGT=$LFS_TGT" -pass1_directories +time pass1_directories case "$buildwhat" in pass1a) - pass1_get_sources_with_morph + time pass1_get_sources_with_morph ;; pass1b) - pass1_build_with_morph + time pass1_build_with_morph ;; pass2a) - pass2_get_morph - pass2_prepare_for_chroot - pass2_get_sources_with_morph_in_chroot - pass2a_cleanup_at_end + time pass2_get_morph + time pass2_prepare_for_chroot + time pass2_get_sources_with_morph_in_chroot + time pass2a_cleanup_at_end ;; pass2b) - pass2_build_with_morph_in_chroot - pass2b_cleanup_at_end + time pass2_build_with_morph_in_chroot + time pass2b_cleanup_at_end ;; pass3a) - pass3_remove_tools - pass3_get_sources_with_morph_in_chroot + time pass3_remove_tools + time pass3_get_sources_with_morph_in_chroot ;; pass3b) - pass3_build_with_morph_in_chroot + time pass3_build_with_morph_in_chroot ;; *) echo "Usage! (sorry, I'm unhelpful)" 1>&2 exit 1 |