I have referred the following links for toolchain and kernel build.
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/AT/JetsonLinuxToolchain.html#at-jetsonlinuxtoolchain
My host PC:
user:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
user:~$
While building the kernel I am facing following error at the end.
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Unexpected GOT/PLT entries detected!
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Unexpected run-time procedure linkages detected!
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in functionsync_clear_bit': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:170: undefined reference to
__aarch64_ldclr4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in functionsync_set_bit': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:165: undefined reference to
__aarch64_ldset4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in functionsync_test_and_set_bit': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:160: undefined reference to
__aarch64_ldset4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in functionsync_clear_bit': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:170: undefined reference to
__aarch64_ldclr4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.o: in functionget_tx_ts': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1781: undefined reference to
__aarch64_ldadd4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1829: undefined reference to__aarch64_ldadd4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.o: in function
osi_lock_irq_enabled’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/…/osi/common/common.h:127: undefined reference to__aarch64_cas4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.o: in function
osi_unlock_irq_enabled’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/…/osi/common/common.h:156: undefined reference to__aarch64_cas4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.o: in function
get_tx_ts’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1783: undefined reference to__aarch64_ldadd4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/macsec.o: in function
osi_lock_irq_enabled’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/…/osi/common/common.h:127: undefined reference to__aarch64_cas4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/macsec.o: in function
osi_unlock_irq_enabled’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/…/osi/common/common.h:156: undefined reference to__aarch64_cas4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/eqos_core.o: in function
eqos_pad_calibrate’:
/home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/eqos_core.c:169: undefined reference to__aarch64_cas4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/eqos_core.c:229: undefined reference to
__aarch64_cas4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.o: in functionmgbe_handle_mac_intrs': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2260: undefined reference to
__aarch64_ldadd4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2309: undefined reference to__aarch64_ldadd4_acq_rel' /home/user/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2262: undefined reference to
__aarch64_ldadd4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/core_common.o: in functionosi_unlock_irq_enabled': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:156: undefined reference to
__aarch64_cas4_acq_rel’
/home/user/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/core_common.o: in functionosi_lock_irq_enabled': /home/user/Orin/Linux_for_Tegra/source/public/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:127: undefined reference to
__aarch64_cas4_acq_rel’
make[1]: *** [/home/user/Orin/Linux_for_Tegra/source/public/kernel/kernel-5.10/Makefile:1211: vmlinux] Error 1
make: *** [Makefile:213: __sub-make] Error 2