Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install on raspbian stretch kernel 4.9 - various issues #25

Closed
JonBlue opened this issue Mar 25, 2018 · 6 comments
Closed

Can't install on raspbian stretch kernel 4.9 - various issues #25

JonBlue opened this issue Mar 25, 2018 · 6 comments
Labels
1 | state: invalid This doesn't seem right or isn't an issue

Comments

@JonBlue
Copy link

JonBlue commented Mar 25, 2018

After running task it gets stuck on patch_src, I can fix this by adding --reject --whitespace=fix to git apply but then it gets stuck on copy_config_from_local saying it can't find the /boot/config-{{.K_VER}}/.config file. I think in Raspbian there is only a build/configure.txt file which I tried feeding it by manually but that brings out all sorts of other issues by asking me to manually configure the build process asking Cross-compiler tool prefix (CROSS_COMPILE) [] (NEW) and about a hundred other questions and ultimately fails again.

@atar-axis
Copy link
Owner

atar-axis commented Mar 26, 2018

Hi there, looks like you are trying to compile the driver natively on a Raspberry - right?
Never tried that, and it isn't supported yet by my Taskfile, to compile it there directly since Raspbian's config-structure differs from other distributions (as you already mentioned).

But cross-compilation is supported! So, why don't you use task raspi3 to cross-compile it on your local machine?

Give it a try 🙂, on the other hand you are welcome to add support for compilation on Raspbian directly if you prefer it this way.

@JonBlue
Copy link
Author

JonBlue commented Mar 28, 2018

Hey, thanks for the answer and my bad, I did read the instruction but I somehow missed the reference about cross compiling under the Build instructions. Cross compiling is great as most of us access the raspberry via ssh anyways.

So it is my understanding that all I have to do is cross compile it then install the modules in Raspbian using insmod and run the Udev-rule.

Is the above correct?

@atar-axis
Copy link
Owner

atar-axis commented Mar 28, 2018

So it is my understanding that all I have to do is cross compile it then install the modules in Raspbian using insmod and run the Udev-rule.

Yea, just run task raspi3 at first - compilation then takes a while since you have to compile all modules (in order to create the missing module.symvers). After the building process finished, you can find three files in out/arm/:

  1. 99-xpadneo-raspi.rules
  2. bluetooth.ko
  3. hid-xpadneo.ko

Place the Udev-rule (1.) e.g. in /etc/udev/rules.d (it will be loaded automatically on the next restart). This is necessary since the hid-subsystem is bultin and we cannot replace its module therefore.

Run modinfo -n bluetooth to find out where your current bluetooth module is installed, replace it (backup!) by the patched one in the out folder.

Place hid-xpadneo.ko somewhere in extramodules (don't know how the correct path at the moment).

Run # depmod to register the new modules afterwards and restart.


If you are unsure, take a look at src/install.sh which does the same (except the udev rule) on your local machine - maybe that script does also work on Raspbian, never tried. Again, you are welcome to modify it to work on Raspbian too.

@atar-axis atar-axis added 1 | state: invalid This doesn't seem right or isn't an issue wontfix labels Mar 28, 2018
@atar-axis
Copy link
Owner

atar-axis commented Mar 28, 2018

Btw: please report back if it works (or not), I will close that issue then (or give you little bit more support) :)

@JonBlue
Copy link
Author

JonBlue commented Mar 28, 2018

as soon as the controller started vibrating I knew it worked :)
I'm using this particular raspberry with kodi and parsecgaming connected to a TV so it's very nice that I got it working.

I think I copied the hid.xpandeo.ko file in /lib/modules/uname -r since I don't think there's an extra modules folder in raspbian and it picked it from there.

I'll look into building the install.sh file for raspbian this weekend, just another question is there any reason the raspberry kernel is hard coded inside the task file? I actually build this on the latest kernel 1_20180313-1 since the latest raspberry pi 3 B+ won't even boot on older ones(firmware issue I think.

@atar-axis
Copy link
Owner

atar-axis commented Mar 28, 2018

Ah, perfect :) Nice to hear that it works for you now!

The reason is that this was the latest version at the time we installed raspbian on our raspberries at work ^^ Feel free to parametrize that if you want 😄, I just had no time to do so since then.

P.S. I am closing that issue - thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 | state: invalid This doesn't seem right or isn't an issue
Projects
None yet
Development

No branches or pull requests

2 participants