Select appropriate CROSS_COMPILE and target

This commit is contained in:
Takumi Sueda
2021-03-06 20:19:11 +09:00
parent 3b26348a09
commit 858dab5a0a
2 changed files with 38 additions and 7 deletions

26
tools/getcross Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh
set -e
uboot() {
. ./u-boot-brain/.config
case "${CONFIG_SYS_CPU}" in
arm926ejs) echo -n "arm-linux-gnueabi-"; return;;
armv7) echo -n "arm-linux-gnueabihf-"; return;;
*) exit 1;;
esac
}
linux() {
. ./linux-brain/.config
case "${CONFIG_CPU_ARM926T}_${CONFIG_ARCH_MULTI_V7}" in
y_) echo -n "arm-linux-gnueabi-"; return;;
_y) echo -n "arm-linux-gnueabihf-"; return;;
*) exit 1;;
esac
}
case "$1" in
u-boot) uboot ;;
linux) linux ;;
*) exit 1; ;;
esac