ODROID-C2 Linux include headers bug?

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

ODROID-C2 Linux include headers bug?

Postby jowemi » Tue Aug 09, 2016 3:07 pm

Hi there,

When trying to compile the RTL8188EU module on the ODROID-C2 using linux-odroid-c2-headers 3.14.65-18 I get the following error output: http://pastebin.com/AtC2vYFA
It looks like it is trying to include ../../arm/<something> where it should be ../../arm64/<something>.

Also happens with the 8188eu-dkms package from AUR.

Any ideas how to fix this?
jowemi
 
Posts: 3
Joined: Mon Aug 08, 2016 3:57 pm

Re: ODROID-C2 Linux include headers bug?

Postby patthebrat » Fri Aug 19, 2016 12:01 pm

Hey!

I've had the same problem compiling the module for my adapter, although it was the 8192. I've managed to get it running. It's dirty and hacky, but it worked. Hopefully, this will help you as well. Are you installing from the AUR? I've had the best luck doing it manually with makepkg, as I had to hack at the code a bit.

Run updates and reboot, if your kernel is upgraded (mine is -19, your was -18).

Now, our architecture is aarch64, not arm or arm64. Make symlinks to trick it into including everything:
$this->bbcode_second_pass_code('', 'cd /usr/lib/modules/3.14.65-19-ARCH/build/arch/
sudo ln -s arm64/ aarch64
sudo ln -s arm64/ arm')

Get the PKGBUILD:
$this->bbcode_second_pass_code('', 'git clone https://aur.archlinux.org/8188eu-dkms.git && cd 8188eu-dkms')

Edit the PKGBUILD (nano/vim) and change the architecture to aarch64 (if needed - I had to). Try it:

$this->bbcode_second_pass_code('', 'makepkg -sri')

If it runs, perfect! I still had bugs, so if you do too, keep going. This is what popped up for me:
$this->bbcode_second_pass_quote('', '/')usr/lib/modules/3.14.65-19-ARCH/build/arch/aarch64/include/asm/dma-mapping.h:45:10: error: 'xen_dma_ops' undeclared (first use in this function)


If this happens to you:
$this->bbcode_second_pass_code('', 'sudo nano /usr/lib/modules/3.14.65-19-ARCH/build/arch/aarch64/include/asm/dma-mapping.h')

Comment out (/* ... */) the xen if-else part, so it looks like this:
$this->bbcode_second_pass_code('', 'static inline struct dma_map_ops *get_dma_ops(struct device *dev)
{
/*if (xen_initial_domain())
return xen_dma_ops;
else */
return __generic_dma_ops(dev);
}')

Try it yet again:
$this->bbcode_second_pass_code('', 'makepkg -sri ')

Now I got the following error:
$this->bbcode_second_pass_quote('', '/')usr/lib/modules/3.14.65-19-ARCH/build/arch/aarch64/include/../../arm/include/asm/xen/hypervisor.h:1:50: error: #include nested too deeply


Hack this file too:
$this->bbcode_second_pass_code('', 'sudo nano /usr/lib/modules/3.14.65-19-ARCH/build/arch/aarch64/include/asm/xen/hypervisor.h')

Comment out (//)the only line:
$this->bbcode_second_pass_code('', '//#include <../../arm/include/asm/xen/hypervisor.h>')

And that should fix the kernel problems. I had a few minor ones with the drivers themselves (namely a missing "#include <net/ip6_checksum.h>" and the linker not liking my $LDFLAGS so I had to comment that line out in /etc/makepkg.conf), but I finally got it running.

Now I'm going to take a shower, because that hack is dirrrty :lol:

Let me know if that helps.
patthebrat
 
Posts: 2
Joined: Fri Aug 19, 2016 11:37 am

Re: ODROID-C2 Linux include headers bug?

Postby jowemi » Sat Aug 20, 2016 12:40 pm

You are so awesome, thank you so much for this! It compiled smoothly after making symlinks and editing those two header files!

I got to the point where I had that bug with nested includes on my own (by using symlinks like you), but I didn't have the courage to touch those header files as I thought there were probably more files that would have a nested mess.
jowemi
 
Posts: 3
Joined: Mon Aug 08, 2016 3:57 pm


Return to ARMv8

Who is online

Users browsing this forum: No registered users and 4 guests