[PlanetCCRMA] Re: Help compiling 2.6 kernel for preemtpion and lowlatency
Daniel Tonda Castillo
dtc at gawab.com
Tue May 11 19:15:02 PDT 2004
Fernando Pablo Lopez-Lezcano escritos:
> How?
Here are the steps I did:
Went to the jack-it.sf site to see if there were any
instructions or documents related to low-latency in the 2.6
kernel. It talks about the Andrew Morton patches for 2.4.X
kernels, for the 2.6 download and build the
realtime-lsm-0.1.0.tar.gz as a module.
Downloaded realtime... and extracted. The readme says you must
enable the kernel with CONFIG_SECURITY_CAPABILITIES=m, as a
module, otherwise it won't compile.
Just for testing I tried the original .config file after
extracting realtime, and it dind'nt work at all.
With the kernel-source from fedora: 2.6.5-1.351:
I compiled the kernel editing the .config file and replacing the
CONFIG_SECURITY_CAPABILITIES=y with
CONFIG_SECURITY_CAPABILITIES=m.
make bzImage
make modules
make modules_install
make install
Some 45 minutes later the compilation finished, rebooted with
the new kernel and it booted just fine, no problem.
cd /tmp/realtime-lsm-0.1.0
cat INSTALL (here is the relevant text)
--------------------------------------------
When you configure the 2.6 kernel, you need at least these
options.
CONFIG_MODULES=y
CONFIG_SECURITY=y
CONFIG_SECURITY_CAPABILITIES=m
CONFIG_SECURITY_SELINUX=y
You probably also want CONFIG_MODULE_UNLOAD=y, so the LSM can be
unloaded. Reloading is currently the only way to change
parameters.
Note that CONFIG_SECURITY_CAPABILITIES *must* be a module. If
it is configured directly into the kernel ("=y"), the realtime
LSM will not
work.
-------------------------------------------------------------------------------------------------------------
Ok, I think I know what the problem may be, I didn't use:
CONFIG_MODULE_UNLOAD=y.
-------------------------------------------------------------------------------------------------------------
Without that option, here's what the output of make looks like:
include/linux/elf.h:431: aviso: array `_DYNAMIC' assumed to have
one element
include/linux/sched.h:206: error: storage size of `mmap_sem'
isn't known
include/linux/sched.h:240: error: storage size of
`default_kioctx' isn't known
include/linux/sched.h:247: error: storage size of `action' isn't
known
include/linux/sched.h:265: error: storage size of
`shared_pending' isn't known
include/linux/sched.h:462: error: storage size of `rlim' isn't
known
include/linux/sched.h:470: error: storage size of `thread' isn't
known
include/linux/sched.h:482: error: storage size of `pending'
isn't known
include/linux/stat.h:68: error: storage size of `atime' isn't
known
include/linux/stat.h:69: error: storage size of `mtime' isn't
known
include/linux/stat.h:70: error: storage size of `ctime' isn't
known
include/linux/module.h:489: error: storage size of
`__this_module' isn't known
include/linux/fs.h:265: error: storage size of `ia_atime' isn't
known
include/linux/fs.h:266: error: storage size of `ia_mtime' isn't
known
include/linux/fs.h:267: error: storage size of `ia_ctime' isn't
known
include/linux/quota.h:223: error: storage size of `dq_dqb' isn't
known
include/linux/fs.h:347: error: storage size of `bd_sem' isn't
known
include/linux/fs.h:348: error: storage size of `bd_mount_sem'
isn't known
include/linux/fs.h:420: error: storage size of `i_atime' isn't
known
include/linux/fs.h:421: error: storage size of `i_mtime' isn't
known
include/linux/fs.h:422: error: storage size of `i_ctime' isn't
known
include/linux/fs.h:429: error: storage size of `i_sem' isn't
known
include/linux/fs.h:435: error: storage size of `i_data' isn't
known
include/linux/fs.h:561: error: storage size of `f_owner' isn't
known
include/linux/fs.h:732: error: storage size of `s_umount' isn't
known
include/linux/fs.h:733: error: storage size of `s_lock' isn't
known
include/linux/fs.h:760: error: storage size of
`s_vfs_rename_sem' isn't known
include/linux/skbuff.h:147: error: storage size of `frags' isn't
known
include/linux/file.h:33: error: storage size of `fd_array' isn't
known
make[2]: *** [/home/danton67/Dload/realtime-lsm-0.1.0/realcap.o]
Error 1
make[1]: *** [/home/danton67/Dload/realtime-lsm-0.1.0] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.5-1.351'
make: *** [all] Error 2
>
> Probably. If you want to be on the bleeding edge (ie: the latest latest
> release) then you are going to have to work a lot (or maybe not, depends
> on your luck :-)
No problem, I'l keep at it, now I have to get a newer kernel
source and try it, I'll tell how it goes...
> On some tests I did here I got LSM to compile and run and it works fine (but I built it with the kernel itself, not as a separate package). It
> also depends on which kernel you are trying to build it into, I know
> 2.6.6 needs a newer, yet unreleased, version of LSM as some of the
> internals have changed.
How did you compile the realtime-lsm with the kernel itself?
> -- Fernando
>
>
________________________________
15 Mbytes Free Web-based and POP3
Sign up now: http://www.gawab.com
More information about the PlanetCCRMA
mailing list