diff mbox series

[v2,2/6] package/linux4tegra: new package

Message ID 20200808123918.1880533-2-christian@paral.in
State RFC
Headers show
Series [v2,1/6] package/nvidia-modprobe: new package | expand

Commit Message

Christian Stewart Aug. 8, 2020, 12:39 p.m. UTC
NVIDIA Linux4Tegra utilities and binaries.

https://developer.nvidia.com/embedded/linux-tegra-archive

Signed-off-by: Christian Stewart <christian@paral.in>

v1 -> v2:

 - cjs: add license hashes

Signed-off-by: Christian Stewart <christian@paral.in>
---
 package/Config.in                             |   1 +
 ...for-flashing-Buildroot-produced-disk.patch |  58 +++++++++
 package/linux4tegra/Config.in                 |   6 +
 package/linux4tegra/linux4tegra.hash          |  54 +++++++++
 package/linux4tegra/linux4tegra.mk            | 114 ++++++++++++++++++
 5 files changed, 233 insertions(+)
 create mode 100644 package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
 create mode 100644 package/linux4tegra/Config.in
 create mode 100644 package/linux4tegra/linux4tegra.hash
 create mode 100644 package/linux4tegra/linux4tegra.mk

Comments

Asaf Kahlon Aug. 8, 2020, 2:03 p.m. UTC | #1
Hello,

On Sat, Aug 8, 2020 at 3:39 PM Christian Stewart <christian@paral.in> wrote:
>
> NVIDIA Linux4Tegra utilities and binaries.
>
> https://developer.nvidia.com/embedded/linux-tegra-archive
>
> Signed-off-by: Christian Stewart <christian@paral.in>
>
> v1 -> v2:
>
>  - cjs: add license hashes
>
> Signed-off-by: Christian Stewart <christian@paral.in>
> ---
>  package/Config.in                             |   1 +
>  ...for-flashing-Buildroot-produced-disk.patch |  58 +++++++++
>  package/linux4tegra/Config.in                 |   6 +
>  package/linux4tegra/linux4tegra.hash          |  54 +++++++++
>  package/linux4tegra/linux4tegra.mk            | 114 ++++++++++++++++++
>  5 files changed, 233 insertions(+)
>  create mode 100644 package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
>  create mode 100644 package/linux4tegra/Config.in
>  create mode 100644 package/linux4tegra/linux4tegra.hash
>  create mode 100644 package/linux4tegra/linux4tegra.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 3349641371..0d34824128 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -481,6 +481,7 @@ endmenu
>         source "package/libuio/Config.in"
>         source "package/linux-backports/Config.in"
>         source "package/linux-serial-test/Config.in"
> +       source "package/linux4tegra/Config.in"
>         source "package/linuxconsoletools/Config.in"
>         source "package/lirc-tools/Config.in"
>         source "package/lm-sensors/Config.in"
> diff --git a/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
> new file mode 100644
> index 0000000000..4ace27bddc
> --- /dev/null
> +++ b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
> @@ -0,0 +1,58 @@
> +From fbd0d35995a23351d4b50ed0b814442a6873ded2 Mon Sep 17 00:00:00 2001
> +From: Christian Stewart <christian@paral.in>
> +Date: Fri, 17 Jul 2020 13:58:43 -0700
> +Subject: [PATCH] Adjust flash.sh for flashing Buildroot-produced disk image
> +
> +Signed-off-by: Christian Stewart <christian@paral.in>
> +---
> + flash.sh | 19 ++++++++++---------
> + 1 file changed, 10 insertions(+), 9 deletions(-)
> +
> +diff --git a/flash.sh b/flash.sh
> +index 38c0cbb..c27b41b 100755
> +--- a/flash.sh
> ++++ b/flash.sh
> +@@ -1339,9 +1339,10 @@ elif [ "${target_rootdev}" == "internal" ] || \
> +               usage allunknown 1;
> +       fi
> +
> +-      cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 "
> ++      # cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 "
> ++      cmdline+="root=/dev/${target_rootdev} rw rootwait"
> + else
> +-      cmdline+="root=/dev/${target_rootdev} rw rootwait rootfstype=ext4 "
> ++      cmdline+="root=/dev/${target_rootdev} rw rootwait"
> + fi;
> +
> + if [ "${CMDLINE_ADD}" != "" ]; then
> +@@ -1512,11 +1513,7 @@ if [ "${write_image_name}" != "" ]; then
> +       fi
> + fi
> +
> +-if [ "${INITRD_IN_BOOTIMG}" = "yes" ]; then
> +-      ramdisk=initrd;
> +-else
> +-      ramdisk="/dev/null"
> +-fi
> ++ramdisk="/dev/null"
> + echo -n "Making Boot image... ";
> + MKBOOTARG+="--kernel ${kernel_image} ";
> + MKBOOTARG+="--ramdisk ${ramdisk} ";
> +@@ -1977,8 +1974,12 @@ if [ "${reuse_systemimg}" = "true" ] || [ "${skip_systemimg}" = "true" ]; then
> + elif [ "${rootdev_type}" = "internal" ]; then
> +       APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
> +       if [ "${target_partname}" = "" -o "${target_partname}" = "APP" ]; then
> +-              build_fsimg "$localsysfile" "$fillpat" \
> +-                  "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
> ++    echo "Skipping image build and setting target_partfile to INITRD."
> ++    # target_partfile=${INITRD}
> ++    # cp ${INITRD} ./system.img
> ++    ln -fs ${INITRD} ./system.img
> ++              #build_fsimg "$localsysfile" "$fillpat" \
> ++              #    "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
> +       fi;
> + elif [ "${rootdev_type}" = "network" -o "${rootdev_type}" = "external" ]; then
> +       APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
> +--
> +2.27.0
> +
> diff --git a/package/linux4tegra/Config.in b/package/linux4tegra/Config.in
> new file mode 100644
> index 0000000000..06d449e21e
> --- /dev/null
> +++ b/package/linux4tegra/Config.in
> @@ -0,0 +1,6 @@
> +config BR2_PACKAGE_LINUX4TEGRA
> +       bool "linux4tegra"
> +       help
> +         NVIDIA Linux4Tegra utilities and binaries.
> +
> +         https://developer.nvidia.com/embedded/linux-tegra-archive
> diff --git a/package/linux4tegra/linux4tegra.hash b/package/linux4tegra/linux4tegra.hash
> new file mode 100644
> index 0000000000..3af19ddeaa
> --- /dev/null
> +++ b/package/linux4tegra/linux4tegra.hash
> @@ -0,0 +1,54 @@
> +# locally computed
> +sha256 9a2d13b1f4b67fef97a428d54724b23e84e14636eedfa22f338c2d1ea62558e2  Tegra186_Linux_R32.4.3_aarch64.tbz2
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE
> +sha256 496f3bc5456694cce764d28a93565bb0d0967dbd95256759e4168a9587406949  bootloader/LICENSE.adsp
> +sha256 q4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f  bootloader/LICENSE.bpmp
I'm pretty sure the letter 'q' can't be a part of a sha256 checksum :)

