LSE atomics not supported by binutils

Hi - I’m trying to build a kernel on my Jetson Nano 2GB to include HDMI to CSI driver (for the Toshiba TC358743 chip) in the device tree and I’m using this webpage as a resource.

When I get to the “Combining kernel and dtb” section and run this line:

make -C kernel/kernel-4.9/ ARCH=arm64 O=$TEGRA_KERNEL_OUT LOCALVERSION=-tegra CROSS_COMPILE=${TOOLCHAIN_PREFIX} -j8 --output-sync=target zImage

I get this output:

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

arch/arm64/Makefile:49: LSE atomics not supported by binutils

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/gcc-version.sh: line 25: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot execute binary file: Exec format error

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/gcc-version.sh: line 26: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot execute binary file: Exec format error

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

GEN ./Makefile

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

CHK include/config/kernel.release

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

CHK include/generated/uapi/linux/version.h

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

CHK include/generated/utsrelease.h

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

make[1]: Entering directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

Using /home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9 as source for kernel

make[1]: Leaving directory '/home/bsg1/Linux_for_Tegra/source/public/build'

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: cannot open @@: No such file

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: ELF: not found

/home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: 3: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Syntax error: "(" unexpected

CC scripts/mod/empty.o

/bin/sh: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:335: recipe for target 'scripts/mod/empty.o' failed

make[3]: *** [scripts/mod/empty.o] Error 2

make[3]: *** Waiting for unfinished jobs....

CC scripts/mod/devicetable-offsets.s

/bin/sh: 1: /home/bsg1/l4t-gcc/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc: Exec format error

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:155: recipe for target 'scripts/mod/devicetable-offsets.s' failed

make[3]: *** [scripts/mod/devicetable-offsets.s] Error 2

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:649: recipe for target 'scripts/mod' failed

make[2]: *** [scripts/mod] Error 2

make[2]: *** Waiting for unfinished jobs....

/home/bsg1/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:579: recipe for target 'scripts' failed

make[1]: *** [scripts] Error 2

Makefile:171: recipe for target 'sub-make' failed

make: *** [sub-make] Error 2

Does the message LSE atomics not supported by binutils indicate what the issue is? I searched around for this but couldn’t find any solutions that helped.

Thanks in advance!
Jamie

When building natively you should avoid setting ARCH (and CROSS_COMPILE). You’re basically telling the software that aarch64 is foreign. Can you make clean and then try again without ARCH and without CROSS_COMPILE?

Next, zImage format has not been supported past 32-bit systems. You’ll actually build Image, and use the Image file for boot. Those other formats (such as zImage) are just compressed or modified versions of Image.

Thanks so much! That line of code runs now after re-flashing my SD card with jetpack 4.4.1 and went through the process of building a kernel.

I have another question though. How do I enable the driver I’m interested in? Instructions I read says that I need to make menuconfig by running:

make O=$KERNEL_OUT menuconfig

and then it will allow me to select the Toshiba TC35873 decoder

I changed it to:

make -C kernel/kernel-4.9/ O=$KERNEL_OUT LOCALVERSION=-tegra menuconfig

based on your suggestions from earlier. When I run this I get this fatal error:

make: Entering directory '/home/bsg1/l4t-gcc/Linux_for_Tegra/source/public/kernel/kernel-4.9'

HOSTCC scripts/basic/fixdep

HOSTCC scripts/kconfig/mconf.o

<command-line>:0:12: fatal error: curses.h: No such file or directory

compilation terminated.

scripts/Makefile.host:118: recipe for target 'scripts/kconfig/mconf.o' failed

make[1]: *** [scripts/kconfig/mconf.o] Error 1

Makefile:565: recipe for target 'menuconfig' failed

make: *** [menuconfig] Error 2

make: Leaving directory '/home/bsg1/l4t-gcc/Linux_for_Tegra/source/public/kernel/kernel-4.9'

So another very important question - do I run:

make menuconfig

before or after I run

make Image

?

Thanks in advance!
Jamie

Your procedure is ok, but you are missing a package. To add:
sudo apt-get install libncurses5-dev

Basically the menu based editors are compiled as they are used, so you need the “dev” version of the older ncurses library.

Tip: Also try nconfig. This adds a “symbol search” function.