Compile intel 915 kernel mod for OpenWrt

Dear all,

I would like to use x11 on my openwrt router. The system has an atom N2807 and I therefore need the intel 915 kernel mod for video. I would like to use 2d and 3d acceleration. The kmod does not seem to be included in the OpenWRT sources (I am on 18.06.2 on x86_64).

Can you give me any pointers how to include the intel kernel drivers in the buildroot so that I can compile the required modules? Any help/pointes would be really appreciated?

Thank you,
alex

I'm going to ask what is puzzling me immensely. Why would you want to run OpenWrt, which basically has no widespread video support and no X, if you've got requirements for 3D video acceleration?

1 Like

Hi Jeff,

firstly I like to tinker around... and try out new things! Secondly I like OpenWRT for the router functionality. Have before used a manual setup with ubuntu and hostapd but openwrt is much nicer.

Thirdly I would like to run Kodi or similar on the router so that I do not need a seperate box for streaming. (Box is a Intel PC with 8GB RAM so has enough resources) Does this answer your question?

Thanks

Well, I'm still not convinced and believe you might be much better served, especially in terms of security and robustness, by putting your routing on OpenWrt on an appropriate device, separate from all of your services. Past that, your "fancy" applications may have significant compilation problems as musl does not implement "everything" that many "desktop" C libraries do, both functions in their entirety, as well as specific actions of some of those functions.

It looks like you'll need to craft your own package as the source is apparently not part of the Linux distribution. The same would go for any other software you want to run that is not pre-packaged for OpenWrt. Even on an x86, it is very challenging to provide a complete and functional build environment running on OpenWrt.

1 Like

Hi Jeff,

Thank you for this. I am aware of these links. I was hoping for something more specific. I will try to experiment on my own.

On a more personal note, because I see this frequently in forums: My question was "How do I ..." and NOT "Should I..." or "would you recommend". Therefore I found it a bit hard to understand why you asked me for a justification for doing this and even claimed "I am still not convinced."

Thank you so much for your support!
Alex

You do understand there's no X, correct?

You'd have to build that too.

Personally I was going to suggest another distro, and perhaps running OpenWrt in VM on that device.

If you successfully build X, please consider contributing the makefile to the community.

Yes, I understand that. It is unfortunately quite an undertaking. Not sure I have enough time to finish. However, If I ever should get it done, I am happy to contributing the makefile.

The alternative I was thinking about was to give a priviledged LXC container access to the card and then install Xorg inside that container with a more suitable distro. This way I would not need to build X.

Knowing that in advance is why I asked if it was something you truly needed.

I don't see many "video" kernel modules in the base OpenWrt distro.

The "how would I" is still to create your own package. The steps are likely:

  • Patch in the Intel driver sources
  • Refresh the patches
  • Add the module to the KConfig structure
  • Add the module to the appropriate Makefile

If I were doing it, I'd look at video.mk for further clues.

Hi Jeff,

I understand. To make my life as easy as possible, I will try to go down the following route.

  1. Try to include th i915 kernel module from the original upstream kernel in the buildroot.
  2. Install x11 in debian or ubuntu within an LXC container. They will contain all the required dependencies for x11.

This way I have the advantages of OpenWRT (small and great router performance) combined with x11.

The i915 kernel driver is in the directory /drivers/gpu/drm/i915 of the upstream kernel. What is the best Package Sourcecode statement in the makefile to pull in the code for this driver?

Thank you,
alex

If already in upstream Linux sources and you don’t have any intention of upstreaming a package to OpenWrt, make kernel_menuconfig should let you add it to your local build.

Otherwise the link above would be what I’d examine to see how to approach a package.

1 Like