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.
Please make sure you already have a ubuntu host installed with Jetpack4.3. All the steps below are on this host but not DUT.
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. Please refer to debian manuals  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
#!/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
This file indicates the patch where your necessary files are located.
Then under debian/out/, we have 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