summaryrefslogtreecommitdiff
path: root/packaging/baselibs.conf
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/baselibs.conf')
-rw-r--r--packaging/baselibs.conf77
1 files changed, 74 insertions, 3 deletions
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
index 845bfa6..d23f00b 100644
--- a/packaging/baselibs.conf
+++ b/packaging/baselibs.conf
@@ -1,7 +1,10 @@
-arch i686 targets armv7l:cross-arm
+arch i686 targets armv7l:cross-arm aarch64:cross-aarch64
-
-targettype cross-arm package qemu-accel-armv7l
+qemu-accel-armv7l
+ targettype cross-arm requires "gcc"
+ targettype cross-aarch64 block!
+ targettype 32bit block!
+ targettype cross-arm
autoreqprov off
extension -cross
post "set -x"
@@ -40,4 +43,72 @@ targettype cross-arm package qemu-accel-armv7l
post "rm -rf /usr/armv7l-tizen-linux-gnueabi/lib"
post "ln -s /lib /usr/armv7l-tizen-linux-gnueabi/usr/lib"
post "builtin echo 0 >/proc/sys/vm/mmap_min_addr"
+ post ""
+ post "if [ -f /usr/bin/gcc ] ; then"
+ post " export GCCVER=$(LANG=C gcc --version | head -1 | sed -e "s/^.*gcc[^0-9]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2/") "
+ post " # Create symlinks to files needed by native ld for the case if we want to use it instead of cross ld:"
+ post " for f in crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o ; do"
+ post " ln -s /usr/lib/gcc/armv7l-tizen-linux-gnueabi/${GCCVER}/$f /usr/armv7l-tizen-linux-gnueabi/bin/$f;"
+ post " done"
+ post "fi"
+ +/
+
+qemu-accel-aarch64
+ targettype cross-aarch64 requires "gcc"
+ targettype cross-arm block!
+ targettype 32bit block!
+ targettype cross-aarch64
+ autoreqprov off
+ extension -cross
+ post "set -x"
+ post "builtin echo 'Starting qemu post script'"
+ post "if [ $(uname -m) = aarch64 ]; then"
+ post " builtin echo aarch64 arch"
+ post " ln -sf %{our_path}/lib/libnsl.so.1 /lib/libnsl.so.1 || true"
+ post "fi"
+ post "# load the binfmt_misc module"
+ post "if [ ! -d /proc/sys/fs/binfmt_misc ]; then"
+ post " builtin echo Calling modprobe"
+ post " /sbin/modprobe binfmt_misc"
+ post "fi"
+ post ""
+ post "did_mount_it=''"
+ post ""
+ post "if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then"
+ post " builtin echo mounting binfmt_misc"
+ post " mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc"
+ post " did_mount_it='1'"
+ post "fi"
+ post ""
+ post "if [ -e /proc/sys/fs/binfmt_misc/aarch64 ]; then"
+ post " builtin echo Unregistering accelerated handler"
+ post " builtin echo -1 > /proc/sys/fs/binfmt_misc/aarch64"
+ post "fi"
+ post "if [ ! -e /proc/sys/fs/binfmt_misc/aarch64 ]; then"
+ post " builtin echo Registering right binfmt handler"
+ post "%if 0%{?use_binfmt_binary}"
+ post "builtin echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/qemu/qemu-aarch64-binfmt:P' > /proc/sys/fs/binfmt_misc/register"
+ post "%else"
+ post "builtin echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/qemu/qemu-aarch64:OC' > /proc/sys/fs/binfmt_misc/register"
+ post "%endif"
+ post "fi"
+ post "cat /proc/sys/fs/binfmt_misc/aarch64 | sed -e 's/mask/mask /'"
+ post ""
+ post "if [ -n $did_mount_it ]; then "
+ post " builtin echo "Unmounting again.";"
+ post " umount /proc/sys/fs/binfmt_misc"
+ post "fi"
+ post ""
+ post "echo All done"
+ post ""
+ post "# Fix up sysroot paths"
+ post "echo 0 >/proc/sys/vm/mmap_min_addr"
+ post ""
+ post "if [ -f /usr/bin/gcc ] ; then"
+ post " export GCCVER=$(LANG=C gcc --version | head -1 | sed -e "s/^.*gcc[^0-9]*\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2/") "
+ post " # Create symlinks to files needed by native ld for the case if we want to use it instead of cross ld:"
+ post " for f in crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o ; do"
+ post " ln -s /usr/lib/gcc/aarch64-tizen-linux/${GCCVER}/$f /usr/lib/$f;"
+ post " done"
+ post "fi"
+/