> +sha256 fd4513e2857a0d91c521dfbb924733563b55d5a2d42d4fb688d2506ed34df0c4  bootloader/LICENSE.bpmp_t194
> +sha256 205a391eb9cfc69854cc0c3082de204d30124607cedecbdd3f47420b5f37f302  bootloader/LICENSE.camera-rtcpu
> +sha256 3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1  bootloader/LICENSE.cboot
> +sha256 3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1  bootloader/LICENSE.cboot_t194
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.chkbdinfo
> +sha256 7bf7d9fae6472452d585ec38dd684daa86dc83638984d1cb14ee35239a868543  bootloader/LICENSE.mce_c10_prod_cr
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.mkbctpart
> +sha256 9b0ccf575cfd9febc97b8f9967216f06341db2d44abc69df92c3127cc1a2608f  bootloader/LICENSE.mkbootimg
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.mkgpt
> +sha256 cddaa9d5583a7705cd4734a6af4b421bca9016ba6af854c51efbfcbe19a4a893  bootloader/LICENSE.nv_smd_generator
> +sha256 7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713  bootloader/LICENSE.spe.bin
> +sha256 7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713  bootloader/LICENSE.spe_t194.bin
> +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware
> +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware
> +sha256 5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130  bootloader/LICENSE.tos-trusty.img.trusty
> +sha256 0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware
> +sha256 5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130  bootloader/LICENSE.tos-trusty_t194.img.trusty
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/LICENSE
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/LICENSE
> +sha256 a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d  nv_tegra/LICENSE.brcm_patchram_plus
> +sha256 88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad  nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img
> +sha256 1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d  nv_tegra/LICENSE.libnvargus
> +sha256 7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5  nv_tegra/LICENSE.libnvcam_imageencoder
> +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/LICENSE.libnveventlib
> +sha256 1f1bf0c752f072a447b1013fc9d76268ddf098c37ddc63988d60e4973cbee2f4  nv_tegra/LICENSE.libnvscf
> +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/LICENSE.libnvtracebuf
> +sha256 b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200  nv_tegra/LICENSE.libtegrav4l2
> +sha256 8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686  nv_tegra/LICENSE.minigbm
> +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  nv_tegra/LICENSE.nvbootctrl
> +sha256 fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6  nv_tegra/LICENSE.nvdla
> +sha256 8b6a8553e4a1668a6267b9789bd69ffe105bffd8f2af59e2fc74a5910bb159ab  nv_tegra/LICENSE.weston
> +sha256 a34730970264d619f352598bf30295ad505a60fc3a493add8aa851645ce3ea47  nv_tegra/LICENSE.weston-data
> +sha256 88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad  nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img
> +sha256 a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus
> +sha256 89786bfd7060f6a60feae03257da6f3206b0f777352cf750c67b3b560dd087a5  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt
> +sha256 1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus
> +sha256 7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder
> +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib
> +sha256 c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf
> +sha256 dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2
> +sha256 dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert
> +sha256 b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2
> +sha256 fbef9c34b63148c0e670e6ac07705b25bebcc1f963b48bf7447ee61cfaadcc1e  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1
> +sha256 8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm
> +sha256 fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla
> +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt
> +sha256 f3f3ecff94537e7d5944fdbae7c6bd02d5eddca8fe1c29d8699ff2e54d26cebc  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors
> +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl
> +sha256 5f28c11f8b1b3f97b9d42c74b85371ebf4127f241b799279bcecd69f7ee542dc  nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test
> \ No newline at end of file
Make sure to run utils/check-package on your new packages in order to
make sure you don't miss that kind of things.

