r21.8 build uboot/kernel error

Hello,
I build r21.8 uboot source.there will be error:

{standard input}: Assembler messages:
{standard input}:46: Error: selected processor does not support ARM mode `smc #0'
scripts/Makefile.build:278: recipe for target 'arch/arm/mach-tegra/pmc.o' failed
make[1]: *** [arch/arm/mach-tegra/pmc.o] Error 1
Makefile:1363: recipe for target 'arch/arm/mach-tegra' failed
make: *** [arch/arm/mach-tegra] Error 2

the command I use to build uboot is:

$ cd u-boot/
$ export ARCH=arm
$ export CROSS_COMPILE=.../bin/arm-unknown-linux-gnueabi-
$ make distclean
$ make jetson-tk1_defconfig
$ make

the same, when I build kernel, there will be error:

/tmp/ccIqo18o.s: Assembler messages:
/tmp/ccIqo18o.s:256: Error: selected processor does not support ARM mode `smc #0'
/home/tim/pcpartner/ftp/temp/0121/tk1_r21-8/kernel/scripts/Makefile.build:308: recipe for target 'drivers/platform/tegra/pmc.o' failed
make[4]: *** [drivers/platform/tegra/pmc.o] Error 1
/home/tim/pcpartner/ftp/temp/0121/tk1_r21-8/kernel/scripts/Makefile.build:455: recipe for target 'drivers/platform/tegra' failed
make[3]: *** [drivers/platform/tegra] Error 2
/home/tim/pcpartner/ftp/temp/0121/tk1_r21-8/kernel/scripts/Makefile.build:455: recipe for target 'drivers/platform' failed
make[2]: *** [drivers/platform] Error 2
/home/tim/pcpartner/ftp/temp/0121/tk1_r21-8/kernel/Makefile:800: recipe for target 'drivers' failed
make[1]: *** [drivers] Error 2
Makefile:130: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

How can I fix it?
Thanks!

What is the specific compiler release version?

/where/ever/it/is/bin/arm-unknown-linux-gnueabi-<b>gcc --version</b>

I’m guessing your compiler is relatively new, and the code itself is from before that release existed. Back then everything used for that software was around gcc 4.7 or 4.8. If this is from a release version of 5 or newer, then you might be able to add something prior to error points, e.g., the code which attempts compile to produce “/tmp/ccIqo18o.s:256”, but using an earlier release may be easier (see this about adding code: http://ding34.blogspot.com/2013/05/error-selected-processor-does-not.html). The binary version of those releases should be available in the Documentation center downloads.

I do not know for certain though this is the problem; if it is, look for gcc here (you’ll need to go to the link, log in, and then go to the link again since redirect does not work):
https://developer.nvidia.com/embedded/downloads#?search=gcc%20tool%20chain%20for%2032-bit

Then look for the oldest 32-bit release, R24.2.1. This is the time when there was a transition from 32-bit to 64-bit. The bootloader code itself remained 32.bit.

Hi All,
We follow the solution in the web site http://ding34.blogspot.com/2013/05/error-selected-processor-does-not.html. Add the line “asm(”.arch_extension sec\n\t");" and recompile the u-boot. The issue is fixed. But the system is hang on when we use the u-boot compiled by ourselves. The messages show on the console is

U-Boot SPL 2018.05 (Jan 22 2020 - 15:23:54 +0800)
Trying to boot from RAM

Could Nvidia share the steps for compiling the U-boot ?

Any suggestion is appreciated!

I can’t answer from the TK1 side, but you might still want to mention the version of the cross compiler you are using. If not the older 32-bit chain mentioned above, then you might want to try the same thing with that compiler. There have been a lot of changes to older bare metal compilers.

Hi All,

Thanks for reply, I used the oldest 32-bit release R24.2.1 gcc tool chain to compile the u-boot, but the system still hang on after flash it.

I also found that if I used the Code Sourcery ARM toolchain 2009q1-203 to compile the R21.8 u-boot, it could be compiled successfully without changed any u-boot codes. But it still have same problem.

Any suggestion is appreciated!

In summary, for R21.8, with “make jetson-tk1_defconfig”, with the gcc 4.8 arm32 compiler, you get compile, but boot fails.

I could not tell you specifically how to flash for that, but I believe installing the bootloader in R21.8 did not need signing and was perhaps from simpler times, so I doubt the error is the install procedure. Even so, how did you flash the image? Also, what is the exact byte size of the image, and what is the partition size where the image went?

Next, can you post a serial console of the boot with the new/failing U-Boot?

Hi All,

We will discuss this issue at the topic as show below:

https://devtalk.nvidia.com/default/topic/1070868/jetson-tk1/tk1-r21-8-uboot-hang-on-issue/

thanks.

For reference, NVIDIA internally used gcc 4.5.3 compiled with crosstool-ng to create the U-Boot binary in L4T r21.x.

I have tracked down the docs re: how to build the toolchain that we use:

Download the Documentation package from the most recent release that contains docs:

https://developer.nvidia.com/linux-tegra-r215

Extract that package, view “Start_Linux_for_Tegra_Docs.html” in a browser, the use the menu on the left of the page to view “Building Hardfp Crosstool-ng Toolchain and glibc”.

At https://developer.nvidia.com/embedded/downloads we have published updated instructions re: how to build the officially supported toolchain for L4T r21 source compilation. See “L4T r21x Toolchain Compilation Correction Notice New” on the download site.