From 9f3b345b06c58d2826cf68d3da876dc062caab01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Fri, 14 Apr 2023 23:17:41 +0000 Subject: [PATCH] Initial support for NVIDIA Tegra live-build/auto/config: - for Ubuntu Server live images and the arm64+tegra full arch, build a tegra variant with linux-nvidia-tegra as the flavor and linux-nvidia-tegra as the kernel meta-package - default to nvidia-$SUBARCH as the kernel flavor for all images using arm64+tegra as full arch hooks/03-kernel-metapkg.chroot_early: - use linux-nvidia-tegra as kernel meta-package for the nvidia-tegra flavor --- live-build/auto/config | 11 +++++++++++ .../hooks/03-kernel-metapkg.chroot_early | 2 ++ 2 files changed, 13 insertions(+) diff --git a/live-build/auto/config b/live-build/auto/config index a0a76838..0a2598cf 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -969,6 +969,9 @@ case $PROJECT in intel-iot) variants='intel' ;; + tegra) + variants='tegra' + ;; *) # variants='ga hwe' variants='ga' @@ -985,6 +988,9 @@ case $PROJECT in elif [ "$variant" = "intel" ]; then kernel_metapkg=linux-intel-iotg flavor=intel-iotg + elif [ "$variant" = "tegra" ]; then + kernel_metapkg=linux-nvidia-tegra + flavor=nvidia-tegra else echo "bogus variant: $variant" exit 1 @@ -1237,6 +1243,11 @@ case "$ARCH${SUBARCH:++$SUBARCH}" in add_package install linux-firmware-raspi pi-bluetooth u-boot-rpi u-boot-tools BINARY_REMOVE_LINUX=false ;; + arm64+tegra) + # Common configuration for all NVIDIA Tegra image variants (server, + # desktop etc.) + KERNEL_FLAVOURS="nvidia-$SUBARCH" + ;; riscv*+*) if [ "${SUBARCH:-}" = "licheerv" ]; then # The wifi driver of the licheerv is an out-of-tree driver packaged diff --git a/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early index a6a19f86..ed02f8b6 100755 --- a/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early +++ b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early @@ -13,6 +13,8 @@ case $PASS in kernel_metapkg=linux-generic-hwe-$(lsb_release -sr) elif [ "$flavor" = "intel-iotg" ]; then kernel_metapkg=linux-intel-iotg + elif [ "$flavor" = "nvidia-tegra" ]; then + kernel_metapkg=linux-nvidia-tegra else echo "bogus flavor: $flavor" exit 1