How to turn openSUSE 12.2 into realtime system?

On Wed 07 Nov 2012 04:36:01 PM CST, AugieHenriques wrote:

Hi,
I ran “make cloneconfig” as normal user.
Should this be done as root?
The instructions don’t state clearly with commands to do as root or
normal user.
Thank you,
Augie

Code:

/usr/src/linux> make cloneconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:433:1: fatal error: opening dependency file
scripts/basic/.fixdep.d: Permission denied compilation terminated.
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
/usr/src/linux>

Hi
Take a step back for a moment, the issues are;

  1. Don’t become root user for building anything,
  2. Because your not root user, doing stuff in /usr/src/linux won’t work
    because you don’t have the permissions (good because as a user you
    won’t cause potential problems :wink: )

So as indicated by user arvidjaar to use your home directory use;


make O=/home/<username>/linux/build

Now in saying that did you check the current kernel configuration for
the options your wanting to add? AFAIK the current desktop kernel is
set for low latency etc…?

So if you run (AS you user)


cd
mkdir -p /home/<username>/linux/build
cp /proc/config.gz  .
gunzip config.gz
chmod 644 config

Now open the config file with an editor and verify the changes exist/don’t exist… then save as required.

Now;


cp /home/<username>/config /home/<username>/linux/build/.config
chmod 444  /home/<username>/linux/build/.config
cd /usr/src/linux
make O=/home/<username>/linux/build

See how that goes first…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 9 days 17:53, 4 users, load average: 0.13, 0.13, 0.09
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi,
I followed exactly what you said. Please see bellow.
Thank you,
Augie

/usr/src/linux> make O=/home/augie/linux/build
  HOSTCC  scripts/basic/fixdep
  GEN     /home/augie/linux/build/Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target `/usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/asm/unistd_32.h'.  Stop.
make[1]: *** [archheaders] Error 2
make: *** [sub-make] Error 2
/usr/src/linux>

On Wed 07 Nov 2012 06:06:01 PM CST, AugieHenriques wrote:

scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target /usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl', needed by arch/x86/syscalls/…/include/generated/asm/unistd_32.h’. Stop.
make[1]: *** [archheaders] Error 2 make: *** [sub-make] Error 2

Hi
Have you forced the re-install of the kernel source in case there are issues?


su -
zypper in -f kernel-source
exit


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 9 days 19:17, 4 users, load average: 0.01, 0.04, 0.09
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi,
I removed the old stuff that I was working with.
I re-installed the source and no issues.
Then I followed your instructions.
Thank you,
Augie

On Wed 07 Nov 2012 06:46:02 PM CST, AugieHenriques wrote:

Hi,
I removed the old stuff that I was working with.
I re-installed the source and no issues.
Then I followed your instructions.
Thank you,
Augie

Hi
From that I would assume your kernel now compiles ok?

Did your modified configuration work as expected?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 9 days 21:30, 4 users, load average: 0.02, 0.04, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi,
Still the same issue.
Thank you,
Augie

/usr/src/linux> make O=/home/augie/linux/build
  HOSTCC  scripts/basic/fixdep
  GEN     /home/augie/linux/build/Makefile
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target `/usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/asm/unistd_32.h'.  Stop.
make[1]: *** [archheaders] Error 2
make: *** [sub-make] Error 2
/usr/src/linux> 

On 2012-11-07 16:46, AugieHenriques wrote:

> Hi,
> I followed the instructions here.
> Ran “make” as normal user.
> See bellow for results.

You have to make sure the group has write permissions, and that your
user belongs to the group that owns /usr/src/linux, that’s all.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-11-07 22:06, AugieHenriques wrote:
>
> Hi,
> Still the same issue.

>
> Code:
> --------------------
> /usr/src/linux> make O=/home/augie/linux/build

> --------------------

But before that you have to configure it all. Like “make
O=/home/augie/linux/build cloneconfig” etc etc.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On Wed 07 Nov 2012 09:28:12 PM CST, Carlos E. R. wrote:

On 2012-11-07 22:06, AugieHenriques wrote:
>
> Hi,
> Still the same issue.

>
> Code:
> --------------------
> /usr/src/linux> make O=/home/augie/linux/build

> --------------------

But before that you have to configure it all. Like “make
O=/home/augie/linux/build cloneconfig” etc etc.

Hi
Never done that in my compiles for kernels or modules, never had to
change permissions on anything in /usr/src/linux?

