All Projects → JetsonHacksNano → buildKernelAndModules

JetsonHacksNano / buildKernelAndModules

Licence: other
Build the Linux Kernel and Modules on board the NVIDIA Jetson Nano Developer Kit

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to buildKernelAndModules

JetScan
JetScan : GPU accelerated portable RGB-D reconstruction system
Stars: ✭ 77 (+13.24%)
Mutual labels:  jetson-nano
SandboxMirror
Tool for reverse-engineering Apple's sandbox
Stars: ✭ 49 (-27.94%)
Mutual labels:  kernel-modules
Bazel bin
Bazel's pre-built binaries for armv7l / aarch64 / x86_64.
Stars: ✭ 23 (-66.18%)
Mutual labels:  jetson-nano
fyp-rescue-robot
This project is my final year capstone project - A self-navigating robot for search and rescue. We build a robot in ROS and integrate several functions: self-navigation, object detection and tracking, and an Arduino board to grab simple objects. The final demostration video is shown here: https://youtu.be/2dpzOpEn4hM
Stars: ✭ 32 (-52.94%)
Mutual labels:  jetson-nano
Donkeycar
Open source hardware and software platform to build a small scale self driving car.
Stars: ✭ 2,192 (+3123.53%)
Mutual labels:  jetson-nano
kernel-syslog
📝 Kernel module that can be used as a replacement for syslog, logger or logwrapper
Stars: ✭ 37 (-45.59%)
Mutual labels:  kernel-modules
installRealSenseROS
Install the realsense-ros library on NVIDIA Jetson Nano Developer Kit.
Stars: ✭ 27 (-60.29%)
Mutual labels:  jetson-nano
JetsonTeach
space.bilibili.com/425957063/channel/detail?cid=73027
Stars: ✭ 16 (-76.47%)
Mutual labels:  jetson-nano
Torch2trt
An easy to use PyTorch to TensorRT converter
Stars: ✭ 2,974 (+4273.53%)
Mutual labels:  jetson-nano
diffbot
DiffBot is an autonomous 2wd differential drive robot using ROS Noetic on a Raspberry Pi 4 B. With its SLAMTEC Lidar and the ROS Control hardware interface it's capable of navigating in an environment using the ROS Navigation stack and making use of SLAM algorithms to create maps of unknown environments.
Stars: ✭ 172 (+152.94%)
Mutual labels:  jetson-nano
homesecurity
Security camera with Raspberry pi and NVIDIA Jetson platforms
Stars: ✭ 141 (+107.35%)
Mutual labels:  jetson-nano
Jetson Inference
Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
Stars: ✭ 5,191 (+7533.82%)
Mutual labels:  jetson-nano
bootFromUSB
Boot NVIDIA Nano Jetson Developer Kit from a mass storage USB device (Jetson Nano devices A02, B01, 2GB and possibly Jetson TX1)
Stars: ✭ 96 (+41.18%)
Mutual labels:  jetson-nano
tf jetson nano
How to run Keras model on Jetson Nano
Stars: ✭ 67 (-1.47%)
Mutual labels:  jetson-nano
trt pose hand
Real-time hand pose estimation and gesture classification using TensorRT
Stars: ✭ 137 (+101.47%)
Mutual labels:  jetson-nano
dd performances
DeepDetect performance sheet
Stars: ✭ 92 (+35.29%)
Mutual labels:  jetson-nano
ipset-netgear-r7000-dd-wrt
Packages and kernel modules for ipset support for the Netgear R7000 running DD-WRT firmware
Stars: ✭ 45 (-33.82%)
Mutual labels:  kernel-modules
installLibrealsense
Build and install Intel's librealsense for the NVIDIA Jetson Nano Developer Kit
Stars: ✭ 134 (+97.06%)
Mutual labels:  jetson-nano
smart-social-distancing
Social Distancing Detector using deep learning and capable to run on edge AI devices such as NVIDIA Jetson, Google Coral, and more.
Stars: ✭ 129 (+89.71%)
Mutual labels:  jetson-nano
iknet
Inverse kinematics estimation of ROBOTIS Open Manipulator X with neural networks
Stars: ✭ 27 (-60.29%)
Mutual labels:  jetson-nano

buildKernelAndModules

Tools to build the Linux kernel and modules on board Jetson Developer Kits

This tool is meant for intermediate+ users. Please read this entire document before proceeding.

Supports L4T Releases 32.4.2 through 32.7.2

This repository contains convenience scripts to:

  • Download Kernel and Module sources (Board Support Package - BSP)
  • Edit the kernel configuration
  • Build the kernel image
  • Build all of the kernel modules
  • Copy the Kernel Image to the /boot directory - This may not supported for newer versions of L4T - see below copyImage.sh deprecation (mostly)
  • An example to build a single kernel module (most useful)

Scripts

getKernelSources.sh

Downloads the kernel sources for L4T from the NVIDIA website and decompresses them into /usr/src/ . Note that this also sets the .config file to that of the current system, and sets the LOCALVERSION to the current local version, i.e., -tegra

makeKernel.sh

Please read the notes below about installing the kernel using copyImage.sh. Compiles the kernel using make. The script commands builds the kernel Image file. Installing the Image file on to the system is a separate step.

