Download at Linaro website
armv8-64 Cross compiler: Gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.tar
I uploaded the address in csdn, no way to set 0 points: Gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.tar
armv7-32 Cross compiler: Gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.tar
Upload address in csdn, no way to set 0 points: Gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabihf.tar.tar
Decompression process: $ TAR-XVF Gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.tar
Move to opt, and modify the folder name as shown below:
"Three ways to configure environment variables" to add a path to $path, you can do this as follows:
1. Console, do not favor the use of this method, because the shell, your settings are invalid, so this method is only temporary use, and later to use the time to reset, more trouble.
Root privileges in the console add: $ export path= $PATH:/opt/toolchain/\gcc-arch64-linux-gnu/bin
$ Export cross_compile=aarch64-linux-gnu-
$ export path= $PATH:/opt/toolchain/\gcc-arm-linux-gnueabihf/bin
$ Export cross_compile=arm-linux-gnueabihf-
(The shell is closed, path is restored)
2. Modify the/etc/profile file, if your computer is only recommended as a development use, because all the user's shell has the right to use these environment variables, may bring security issues to the system. Here is for all the users, all the shells;
Under Root, add the following and save: Gedit/etc/profile
Add in:
$ export path= $PATH:/opt/toolchain/\gcc-arch64-linux-gnu/bin
$ Export cross_compile=aarch64-linux-gnu-
$ export path= $PATH:/opt/toolchain/\gcc-arm-linux-gnueabihf/bin
$ export cross_compile=arm-linux-gnueabihf-Use the source command to make the modification effective immediately:
Source/etc/profile
3. To modify the. bashrc file, this method is more secure, it can be used to control the permissions of these environment variables to the user level, here is for a specific user, if you need to give a user permissions to use these environment variables, you only need to modify their personal user home directory of the. bashrc file on it.
Root privileges: gedit ~/.BASHRC
Add in:
$ export path= $PATH:/opt/toolchain/\gcc-arch64-linux-gnu/bin
$ Export cross_compile=aarch64-linux-gnu-
$ export path= $PATH:/opt/toolchain/\gcc-arm-linux-gnueabihf/bin
$ Export cross_compile=arm-linux-gnueabihf-
Source/root/.bashrc
The latter two methods generally need to unregister the system to take effect, or you can use the source command to make the modified configuration immediately
Finally, you can test it with the echo command:
$ echo $PATH
The output is already a new path.