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:

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:

Operating System used to compile: Arch Linux (4.12.10-1-ARCH) gcc version: 7.1.1 uboot-tools: 2017.07-1 arm-none-eabi-gcc: 7.1.0 dtc version: 1.4.4

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

Arch Arm from the source linked in the Arch Wiki as well:

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 ?