Build Android Uboot failed

Why not compile Uboot? Install Cross Compiler for U-Boot http://docs.khadas.com/develop/InstallToolchainsForAmlogicPlatform/

You need to install gcc-linaro-aarch64-linux-gnu- and not gcc-linaro-aarch64-none-elf-

$ wget http://releases.linaro.org/archive/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.bz2
$ sudo mkdir /opt/toolchains
$ sudo tar -xjf gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.bz2 -C /opt/toolchains
1 Like

I set everything according to the instructions. The first line in the screenshot I tried from odroid-c

You can have a try following command

# make CROSS_COMPILE=/opt/toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/aarch64-linux-gnu- 

Thanks terry!!! Build Uboot successfully :+1:

build android failed

Try again with below command

export PATH=$PATH:/opt/toolchains/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin
1 Like

Thanks!!! Everything is fine android was going well

I’m not able to build uboot with android oreo for VIM1 using these instructions:

Building board/khadas/kvim/bl21.bin
CPP task_entry.s
CPP user_task.lds
aarch64-linux-gnu-cpp: error: unrecognized command line option ‘-mthumb’
aarch64-linux-gnu-cpp: error: unrecognized command line option ‘-mno-sched-prolog’
Makefile:111: recipe for target ‘/mnt/disks/khadas/oreo/uboot/build/scp_task/user_task.lds’ failed
make[2]: *** [/mnt/disks/khadas/oreo/uboot/build/scp_task/user_task.lds] Error 1
/mnt/disks/khadas/oreo/uboot/Makefile:914: recipe for target ‘/mnt/disks/khadas/oreo/uboot/build/scp_task/bl301.bin’ failed
make[1]: *** [/mnt/disks/khadas/oreo/uboot/build/scp_task/bl301.bin] Error 2
Makefile:147: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

Do you know why?

Did you install the aarch64-linux-gnu-cpp tool? Can you describe in detail the steps you perform?