Building an out of tree kernel object


ajellisuk
 Share

0

Recommended Posts

Hello

 

I am trying to build a driver for a PineCube. The driver is Cedar_Ve.ko. Unfortnately I'm running in to problems either building the driver or deploying it. I have tried 3 approaches, but not work.

1) I downloaded the source for the kerenl 5.10.6 which I'm using from here: https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-source-5.10.60-current-sunxi/ and built it using the following commands:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig

make LOCALVERSION="-sunxi" ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

I then cloned the source for the Cedar driver from here https://github.com/uboborov/sunxi-cedar-mainline

I built the driver against the above kernel using this command line:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOCALVERSION="-sunxi" KERNEL_SOURCE=../linux-source-5.10.60-sunxi/ 

 

Using the above steps the driver cross compiled, but when I tried to load it on the PineCube, the module failed to load. The kernel log gave the following message:

 

Quote

cedar_ve: version magic '5.10.60-sunxi SMP mod_unload ARMv7 p2v8 ' should be '5.10.60-sunxi SMP mod_unload ARMv7 thumb2 p2v8 '

 

2) Having tried the above steps, and not being able to find a way to resolve the error with the above driver, I tried the above steps but using the kernel in the armbian sources here

Quote

build/cache/sources/linux-mainline/orange-pi-5.10/

But the build failed with

Quote

/bin/sh: 1: scripts/basic/fixdep: not found

I looked in the source tree for the kerenl for orange-pi-5.10, and could see that fixdep was not built.

 

3) Finally I tried building the driver on the PineCube itself, but the build failed with:

Quote

./include/linux/page-flags-layout.h:95:2: error: #error "Not enough bits in page flags"

 

So my questions are what is the recommended approach to building an out of tree module for Armbian? And in the case of method 2 how do I get the build process to build fixdep?

 

Thanks in Advance

 

Andrew

Link to post
Share on other sites

Donate and support the project!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

0