From 369c845112dd6f36ad973f1a68ee7e1596ff7dd3 Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Thu, 20 Sep 2018 20:48:47 +0100 Subject: Updated kernel compilation now output goes to output directory --- create_kernel/create_kernel.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'create_kernel/create_kernel.sh') 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 -- cgit v1.2.3