LSE atomics not supported by binutils

Hi,I am tring to build my own kernel for Jetson nano 4G.The build steps as follow :
1./home$ sudo wget

2./home$ sudo tar -xvf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

3./home$ sudo wget

4./home$ sudo tar -xjf public_sources.tbz2

5./home$ cd Linux_for_Tegra/source/public/

6./home/Linux_for_Tegra/source/public$ sudo tar -xjf kernel_src.tbz2

7./home/Linux_for_Tegra/source/public$ sudo apt install build-essential bc

8./home/Linux_for_Tegra/source/public$ TEGRA_KERNEL_OUT=/home/kernel_out

9./home/Linux_for_Tegra/source/public$ export CROSS_COMPILE=/home/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-

10./home/Linux_for_Tegra/source/public$ export LOCALVERSION=-tegra

11./home/Linux_for_Tegra/source/public$ cd kernel/kernel-4.9/

12./home/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo mkdir -p $TEGRA_KERNEL_OUT

13./home/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig

14./home/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT

when I excute the final steps 14. I get the follow log:

arch/arm64/Makefile:49: LSE atomics not supported by binutils
  CHK     include/config/kernel.release
  Using /home/Linux_for_Tegra/source/public/kernel/kernel-4.9 as source for kernel
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      kernel/bounds.s
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
/home/Linux_for_Tegra/source/public/kernel/kernel-4.9/./Kbuild:20: recipe for target 'kernel/bounds.s' failed
make[2]: *** [kernel/bounds.s] Error 1
/home/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:1167: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory '/home/kernel_out'
Makefile:171: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

I see Jetson Nano kernel build error

I could only suggest to follow NVIDIA Jetson Linux Driver Package Software Features : Kernel Customization | NVIDIA Docs, and those source and toolchain from Jetson Linux R32.7.1 Release Page | NVIDIA Developer

Hi kayccc , *I did follow this document…

Don’t use sudo for all of your command.
Extract the public_sources.tbz2 without sudo and make it without sudo again.

Hi ShaneCCC,
Thank you so much ,I have built it successful!

I had another problem installing kernel modules
1.root@VM-12-5-ubuntu:~# tar -xjf Jetson-210_Linux_R32.7.1_aarch64.tbz2

2.root@VM-12-5-ubuntu:~# cd Linux_for_Tgera/rootfs

3.root@VM-12-5-ubuntu:~/Linux_for_Tegra/rootfs# sudo tar -jxpf …/…/Tegra_Linux_Sample-Root-Filesystem_R32.7.1_aarch64.tbz2

4.root@VM-12-5-ubuntu:~/Linux_for_Tegra/rootfs# cd …
root@VM-12-5-ubuntu:~/Linux_for_Tegra# sudo ./

5.root@VM-12-5-ubuntu:~/Linux_for_Tegra# cp /home/kernel_out/arch/arm64/boot/Image kernel/Image

6.root@VM-12-5-ubuntu:~/Linux_for_Tegra# cp -r /home/kernel_out/arch/arm64/boot/dts/* kernel/dtb/

7.sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT modules_install \ INSTALL_MOD_PATH=/root/Linux_for_Tegra/rootfs/

And TEGRA_KERNEL_OUT is a dictory :/home/kernel_out
When I excute the steps 7 ,I got a error:

make: *** No rule to make target 'modules_install'.  Stop.

Could you give some suggestion? I appreciate it

Should be NSTALL_MOD_PATH=~/Linux_for_Tegra/rootfs/

I tired sudo make ARCH=aarm64 O=$TEGRA_KERNEL_OUT modules_install \ INSTALL_MOD_PATH=~/Linux_for_Tegra/rootfs/

the error still appeared.

Should be below command.

sudo make ARCH=aarm64 O=$TEGRA_KERNEL_OUT modules_install ~/Linux_for_Tegra/rootfs/

FYI, if you add a line before and after your code or logs which is entirely three backquotes (the “`” character, next to the “1” key at the upper left of the keyboard), then it’ll add scrollbars and preserve whitespace and make it easier to read. Example:
…some log or code…

You can click on the “pencil” icon on one of your existing posts to edit and add that line above and below any log and it’ll be easier to read. Or mouse highlight it and click the “code” icon (“</>”).

Instead of adding “ARCH=arm64” try to instead export this:
export ARCH=arm64
…and then compile without naming that in command line. Sometimes the LSE atomics is mentioned when the wrong architecture is found (or if a version of something is far enough off), and I just want to make sure that the “ARCH=arm64” is actually interpreted correctly. Prior to build make sure the following appear correct in output:

echo $ARCH

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