Info: Version 1.8.x is available.

Japanese Page

Last modified: $Date: 2019-02-04 23:02:53 +0900 (Mon, 04 Feb 2019) $

Phase 1: Installing TOMOYO Linux kernels and tools.

This page describes how to install TOMOYO Linux's kernel and userland tools.


Step 1: Installing kernel and tools

To compile kernel, the following packages are needed.

Download source code from linux-2.4 or linux-2.6 and extract it and goto the extracted directory.
Regarding linux-2.4 , 2.4.37 is supported. Regarding linux-2.6 , 2.6.27 to 2.6.37 are supported. If you use kernel 2.6.37.6 , replace 2.$PATCHLEVEL.$SUBLEVEL with 2.6.37 in the below operations.

[user@tomoyo ~]$ wget -O ccs-patch-1.7.3-20171111.tar.gz 'https://osdn.jp/frs/redir.php?m=jaist&f=/tomoyo/43375/ccs-patch-1.7.3-20171111.tar.gz'
[user@tomoyo ~]$ wget -O ccs-patch-1.7.3-20171111.tar.gz.asc 'https://osdn.jp/frs/redir.php?m=jaist&f=/tomoyo/43375/ccs-patch-1.7.3-20171111.tar.gz.asc'
[user@tomoyo ~]$ gpg ccs-patch-1.7.3-20171111.tar.gz.asc
[user@tomoyo ~]$ tar -zxf ccs-patch-1.7.3-20171111.tar.gz
[user@tomoyo ~]$ patch -sp1 < patches/ccs-patch-2.$PATCHLEVEL.$SUBLEVEL.diff
[user@tomoyo ~]$ make -s menuconfig

Choose the following options in "Security options" section.

If you choose "Compile as loadable kernel module" option, you can minimize file size increment of vmlinux because most part of TOMOYO Linux is compiled as a loadable kernel module. You can choose this option when there is a file size limitation for vmlinux (e.g. embedded systems).

If you choose "Disable by default", TOMOYO Linux is enabled only when ccsecurity=on is passed to the kernel's command line options. If you don't choose this option, TOMOYO Linux is disabled only when ccsecurity=off is passed to the kernel's command line options.

After creating a kernel config, compile the kernel.

[user@tomoyo ~]$ make -s dep
[user@tomoyo ~]$ make -s
[user@tomoyo ~]$ make -s modules
[user@tomoyo ~]$ su
[root@tomoyo ~]# make -s modules_install install

Create initrd if you need.

If you want to customize distoributor's kernels, feel free to follow below steps for reference.

CentOS 3 # Download build script.
wget -O build-c3-2.4.21.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c3-2.4.21.sh?root=tomoyo'
# Run build script.
sh build-c3-2.4.21.sh
CentOS 4 # Download build script.
wget -O build-c4-2.6.9.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c4-2.6.9.sh?root=tomoyo'
# Run build script.
sh build-c4-2.6.9.sh
CentOS 5 # Download build script.
wget -O build-c5-2.6.18.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c5-2.6.18.sh?root=tomoyo'
# Run build script.
sh build-c5-2.6.18.sh
CentOS 6 # Download build script.
wget -O build-c6-2.6.32.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-c6-2.6.32.sh?root=tomoyo'
# Run build script.
sh build-c6-2.6.32.sh
Asianux 3 # Download build script.
wget -O build-ax3-2.6.18.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ax3-2.6.18.sh?root=tomoyo'
# Run build script.
sh build-ax3-2.6.18.sh
Ubuntu 10.04 # Download build script.
wget -O build-ubuntu_10.04.sh 'https://svn.osdn.jp/cgi-bin/viewcvs.cgi/*checkout*/trunk/1.7.x/ccs-patch/specs/build-ubuntu_10.04.sh?root=tomoyo'
# Run build script.
sh build-ubuntu_10.04.sh
Gentoo # Install layman package.
emerge layman
# Install subversion package.
emerge subversion
# Add sunrise repository.
layman -f -a sunrise
# Configure /etc/make.conf to include layman's make.conf .
echo "source /usr/local/portage/layman/make.conf" >> /etc/make.conf
# Download kernel source.
emerge ccs-sources
# Run genkernel to build.
genkernel --menuconfig all
# Configure grub . See https://www.gentoo.org/doc/en/kernel-upgrade.xml for detail.
# Install tools package.
emerge ccs-tools

To compile tool, run the following commands.

[user@tomoyo ~]$ wget -O ccs-tools-1.7.3-20120301.tar.gz 'https://osdn.jp/frs/redir.php?m=jaist&f=/tomoyo/43376/ccs-tools-1.7.3-20120301.tar.gz'
[user@tomoyo ~]$ wget -O ccs-tools-1.7.3-20120301.tar.gz.asc 'https://osdn.jp/frs/redir.php?m=jaist&f=/tomoyo/43376/ccs-tools-1.7.3-20120301.tar.gz.asc'
[user@tomoyo ~]$ gpg ccs-tools-1.7.3-20120301.tar.gz.asc
[user@tomoyo ~]$ tar -zxf ccs-tools-1.7.3-20120301.tar.gz
[user@tomoyo ~]$ cd ccstools/
[user@tomoyo ~]$ make -s
[user@tomoyo ~]$ su
[root@tomoyo ~]# make -s install

Return to index page.

sflogo.php