Skip to content

Commit

Permalink
Sandboxed kernel header installation (and usage)
Browse files Browse the repository at this point in the history
  • Loading branch information
salvestrini committed Jun 19, 2014
1 parent 5578146 commit 96e8e67
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 97 deletions.
20 changes: 20 additions & 0 deletions compile-kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
# -*- sh -*-

#
# Written by: Francesco Salvestrini <f DOT salvestrini AT nextworks DOT it>
#

ME=compile-kernel

echo "$ME: Compiling kernel"
(cd linux && make bzImage) || {
echo "$ME: Cannot complete kernel compilation"
exit 1
}

echo "$ME: Compiling modules"
(cd linux && make modules) || {
echo "$ME: Cannot complete modules compilation"
exit 1
}
6 changes: 3 additions & 3 deletions install-from-scratch
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

ME=install-from-scratch

./install-kernel-from-scratch || {
echo "$ME: Cannot install kernel"
./compile-kernel && ./install-kernel $@ || {
echo "$ME: Cannot compile or install the kernel from scratch"
exit 1
}

./install-user-from-scratch $@ || {
echo "$ME: Cannot install user parts"
echo "$ME: Cannot install the user parts from scratch"
exit 1
}
42 changes: 42 additions & 0 deletions install-kernel
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
# -*- sh -*-

#
# Written by: Francesco Salvestrini <f DOT salvestrini AT nextworks DOT it>
#

ME=install-kernel

#PREFIX=`echo "$1"|sed -e "s,\/$,,"`
#
#echo "$ME: Prefix is \`$PREFIX'"
#if test -n "$PREFIX" ; then
# mkdir -p $PREFIX || {
# echo "$ME: Cannot create directory \`$PREFIX'"
# }
#fi

#
# FIXME: we should definitely do a VPATH build ...
#

echo "$ME: Installing kernel headers"
#(cd linux && make INSTALL_HDR_PATH=/usr headers_install) || {
(cd linux && make headers_install) || {
echo "$ME: Cannot install kernel headers"
exit 1
}

echo "$ME: Installing kernel modules"
#(cd linux && make INSTALL_MOD_PATH=$PREFIX modules_install) || {
(cd linux && make modules_install) || {
echo "$ME: Cannot install kernel modules"
exit 1
}

echo "$ME: Installing kernel"
#(cd linux && make INSTALL_PATH=$PREFIX/boot install) || {
(cd linux && make install) || {
echo "$ME: Cannot install kernel"
exit 1
}
30 changes: 0 additions & 30 deletions install-kernel-from-scratch

This file was deleted.

30 changes: 0 additions & 30 deletions install-kernel-precompiled

This file was deleted.

2 changes: 1 addition & 1 deletion install-user-from-scratch
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
#

echo "$ME: Starting librina phase"
(cd librina && ./bootstrap && ./configure --enable-java-bindings --prefix=$PREFIX && make CPPFLAGS="-I $PREFIX/usr/include" clean install installcheck) || {
(cd librina && ./bootstrap && ./configure --enable-java-bindings --with-sysheaders=`pwd`/../linux/usr/include --prefix=$PREFIX && make clean install installcheck) || {
echo "$ME: Cannot complete librina phase"
exit 1
}
Expand Down
26 changes: 0 additions & 26 deletions uninstall

This file was deleted.

26 changes: 26 additions & 0 deletions uninstall-user
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# -*- sh -*-

#
# Written by: Francesco Salvestrini <f DOT salvestrini AT nextworks DOT it>
#

ME=uninstall-user

echo "$ME: Uninstalling rina-tools"
(cd rina-tools && make uninstall) || {
echo "$ME: Cannot uninstall rina-tools"
exit 1
}

echo "$ME: Uninstalling rinad"
(cd rinad && make uninstall) || {
echo "$ME: Cannot uninstall rinad"
exit 1
}

echo "$ME: Uninstalling librina"
(cd librina && make uninstall) || {
echo "$ME: Cannot uninstall librina"
exit 1
}
14 changes: 7 additions & 7 deletions uninstall-and-clean → uninstall-user-and-clean
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
# Written by: Francesco Salvestrini <f DOT salvestrini AT nextworks DOT it>
#

ME=uninstall-and-clean
ME=uninstall-user-and-clean

echo "$ME: Starting phase rina-tools"
echo "$ME: Uninstalling and cleaning rina-tools"
(cd rina-tools && make uninstall && make maintainer-clean) || {
echo "$ME: Cannot complete rina-tools phase"
echo "$ME: Cannot uninstall or clean rina-tools"
exit 1
}

echo "$ME: Starting phase rinad"
echo "$ME: Uninstalling and cleaning rinad"
(cd rinad && make uninstall && make maintainer-clean) || {
echo "$ME: Cannot complete rinad phase"
echo "$ME: Cannot uninstall or clean rinad"
exit 1
}

echo "$ME: Starting phase librina"
echo "$ME: Uninstalling and cleaning librina"
(cd librina && make uninstall && make maintainer-clean) || {
echo "$ME: Cannot complete librina phase"
echo "$ME: Cannot uninstall or clean librina"
exit 1
}

0 comments on commit 96e8e67

Please sign in to comment.