mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
When building the out-of-tree drivers with virtualization support disabled, symbols for some of the virtualization functions are not found ... nvgpu: Unknown symbol tegra_hv_mempool_unreserve (err -2) nvgpu: Unknown symbol is_tegra_hypervisor_mode (err -2) nvgpu: Unknown symbol tegra_hv_mempool_reserve (err -2) nvhost_pva: Unknown symbol is_tegra_hypervisor_mode (err -2) mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2) mc_utils: Unknown symbol is_tegra_hypervisor_mode (err -2) Update the hv-ivc.h header to ensure that these function stubs are defined when virtualization support is disabled and only build the hv-ivc driver if virtualization is enabled. Finally, move populating the ccflags to the top-level Makefile and use the subdir-ccflags directive to ensure the ccflags are passed to all sub-directories. Bug 4159372 Bug 4170085 Change-Id: I35edb91007524c3143dff7564f9ad545bd34e969 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2921199 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Build NvSciIpc KMD for DRIVE x86
================================
1) install kernel header package
sudo apt-get install linux-headers-`uname -r`
check version of desktop using "uname -r" command.
kernel version must be 5.4.0+.
2) link common header files (NVIDIA internal dev only)
export NVSCIIPC_INCLUDE=${PWD}/../../../include
ln -s ${NVSCIIPC_INCLUDE}/linux ./
ln -s ${NVSCIIPC_INCLUDE}/uapi ./
3) build
make -C /lib/modules/`uname -r`/build M=${PWD} modules
4) install NvSciIpc KMD
sudo make -C /lib/modules/`uname -r`/build M=${PWD} modules_install
sudo depmod -a
nvsciipc.ko will be installed in /lib/modules/`uname -r`/extra/nvsciipc.ko
[NOTE] If kernel module installation is failed by missing signing key, follow steps below
** create x509.genkey
echo -e "[ req ] \n\
default_bits = 4096 \n\
distinguished_name = req_distinguished_name \n\
prompt = no \n\
x509_extensions = myexts \n\
\n\
[ req_distinguished_name ] \n\
CN = Modules \n\
\n\
[ myexts ] \n\
basicConstraints=critical,CA:FALSE \n\
keyUsage=digitalSignature \n\
subjectKeyIdentifier=hash \n\
authorityKeyIdentifier=keyid" > x509.genkey
** generate signing key
openssl req -new -nodes -utf8 -sha512 -days 36500 -batch -x509 -config x509.genkey -outform DER -out signing_key.x509 -keyout signing_key.pem
** move signing key to kernel module folder of desktop
sudo mv signing_key.* /lib/modules/`uname -r`/build/certs/
5) clean
make -C /lib/modules/`uname -r`/build M=${PWD} clean
6) load NvSciIpc KMD
You can load NvSciIpc KMD during desktop boot.
sudo vi /etc/modules-load.d/modules.conf
add "nvsciipc" to this file
For manual loading KMD, do "sudo insmod nvsciipc.ko"