About †This page describes how to install TOMOYO Linux on LFS. About LFS †"Linux From Scratch (LFS) is a project that provides you with step-by-step instructions for building your own customized Linux system entirely from source." http://www.linuxfromscratch.org/lfs/ Version †
STEP 1. Prepare new kernel of 2.6.22.9 with TOMOYO †Chdir to the working directory †cd /sources Get kernel and required staff †wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.9.tar.bz2 wget http://people.redhat.com/mingo/cfs-scheduler/sched-cfs-v2.6.22.9-v22.patch Get TOMOYO Linux patch †wget wget http://osdn.dl.sourceforge.jp/tomoyo/27219/ccs-patch-1.5.0-20070920.tar.gz Extract files and apply patch †tar xvf linux-2.6.22.9.tar.bz2 cd linux-2.6.22.9 patch -p1 -i ../sched-cfs-v2.6.22.9-v22.patch tar xvf ../ccs-patch-1.5.0-20070920.tar.gz Modify the ccs-patch-2.6.22.txt file †8<=========== change for version ============>8 -EXTRAVERSION = .9-cfs-v22 +EXTRAVERSION = .9-cfs-v22-ccs 8<=========== chang for CFS v22 patch http://lkml.org/lkml/2007/9/26/97 ============>8 @@ -64,5 +64,8 @@ #include <asm/tlb.h> +/***** TOMOYO Linux start. *****/ +#include <linux/tomoyo.h> +/***** TOMOYO Linux end. *****/ /* * Scheduler clock - returns current time in nanosec units. @@ -4060,6 +4063,9 @@ int can_nice(const struct task_struct *p 8<=======================>8 Patch it †patch -p1 -i ccs-patch-2.6.22.txt Let's build †make mrproper make menuconfig # check TOMOYO selected by default make Install kernel †cp -v arch/i386/boot/bzImage /boot/lfskernel-2.6.22.9-cfs-v22-ccs cp -v System.map /boot/System.map-2.6.22.9-cfs-v22-ccs cp -v .config /boot/config-2.6.22.9-cfs-v22-ccs #install -d /usr/share/doc/linux-2.6.22.9-cfs-v22-ccs #cp -r Documentation/* /usr/share/doc/linux-2.6.22.9-cfs-v22-ccs Tell grub TOMOYO Linux (add to GRUB menu) †title LFS 6.3 Kernel 2.6.22.9-cfs-v22-ccs kernel (hd0,7)/boot/lfskernel-2.6.22.9-cfs-v22-ccs root=/dev/hda8 vga=791 video=vesafb:ywrap ,mtrr acpi=off STEP 2. Install ccs-tools †Install bc †http://www.linuxfromscratch.org/blfs/view/svn/general/bc.html Install openssl †http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html Get and build ccs-tools †cd /source wget http://osdn.dl.sourceforge.jp/tomoyo/27220/ccs-tools-1.5.0-20070920.tar.gz tar xvf ccs-tools-1.5.0-20070920.tar.gz cd ccstools make make install Preparation †export PATH=$PATH:/usr/lib/ccs
/usr/lib/ccs/init_policy.sh
cat > /etc/rc.d/init.d/ccs-auditd << EOF
#!/bin/sh
/usr/lib/ccs/ccs-auditd /dev/null /var/log/tomoyo/reject_log.txt
EOF
chmod +x /etc/init.d/ccs-auditd
for i in 2 3 4 5; do
ln -sv ../init.d/ccs-auditd /etc/rc.d/rc${i}.d/S99ccs-auditd; done
mkdir -p /var/log/tomoyo
You need to reboot the system before try †reboot Links †LFS †TOMOYO Linux †
Acknowledgements †The above procedures were given by someone who visited TOMOYO Linux "Open Discussoin" forum. Original can be found at http://sourceforge.jp/forum/forum.php?forum_id=11352 (look for the topic "how to install TOMOYO on LFS linux?". I don't know the name of the author, but thank him/her sincerely. |