|
From: Marko O. <d0...@us...> - 2009-10-27 12:42:39
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "kdfs".
The branch, make_kdfs_compile has been updated
via e9dc700afcb49febc90f5b5dc580818bfc33fb6d (commit)
from a555410defc36ea806183bcb78b8f2ab4b50996e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e9dc700afcb49febc90f5b5dc580818bfc33fb6d
Author: Marko Obrovac <mar...@in...>
Date: Tue Oct 27 12:36:18 2009 +0000
Add a simple kernel compilation utility
diff --git a/scripts/compile-kernel b/scripts/compile-kernel
new file mode 100755
index 0000000..91cca8e
--- /dev/null
+++ b/scripts/compile-kernel
@@ -0,0 +1,77 @@
+#!/bin/bash
+
+#################################################################
+# #
+# compile-kernel #
+# #
+#===============================================================#
+# #
+# Author: Marko Obrovac #
+# Copyright(c) 2009 XtreemOS Consortium #
+# Licence: GPL #
+# #
+#---------------------------------------------------------------#
+# #
+# A simple utilily script to compile and install the kernel #
+# and its modules. #
+# #
+# Usage: #
+# by default, the script uses the Makefile-s in the current #
+# working directory, making it possible to call the script #
+# in a nice fashion from the kernel root directory: #
+# $ ./scripts/compile-kernel #
+# It is also possible to supply the root kernel directory #
+# as an argument: #
+# $ compile-kernel /path/to/kernel/dir #
+# Alternatively, the REPO environment variable can be set #
+# to point to the kernel directory: #
+# $ export REPO=/path/to/kernel/dir #
+# $ compile-kernel #
+# #
+# Assumptions: #
+# This script makes two important assumptions: #
+# a) you either run the script as the super-user or your #
+# running user is able to use the sudo command #
+# b) the machine you're compiling the kernel has at least #
+# a modern dual-core processor, so it adds the '-j3' #
+# argument to "make" #
+# If these assumptions are not met, you will have to modify #
+# the script accordingly #
+# #
+#################################################################
+
+
+if [ $# -eq 1 ]; then
+ REPO=$1;
+else
+ if [ "x$REPO" == "x" ]; then
+ REPO=`dirname $0`;
+ fi;
+fi;
+
+echo -e "Using dir $REPO\n";
+
+echo "###";
+echo "#";
+echo "# COMPILING KERNEL";
+echo "#";
+echo -e "###\n";
+
+make -C $REPO -j3;
+
+if [ $? -ne 0 ]; then
+ echo -e "\nPlease correct the errors and try again! Leaving...";
+ exit 1;
+fi;
+
+echo -e "\n###";
+echo "#";
+echo "# INSTALLING THE KERNEL & MODULES";
+echo "#";
+echo -e "###\n";
+
+sudo make -C $REPO modules_install;
+sudo make -C $REPO install;
+
+exit;
+
-----------------------------------------------------------------------
Summary of changes:
scripts/compile-kernel | 77 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 77 insertions(+), 0 deletions(-)
create mode 100755 scripts/compile-kernel
hooks/post-receive
--
kdfs
|