summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauri Leukkunen <lle@rahina.org>2009-03-30 10:17:55 +0300
committerLauri Leukkunen <lle@rahina.org>2009-03-30 10:17:55 +0300
commit48af3929f79b2ffe60e2430968261620dd1bccf9 (patch)
tree77220956f7c4281092898de9b19b9ade57900208
parentc9d3a0a64cfcee1a1a643c6f95d4832a6846762a (diff)
Fix default sb2-init behaviour
"sb2-init ARM arm-linux-gcc" does the expected: simple mode, qemu-arm cputransp, tools from / Signed-off-by: Lauri Leukkunen <lle@rahina.org>
-rwxr-xr-xutils/sb212
-rwxr-xr-xutils/sb2-init6
2 files changed, 16 insertions, 2 deletions
diff --git a/utils/sb2 b/utils/sb2
index 48ab9f7..3d8d718 100755
--- a/utils/sb2
+++ b/utils/sb2
@@ -205,6 +205,13 @@ function load_configuration()
if [ -f $HOME/.scratchbox2/$TARGET/sb2.config.d/gcc.config.sh ]; then
. $HOME/.scratchbox2/$TARGET/sb2.config.d/gcc.config.sh
fi
+ # attempt to make SBOX_CPUTRANSPARENCY_METHOD path absolute
+ if [ -n "$SBOX_CPUTRANSPARENCY_METHOD" ]; then
+ _cputransp=$(which $SBOX_CPUTRANSPARENCY_METHOD)
+ if [ -e $_cputransp ]; then
+ SBOX_CPUTRANSPARENCY_METHOD=$_cputransp
+ fi
+ fi
}
function clone_target_root_dir_from()
@@ -238,6 +245,9 @@ function sboxify_environment()
fi
# Check that tools exist (or at least the directory exists)
+ if [ -z "$SBOX_TOOLS_ROOT" ]; then
+ SBOX_TOOLS_ROOT="/"
+ fi
if [ ! -d "$SBOX_TOOLS_ROOT" ]; then
exit_error "Tools directory '$SBOX_TOOLS_ROOT' does not exist."
fi
@@ -784,7 +794,7 @@ END
$HOME/.scratchbox2/$SBOX_TARGET/locales \
conf_target_locale_path
else
- # SBOX_CPUTRANSPARENCY_METHOD is set empty,
+ # SBOX_CPUTRANSPARENCY_METHOD is not empty,
# host CPU != target CPU
cat <<END >>$SBOX_SESSION_DIR/exec_config.lua
conf_target_ld_so_library_path = nil
diff --git a/utils/sb2-init b/utils/sb2-init
index 2c95490..b556f11 100755
--- a/utils/sb2-init
+++ b/utils/sb2-init
@@ -282,7 +282,7 @@ fi
if [ -z "$MAPPING_MODE" ]; then
MAPPING_MODE="simple"
- echo "Warning: Mapping mode not specified, using default ($MAPPING_MODE)"
+ echo "Info: Mapping mode not specified, using default ($MAPPING_MODE)"
fi
if [ ! -d $SBOX_DIR/share/scratchbox2/lua_scripts/pathmaps/$MAPPING_MODE ]; then
@@ -325,6 +325,10 @@ if echo "$HOST_ARCH" | grep -q "^i.86*"; then
fi
echo "sb2-init: Host architecture is '$HOST_ARCH'"
+if [ "$HOST_ARCH" != "$ARCH" -a -z "$SB2INIT_CPUTRANSP" ]; then
+ SB2INIT_CPUTRANSP="qemu-$ARCH"
+fi
+
case "$ARCH" in
$HOST_ARCH*) ;;
arm*)