SPI build from elinux site failed

Hi, what should i do now? I followed the steps and im using jetpack 4.2 32.1.0 i made the edits necessary but it failed

Thanks

LD kernel/built-in.o

real 2m0.265s
user 5m17.660s
sys 0m26.012s
Make did not build
Retrying …
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[1]: ‘include/generated/mach-types.h’ is up to date.
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
CC arch/arm64/kernel/topology.o
arch/arm64/kernel/topology.c: In function ‘parse_cluster’:
arch/arm64/kernel/topology.c:114:40: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 3 [-Werror=format-truncation=]
snprintf(name, sizeof(name), “cluster%d”, i);
^~
arch/arm64/kernel/topology.c:114:32: note: directive argument in the range [0, 2147483647]
snprintf(name, sizeof(name), “cluster%d”, i);
^~~~~~~~~~~
arch/arm64/kernel/topology.c:114:3: note: ‘snprintf’ output between 9 and 18 bytes into a destination of size 10
snprintf(name, sizeof(name), “cluster%d”, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/topology.c:129:37: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Werror=format-truncation=]
snprintf(name, sizeof(name), “core%d”, i);
^~
arch/arm64/kernel/topology.c:129:32: note: directive argument in the range [0, 2147483647]
snprintf(name, sizeof(name), “core%d”, i);
^~~~~~~~
arch/arm64/kernel/topology.c:129:3: note: ‘snprintf’ output between 6 and 15 bytes into a destination of size 10
snprintf(name, sizeof(name), “core%d”, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/kernel/topology.c:59:39: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 4 [-Werror=format-truncation=]
snprintf(name, sizeof(name), “thread%d”, i);
^~
arch/arm64/kernel/topology.c:59:32: note: directive argument in the range [0, 2147483647]
snprintf(name, sizeof(name), “thread%d”, i);
^~~~~~~~~~
arch/arm64/kernel/topology.c:59:3: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 10
snprintf(name, sizeof(name), “thread%d”, i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
scripts/Makefile.build:261: recipe for target ‘arch/arm64/kernel/topology.o’ failed
make[1]: *** [arch/arm64/kernel/topology.o] Error 1
Makefile:973: recipe for target ‘arch/arm64/kernel’ failed
make: *** [arch/arm64/kernel] Error 2
Make did not successfully build
Please fix issues and retry build
jetson@jetson-desktop:~/buildJetsonTX2Kernel$

Hi LeMoth - sorry for the trouble, we will have our kernel developers look into it and get back to you promptly with next steps to follow.

In the meantime, please do not re-post multiple topics about the same issue as it makes them hard to follow. Thanks for your understanding.

Thanks Dusty,

Could you also please ask them to write proper documentation AND include the SPI by default in the next build? If a hobby grade hardware like the raspberry pi can do it, certainly a jetson should.

I also have a huge compiled list of game breakers for us in case they are interested.

Thanks,
Bimal

What do you mean build from elinux site?
If you what to build customize kernel please have a reference to this document.

[url]Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation

Also reference to below topic for reference.

Hi Shane,

This word document shows me nothing about enabling SPI

Do you have a document with exact steps to follow so I can enable SPI on my Jetson TX2?

I have bricked and re flashed my Jetson 3 times today by following that tutorial on elinux website which is a very bad and dangerous tutorial

Where can I find straightforward instructions to enable SPI on my Jetson TX2 running jet pack 4.2?

Do you have that document please? We are desperately trying to make this work

Right now I have to go to one thread and then go to another to follow newer instructions and it still does not work

Do I really need to recompile the kernel to use SPI? Really? Did you guys think this through when you were designing this device? Did you guys also know that raspberry pi, a far inferior device and cheap hobby kit has SPI… while an expensive Nvidia Jetson does not and we have to recompile the kernel and earn a PhD in Linux administration to be able to use the damn thing.

This is beyond frustrating

For J4.2 you don’t need to rebuild the kernel Image but must edit the dtc like the elinux tell like below.

Update The Device-Tree
Use your text editor of choice to update the DTS that we decompiled above:

 $ sudo gedit myTX2DeviceTreeSource.dts
Make the following patches:

 spi@3240000{
    compatible = "nvidia,tegra186-spi";
    reg = <0x0 0x3240000 0x0 0x10000>;
    ....
    ....
    ....
    linux,phandle = <0x80>;
    spi@0 {
      compatible = "spidev";
      reg = <0x0>;
      spi-max-frequency = <0x1312D00>;
      nvidia,enable-hw-based-cs;
      nvidia,cs-setup-clk-count = <0x1e>;
      nvidia,cs-hold-clk-count = <0x1e>;
      nvidia,rx-clk-tap-delay = <0x1f>;
      nvidia,tx-clk-tap-delay = <0x0>;
    }; 
 };
Recompiling the Device Tree
Use DTC again to recompile the modifying DTS back into the new DTB:

 $ cd /boot/dtb/
 $ sudo dtc -I dts -O dtb -o tegra186-quill-p3310-1000-c03-00-base.dtb extracted_proc.dts
Enabling the New DTB
It's better flash the DTB by flash command instead of modify the extlinux due plugin manager will broken may cause unknow problem like break the network interface. Below is the command flash the DTB only.

 sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

I have done this and it does not work. What is the next step?

When i do this and then try ls /dev/spi* it says cant find file or folder

Also this block of code you pasted from the website is very bad

First you say $ sudo gedit myTX2DeviceTreeSource.dts

and then

$ sudo dtc -I dts -O dtb -o tegra186-quill-p3310-1000-c03-00-base.dtb extracted_proc.dts

???

why 2 different versions of dts files?? Should they not be the same?

right should be the same. Can you update it to help others?

I will update it and maybe also post a full post on how to enable SPI from scratch, if i am able to get it working by end of day

same problem here. Please help. After the make process completes, I cannot create the zImage file in the /usr/src/kernel/kernel-4.4/arch/arm64/boot folder using sudo ./copyImage.sh command.

Hi rahul231444,

Please open a new topic for your issue. Thanks