> diff --git a/package/linux4tegra/linux4tegra.mk b/package/linux4tegra/linux4tegra.mk
> new file mode 100644
> index 0000000000..74cb19723e
> --- /dev/null
> +++ b/package/linux4tegra/linux4tegra.mk
> @@ -0,0 +1,114 @@
> +################################################################################
> +#
> +# linux4tegra
> +#
> +################################################################################
> +
> +LINUX4TEGRA_VERSION = 32.4.3
> +LINUX4TEGRA_SITE = https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t186ref_release_aarch64
> +LINUX4TEGRA_SOURCE = Tegra186_Linux_R$(LINUX4TEGRA_VERSION)_aarch64.tbz2
> +
> +LINUX4TEGRA_LICENSE = NVIDIA Software License, GPL-2.0, LGPL, Apache-2.0, MIT
> +LINUX4TEGRA_LICENSE_FILES = \
> +       bootloader/LICENSE \
> +       bootloader/LICENSE.adsp \
> +       bootloader/LICENSE.bpmp \
> +       bootloader/LICENSE.bpmp_t194 \
> +       bootloader/LICENSE.camera-rtcpu \
> +       bootloader/LICENSE.cboot \
> +       bootloader/LICENSE.cboot_t194 \
> +       bootloader/LICENSE.chkbdinfo \
> +       bootloader/LICENSE.mce_c10_prod_cr \
> +       bootloader/LICENSE.mkbctpart \
> +       bootloader/LICENSE.mkbootimg \
> +       bootloader/LICENSE.mkgpt \
> +       bootloader/LICENSE.nv_smd_generator \
> +       bootloader/LICENSE.spe.bin \
> +       bootloader/LICENSE.spe_t194.bin \
> +       bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware \
> +       bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware \
> +       bootloader/LICENSE.tos-trusty.img.trusty \
> +       bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware \
> +       bootloader/LICENSE.tos-trusty_t194.img.trusty \
> +       nv_tegra/LICENSE \
> +       nv_tegra/LICENSE \
> +       nv_tegra/LICENSE.brcm_patchram_plus \
> +       nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img \
> +       nv_tegra/LICENSE.libnvargus \
> +       nv_tegra/LICENSE.libnvcam_imageencoder \
> +       nv_tegra/LICENSE.libnveventlib \
> +       nv_tegra/LICENSE.libnvscf \
> +       nv_tegra/LICENSE.libnvtracebuf \
> +       nv_tegra/LICENSE.libtegrav4l2 \
> +       nv_tegra/LICENSE.minigbm \
> +       nv_tegra/LICENSE.nvbootctrl \
> +       nv_tegra/LICENSE.nvdla \
> +       nv_tegra/LICENSE.weston \
> +       nv_tegra/LICENSE.weston-data \
> +       nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2 \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2 \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1 \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt \
> +       nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors \
> +       nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl \
> +       nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test
> +
> +LINUX4TEGRA_INSTALL_IMAGES = YES
> +
> +define LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS
> +       @mkdir -p $(@D)/nv_tegra/nvidia_drivers
> +       $(call suitable-extractor,nvidia_drivers.tbz2) \
> +               $(@D)/nv_tegra/nvidia_drivers.tbz2 | \
> +               $(TAR) -C $(@D)/nv_tegra/nvidia_drivers $(TAR_OPTIONS) -
> +endef
> +
> +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS
> +
> +define LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS
> +       @mkdir -p $(@D)/nv_tegra/nvidia_configs
> +       $(call suitable-extractor,config.tbz2) \
> +               $(@D)/nv_tegra/config.tbz2 | \
> +               $(TAR) -C $(@D)/nv_tegra/nvidia_configs $(TAR_OPTIONS) -
> +endef
> +
> +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS
> +
> +define LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS
> +       @mkdir -p $(@D)/nv_tegra/nvidia_tools
> +       $(call suitable-extractor,nv_tools.tbz2) \
> +               $(@D)/nv_tegra/nv_tools.tbz2 | \
> +               $(TAR) -C $(@D)/nv_tegra/nvidia_tools $(TAR_OPTIONS) -
> +endef
> +
> +LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS
> +
> +# symlink linux4tegra to the target dir.
> +define LINUX4TEGRA_INSTALL_IMAGES_CMDS
> +       ln -fs $(@D) $(BINARIES_DIR)/linux4tegra
> +endef
> +
> +LINUX4TEGRA_RSYNC = \
> +       rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
> +               --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
> +               --keep-dirlinks --exclude=ld.so.conf.d
> +
> +define LINUX4TEGRA_INSTALL_TARGET_CMDS
> +       # install nvidia_drivers
> +       $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_drivers/ $(TARGET_DIR)/
> +       # install nvidia_configs
> +       $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_configs/ $(TARGET_DIR)/
> +       # install nvidia_tools
> +       $(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_tools/ $(TARGET_DIR)/
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.28.0
>

Regards,
Asaf
Christian Stewart Aug. 8, 2020, 5:55 p.m. UTC | #2
Hi Asaf,

On Sat, Aug 8, 2020 at 7:03 AM Asaf Kahlon <asafka7@gmail.com> wrote:
> On Sat, Aug 8, 2020 at 3:39 PM Christian Stewart <christian@paral.in> wrote:
> >
> > NVIDIA Linux4Tegra utilities and binaries.
> >
> > https://developer.nvidia.com/embedded/linux-tegra-archive
> >
> > Signed-off-by: Christian Stewart <christian@paral.in>
> >
> > v1 -> v2:
> >
> >  - cjs: add license hashes
> >

[snip]

> > diff --git a/package/linux4tegra/linux4tegra.hash b/package/linux4tegra/linux4tegra.hash
> > new file mode 100644
> > index 0000000000..3af19ddeaa
> > --- /dev/null
> > +++ b/package/linux4tegra/linux4tegra.hash
> > @@ -0,0 +1,54 @@
> > +# locally computed
> > +sha256 9a2d13b1f4b67fef97a428d54724b23e84e14636eedfa22f338c2d1ea62558e2  Tegra186_Linux_R32.4.3_aarch64.tbz2
> > +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE
> > +sha256 496f3bc5456694cce764d28a93565bb0d0967dbd95256759e4168a9587406949  bootloader/LICENSE.adsp
> > +sha256 q4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f  bootloader/LICENSE.bpmp
> I'm pretty sure the letter 'q' can't be a part of a sha256 checksum :)

