summaryrefslogtreecommitdiff
path: root/create_kernel/create_kernel.sh
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2018-09-20 20:48:47 +0100
committerFreeArtMan <dos21h@gmail.com>2018-09-20 20:48:47 +0100
commit369c845112dd6f36ad973f1a68ee7e1596ff7dd3 (patch)
tree37cd9e3e8392dc9ce9a4fcdbc617dde04b98d78d /create_kernel/create_kernel.sh
parent9a1bc7d1dbee1cca01462041fcf9c3b2f64a8334 (diff)
downloados201-369c845112dd6f36ad973f1a68ee7e1596ff7dd3.tar.gz
os201-369c845112dd6f36ad973f1a68ee7e1596ff7dd3.zip
Updated kernel compilation now output goes to output directory
Diffstat (limited to 'create_kernel/create_kernel.sh')
-rwxr-xr-xcreate_kernel/create_kernel.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/create_kernel/create_kernel.sh b/create_kernel/create_kernel.sh
index 7e94050..7f29d01 100755
--- a/create_kernel/create_kernel.sh
+++ b/create_kernel/create_kernel.sh
@@ -6,14 +6,24 @@ KERNEL_VERSION=4.4.148
KERNEL_MAJOR_VERSION=v4.x
KERNEL_PAGE=https://cdn.kernel.org
DEVICE_NAME=generic
+OUT_DIRECTORY=out
+
+#prepare
+_PWD=`pwd`
+mkdir -p $OUT_DIRECTORY/lib/modules
echo "Download kernel"
wget -c $KERNEL_PAGE/pub/linux/kernel/$KERNEL_MAJOR_VERSION/linux-$KERNEL_VERSION.tar.xz
echo "Unpack kernel"
tar -xvf linux-$KERNEL_VERSION.tar.xz
echo "Copy config to kernel"
-cp config/$DEVICE_NAME/config-$KERNEL_VERSION ./linux-$KERNEL_VERSION/.config
+cp configs/$DEVICE_NAME/generic-$KERNEL_VERSION ./linux-$KERNEL_VERSION/.config
echo "Compile kernel"
cd ./linux-$KERNEL_VERSION
make -j4
-echo "Copy results to out" \ No newline at end of file
+make INSTALL_MOD_PATH=$_PWD/$OUT_DIRECTORY/ modules_install
+echo "Copy results to out"
+
+#output results
+cd ..
+cp ./linux-$KERNEL_VERSION/arch/x86_64/boot/bzImage $_PWD/$OUT_DIRECTORY \ No newline at end of file