Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Linux Kernel Driver Version Mismatch

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32

Linux Kernel Driver Version Mismatch

Posted at 4/16/2018 19:33:32      View:5333 | Replies:4        Print      Only Author   [Copy Link] 1#
Dear Firefly,

I am trying to compile a network driver for a PCIe card inserted into a RK3399 board.
I am facing three issues.
************************************
1. Issue with linux-headers for 4.4.16.
************************************
This command when I run on firefly Linux, I am getting the below error.
I would like to compile a network driver after the Linux headers are downloaded @ /lib/modules/<Linux_Version>/
# sudo apt installlinux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-4.4.16
E: Couldn't find any package by glob 'linux-headers-4.4.16'
E: Couldn't find any package by regex 'linux-headers-4.4.16'
Please suggest me what is wrong here,why the kernel headers are found for 4.4.16 version is linux in firefly board ?
And from where to download the headers for our 4.4.16 version of Linux?

************************************
2. Downloaded kernel mismatch: ************************************
Currently the firefly board has the linux kernel 4.4.16.
I downloaded kernel source (4.4.77) from the firefly repo which is not 4.4.16.
So when I compile the kernel (4.4.77) and compile the driver, the driver is being compiled but I am getting an error of version mismatch when the driver is inserted as below:
[15712.108550] r8168: version magic '4.4.77 SMP mod_unload aarch64' should be '4.4.16 SMP preempt mod_unload aarch64'
This is because, the Linux running on firefly is 4.4.16 and the dowloaded kernel is of 4.4.77 and driver is compiled using 4.4.77 kernel source.
Could you please point to me to 4.4.16 kernel source of firefly rk3399 board? If not available, how do i proceed with the driver compilation, please suggest?

************************************
3 Dmesg prints for PCIe
************************************
Is this the notable error? Why this error shown in dmesg log? please clarify?  

[    0.434696] rockchip-pcie f8000000.pcie: no vpcie3v3 regulator found
[    0.434744] rockchip-pcie f8000000.pcie: no vpcie1v8 regulator found
[    0.434776] rockchip-pcie f8000000.pcie: no vpcie0v9 regulator found
[    0.961298] rockchip-pcie f8000000.pcie: PCIe link training gen1 timeout!
[    0.961373] rockchip-pcie: probe of f8000000.pcie failed with error -110

Currently the details of Linux that came along with the board rk3399 are:
==================================================================================
ARM64:
Model name: Rockchip RK3399
Architecture: aarch64
# uname -m
aarch64
# uname -a
Linux 4.4.16 #960 SMP PREEMPT Thu Feb 23 10:11:32 CST 2017 aarch64 aarch64aarch64 GNU/Linux
==================================================================================
# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
==================================================================================



Reply

Use props Report

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32
Posted at 4/17/2018 14:20:23        Only Author  2#
Gentle Reminder!
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 4/17/2018 16:18:28        Only Author  3#
1. firefly linux kernel version is 4.4.77, and i have no idea what are you want to do with the kernel-header.
2. if you want to build your own kernel-header , you better that use the firefly linux kernel to build it.
3. PCIe probe success after your device connect the board and the driver work fine.
Reply

Use props Report

18

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
18
Posted at 4/18/2018 09:34:54        Only Author  4#
The version of the OS that the boards ship with is old. First thing, upgrade to the latest Linux build (http://www.t-firefly.com/share/i ... 280428918a40e3.html), which is running 4.4.77.  From there, you can compile the kernel mods as needed.  Since this is not the stock Ubuntu kernel, you can't use any kernel packages or kernel modules in the stock repos.  
Reply

Use props Report

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32
Posted at 4/18/2018 15:00:47        Only Author  5#
Last edited by WajahathMM In 4/18/2018 15:24 Editor

Thanks for the clarity. I am downloading the kernel now from the above given link. You didnt not verify which folder to download. there are 4 folders. Please suggest the correct one to flash.

Firefly-RK3399_xubuntu16.04_20180412
Firefly-RK3399_xubuntu16.04_20180416
Firefly-RK3399_xubuntu16.04_EDP785_20180403
Firefly-RK3399_xubuntu16.04_MIPI785_20180403

After compiling the kernel, I will try the below steps to flash the kernel image: correct?
sudo upgrade_tool di -k ./kernel.img

Will the above step upgrade the kernel or is there anything to do for the kernel upgrade?


Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list