summaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorBen Howard <ben.howard@canonical.com>2011-09-30 16:24:08 -0600
committerDaniel Baumann <daniel@debian.org>2011-10-05 07:38:53 +0200
commitd90c311ef937a95ead004142c1d0740eca313a0a (patch)
treee2a020b20c2529d56068da01b7fa7981b21c34fc /functions
parent9e5218ec75190dc497224d41f68939f460573754 (diff)
downloadvyos-live-build-d90c311ef937a95ead004142c1d0740eca313a0a.tar.gz
vyos-live-build-d90c311ef937a95ead004142c1d0740eca313a0a.zip
Adding foreign bootstrap via qemu for cross arch building.
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/architectures.sh36
-rwxr-xr-xfunctions/defaults.sh9
2 files changed, 45 insertions, 0 deletions
diff --git a/functions/architectures.sh b/functions/architectures.sh
index 53d925bf1..d2c99dd65 100755
--- a/functions/architectures.sh
+++ b/functions/architectures.sh
@@ -22,6 +22,24 @@ Check_architectures ()
fi
done
+ if [ "${ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
+ then
+ VALID="true"
+
+ if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
+ then
+ Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
+ VALID="false"
+ fi
+
+ if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
+ then
+ Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
+ VALID="false"
+ fi
+
+ fi
+
if [ "${VALID}" = "false" ]
then
Echo_warning "skipping %s, foreign architecture(s)." "${0}"
@@ -52,6 +70,24 @@ Check_crossarchitectures ()
;;
esac
+ if [ "${LB_ARCHITECTURES}" = "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" ]
+ then
+
+ if [ ! -e "${LB_BOOTSTRAP_QEMU_STATIC}" ]
+ then
+ Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_ARCHITECTURES} was not found"
+ exit 0
+ fi
+
+ if [ ! -x "${LB_BOOTSTRAP_QEMU_STATIC}" ]
+ then
+ Echo_warning "skipping %s, qemu-static binary ${LB_BOOTSTRAP_QEMU_STATIC} is not executable"
+ exit 0
+ fi
+ return
+ fi
+
+
Check_architectures "${CROSS}"
}
diff --git a/functions/defaults.sh b/functions/defaults.sh
index 52b710724..a0dfd2bbc 100755
--- a/functions/defaults.sh
+++ b/functions/defaults.sh
@@ -1276,4 +1276,13 @@ Check_defaults ()
fi
fi
+ # Architectures to use foreign bootstrap for
+ LB_BOOTSTRAP_QEMU_ARCHITECTURES="${LB_BOOTSTRAP_QEMU_ARCHITECTURES:-}"
+
+ # Packages to exclude for the foreign/ports bootstrapping
+ LB_BOOTSTRAP_QEMU_EXCLUDE="${LB_PORTS_BOOTSTRAP_EXCLUDE:-}"
+
+ # Ports using foreign bootstrap need a working qemu-*-system. This is the location it
+ LB_BOOTSTRAP_QEMU_STATIC="${LB_BOOTSTRAP_QEMU_STATIC:-}"
+
}