diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-10-10 12:00:38 -0400 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2014-09-24 15:20:58 +0000 |
commit | e97e02e134a0f228d7e87e19539b6ef6b9501b1c (patch) | |
tree | 8bfe6146be8f40c406252fe7dde742c8e01b7957 | |
parent | 19f949f52599ba7c3f67a5897ac6be14bfcb1200 (diff) | |
download | linux-e97e02e134a0f228d7e87e19539b6ef6b9501b1c.tar.gz |
Add `morph-arch` script
This is used by the chunk morphologies in definitions.git to work out
what Linux architecture name to use for a given Morph architecture name.
-rwxr-xr-x | morph-arch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/morph-arch b/morph-arch new file mode 100755 index 000000000000..25f91758a488 --- /dev/null +++ b/morph-arch @@ -0,0 +1,22 @@ +#!/bin/sh + +# Get Linux ARCH from Morph architecture + +if [ -z "$MORPH_ARCH" ]; then + echo "Error: MORPH_ARCH is not set" >&2 + exit 1 +fi + +case "$MORPH_ARCH" in + armv7b|armv7l|armv7lhf) + echo arm ;; + x86_32) + echo i386 ;; + x86_64) + echo x86_64 ;; + ppc64) + echo powerpc ;; + *) + echo "Error: unsupported Morph architecture: $MORPH_ARCH" >&2 + exit 1 +esac |