Yes... oops... FWIW I set up some CI just now to automatically run
check-package before I submit.

Now it's:

sha256 d4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f
 bootloader/LICENSE.bpmp

Not sure why this didn't fail during the test build I ran?

Best regards,
Christian
Asaf Kahlon Aug. 8, 2020, 6:22 p.m. UTC | #3
Hello,

On Sat, Aug 8, 2020 at 8:55 PM Christian Stewart <christian@paral.in> wrote:
>
> Hi Asaf,
>
> On Sat, Aug 8, 2020 at 7:03 AM Asaf Kahlon <asafka7@gmail.com> wrote:
> > On Sat, Aug 8, 2020 at 3:39 PM Christian Stewart <christian@paral.in> wrote:
> > >
> > > NVIDIA Linux4Tegra utilities and binaries.
> > >
> > > https://developer.nvidia.com/embedded/linux-tegra-archive
> > >
> > > Signed-off-by: Christian Stewart <christian@paral.in>
> > >
> > > v1 -> v2:
> > >
> > >  - cjs: add license hashes
> > >
>
> [snip]
>
> > > diff --git a/package/linux4tegra/linux4tegra.hash b/package/linux4tegra/linux4tegra.hash
> > > new file mode 100644
> > > index 0000000000..3af19ddeaa
> > > --- /dev/null
> > > +++ b/package/linux4tegra/linux4tegra.hash
> > > @@ -0,0 +1,54 @@
> > > +# locally computed
> > > +sha256 9a2d13b1f4b67fef97a428d54724b23e84e14636eedfa22f338c2d1ea62558e2  Tegra186_Linux_R32.4.3_aarch64.tbz2
> > > +sha256 bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE
> > > +sha256 496f3bc5456694cce764d28a93565bb0d0967dbd95256759e4168a9587406949  bootloader/LICENSE.adsp
> > > +sha256 q4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f  bootloader/LICENSE.bpmp
> > I'm pretty sure the letter 'q' can't be a part of a sha256 checksum :)
>
> Yes... oops... FWIW I set up some CI just now to automatically run
> check-package before I submit.
>
> Now it's:
>
> sha256 d4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f
>  bootloader/LICENSE.bpmp
>
> Not sure why this didn't fail during the test build I ran?
That's because the license hashes aren't checked on a "regular" build.
You can validate that using:
make linux4tegra-legal-info

