Trouble compiling u-boot for BPI-M1 (BP-A20)

Hey all,

Following the instructions on the Arch Wiki to attempt to install Arch Linux onto my BPI-M1 (BP-A20), I’ve run into issues compiling u-boot, here’s the terminal output: https://pastebin.com/fnHuztuK

One of the Python scripts complains about a missing module named ‘_libfdt,’ I have some experience with Python. But I wasn’t able to find any Python libraries that provide this module. There’s a module called pyfdt. But that’s imported by calling “import pyfdt” not “_libfdt” and when installed does not solve the issue. (Why would it?)

I’ve tried u-boot from different sources with no success either. I’ve also tried manually adding #!/usr/bin/python2 to all of the Python build scripts to see if that would fix the issue with no success. (Because Arch Linux uses Python 3 by default.)

I also tried compiling in Bash to see if my shell was the issue. Nothing I’ve tried seems to fix the compile issues, so maybe someone more experienced can help me understand what’s going wrong?

I followed the guide from the Arch Wiki: https://wiki.archlinux.org/index.php/Banana_Pi

Operating System used to compile: Arch Linux (4.12.10-1-ARCH) gcc version: 7.1.1 uboot-tools: 2017.07-1 https://www.archlinux.org/packages/community/x86_64/uboot-tools/ arm-none-eabi-gcc: 7.1.0 https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/ dtc version: 1.4.4 https://www.archlinux.org/packages/community/x86_64/dtc/

u-boot compiled from the source linked in the Arch Wiki: git://git.denx.de/u-boot.git

Arch Arm from the source linked in the Arch Wiki as well: http://archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz

Included a text file of the compile errors just in case the pastebin gets removed. compile-errors.txt (2.4 KB)

Any help is much appreciated, how do I compile u-boot correctly?

Hi, is there a special reason to use Arch Linux or would a Debian based Linux be okay as well ?