Compiles fine every time, please explain in more detail why the OP
needs to do this?


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 9 days 22:26, 4 users, load average: 2.12, 3.95, 3.27
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On Wed 07 Nov 2012 09:06:01 PM CST, AugieHenriques wrote:

Hi,
Still the same issue.
Thank you,
Augie

Code:

/usr/src/linux> make O=/home/augie/linux/build
HOSTCC scripts/basic/fixdep
GEN /home/augie/linux/build/Makefile
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target
/usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl', needed by arch/x86/syscalls/…/include/generated/asm/unistd_32.h’. Stop.
make[1]: *** [archheaders] Error 2 make: *** [sub-make] Error
2 /usr/src/linux>

Hi
So are you on 32bit? Can you try a make clean on your build directory.
The other thing is have you modified the config file? If so please
create a new config file without any modifications and copy to the
build directory.

To clean for a new build, please run;


cd /usr/src/linux

make clean O=/data/scratch/linux/build/

make O=/data/scratch/linux/build/


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 9 days 22:29, 4 users, load average: 0.26, 2.57, 2.84
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 2012-11-07 22:39, malcolmlewis wrote:

> Hi
> Never done that in my compiles for kernels or modules, never had to
> change permissions on anything in /usr/src/linux?

To be able to do is as plain user. One should not do makes as root, and
the kernel should not be an exception - although I have to confess that
I have done it countless times as root.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On Thu 08 Nov 2012 01:24:12 AM CST, Carlos E. R. wrote:

On 2012-11-07 22:39, malcolmlewis wrote:

> Hi
> Never done that in my compiles for kernels or modules, never had to
> change permissions on anything in /usr/src/linux?

To be able to do is as plain user. One should not do makes as root, and
the kernel should not be an exception - although I have to confess that
I have done it countless times as root.

Hi
But nothing I’ve asked the user to do involves being root, the actual
building takes place in the users home directory, but is run
from /usr/src/linux therefore nothing needs permission changes…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 10 days 2:37, 4 users, load average: 0.03, 0.04, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 2012-11-08 02:49, malcolmlewis wrote:

> Hi
> But nothing I’ve asked the user to do involves being root, the actual
> building takes place in the users home directory, but is run
> from /usr/src/linux therefore nothing needs permission changes…