>
> Best regards,
> Christian
Regards,
Asaf.
diff mbox series

Patch

diff --git a/package/Config.in b/package/Config.in
index 3349641371..0d34824128 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -481,6 +481,7 @@  endmenu
 	source "package/libuio/Config.in"
 	source "package/linux-backports/Config.in"
 	source "package/linux-serial-test/Config.in"
+	source "package/linux4tegra/Config.in"
 	source "package/linuxconsoletools/Config.in"
 	source "package/lirc-tools/Config.in"
 	source "package/lm-sensors/Config.in"
diff --git a/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
new file mode 100644
index 0000000000..4ace27bddc
--- /dev/null
+++ b/package/linux4tegra/0001-Adjust-flash.sh-for-flashing-Buildroot-produced-disk.patch
@@ -0,0 +1,58 @@ 
+From fbd0d35995a23351d4b50ed0b814442a6873ded2 Mon Sep 17 00:00:00 2001
+From: Christian Stewart <christian@paral.in>
+Date: Fri, 17 Jul 2020 13:58:43 -0700
+Subject: [PATCH] Adjust flash.sh for flashing Buildroot-produced disk image
+
+Signed-off-by: Christian Stewart <christian@paral.in>
+---
+ flash.sh | 19 ++++++++++---------
+ 1 file changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/flash.sh b/flash.sh
+index 38c0cbb..c27b41b 100755
+--- a/flash.sh
++++ b/flash.sh
+@@ -1339,9 +1339,10 @@ elif [ "${target_rootdev}" == "internal" ] || \
+ 		usage allunknown 1;
+ 	fi
+ 
+-	cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 "
++	# cmdline+="root=PARTUUID=${rootfsuuid} rw rootwait rootfstype=ext4 "
++	cmdline+="root=/dev/${target_rootdev} rw rootwait"
+ else
+-	cmdline+="root=/dev/${target_rootdev} rw rootwait rootfstype=ext4 "
++	cmdline+="root=/dev/${target_rootdev} rw rootwait"
+ fi;
+ 
+ if [ "${CMDLINE_ADD}" != "" ]; then
+@@ -1512,11 +1513,7 @@ if [ "${write_image_name}" != "" ]; then
+ 	fi
+ fi
+ 
+-if [ "${INITRD_IN_BOOTIMG}" = "yes" ]; then
+-	ramdisk=initrd;
+-else
+-	ramdisk="/dev/null"
+-fi
++ramdisk="/dev/null"
+ echo -n "Making Boot image... ";
+ MKBOOTARG+="--kernel ${kernel_image} ";
+ MKBOOTARG+="--ramdisk ${ramdisk} ";
+@@ -1977,8 +1974,12 @@ if [ "${reuse_systemimg}" = "true" ] || [ "${skip_systemimg}" = "true" ]; then
+ elif [ "${rootdev_type}" = "internal" ]; then
+ 	APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
+ 	if [ "${target_partname}" = "" -o "${target_partname}" = "APP" ]; then
+-		build_fsimg "$localsysfile" "$fillpat" \
+-		    "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
++    echo "Skipping image build and setting target_partfile to INITRD."
++    # target_partfile=${INITRD}
++    # cp ${INITRD} ./system.img
++    ln -fs ${INITRD} ./system.img
++		#build_fsimg "$localsysfile" "$fillpat" \
++		#    "$rootfssize" "$rootfs_type" "$rootfs_dir" "$cmdline";
+ 	fi;
+ elif [ "${rootdev_type}" = "network" -o "${rootdev_type}" = "external" ]; then
+ 	APP_TAG+="-e s/APPFILE/${localsysfile}/ ";
+-- 
+2.27.0
+
diff --git a/package/linux4tegra/Config.in b/package/linux4tegra/Config.in
new file mode 100644
index 0000000000..06d449e21e
--- /dev/null
+++ b/package/linux4tegra/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_LINUX4TEGRA
+	bool "linux4tegra"
+	help
+	  NVIDIA Linux4Tegra utilities and binaries.
+
+	  https://developer.nvidia.com/embedded/linux-tegra-archive
diff --git a/package/linux4tegra/linux4tegra.hash b/package/linux4tegra/linux4tegra.hash
new file mode 100644
index 0000000000..3af19ddeaa
--- /dev/null
+++ b/package/linux4tegra/linux4tegra.hash
@@ -0,0 +1,54 @@ 
+# locally computed
+sha256	9a2d13b1f4b67fef97a428d54724b23e84e14636eedfa22f338c2d1ea62558e2  Tegra186_Linux_R32.4.3_aarch64.tbz2
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE
+sha256	496f3bc5456694cce764d28a93565bb0d0967dbd95256759e4168a9587406949  bootloader/LICENSE.adsp
+sha256	q4885fa44934935d6a178c84a16aec49dae1bd4f41f14bbbd781bafcf704885f  bootloader/LICENSE.bpmp
+sha256	fd4513e2857a0d91c521dfbb924733563b55d5a2d42d4fb688d2506ed34df0c4  bootloader/LICENSE.bpmp_t194
+sha256	205a391eb9cfc69854cc0c3082de204d30124607cedecbdd3f47420b5f37f302  bootloader/LICENSE.camera-rtcpu
+sha256	3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1  bootloader/LICENSE.cboot
+sha256	3cc8cfbf77eb7f086d9b6f68de92251ebbcf13fd7a20fec2749cab30348bf9b1  bootloader/LICENSE.cboot_t194
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.chkbdinfo
+sha256	7bf7d9fae6472452d585ec38dd684daa86dc83638984d1cb14ee35239a868543  bootloader/LICENSE.mce_c10_prod_cr
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.mkbctpart
+sha256	9b0ccf575cfd9febc97b8f9967216f06341db2d44abc69df92c3127cc1a2608f  bootloader/LICENSE.mkbootimg
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  bootloader/LICENSE.mkgpt
+sha256	cddaa9d5583a7705cd4734a6af4b421bca9016ba6af854c51efbfcbe19a4a893  bootloader/LICENSE.nv_smd_generator
+sha256	7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713  bootloader/LICENSE.spe.bin
+sha256	7b699cea50c65de6679ea0617e8276cf24a523d6068e2502e637fadf9bc49713  bootloader/LICENSE.spe_t194.bin
+sha256	0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware
+sha256	0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware
+sha256	5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130  bootloader/LICENSE.tos-trusty.img.trusty
+sha256	0ef77b4d7ffb0195540e394863dd969594ba8e21cb4b810822b4d42c1ab8ef72  bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware
+sha256	5a316570e2f1d43b09e51432e613c408b240d0ea0ce30134a7de16c25b832130  bootloader/LICENSE.tos-trusty_t194.img.trusty
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/LICENSE
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/LICENSE
+sha256	a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d  nv_tegra/LICENSE.brcm_patchram_plus
+sha256	88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad  nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img
+sha256	1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d  nv_tegra/LICENSE.libnvargus
+sha256	7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5  nv_tegra/LICENSE.libnvcam_imageencoder
+sha256	c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/LICENSE.libnveventlib
+sha256	1f1bf0c752f072a447b1013fc9d76268ddf098c37ddc63988d60e4973cbee2f4  nv_tegra/LICENSE.libnvscf
+sha256	c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/LICENSE.libnvtracebuf
+sha256	b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200  nv_tegra/LICENSE.libtegrav4l2
+sha256	8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686  nv_tegra/LICENSE.minigbm
+sha256	cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  nv_tegra/LICENSE.nvbootctrl
+sha256	fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6  nv_tegra/LICENSE.nvdla
+sha256	8b6a8553e4a1668a6267b9789bd69ffe105bffd8f2af59e2fc74a5910bb159ab  nv_tegra/LICENSE.weston
+sha256	a34730970264d619f352598bf30295ad505a60fc3a493add8aa851645ce3ea47  nv_tegra/LICENSE.weston-data
+sha256	88e408dec7796e0440b0bf5131f88f0d97bc4014fc389562ec0d5cc7ed1c45ad  nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img
+sha256	a85e1af5d521f0d68aa08806292076bb9bda8a31a496f17063fafab121053e4d  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus
+sha256	89786bfd7060f6a60feae03257da6f3206b0f777352cf750c67b3b560dd087a5  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt
+sha256	1467d3bd35f6ad87ffb24c0e665c2d028dda6e943dff66b347f0051370dcf88d  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus
+sha256	7ea9279fe435e009307da026ea72a1f47ecbdeef3a6a7f6bb04a2dec7bbdfcd5  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder
+sha256	c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib
+sha256	c19b803d92378a0acc9c7dc02e018022f821b8284a5d918e2628e6d1d9376245  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf
+sha256	dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2
+sha256	dee27dbeddf4f7d093df765624022e72fb28c818d60fa3fd9d1dd77b392e4d31  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert
+sha256	b4e0f72b067cd11afa0875d20144423a80b7293e4309cca43190cf8c1d4ba200  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2
+sha256	fbef9c34b63148c0e670e6ac07705b25bebcc1f963b48bf7447ee61cfaadcc1e  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1
+sha256	8610954adbca6c6b85d8b1ae5613b44b0014e437d32fcad6683bb27541411686  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm
+sha256	fa776c507a543cc43d9d66407cfe5d685f35207fd9631e7fd77ee4f42ef92be6  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla
+sha256	bd28b0c5aeeb00eb11d3ec6f6f3449d4b3a40100914258332734a53527997526  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt
+sha256	f3f3ecff94537e7d5944fdbae7c6bd02d5eddca8fe1c29d8699ff2e54d26cebc  nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors
+sha256	cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl
+sha256	5f28c11f8b1b3f97b9d42c74b85371ebf4127f241b799279bcecd69f7ee542dc  nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test
\ No newline at end of file
diff --git a/package/linux4tegra/linux4tegra.mk b/package/linux4tegra/linux4tegra.mk
new file mode 100644
index 0000000000..74cb19723e
--- /dev/null
+++ b/package/linux4tegra/linux4tegra.mk
@@ -0,0 +1,114 @@ 
+################################################################################
+#
+# linux4tegra
+#
+################################################################################
+
+LINUX4TEGRA_VERSION = 32.4.3
+LINUX4TEGRA_SITE = https://developer.nvidia.com/embedded/L4T/r32_Release_v4.3/t186ref_release_aarch64
+LINUX4TEGRA_SOURCE = Tegra186_Linux_R$(LINUX4TEGRA_VERSION)_aarch64.tbz2
+
+LINUX4TEGRA_LICENSE = NVIDIA Software License, GPL-2.0, LGPL, Apache-2.0, MIT
+LINUX4TEGRA_LICENSE_FILES = \
+	bootloader/LICENSE \
+	bootloader/LICENSE.adsp \
+	bootloader/LICENSE.bpmp \
+	bootloader/LICENSE.bpmp_t194 \
+	bootloader/LICENSE.camera-rtcpu \
+	bootloader/LICENSE.cboot \
+	bootloader/LICENSE.cboot_t194 \
+	bootloader/LICENSE.chkbdinfo \
+	bootloader/LICENSE.mce_c10_prod_cr \
+	bootloader/LICENSE.mkbctpart \
+	bootloader/LICENSE.mkbootimg \
+	bootloader/LICENSE.mkgpt \
+	bootloader/LICENSE.nv_smd_generator \
+	bootloader/LICENSE.spe.bin \
+	bootloader/LICENSE.spe_t194.bin \
+	bootloader/LICENSE.tos-mon-only.img.arm-trusted-firmware \
+	bootloader/LICENSE.tos-trusty.img.arm-trusted-firmware \
+	bootloader/LICENSE.tos-trusty.img.trusty \
+	bootloader/LICENSE.tos-trusty_t194.img.arm-trusted-firmware \
+	bootloader/LICENSE.tos-trusty_t194.img.trusty \
+	nv_tegra/LICENSE \
+	nv_tegra/LICENSE \
+	nv_tegra/LICENSE.brcm_patchram_plus \
+	nv_tegra/LICENSE.l4t-usb-device-mode-filesystem.img \
+	nv_tegra/LICENSE.libnvargus \
+	nv_tegra/LICENSE.libnvcam_imageencoder \
+	nv_tegra/LICENSE.libnveventlib \
+	nv_tegra/LICENSE.libnvscf \
+	nv_tegra/LICENSE.libnvtracebuf \
+	nv_tegra/LICENSE.libtegrav4l2 \
+	nv_tegra/LICENSE.minigbm \
+	nv_tegra/LICENSE.nvbootctrl \
+	nv_tegra/LICENSE.nvdla \
+	nv_tegra/LICENSE.weston \
+	nv_tegra/LICENSE.weston-data \
+	nv_tegra/nvidia_configs/opt/nvidia/l4t-usb-device-mode/LICENSE.filesystem.img \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.brcm_patchram_plus \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.cypress_wifibt \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvargus \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvcam_imageencoder \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnveventlib \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvtracebuf \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4l2 \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libnvv4lconvert \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libtegrav4l2 \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.libvulkan1 \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.minigbm \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.nvdla \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.realtek_8822ce_wifibt \
+	nv_tegra/nvidia_drivers/usr/share/doc/nvidia-tegra/LICENSE.tegra_sensors \
+	nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.nvbootctrl \
+	nv_tegra/nvidia_tools/usr/share/doc/nvidia-tegra/LICENSE.tipc_test
+
+LINUX4TEGRA_INSTALL_IMAGES = YES
+
+define LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS
+	@mkdir -p $(@D)/nv_tegra/nvidia_drivers
+	$(call suitable-extractor,nvidia_drivers.tbz2) \
+		$(@D)/nv_tegra/nvidia_drivers.tbz2 | \
+		$(TAR) -C $(@D)/nv_tegra/nvidia_drivers $(TAR_OPTIONS) -
+endef
+
+LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_DRIVERS
+
+define LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS
+	@mkdir -p $(@D)/nv_tegra/nvidia_configs
+	$(call suitable-extractor,config.tbz2) \
+		$(@D)/nv_tegra/config.tbz2 | \
+		$(TAR) -C $(@D)/nv_tegra/nvidia_configs $(TAR_OPTIONS) -
+endef
+
+LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_CONFIGS
+
+define LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS
+	@mkdir -p $(@D)/nv_tegra/nvidia_tools
+	$(call suitable-extractor,nv_tools.tbz2) \
+		$(@D)/nv_tegra/nv_tools.tbz2 | \
+		$(TAR) -C $(@D)/nv_tegra/nvidia_tools $(TAR_OPTIONS) -
+endef
+
+LINUX4TEGRA_POST_EXTRACT_HOOKS += LINUX4TEGRA_EXTRACT_NVIDIA_TOOLS
+
+# symlink linux4tegra to the target dir.
+define LINUX4TEGRA_INSTALL_IMAGES_CMDS
+	ln -fs $(@D) $(BINARIES_DIR)/linux4tegra
+endef
+
+LINUX4TEGRA_RSYNC = \
+	rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
+		--chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
+		--keep-dirlinks --exclude=ld.so.conf.d
+
+define LINUX4TEGRA_INSTALL_TARGET_CMDS
+	# install nvidia_drivers
+	$(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_drivers/ $(TARGET_DIR)/
+	# install nvidia_configs
+	$(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_configs/ $(TARGET_DIR)/
+	# install nvidia_tools
+	$(LINUX4TEGRA_RSYNC) $(@D)/nv_tegra/nvidia_tools/ $(TARGET_DIR)/
+endef
+
+$(eval $(generic-package))