Power & Source of Big Ideas

Build U-Boot From Source Fails

Moderator: FATechsupport

Attempting to build Linux kernel and U-Boot for NanoPi Fire3 target.
Kernel builds successfully, U-Boot fails to build.

Reference: http://wiki.friendlyarm.com/wiki/index. ... FromSource

Command History:

git clone https://github.com/friendlyarm/prebuilts.git
sudo mkdir -p /opt/FriendlyARM/toolchain
sudo tar xf prebuilts/gcc-x64/arm-cortexa9-linux-gnueabihf-4.9.3.tar.xz -C /opt/FriendlyARM/toolchain/
sudo tar xf prebuilts/gcc-x64/aarch64-cortexa53-linux-gnu-6.4.tar.xz -C /opt/FriendlyARM/toolchain/

vi ~/.bashrc

Append:
export PATH=/opt/FriendlyARM/toolchain/4.9.3/bin:$PATH
export PATH=/opt/FriendlyARM/toolchain/6.4-aarch64/bin:$PATH
export GCC_COLORS=auto

source ~/.bashrc

git clone https://github.com/friendlyarm/linux.git -b nanopi2-v4.4.y --depth 1
git clone --branch nanopi2-v2016.01 https://github.com/friendlyarm/u-boot.git
cd linux
touch .scmversion
make ARCH=arm64 nanopi3_linux_defconfig
make ARCH=arm64
cd ../u-boot/
make s5p6818_nanopi3_defconfig
make CROSS_COMPILE=aarch64-linux-

Results:

Kernel build successful. File, linux/arch/arm64/boot/Image, exists.
U-Boot build fails with:

CC drivers/usb/gadget/f_fastboot.o
LD drivers/usb/gadget/built-in.o
DTC arch/arm/dts/s5p6818-drone.dtb
/bin/sh: 1: dtc: not found
scripts/Makefile.lib:296: recipe for target 'arch/arm/dts/s5p6818-drone.dtb' failed
make[2]: *** [arch/arm/dts/s5p6818-drone.dtb] Error 127
dts/Makefile:36: recipe for target 'arch-dtbs' failed
make[1]: *** [arch-dtbs] Error 2
Makefile:1249: recipe for target 'dts' failed
make: *** [dts] Error 2

Observations:

s5p6818_nanopi3_defconfig should not result in dependency on s5p6818-drone.dtb, it should be dependent upon s5b6818-nanopi3-rev*.dtb.

Question:

What do I change to fix this build issue?
My build environment was missing the device tree compiler...

sudo apt-get install device-tree-compiler

problem solved!
I am building same target and got errors while building u-boot
ArchLinux Other Linux 4.x or later kernel 64-bit-2018-06-02-21-26-41.png
ArchLinux Other Linux 4.x or later kernel 64-bit-2018-06-02-21-26-41.png (20.62 KiB) Viewed 10802 times


Any suggestions what can produce these errors are very welcome!

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests