Jetson Orin Nano kernel build error

Hi
I am trying to build the kernel for the Jetson Orin Nano. I followed the setups mention on https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html. I am getting below error :

/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Unexpected GOT/PLT entries detected!
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: Unexpected run-time procedure linkages detected!
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in function `sync_clear_bit':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:170: undefined reference to `__aarch64_ldclr4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in function `sync_set_bit':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:165: undefined reference to `__aarch64_ldset4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in function `sync_test_and_set_bit':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:160: undefined reference to `__aarch64_ldset4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/misc/eventlib/eventlib_flt.o: in function `sync_clear_bit':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/misc/eventlib/eventlib_flt.h:170: undefined reference to `__aarch64_ldclr4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1781: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1829: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:127: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:156: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/osi_hal.c:1783: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:127: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:156: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/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':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/eqos_core.c:169: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/eqos_core.c:229: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.o: in function `mgbe_handle_mac_intrs':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2260: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2309: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: /media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/mgbe_core.c:2262: undefined reference to `__aarch64_ldadd4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/core_common.o: in function `osi_unlock_irq_enabled':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:156: undefined reference to `__aarch64_cas4_acq_rel'
/media/extended/Om_dev/nvidia/kernel_cc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-ld: drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/osi/core/core_common.o: in function `osi_lock_irq_enabled':
/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/nvethernetrm/include/../osi/common/common.h:127: undefined reference to `__aarch64_cas4_acq_rel'
make[1]: *** [/media/extended/Om_dev/nvidia/kernel_cc/public_sources/Linux_for_Tegra/source/public/kernel_src/kernel/kernel-5.10/Makefile:1211: vmlinux] Error 1
make: *** [Makefile:213: __sub-make] Error 2

Would you please give your help for the same.
Thanks

Did you install and set up for the cross tools? This is a cross compile, and not native on the Jetson, so the tool setup has additional requirements. Thus, statements like this one depend on the tool chain the environment variable points to:
export CROSS_COMPILE_AARCH64_PATH=<toolchain-path>

I see a list of aarch64 missing references (64-bit ARM), which in turn might simply be the tools not being correct. There are also possibilities of trying to compile something without a valid configuration causing this, e.g., some code creates an implementation of a function signature (which is what __aarch64_cas4_acq_rel is), and if you try to build the code that depends on this out of order, it might give a similar message.

The cross tools are critical, and so is the configuration order. Perhaps in cases it refers to out-of-tree content, in which case you might need a different download.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.