build kernel with aarch64-linux-gnu-gcc
Asked Answered
P

6

9

I am trying to build the kernel source on my platform with the following command:

make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- generic-v8-defconfig

However, the error messages appear as shown in the following:

/bin/sh: 1: aarch64-linux-gnu-gcc: not found

It's obvious I have not this version of gcc installed on my laptop.

I then followed

http://www.howtoinstall.co/en/ubuntu/trusty/main/gcc-4.8-aarch64-linux-gnu/

This to install gcc-4.8-aarch-linux-gnu,

however, I still get the same error message.

Ubuntu version: 14.04

Please let me know if you know how to fix this.

Thanks

Pellikka answered 17/2, 2015 at 16:0 Comment(1)
#22267086Peppel
K
7

looks like a PATH issue. what happens when you just type "aarch64-linux-gnu-gcc "in your shell? does it find the compiler?

Killen answered 17/2, 2015 at 17:44 Comment(3)
Thanks for the reply. The issue has been fixed.Pellikka
@Pellikka could you let us know how?Pushcart
#22267086Peppel
E
28

Maybe aarch64-linux-gnu-gcc is not installed. Try

sudo apt-get install gcc-aarch64-linux-gnu
Eisler answered 16/12, 2016 at 6:22 Comment(2)
# pacman -S aarch64-linux-gnu-gcc on arch linuxGiorgione
dnf install gcc-aarch64-linux-gnu gcc-c++-aarch64-linux-gnu on fedoraAsomatous
K
7

looks like a PATH issue. what happens when you just type "aarch64-linux-gnu-gcc "in your shell? does it find the compiler?

Killen answered 17/2, 2015 at 17:44 Comment(3)
Thanks for the reply. The issue has been fixed.Pellikka
@Pellikka could you let us know how?Pushcart
#22267086Peppel
A
3

You can use the following commands:

sudo add-apt-repository ppa:linaro-maintainers/toolchain
sudo apt-get update
sudo apt-get install gcc-**version**-aarch64-linux-gnu

Make sure to replace **version** by the correct version.

Actinometer answered 4/7, 2017 at 6:1 Comment(0)
A
3

Try it:

debian/ubuntu:

sudo apt-get install gcc-aarch64-linux-gnu # GNU C compiler for the arm64 architecture
sudo apt-get install g++-aarch64-linux-gnu # GNU C++ compiler

Archuleta answered 4/8, 2020 at 7:48 Comment(0)
A
2

Use ndk tool to install the arm64 cross compiler:

$NDK_ROOT/build/tools/make-standalone-toolchain.sh --arch=arm64 --install-dir=/opt/android-toolchain export PATH=$PATH:/opt/android-toolchain

Ahvenanmaa answered 13/6, 2017 at 2:15 Comment(0)
G
0

Do this, it will get solved CROSS_COMPILE=aarch64-linux-gnu- make flash.bin -j $(nproc --all)

Greenway answered 17/3 at 10:14 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Fistulous

© 2022 - 2024 — McMap. All rights reserved.