How to Fix DKMS error: "/bin/sh: 1: scripts/basic/fixdep: Exec format error"
The kernel headers are cross compiled and there's a bug in deb-pkg that packs the build host executables rather than the target executables. Thankfully, the sources are also included with the headers so you just have to recompile the header scripts.
There are 4 steps needed to do this:
1) Change to the Linux header directory: cd /usr/src/linux-headers-`uname -r`
1) Install the necessary dependencies: sudo apt-get install -y build-essential bc bison flex libssl-dev
2) Apply the byteshift patch to the headers: wget https://raw.githubusercontent.com/armbian/build/master/patch/misc/headers-debian-byteshift.patch -O - | sudo patch -p1
3) Compile the scripts: sudo make scripts
Now DKMS should work like normal. This is useful for adding Realtek wireless devices and other drivers.
Comments
Fantastic! Just tried this out with the latest image for the ALL-H5 and it worked like a charm.
I did have to go through a few different githubs before I found one that would compile correctly, but If your on a Tritium H5, I can verify this one works:
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux.git
EDIT: Also compiles on the Le Potato.