Difference between revisions of "L4T Jetson/OTA"

From eLinux.org
Jump to: navigation, search
(What is the for)
Line 17: Line 17:
  
 
2. Prepare the metadata under <OUT>/debian/<br>
 
2. Prepare the metadata under <OUT>/debian/<br>
To generate the deb file, it is not enough to use only above files.
+
To generate the deb file, it is not enough to use only above files. You need to have below files in your debian folder. <br>
 
Please refer to debian manuals [https://www.debian.org/doc/manuals/maint-guide/dreq.en.html] for more detail.
 
Please refer to debian manuals [https://www.debian.org/doc/manuals/maint-guide/dreq.en.html] for more detail.
 
  .
 
  .
Line 48: Line 48:
  
 
*install
 
*install
This file indicates the patch where your necessary files are located.  
+
This file indicates the path where your necessary files are located.  
 
  debian/out/* /
 
  debian/out/* /
  
Then under debian/out/, we have below files
+
Then under <OUT>/debian/out/, you need to put below files
 
  boot/Image
 
  boot/Image
 
  lib/modules/<KERNELVER>/kernel/
 
  lib/modules/<KERNELVER>/kernel/

Revision as of 23:09, 3 March 2020

What is the for?

This page is a developer wiki for customizing deb package from official Jetpack 4.3 release. Please be careful this is not a official document.

Get prepared

Please make sure you already have a ubuntu host installed with Jetpack4.3. All the steps below are on this host but not DUT.

Example

In this page, we will use nvidia-l4t-kernel as a sample to demo how to rebuild it.

1. Extract the official deb package

dpkg -x nvidia-l4t-kernel*.deb origin
dpkg -e nvidia-l4t-kernel*.deb origin/debian

After the extraction, you shall see some files under origin/debian/:

 control
 md5sum
 postinst/postrm/triggers

2. Prepare the metadata under <OUT>/debian/
To generate the deb file, it is not enough to use only above files. You need to have below files in your debian folder.
Please refer to debian manuals [1] for more detail.

.
└── debian
   ├── changelog
   ├── compat
   ├── control
   ├── copyright
   ├── install
   ├── postinst
   ├── rules
   ├── source
   │   └── format
   └── triggers

3. Some simple examples if you don't know how to write these metadata

  • rules
#!/usr/bin/make -f
.PHONY: binary
clean:
       dh clean
binary:
       dh binary
build:
override_dh_strip:
override_dh_shlibdeps:
  • copyright and changelog
cp origin/usr/share/doc/nvidia-l4t-kernel/copyright debian-repack-tmp/debian/
gunzip -c origin/usr/share/doc/nvidia-l4t-kernel/changelog.Debian.gz > debian-repack-tmp/debian/changelog
  • install

This file indicates the path where your necessary files are located.

debian/out/* /

Then under <OUT>/debian/out/, you need to put below files

boot/Image
lib/modules/<KERNELVER>/kernel/
lib/modules/<KERNELVER>/modules.*

4. Build Use below command to build the deb file.

cd <OUT>
CC=aarch64-linux-gnu-gcc dpkg-buildpackage -uc -b -d -a arm64