What's the correct way to install kernel sources?
What I do right now:
- Mount some storage to /home/nemo/rpmbuild (in this case a nfs storage) to have enough space.
- Download and extract sailfish-1.1.6.27-oss.tar.bz2
- move kernel-adaptation-sbj/kernel-adaptation-sbj-3.4.106.20150416.1.tar.bz2 to /home/nemo/rpmbuild/SOURCES/
- Put this spec file to /home/nemo/rpmbuild/SPECS/kernel-adaptation-sbj.spec (it's a slight modification of the original spec file).
- Do `rpmbuild -bb /home/nemo/rpmbuild/SPECS/kernel-adaptation-sbj.spec
- When rpmbuild does build the kernel stop it (ctrl + C).
- Copy /home/nemo/rpmbuild/BUILD/kernel-adaptation-sbj-3.4.106.20150416.1 to /usr/src/linux-3.4.106.20150416.1 (or better: onto a larger share, nfs storage in that example, and symlink it).
- Do
cd /usr/src/linux-3.4.106.20150416.1 && make -j3
Now you might ask why I'm stopping rpmbuild at step 6 and doing manual things instead of letting it finish and installing kernel-adaptation-sbj-devel. The reason for this is that the created rpm does contain the /usr/src/linux-3.4.106.20150416.1 folder but inside of it various files are missing. I tried to copy these files from an Android kernel source but that's just a never ending ghost hunting, so I decided to go my hackish route instead.
Now I'm pretty sure I'm doing something wrong at the first 5 steps and there's a way more simple way (which involves letting rpmbuild finish and installing the created rpm) but I can't figure it out. Any hints?
@Violator : As described here https://together.jolla.com/question/97779/need-help-with-kernel-source/
If you build on phone you drop the CROSS_COMPILE bit.
So just extract the tarball, cd in the dir, make sbj_defconfig and then make. (Unless the tarball is somehow messed up ofc)
Philippe De Swert ( 2015-07-04 18:21:26 +0200 )edit