diff options
Diffstat (limited to 'create_kernel/create_kernel.sh')
-rwxr-xr-x | create_kernel/create_kernel.sh | 14 |
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 |