diff --git a/README.md b/README.md index b22793a..f7bb7dc 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,92 @@ # buildJetsonTX1Kernel -Scripts to help build the 4.4.38 kernel and modules onboard the Jetson TX1 (L4T 28.1, JetPack 3.1). For previous versions, visit the 'tags' section. +Scripts to help build the 4.4.38 kernel and modules onboard the Jetson TX1 (L4T 28.2, JetPack 3.2). For previous versions, visit the 'tags' section. -<em><strong>Note:</strong> The kernel source version must match the version of firmware flashed on the Jetson. For example, the source for the 4.4.38 kernel here is matched with L4T 28.1. This kernel compiled using this source tree will not work with newer versions or older versions of L4T, only 28.1.</em> +<em><strong>Note:</strong> The kernel source version must match the version of firmware flashed on the Jetson. For example, the source for the 4.4.38 kernel here is matched with L4T 28.2. This kernel compiled using this source tree will not work with newer versions or older versions of L4T, only 28.2.</em> -As of this writing, the "official" way to build the Jetson TX1 kernel is to use a cross compiler on a Linux PC. These scripts are an alternative which builds the kernel onboard the Jetson itself. These scripts will download the kernel source to the Jetson TX1, wrangle some of the Makefiles to make them work on the Jetson, and then compile the kernel and selected modules. The newly compiled kernel can then be installed. +As of this writing, the "official" way to build the Jetson TX1 kernel is to use a cross compiler on a Linux PC. These scripts are an alternative which builds the kernel onboard the Jetson itself. These scripts will download the kernel source to the Jetson TX1 and then compile the kernel and selected modules. The newly compiled kernel can then be installed. -WARNING: After flashing the Jetson TX1, there is a limited amount of room on the device. After completing these scripts there will be NO space on the device. You MUST remove some of the files that were added in the /usr/src directory. You should store the /usr/src/kernel directory offboard (like on a SATA drive or USB stick) along with the compressed sources before deleting them. You may want to use them again later. +<strong>WARNING:</strong> After flashing the Jetson TX1, there is a limited amount of room on the device. You should modify the kernel directly after flashing the device. After completing these scripts there will be little space left on the device. After building the kernel and modules, you should remove some of the files that were added in the /usr/src directory. You may want to store the /usr/src/kernel directory offboard (like on a SATA drive or USB stick) along with the compressed sources before deleting them as you may want to use them again later. -These scripts are for building the kernel for the 64-bit L4T 28.1 (Ubuntu 16.04 based) operating system on the NVIDIA Jetson TX1. The scripts should be run directly after flashing the Jetson with L4T 28.1 from a host PC. There are three scripts: +These scripts are for building the kernel for the 64-bit L4T 28.2 (Ubuntu 16.04 based) operating system on the NVIDIA Jetson TX1. The scripts should be run directly after flashing the Jetson with L4T 28.2 from a host PC. There are five scripts: <strong>getKernelSources.sh</strong> -Downloads the kernel sources for L4T 28.1 from the NVIDIA website, decompresses them and opens a graphical editor on the .config file. +Downloads the kernel sources for L4T 28.2 from the NVIDIA website, decompresses them and opens a graphical editor on the .config file. + +<strong>getKernelSourcesNoGUI.sh</strong> + +Downloads the kernel sources for L4T 28.2 from the NVIDIA website and decompresses them. This is useful when using SSH, or you prefer a different method of editing the .config file. <strong>makeKernel.sh</strong> -This script applies a few patches to makefiles in the kernel source, and then compiles the kernel and modules using make. +This script compiles the kernel and modules using make. <strong>copyImage.sh</strong> -Copies the Image file created by compiling the kernel to the /boot directory +Copies the Image file created by compiling the kernel to the /boot directory. If you modify the kernel, you will probably want to make a copy of the original kernel image (/boot/Image) before copying over the newly generated one. You will also want to modify /boot/extlinux/extlinux.conf so that you can boot from the new Image or the old Image in case something untowards happens. That way, you will be able to select the old Image through the serial console. -<strong>Notes:</strong> +<strong>Note:</strong> The Image file is copied to the boot directory of the current root directory device. The Jetson generally boots from the internal eMMC. If you are developing on external media (such as a SSD or USB drive) you will probably need to manually copy the Image file to the /boot directory of the eMMC. Refer to the script for the location of the Image file in the source tree. -The kernel source files are downloaded in a .tgz2 format. After compilation you may want to remove those files. The files are located in /usr/src You will need to use sudo to remove the files, as they are in a system area. The work directory 'sources' contains kernel_src-txt1.tbz2, you can remove that directory. The file 'source_release.tbz2' is a much larger file that holds the kernel sources as well as many other TX1 specific source packages. You can make a backup of source_release.tbz2 before deleting it. +<strong>removeAllKernelSources.sh</strong> +Removes all of the kernel sources and compressed source files. You may want to make a backup of the files before deletion. -You may want to save the newly built Image and modules to external media so that can be used to flash a Jetson image, or clone the disk image. + +<strong>Notes:</strong> These scripts make only the kernel Image and Modules. You will need to modify the scripts if more are needed. -The copyImage.sh script copies the Image to the current device. If you are building the kernel on an external device, for example a SSD, you will want to copy the Image file over to the eMMC in the eMMC /boot directory if you are booting from the eMMC and using external storage as your root directory. +<strong>IMPORTANT</strong> The copyImage.sh script copies the Image to the current device. If you are building the kernel on an external device, for example a SSD, you will want to copy the Image file over to the eMMC in the eMMC /boot directory if you are booting from the eMMC and using external storage as your root directory. + +Special thanks to Raffaello Bonghi (https://github.com/rbonghi) for jeston_easy scripts. + + +### Release Notes +April, 2018 +* v1.0-L4T28.2 +* L4T 28.2 (JetPack 3.2) +* Add getKernelSourcesNoGUI.sh for cases where the user does not want to edit the .config file through a GUI. +* Add removeAllSources.sh for removing kernel sources and compressed files after the kernel is built. +* Check to make sure that the version of the kernel matches the sources to download + +March, 2018 +* v1.0-L4T28.1 +* L4T 28.1 (JetPack 3.1) + +July, 2017 +* v1.0-L4T24.2.1 +* L4T 24.2.1 + +April, 2017 +* Initial Release +* v1.0-L4T24.2 +* L4T 24.2 + +## License +MIT License + +Copyright (c) 2017-2018 Jetsonhacks +Copyright (c) 2015-2018 Raffaello Bonghi (jetson_easy) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + diff --git a/copyImage.sh b/copyImage.sh index ec0d9d9..0f7105a 100755 --- a/copyImage.sh +++ b/copyImage.sh @@ -1,2 +1,19 @@ #!/bin/bash -sudo ./scripts/copyImage.sh +# Check to make sure the Image file has been generated +# The "could not stat" error seems to confuse people +if [ -f /usr/src/kernel/kernel-4.4/arch/arm64/boot/Image ] ; then + echo "Copying Image to /boot diretory" + sudo ./scripts/copyImage.sh + echo "Image copied" + tput setaf 2 + echo "Please reboot for changes to take effect" + tput sgr0 +else + tput setaf 1 + echo "==== Image file does not exist ====" + tput sgr0 + echo "Check for errors in makeKernel" + echo "" + echo "Copy failed" +fi + diff --git a/diffs/devfreq/devfreq.patch b/diffs/devfreq/devfreq.patch deleted file mode 100644 index c82f707..0000000 --- a/diffs/devfreq/devfreq.patch +++ /dev/null @@ -1,3 +0,0 @@ -17a18,19 -> -> ccflags-y += -I$(src) diff --git a/diffs/nvgpu/nvgpu.patch b/diffs/nvgpu/nvgpu.patch deleted file mode 100644 index e25abf7..0000000 --- a/diffs/nvgpu/nvgpu.patch +++ /dev/null @@ -1,6 +0,0 @@ -8a9 -> ccflags-y += -I./$(src)/ -14a16,18 -> -> ccflags-y += -I$(src) -> diff --git a/diffs/tegra-alt/tegra-alt.patch b/diffs/tegra-alt/tegra-alt.patch deleted file mode 100644 index b6376c4..0000000 --- a/diffs/tegra-alt/tegra-alt.patch +++ /dev/null @@ -1,3 +0,0 @@ -2a3,4 -> ccflags-y += -I$(src) -> diff --git a/getKernelSources.sh b/getKernelSources.sh index 814335a..623ba20 100755 --- a/getKernelSources.sh +++ b/getKernelSources.sh @@ -1,3 +1,35 @@ #!/bin/bash # Install the kernel source for L4T -sudo ./scripts/getKernelSources.sh +# Make sure that we are downloading the correct kernel source +source scripts/jetson_variables.sh +#Print Jetson version +echo "$JETSON_DESCRIPTION" +#Print Jetpack version +echo "Jetpack $JETSON_JETPACK [L4T $JETSON_L4T]" + +# Check to make sure we're installing the correct kernel sources +L4TTarget="28.2" +if [ $JETSON_L4T == $L4TTarget ] ; then + echo "Getting kernel sources" + sudo ./scripts/getKernelSources.sh +else + echo "" + tput setaf 1 + echo "==== L4T Kernel Version Mismatch! =============" + tput sgr0 + echo "" + echo "This repository branch is for installing the kernel sources for L4T "$L4TTarget + echo "You are attempting to use these kernel sources on a L4T "$JETSON_L4T "system." + echo "The kernel sources do not match their L4T release!" + echo "" + echo "Please git checkout the appropriate kernel sources for your release" + echo " " + echo "You can list the tagged versions." + echo "$ git tag -l" + echo "And then checkout the latest version: " + echo "For example" + echo "$ git checkout v1.0-L4T"$JETSON_L4T + echo "" +fi + + diff --git a/getKernelSourcesNoGUI.sh b/getKernelSourcesNoGUI.sh new file mode 100755 index 0000000..69bd19d --- /dev/null +++ b/getKernelSourcesNoGUI.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Install the kernel source for L4T +# Make sure that we are downloading the correct kernel source +source scripts/jetson_variables.sh +#Print Jetson version +echo "$JETSON_DESCRIPTION" +#Print Jetpack version +echo "Jetpack $JETSON_JETPACK [L4T $JETSON_L4T]" + +# Check to make sure we're installing the correct kernel sources +L4TTarget="28.2" +if [ $JETSON_L4T == $L4TTarget ] ; then + echo "Getting kernel sources" + sudo ./scripts/getKernelSourcesNoGUI.sh +else + echo "" + tput setaf 1 + echo "==== L4T Kernel Version Mismatch! =============" + tput sgr0 + echo "" + echo "This repository branch is for installing the kernel sources for L4T "$L4TTarget + echo "You are attempting to use these kernel sources on a L4T "$JETSON_L4T "system." + echo "The kernel sources do not match their L4T release.!" + echo "" + echo "Please git checkout the appropriate kernel sources for your release" + echo " " + echo "You can list the tagged versions." + echo "$ git tag -l" + echo "And then checkout the latest version: " + echo "For example" + echo "$ git checkout v1.0-L4T"$JETSON_L4T + echo "" +fi + diff --git a/makeKernel.sh b/makeKernel.sh index c3f4eb7..f65d963 100755 --- a/makeKernel.sh +++ b/makeKernel.sh @@ -1,4 +1,3 @@ #!/bin/bash -sudo ./scripts/fixMakeFiles.sh sudo ./scripts/makeKernel.sh diff --git a/removeAllKernelSources.sh b/removeAllKernelSources.sh new file mode 100755 index 0000000..8250731 --- /dev/null +++ b/removeAllKernelSources.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Remove all of the kernel sources that were downloaded and built during the kernel build process +# Note that this will also remove the possibly changed .config file in: +# /usr/src/kernel/kernel-4.4 +echo "Removing All Kernel Sources" +sudo ./scripts/removeAllKernelSources.sh +echo "Kernel sources removed" diff --git a/scripts/copyImage.sh b/scripts/copyImage.sh index 43bf32b..7f46500 100755 --- a/scripts/copyImage.sh +++ b/scripts/copyImage.sh @@ -10,6 +10,6 @@ cd /usr/src/kernel/kernel-4.4 # sudo cp arch/arm64/boot/zImage /boot/zImage # Note that if you are compiling on an external device, like a SSD, you should probably # copy this over to the internal eMMC if that is where the Jetson boots -sudo cp arch/arm64/boot/Image /boot/Image +cp arch/arm64/boot/Image /boot/Image diff --git a/scripts/fixMakeFiles.sh b/scripts/fixMakeFiles.sh deleted file mode 100755 index 1c8b42a..0000000 --- a/scripts/fixMakeFiles.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Fix the Makefiles so that they compile on the device -patch /usr/src/kernel/kernel-4.4/drivers/devfreq/Makefile ./diffs/devfreq/devfreq.patch -patch /usr/src/kernel/nvgpu/drivers/gpu/nvgpu/Makefile ./diffs/nvgpu/nvgpu.patch -# The Jetson TX2 requires the following; Not needed for the Jetson TX1 -# patch /usr/src/kernel/kernel-4.4/sound/soc/tegra-alt/Makefile ./diffs/tegra-alt/tegra-alt.patch -# vmipi is in a sub directory without a Makefile, there was an include problem -cp /usr/src/kernel/kernel-4.4/drivers/media/platform/tegra/mipical/mipi_cal.h /usr/src/kernel/kernel-4.4/drivers/media/platform/tegra/mipical/vmipi/mipi_cal.h - - diff --git a/scripts/getKernelSources.sh b/scripts/getKernelSources.sh index 8f5e6fb..e30d184 100755 --- a/scripts/getKernelSources.sh +++ b/scripts/getKernelSources.sh @@ -3,11 +3,12 @@ apt-add-repository universe apt-get update apt-get install qt5-default pkg-config -y cd /usr/src -wget http://developer.download.nvidia.com/embedded/L4T/r28_Release_v1.0/BSP/source_release.tbz2 -tar -xvf source_release.tbz2 sources/kernel_src-tx1.tbz2 -tar -xvf sources/kernel_src-tx1.tbz2 -# Space is tight get rid of the compressed kernel source -rm sources/kernel_src-tx1.tbz2 +wget -N http://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.0/GA/BSP/tx1_sources.tbz2 +echo "Expanding sources, please wait" +tar -xvf tx1_sources.tbz2 public_release/kernel_src.tbz2 +tar -xvf public_release/kernel_src.tbz2 +# Space is tight; get rid of the compressed kernel source +rm -r public_release cd kernel/kernel-4.4 zcat /proc/config.gz > .config make xconfig diff --git a/scripts/getKernelSourcesNoGUI.sh b/scripts/getKernelSourcesNoGUI.sh new file mode 100755 index 0000000..7947c13 --- /dev/null +++ b/scripts/getKernelSourcesNoGUI.sh @@ -0,0 +1,14 @@ +#!/bin/bash +apt-add-repository universe +apt-get update +apt-get install pkg-config -y +cd /usr/src +wget -N http://developer.download.nvidia.com/embedded/L4T/r28_Release_v2.0/GA/BSP/tx1_sources.tbz2 +echo "Expanding sources, please wait" +tar -xvf tx1_sources.tbz2 public_release/kernel_src.tbz2 +tar -xvf public_release/kernel_src.tbz2 +# Space is tight; get rid of the compressed kernel source +rm -r public_release +cd kernel/kernel-4.4 +zcat /proc/config.gz > .config + diff --git a/scripts/jetson_variables LICENSE b/scripts/jetson_variables LICENSE new file mode 100644 index 0000000..c6dcd22 --- /dev/null +++ b/scripts/jetson_variables LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Raffaello Bonghi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/scripts/jetson_variables.sh b/scripts/jetson_variables.sh new file mode 100755 index 0000000..e11ea11 --- /dev/null +++ b/scripts/jetson_variables.sh @@ -0,0 +1,142 @@ +#!/bin/bash +# Copyright (C) 2018, Raffaello Bonghi <raffaello@rnext.it> +# All rights reserved +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# NVIDIA Identify version +# reference: +# https://devtalk.nvidia.com/default/topic/1014424/jetson-tx2/identifying-tx1-and-tx2-at-runtime/ +# https://devtalk.nvidia.com/default/topic/996988/jetson-tk1/chip-uid/post/5100481/#5100481 + +if [ -f /sys/module/tegra_fuse/parameters/tegra_chip_id ]; then + case $(cat /sys/module/tegra_fuse/parameters/tegra_chip_id) in + 64) + JETSON_BOARD="TK1" ;; + 33) + JETSON_BOARD="TX1" ;; + 24) + JETSON_BOARD="TX2" ;; + *) + JETSON_BOARD="UNKNOWN" ;; + esac + JETSON_DESCRIPTION="NVIDIA Jetson $JETSON_BOARD" +fi + +# NVIDIA Jetson version +# reference https://devtalk.nvidia.com/default/topic/860092/jetson-tk1/how-do-i-know-what-version-of-l4t-my-jetson-tk1-is-running-/ +if [ -f /etc/nv_tegra_release ]; then + # L4T string + JETSON_L4T_STRING=$(head -n 1 /etc/nv_tegra_release) + + # Load release and revision + JETSON_L4T_RELEASE=$(echo $JETSON_L4T_STRING | cut -f 1 -d ',' | sed 's/\# R//g' | cut -d ' ' -f1) + JETSON_L4T_REVISION=$(echo $JETSON_L4T_STRING | cut -f 2 -d ',' | sed 's/\ REVISION: //g' | cut -d. -f1) + # unset variable + unset JETSON_L4T_STRING + + # Write Jetson description + JETSON_L4T="$JETSON_L4T_RELEASE.$JETSON_L4T_REVISION" + + # Write version of jetpack installed + # https://developer.nvidia.com/embedded/jetpack-archive + if [ "$JETSON_BOARD" = "TX2i" ] ; then + case $JETSON_L4T in + "28.2") + JETSON_JETPACK="3.2" ;; + *) + JETSON_JETPACK="UNKNOWN" ;; + esac + elif [ "$JETSON_BOARD" = "TX2" ] ; then + case $JETSON_L4T in + "28.2") + JETSON_JETPACK="3.2" ;; + "28.1") + JETSON_JETPACK="3.1" ;; + "27.1") + JETSON_JETPACK="3.0" ;; + *) + JETSON_JETPACK="UNKNOWN" ;; + esac + elif [ "$JETSON_BOARD" = "TX1" ] ; then + case $JETSON_L4T in + "28.2") + JETSON_JETPACK="3.2" ;; + "28.1") + JETSON_JETPACK="3.1" ;; + "24.2.1") + JETSON_JETPACK="3.0 or 2.3.1" ;; + "24.2") + JETSON_JETPACK="2.3" ;; + "24.1") + JETSON_JETPACK="2.2.1 or 2.2" ;; + "23.2") + JETSON_JETPACK="2.1" ;; + "23.1") + JETSON_JETPACK="2.0" ;; + *) + JETSON_JETPACK="UNKNOWN" ;; + esac + elif [ "$JETSON_BOARD" ="TK1" ] ; then + case $JETSON_L4T in + "21.5") + JETSON_JETPACK="2.3.1 or 2.3" ;; + "21.4") + JETSON_JETPACK="2.2 or 2.1 or 2.0 or DP 1.2" ;; + "21.3") + JETSON_JETPACK="DP 1.1" ;; + "21.2") + JETSON_JETPACK="DP 1.0" ;; + *) + JETSON_JETPACK="UNKNOWN" ;; + esac + else + # Unknown board + JETSON_JETPACK="UNKNOWN" + fi +fi + +# Read CUDA version +if [ -f /usr/local/cuda/version.txt ]; then + JETSON_CUDA=$(cat /usr/local/cuda/version.txt | sed 's/\CUDA Version //g') +else + JETSON_CUDA="NOT INSTALLED" +fi + +# Read opencv version +if hash pkg-config --modversion opencv 2>/dev/null; then + JETSON_OPENCV=$(pkg-config --modversion opencv) +else + JETSON_OPENCV="NOT INSTALLED" +fi + +# TODO Add enviroments variables: +# - UID -> https://devtalk.nvidia.com/default/topic/996988/jetson-tk1/chip-uid/post/5100481/#5100481 +# - GCID, BOARD, EABI +# - cuDNN +# - TensorRT +# - Visionworks + diff --git a/scripts/makeKernel.sh b/scripts/makeKernel.sh index ce05aa5..8d0f8a0 100755 --- a/scripts/makeKernel.sh +++ b/scripts/makeKernel.sh @@ -5,8 +5,8 @@ cd /usr/src/kernel/kernel-4.4 make prepare make modules_prepare # Make alone will build the dts files too -# make -j4 -make -j4 Image +NUM_CPU=$(nproc) +make -j$NUM_CPU Image make modules make modules_install diff --git a/scripts/removeAllKernelSources.sh b/scripts/removeAllKernelSources.sh new file mode 100755 index 0000000..133c013 --- /dev/null +++ b/scripts/removeAllKernelSources.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Remove the kernel source and compressed files +cd /usr/src +rm -r kernel +rm -r hardware +rm tx1_sources.tbz2 +