There are several people talking and it is difficult to track what
exactly has been said and by whom. One method is to write to another
directory, as you say, but another is to change ownership or permissions
of the build directory so that a plain user can write there.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Hi,
I still have a problem doing the compile as normal user.
Please see bellow the permissions for /usr/src/linux.
Also for the /home/augie.
I have no idea why I’m having so much trouble.
I take some comfort in the fact that people have done this as root and normal user.
Thank you,
Augie

   /usr/src# ls -la
 total 12
 drwxr-xr-x  3 root root 4096 Nov  7 15:50 ./
 drwxr-xr-x 11 root root 4096 Oct 22 13:37 ../
 lrwxrwxrwx  1 root root   17 Nov  7 15:50 linux -> linux-3.4.11-2.16/
 drwxr-xr-x 23 root root 4096 Nov  7 15:50 linux-3.4.11-2.16/
 /usr/src#
 

 /home> ls -la
 total 12
 drwxr-xr-x  3 root  root 4096 Jul 14 22:02 ./
 drwxr-xr-x 39 root  root 4096 Nov  6 13:52 ../
 drwxr-xr-x 46 augie sea  4096 Nov  8 10:06 augie/
 /home>
 

 /usr/src/linux> make clean O=/home/augie/linux/build
 ls: cannot access /usr/src/linux-3.4.11-2.16/Documentation/DocBook/media/*.b64: No such file or directory
 /usr/src/linux> make O=/home/augie/linux/build
 make[2]: *** No rule to make target `/usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl', needed by `arch/x86/syscalls/../include/generated/asm/unistd_32.h'.  Stop.
 make[1]: *** [archheaders] Error 2
 make: *** [sub-make] Error 2
 /usr/src/linux>


Do these files exist?

bor@opensuse:/usr/src/linux-3.4.11-2.16/Documentation/DocBook/media> LC_ALL=C ll *.b64
-rw-r--r-- 1 root root 13139 Sep 26 21:05 bayer.png.b64
-rw-r--r-- 1 root root  4479 Sep 26 21:05 constraints.png.b64
-rw-r--r-- 1 root root  8061 Sep 26 21:05 crop.gif.b64
-rw-r--r-- 1 root root 30606 Sep 26 21:05 dvbstb.png.b64
-rw-r--r-- 1 root root 34355 Sep 26 21:05 fieldseq_bt.gif.b64
-rw-r--r-- 1 root root 34209 Sep 26 21:05 fieldseq_tb.gif.b64
-rw-r--r-- 1 root root  2849 Sep 26 21:05 nv12mt.gif.b64
-rw-r--r-- 1 root root  9265 Sep 26 21:05 nv12mt_example.gif.b64
-rw-r--r-- 1 root root 16389 Sep 26 21:05 pipeline.png.b64
-rw-r--r-- 1 root root 15830 Sep 26 21:05 selection.png.b64
-rw-r--r-- 1 root root  6408 Sep 26 21:05 vbi_525.gif.b64
-rw-r--r-- 1 root root  6886 Sep 26 21:05 vbi_625.gif.b64
-rw-r--r-- 1 root root  3243 Sep 26 21:05 vbi_hsync.gif.b64
bor@opensuse:~> LC_ALL=C ll /usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl
-rw-r--r-- 1 root root 14285 Sep 26 21:05 /usr/src/linux-3.4.11-2.16/arch/x86/syscalls/syscall_32.tbl

You may want to verify kernel-source RPM using (as root) “rpm -V kernel-source” and reinstall if some files are missing.

bor@opensuse:/usr/src/linux-3.4.11-2.16/Documentation/DocBook/media> sudo rpm -V kernel-source
root's password:
bor@opensuse:/usr/src/linux-3.4.11-2.16/Documentation/DocBook/media> 

In my case no output - which is good.

On 11/08/2012 09:26 AM, AugieHenriques wrote:
>
> Hi,
> I still have a problem doing the compile as normal user.
> Please see bellow the permissions for /usr/src/linux.
> Also for the /home/augie.
> I have no idea why I’m having so much trouble.
> I take some comfort in the fact that people have done this as root and
> normal user.

In the post that you were told to read earlier, there were instructions on how
to change to ownership of the source files from root:root to <your_user>:users.
For your system, that would call for doing the following:


sudo chown -R augie:sea /usr/src/linux-3.4.11-2.16

Obviously, you chose not to do that, thus you are having all these problems with
permissions. Why your user belongs to group “sea” and not “users” is a separate
question.

Once you do the above step, building and installing a kernel is as simple as


make cloneconfig
make
sudo make modules_install install

Be aware that the “make cloneconfig” step only needs to be done once. In
addition, it is special to openSUSE sources. If you get your source from the
original place at kernel.org, then that step is replaces by “zcat
/proc/config.gz > .config” while you are in the directory of the kernel source.

Hi,
The files are not there.
The “rpm -V kernel-source” returns tons of missing files.
How do I configure this correctly?
Thank you,
Augie

Just reinstall the package(s):

zypper in -f kernel-source kernel-devel

And I strongly advise you - copy source tree from /usr/src/linux to somewhere else in your home directory and play there. Not in /usr/src/linux.

On 2012-11-08 16:26, AugieHenriques wrote:
>
> Hi,
> I still have a problem doing the compile as normal user.
> Please see bellow the permissions for /usr/src/linux.
> Also for the /home/augie.
> I have no idea why I’m having so much trouble.
> I take some comfort in the fact that people have done this as root and
> normal user.
> Thank you,
> Augie
>
>
>
>
> Code:
> --------------------
> /usr/src# ls -la
> total 12
> drwxr-xr-x 3 root root 4096 Nov 7 15:50 ./
> drwxr-xr-x 11 root root 4096 Oct 22 13:37 …/
> lrwxrwxrwx 1 root root 17 Nov 7 15:50 linux → linux-3.4.11-2.16/
> drwxr-xr-x 23 root root 4096 Nov 7 15:50 linux-3.4.11-2.16/
> /usr/src#

> --------------------

But you have not changed the permissions! See for yourself,
linux-3.4.11-2.16/ is owned by root and no write permission for the
group… and of course, you do it on the directory and all the files
inside. Every single one.

That is basic Linux knowledge.

Besides, that method is not for use with the O= option.

Again, notice that you are been given two different advices for doing
this: either change the permissions and then work as user on that
directory, or tell make to write to another directory. One or the other,
not both.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Hi,
The “make” worked as normal user.
I was missing some files.
The README.SUSE says to do “make”, “make modules_install” followed by “make install”.
However it was suggested to to “make modules” after “make”.
Which is correct?
Thank you,
Augie