]> git.zerfleddert.de Git - m1-debian/commitdiff
use the right compiler and prepare for crosscompiling
authorThomas Glanzmann <thomas@glanzmann.de>
Thu, 8 Dec 2022 09:47:34 +0000 (10:47 +0100)
committerThomas Glanzmann <thomas@glanzmann.de>
Thu, 8 Dec 2022 09:47:34 +0000 (10:47 +0100)
gpu.sh

diff --git a/gpu.sh b/gpu.sh
index 960ccbe9b4d8ded0f81f6bae9bdcd1653068a684..4789b2c4ab07edbaf51cd13586c603f0e743c3db 100644 (file)
--- a/gpu.sh
+++ b/gpu.sh
@@ -12,6 +12,16 @@ cd "$(dirname "$0")"
 unset LC_CTYPE
 unset LANG
 
 unset LC_CTYPE
 unset LANG
 
+handle_crosscompile()
+{
+        if [ "`uname -m`" != 'aarch64' ]; then
+                export ARCH=arm64
+                export CROSS_COMPILE=aarch64-linux-gnu-
+                export DEBOOTSTRAP=qemu-debootstrap
+                sudo apt install -y libc6-dev-arm64-cross
+        fi
+}
+
 build_linux()
 {
 (
 build_linux()
 {
 (
@@ -22,7 +32,7 @@ build_linux()
         source "$HOME/.cargo/env"
         cat ../../config-gpu.txt > .config
         make LLVM=-14 olddefconfig
         source "$HOME/.cargo/env"
         cat ../../config-gpu.txt > .config
         make LLVM=-14 olddefconfig
-        make -j `nproc` V=0 bindeb-pkg > /dev/null
+        make -j `nproc` LLVM=-14 V=0 bindeb-pkg > /dev/null
 )
 }
 
 )
 }
 
@@ -54,6 +64,7 @@ build_uboot()
 mkdir -p build
 cd build
 
 mkdir -p build
 cd build
 
+handle_crosscompile
 build_linux
 build_m1n1
 build_uboot
 build_linux
 build_m1n1
 build_uboot
Impressum, Datenschutz