{"id":17354255,"url":"https://github.com/jetsonhacksnano/buildkernelandmodules","last_synced_at":"2026-03-01T18:32:06.604Z","repository":{"id":35837933,"uuid":"182935649","full_name":"JetsonHacksNano/buildKernelAndModules","owner":"JetsonHacksNano","description":"Build the Linux Kernel and Modules on board the NVIDIA Jetson Nano Developer Kit","archived":false,"fork":false,"pushed_at":"2024-05-05T16:47:12.000Z","size":66,"stargazers_count":92,"open_issues_count":5,"forks_count":48,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-14T21:53:07.635Z","etag":null,"topics":["jetson-nano","kernel","kernel-modules"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JetsonHacksNano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-23T04:55:05.000Z","updated_at":"2025-04-03T14:18:44.000Z","dependencies_parsed_at":"2025-04-14T21:53:10.077Z","dependency_job_id":"ffffc666-b112-4c72-b723-fbef6c94556a","html_url":"https://github.com/JetsonHacksNano/buildKernelAndModules","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/JetsonHacksNano/buildKernelAndModules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetsonHacksNano%2FbuildKernelAndModules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetsonHacksNano%2FbuildKernelAndModules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetsonHacksNano%2FbuildKernelAndModules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetsonHacksNano%2FbuildKernelAndModules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JetsonHacksNano","download_url":"https://codeload.github.com/JetsonHacksNano/buildKernelAndModules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JetsonHacksNano%2FbuildKernelAndModules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29978551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jetson-nano","kernel","kernel-modules"],"created_at":"2024-10-15T17:19:29.545Z","updated_at":"2026-03-01T18:32:06.583Z","avatar_url":"https://github.com/JetsonHacksNano.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## buildKernelAndModules\nTools to build the Linux kernel and modules on board Jetson Developer Kits\n\nThis tool is meant for intermediate+ users. Please read this entire document before proceeding.\n\nSupports L4T Releases 32.4.2 through 32.7.2\n\nThis repository contains convenience scripts to:\n* Download Kernel and Module sources (**B**oard **S**upport **P**ackage - **BSP**) \n* Edit the kernel configuration\n* Build the kernel image\n* Build all of the kernel modules\n* Copy the Kernel Image to the /boot directory - This may not supported for newer versions of L4T - see below _**copyImage.sh deprecation (mostly)**_ \n* An example to build a single kernel module (most useful)\n\n## Scripts\n\n### getKernelSources.sh\n\nDownloads 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**\n\n### makeKernel.sh\n\nPlease 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. \n\nThis 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.\n\n### makeModules.sh\n\nCompiles 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.\n\n### copyImage.sh\n\nPlease 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.\n\nYou will want to make a copy of the original Image before the copy, something like:\n```\n$ cp /boot/Image $INSTALL_DIR/Image.orig\n$ ./copyImage.sh\n$ echo \"New Image created and placed in /boot\"\n```\nYou may need to modify the _/boot/extlinux/extlinux.conf_ to reflect the changes. \n\n### editConfig.sh \nEdit 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.\n\n### removeAllKernelSources.sh\n\nRemoves all of the kernel sources and compressed source files. You may want to make a backup of the files before deletion.\n\n### Example - build-module.sh\nThe most likely use for these scripts is to build kernel module(s). In the example folder, there is a script named _**build-module.sh**_\nYou 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**\n\nYou will need to know the module flag to use this method, in this case it is: **LOGITECH_FF** \n\n\n## Background Notes\nOver 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:\n\n* Jetson Nano\n* Jetson Nano 2GB\n* Jetson TX1\n* Jetson TX2\n* Jetson AGX Xavier\n* Jetson Xavier NX\n\nThe main difficulty of this approach is that there are several different repositories to maintain across NVIDIA L4T releases.\n\nThere 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.\n\nThe 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.\n\n### copyImage.sh deprecation (mostly)\nThere 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. \n\nFor 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.\n\nAdditionally, 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. \n\nThe 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. \n\n### So what good are these scripts?\nOne 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.\n\n## Release Notes\n\n### November, 2022\n* v1.1\n* Fixes issue with source file selection\n* Add support for 32.7.1 and 32.7.2\n* Thank you @SMSmith, @enetkilfatih, @kitazaki for contributing fixes\n\n### September, 2021\n* v1.0\n* Initial Release - Build 32.4.2 through 32.6.1\n* Unification of build methods across Jetson platform\n  * Jetson Nano, Nano 2GB, TX1, TX2, AGX Xavier, Xavier NX\n* Associative lookup of BSP source code via L4T Release name\n* L4T Releases 32.4.2 through 32.6.1\n* Tested on Jetson Nano, Jetson Xavier NX\n\n### December, 2019\n* vL4T32.3.1\n* L4T 32.3.1 (JetPack 4.3)\n* Minor version update\n\n### November, 2019\n* vL4T32.2.3\n* L4T 32.2.3 (JetPack 4.2.2)\n* Minor version update\n\n### October, 2019\n\n* vL4T32.2.1\n* L4T 32.2.1 (JetPack 4.2.1)\n* Better release version parsing\n\n### July, 2019\n* vL4T32.2\n* L4T 32.2 (JetPack 4.2.1)\n\n### June, 2019\n* vL4T32.1\n* L4T 32.1 (JetPack 4.2)\n* Initial Release\n\nSpecial thanks to Raffaello Bonghi (https://github.com/rbonghi) for jetson_easy scripts.\n\nSpecial thanks to Shreeyak (https://github.com/Shreeyak) for discussing alternatives to get source directly from NVIDIA git repositories.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetsonhacksnano%2Fbuildkernelandmodules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetsonhacksnano%2Fbuildkernelandmodules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetsonhacksnano%2Fbuildkernelandmodules/lists"}