[opensuse-arm] Build a kernel module for a downstream kernel (sun7i)
Hi, I'm trying to build the rtl8188eu kernel module for my wifi dongle locally in my cubieboard2. The build fails with the following error: + make -C /usr/src/linux-obj/armv7hl/sun7i modules M=/usr/src/packages/BUILD/rtl8188eu-3.13/obj/sun7i make: Entering directory `/usr/src/linux-3.4.75-2-obj/armv7hl/sun7i' make: Entering an unknown directory make: *** ../../../linux-3.4.75-2: No such file or directory. Stop. make: Leaving an unknown directory make: *** [all] Error 2 make: Leaving directory `/usr/src/linux-3.4.75-2-obj/armv7hl/sun7i' The error is clear: the directory /usr/src/linux-3.4.75-2 does not exist. That directory is where the kernel sources should be installed, but I don't have any package with the kernel source: linux:~ # ls -l /usr/src total 16 lrwxrwxrwx 1 root root 17 feb 4 01:59 linux -> linux-3.7.10-1.24 drwxr-xr-x 3 root root 4096 feb 4 02:09 linux-3.4.75-2-obj drwxr-xr-x 3 root root 4096 feb 4 02:09 linux-obj drwxr-xr-x 8 root root 4096 ene 13 2014 packages When I built the kernel-sun7i package in OBS (home:ocurero:arm) it didn't build kernel-sun7i-source, only kernel-sun7i, kernel-sun7i-devel and kernel-sun7i-base packages where created. What packages do I need to build to be able to compile kernel modules for kernel-sun7i? Thanks! -- -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
15.01.2014 02:59, Oscar C пишет:
Hi,
I'm trying to build the rtl8188eu kernel module for my wifi dongle locally in my cubieboard2. The build fails with the following error:
Are you trying to build module as rpm package? (Then, show me a spec) Otherwise, do you have kernel-devel installed? -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-17 17:57, Matwey V. Kornilov escribió:
15.01.2014 02:59, Oscar C пишет:
Hi,
I'm trying to build the rtl8188eu kernel module for my wifi dongle locally in my cubieboard2. The build fails with the following error:
Are you trying to build module as rpm package? (Then, show me a spec) Otherwise, do you have kernel-devel installed?
Yes, kernel-sun7i-devel is installed. The build repo is here: home:ocurero:branches:home:Akoellh:Kernelmodules -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
18.01.2014 03:08, Oscar C пишет:
Yes, kernel-sun7i-devel is installed. The build repo is here: home:ocurero:branches:home:Akoellh:Kernelmodules
I use make -C %{kernel_source $flavor}: make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-18 17:06, Matwey V. Kornilov escribió:
18.01.2014 03:08, Oscar C пишет:
Yes, kernel-sun7i-devel is installed. The build repo is here: home:ocurero:branches:home:Akoellh:Kernelmodules
I use make -C %{kernel_source $flavor}:
make -C %{kernel_source $flavor} modules M=$PWD/obj/$flavor
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel. From https://en.opensuse.org/openSUSE:Build_Service_prjconf#Release: "The BuildService sets the Release tag in spec files automatically. The format of the Release tag an be defined in the prjconf. Two magic strings are recognized: CI_CNT is the number of commits B_CNT is the number of rebuilds (when the rebuild is triggered)." So now the question is: How can I control the release tag to make the kernel-source and kernel-sun7i match the release tag? -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
19.01.2014 20:08, Oscar C пишет:
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel.
But kernel-$flavor is just a link to kernel-sources. They can not have different release tags. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-19 17:14, Matwey V. Kornilov escribió:
19.01.2014 20:08, Oscar C пишет:
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel.
But kernel-$flavor is just a link to kernel-sources. They can not have different release tags.
Ehm, I'm must be doing something wrong because in my case, they have different release tags. These are the tests I've done so far: - Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1 - Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1 - Commit some modifications to kernel-source. Release tag is 2.1. As soon as I commit the changes, the kernel-sun7i is rebuilt. Release tag is then 2.2. - Create package kernel-source. Release tag is 1.1. - Commit some modifications to kernel-source. Release tag is 2.1. - Branch kernel-sun7i from kernel-source. Release tag is 3.1. All these tests were build in the home:ocurero:arm project. What's wrong? -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
21.01.2014 19:05, Oscar C пишет:
El 2014-01-19 17:14, Matwey V. Kornilov escribió:
19.01.2014 20:08, Oscar C пишет:
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel.
But kernel-$flavor is just a link to kernel-sources. They can not have different release tags.
Ehm, I'm must be doing something wrong because in my case, they have different release tags. These are the tests I've done so far:
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1 - Commit some modifications to kernel-source. Release tag is 2.1. As soon as I commit the changes, the kernel-sun7i is rebuilt. Release tag is then 2.2.
- Create package kernel-source. Release tag is 1.1. - Commit some modifications to kernel-source. Release tag is 2.1. - Branch kernel-sun7i from kernel-source. Release tag is 3.1.
All these tests were build in the home:ocurero:arm project. What's wrong?
Usual work-flow is to branch kernel-source and then link kernel-$flavor to it. Look at https://build.opensuse.org/project/show/home:matwey:beaglebone You have to edit kernel-source package, while kernel-$flavor is just a namekeeper. -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-21 17:35, Matwey V. Kornilov escribió:
21.01.2014 19:05, Oscar C пишет:
El 2014-01-19 17:14, Matwey V. Kornilov escribió:
19.01.2014 20:08, Oscar C пишет:
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel.
But kernel-$flavor is just a link to kernel-sources. They can not have different release tags.
Ehm, I'm must be doing something wrong because in my case, they have different release tags. These are the tests I've done so far:
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1 - Commit some modifications to kernel-source. Release tag is 2.1. As soon as I commit the changes, the kernel-sun7i is rebuilt. Release tag is then 2.2.
- Create package kernel-source. Release tag is 1.1. - Commit some modifications to kernel-source. Release tag is 2.1. - Branch kernel-sun7i from kernel-source. Release tag is 3.1.
All these tests were build in the home:ocurero:arm project. What's wrong?
Usual work-flow is to branch kernel-source and then link kernel-$flavor to it. Look at https://build.opensuse.org/project/show/home:matwey:beaglebone
You have to edit kernel-source package, while kernel-$flavor is just a namekeeper.
Finally I got i working, yeah! Both kernel-source and kernel-sun7i have the same release number. I think the poblem was that I branched the kernel-sun7i before the first built of kernel-source ended ok. Thanks! :) While we are at it, I have another question for you. I see you have built a module named v4l2loopback. I'm also trying to build a similar module named "dvbloopback" (http://software.opensuse.org/package/dvbloopback). To work ok, this module needs a very small patch to dvb-core.ko. Do you know how to patch a kernel module (dvb-core in this case) from the spec file? I tried to patch the kernel-source in OBS as if I were in a local build but it fails: [ 205s] Patch #0 (dvb-mutex.patch): [ 205s] + /usr/bin/patch -p0 --fuzz=0 [ 205s] + /usr/bin/cat /home/abuild/rpmbuild/SOURCES/dvb-mutex.patch [ 205s] Ignoring potentially dangerous file name /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] can't find file to patch at input line 4 [ 205s] Perhaps you used the wrong -p or --strip option? [ 205s] The text leading up to this was: [ 205s] -------------------------- [ 205s] |diff -Nur /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] |--- /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] |+++ /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c Thanks! -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-23 13:56, Oscar C escribió:
El 2014-01-21 17:35, Matwey V. Kornilov escribió:
21.01.2014 19:05, Oscar C пишет:
El 2014-01-19 17:14, Matwey V. Kornilov escribió:
19.01.2014 20:08, Oscar C пишет:
Looking at this closer, the problem is that the release tag on the .spec file is changed automatically on every build by OBS. If kernel-sun7i and kernel-sources have different release number, it's impossible to build a module for the kernel.
But kernel-$flavor is just a link to kernel-sources. They can not have different release tags.
Ehm, I'm must be doing something wrong because in my case, they have different release tags. These are the tests I've done so far:
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1
- Create package kernel-source. Release tag is 1.1 - Branch kernel-sun7i from kernel-source. Release tag is 2.1 - Commit some modifications to kernel-source. Release tag is 2.1. As soon as I commit the changes, the kernel-sun7i is rebuilt. Release tag is then 2.2.
- Create package kernel-source. Release tag is 1.1. - Commit some modifications to kernel-source. Release tag is 2.1. - Branch kernel-sun7i from kernel-source. Release tag is 3.1.
All these tests were build in the home:ocurero:arm project. What's wrong?
Usual work-flow is to branch kernel-source and then link kernel-$flavor to it. Look at https://build.opensuse.org/project/show/home:matwey:beaglebone
You have to edit kernel-source package, while kernel-$flavor is just a namekeeper.
Finally I got i working, yeah! Both kernel-source and kernel-sun7i have the same release number. I think the poblem was that I branched the kernel-sun7i before the first built of kernel-source ended ok. Thanks! :)
While we are at it, I have another question for you. I see you have built a module named v4l2loopback. I'm also trying to build a similar module named "dvbloopback" (http://software.opensuse.org/package/dvbloopback). To work ok, this module needs a very small patch to dvb-core.ko. Do you know how to patch a kernel module (dvb-core in this case) from the spec file? I tried to patch the kernel-source in OBS as if I were in a local build but it fails:
[ 205s] Patch #0 (dvb-mutex.patch): [ 205s] + /usr/bin/patch -p0 --fuzz=0 [ 205s] + /usr/bin/cat /home/abuild/rpmbuild/SOURCES/dvb-mutex.patch [ 205s] Ignoring potentially dangerous file name /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] can't find file to patch at input line 4 [ 205s] Perhaps you used the wrong -p or --strip option? [ 205s] The text leading up to this was: [ 205s] -------------------------- [ 205s] |diff -Nur /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] |--- /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c [ 205s] |+++ /usr/src/linux/drivers/media/dvb/dvb-core/dvbdev.c
Thanks!
Never mind, I got it working. Hurray! -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi, Am 14.01.2014 23:59, schrieb Oscar C:
I'm trying to build the rtl8188eu kernel module for my wifi dongle locally in my cubieboard2. The build fails with the following error:
Have you tried using the latest openSUSE kernel-default? I heard the sunxi guys were working on upstreaming things. Being able to use the regular kernel-source package would avoid fiddling with mismatching Contrib:sunxi packages. Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
El 2014-01-23 23:06, Andreas Färber escribió:
Hi,
Am 14.01.2014 23:59, schrieb Oscar C:
I'm trying to build the rtl8188eu kernel module for my wifi dongle locally in my cubieboard2. The build fails with the following error:
Have you tried using the latest openSUSE kernel-default? I heard the sunxi guys were working on upstreaming things. Being able to use the regular kernel-source package would avoid fiddling with mismatching Contrib:sunxi packages.
I haven't tried the latest kernel in a while, but reading the sunxi ML I get the impression that upstream kernel is not yet ready for day to day use. Some things are still missing or too unstable like SATA or ethernet. On the other hand, the sunxi branch is working solid on my cubieboard2 (repo home:ocurero:arm). So far so good: SATA works, usb works, display works and ethernet works. -- Cheers -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (3)
-
Andreas Färber
-
Matwey V. Kornilov
-
Oscar C