This and other parts of the kernel build, such as building the device tree, may require that the result be 'signed' and flashed from the the NVIDIA tools on a host PC.

makeModules.sh

Compiles all of the the modules on the system using make and then installs them. You more than likely not want to do this. Instead, look at the script build-module.sh in the example directory for an outline on how to build a single module.

copyImage.sh

Please read the notes below under Background Notes about installing the kernel image. This script copies the Image file created by compiling the kernel to the /boot directory. Note that while developing you will want to be more conservative than this: You will probably want to copy the new kernel Image to a different name in the boot directory, and modify /boot/extlinux/extlinux.conf to have entry points at the old image, or the new image. This way, if things go sideways you can still boot the machine using the serial console.

You will want to make a copy of the original Image before the copy, something like:

$ cp /boot/Image $INSTALL_DIR/Image.orig
$ ./copyImage.sh
$ echo "New Image created and placed in /boot"

You may need to modify the /boot/extlinux/extlinux.conf to reflect the changes.

editConfig.sh

Edit the .config file located in /usr/src/kernel/kernel-4.9 This file must be present (from the getKernelSources.sh script) before launching the file. Note that if you change the local version, you will need to make both the kernel and modules and install them.

removeAllKernelSources.sh

Removes all of the kernel sources and compressed source files. You may want to make a backup of the files before deletion.

Example - build-module.sh

The most likely use for these scripts is to build kernel module(s). In the example folder, there is a script named build-module.sh You should open the script, read through it, and modify to meet your needs. The script builds a module for the Logitech F710 game controller. The module name is hid-logitech.ko

You will need to know the module flag to use this method, in this case it is: LOGITECH_FF

Background Notes

Over the years, we have been maintaining several different repositories here and on https://github.com/jetsonhacks to build the Linux kernel and modules for the various NVIDIA Jetson models:

  • Jetson Nano
  • Jetson Nano 2GB
  • Jetson TX1
  • Jetson TX2
  • Jetson AGX Xavier
  • Jetson Xavier NX

The main difficulty of this approach is that there are several different repositories to maintain across NVIDIA L4T releases.

There are two different versions of BSP source code for each NVIDIA L4T release. One version is for the Jetson Nano, Nano 2GB and TX1 named T210. The other version is for the Jetson TX2, AGX Xavier, and Xavier NX named T186. The only difference in building the kernel from machine to machine is where to download the BSP sources from for a given release. The idea of this repository is to place these URLs into an associative array to lookup given the L4T release version.

The other procedures have remained the same over the years, except for placing items in the /boot directory. The placement of the Linux kernel image, device tree and extlinux.conf may be different based on the Jetson model and L4T release.

copyImage.sh deprecation (mostly)

There has been an architectural shift on different Jetson models to provide better security. These changes are implemented differently on each model, depending on hardware capabilities and bootloaders of the Jetson module in question. Several system files, such as but not limited to the Linux kernel and device tree, may now be signed.

For example, on the Jetson Xaviers the kernel is PKC Signed and has SBK encryption in the newer releases. Currently, the NVIDIA approved application to sign these files is an x86 app running on the host machine.

Additionally, there are Jetsons which place the /boot folder into the onboard QSPI-NOR flash memory to be read at boot time, rather than reading it from the APP partition. Consequently the developer needs to know where/how to place a newly created kernel and support code.

The copyImage.sh script may be helpful depending on the Jetson model and L4T release it is being used with. However, on some releases or Jetson models it may not work, or give a false sense of hope of actually doing something.

So what good are these scripts?

One thing that the scripts are useful for is building external kernel modules. People can build the modules on the device without having to go through the steps of setting up a development environment on the host, building the module, and transferring it to the Jetson. Instead, build the module on the Jetson and then install it.

Release Notes

November, 2022

  • v1.1
  • Fixes issue with source file selection
  • Add support for 32.7.1 and 32.7.2
  • Thank you @SMSmith, @enetkilfatih, @kitazaki for contributing fixes

September, 2021

  • v1.0
  • Initial Release - Build 32.4.2 through 32.6.1
  • Unification of build methods across Jetson platform
    • Jetson Nano, Nano 2GB, TX1, TX2, AGX Xavier, Xavier NX
  • Associative lookup of BSP source code via L4T Release name
  • L4T Releases 32.4.2 through 32.6.1
  • Tested on Jetson Nano, Jetson Xavier NX

December, 2019

  • vL4T32.3.1
  • L4T 32.3.1 (JetPack 4.3)
  • Minor version update

November, 2019

  • vL4T32.2.3
  • L4T 32.2.3 (JetPack 4.2.2)
  • Minor version update

October, 2019

  • vL4T32.2.1
  • L4T 32.2.1 (JetPack 4.2.1)
  • Better release version parsing

July, 2019

  • vL4T32.2
  • L4T 32.2 (JetPack 4.2.1)

June, 2019

  • vL4T32.1
  • L4T 32.1 (JetPack 4.2)
  • Initial Release

Special thanks to Raffaello Bonghi (https://github.com/rbonghi) for jetson_easy scripts.

Special thanks to Shreeyak (https://github.com/Shreeyak) for discussing alternatives to get source directly from NVIDIA git repositories.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].