TX2 dev kit PCIe works with factory flash but not compiled

I tried
./source_sync.sh -k tegra-l4t-r28.2.2
and
./source_sync.sh -k tegra-l4t-r28.2.1

on TX2 and TX2i, but I cannot get my compiled versions to list anything for

lspci

When I freshly install the Jetpack and flash the board, it finds my ethernet card in the 4x slot.

If I compare the working and non-working versions with

dtc -I fs /sys/firmware/devicetree/base >> thisdts

The results look pretty much the same.

            pci@1,0 {
                    reg = <0x800 0x0 0x0 0x0 0x0>;
                    assigned-addresses = <0x82000800 0x0 0x10000000 0x0 0x1000>;
                    device_type = "pci";
                    ranges;
                    status = "okay";
                    #address-cells = <0x3>;
                    #size-cells = <0x2>;
                    nvidia,afi-ctl-offset
                    nvidia,num-lanes = <0x4>;
            };

            pci@2,0 {
                    reg = <0x1000 0x0 0x0 0x0 0x0>;
                    assigned-addresses = <0x82001000 0x0 0x10001000 0x0 0x1000>;
                    device_type = "pci";
                    ranges;
                    status = "disabled";
                    #address-cells = <0x3>;
                    #size-cells = <0x2>;
                    nvidia,afi-ctl-offset = <0x118>;
                    nvidia,num-lanes = <0x0>;
            };

            pci@3,0 {
                    reg = <0x1800 0x0 0x0 0x0 0x0>;
                    assigned-addresses = <0x82001800 0x0 0x10004000 0x0 0x1000>;
                    device_type = "pci";
                    ranges;
                    status = "okay";
                    #address-cells = <0x3>;
                    #size-cells = <0x2>;
                    nvidia,afi-ctl-offset = <0x19c>;
                    nvidia,num-lanes = <0x1>;
            };
    };

Is there some step that applies the p2597 BSP that I am missing in the build process?

I’m using

NVIDIA Tegra Linux Driver Package

Development Guide
28.2 Release

Thanks!!!

Correction

I tried
./source_sync.sh -k tegra-l4t-r28.2.2
and
./source_sync.sh -k tegra-l4t-r28.2.1

I just used ./source_sync.sh and pasted the tags in when it asked for them

Thanks!!

Could you check the kernel name by uname -a

This is what your tegra-l4t-r28.2.1 git tag looks like:

ubuntu@tegra-ubuntu:~$ uname -a
Linux tegra-ubuntu 4.4.38+ #4 SMP PREEMPT Tue Mar 26 13:53:55 MST 2019 aarch64 aarch64 aarch64 GNU/Linux

/etc/nv_tegra_release

R28 (release), REVISION: 2.1, GCID: 11272647, BOARD: t186ref, EABI: aarch64, DATE: Thu May 17 07:29:06 UTC 2018

Makefile:
VERSION = 4
PATCHLEVEL = 4
SUBLEVEL = 38
EXTRAVERSION =
NAME = Blurry Fish Butt

jetson-tx2.conf

p2771-0000-devkit.conf: configuration for T186-A02 te770d-UCM2 Silicon

BPFDTB_FILE=tegra186-a02-bpmp-quill-p3310-1000-a00-00-te770d-ucm2.dtb;

source “${LDK_DIR}/p2771-0000.conf.common”;

jetson-tx2i.conf

p2771-3489-ucm1.conf: configuration for T186-A02 ta795sa Silicon ucm1 profile

BPFDTB_FILE=tegra186-a02-bpmp-storm-p3489-a00-00-ta795sa-ucm1.dtb;
source “${LDK_DIR}/p2771-0000.conf.common”;
SYSBOOTFILE=p2771-0000/extlinux.conf;
EMMC_BCT=P3489_A00_8GB_Samsung_8GB_lpddr4_204Mhz_P134_A02_ECC_en_l4t.cfg
DTB_FILE=tegra186-quill-p3489-1000-a00-00-ucm1.dtb;
TBCDTB_FILE=tegra186-quill-p3489-1000-a00-00-ucm1.dtb;

PROD_CONFIG=“tegra186-mb1-bct-prod-storm-p3489-1000-a00.cfg”;
PINMUX_CONFIG=“tegra186-mb1-bct-pinmux-quill-p3489-1000-a00.cfg”;
PMIC_CONFIG=“tegra186-mb1-bct-pmic-quill-p3489-1000-a00.cfg”;
PMC_CONFIG=“tegra186-mb1-bct-pad-quill-p3489-1000-a00.cfg”;
BOOTROM_CONFIG=“tegra186-mb1-bct-bootrom-quill-p3489-1000-a00.cfg”;

Are you cross-compiling the kernel on an x86 PC and then reflashing with flash.sh, or compiling on Jetson itself?

After compilation, which files are you copying where to install the new kernel; did you also install the matching DTS and module files?

Which compiler are you using?

After you boot Jetson with the new kernel, what PCIe-related messages are seen in the kernel log? Run “dmesg” to see the full log.

I’m using the instructions that came with 28.2.2 -->

NVIDIA_Tegra_Linux_Driver_Package/nvl4t_docs/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html

Kernel Customization instructions from the
NVIDIA Tegra Linux Driver Package

Development Guide
28.2 Release

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j8

sudo cp /home/alphi/TX2/64_TX2/Linux_for_Tegra/kernel-out/kernel/arch/arm64/boot/Image /home/alphi/TX2/64_TX2/Linux_for_Tegra/kernel/Image

sudo cp -r /home/alphi/TX2/64_TX2/Linux_for_Tegra/kernel-out/kernel/arch/arm64/boot/dts/* /home/alphi/TX2/64_TX2/Linux_for_Tegra/kernel/dtb/

sudo ./apply_binaries.sh

sudo ./flash.sh jetson-tx2i mmcblk0p1
or
sudo ./flash.sh jetson-tx2 mmcblk0p1

I used the precompiled toolchain from the download directory.

ubuntu@tegra-ubuntu:~ dmesg|grep pci [ 0.143022] node /plugin-manager/fragment-500-pcie-config match with board >=3310-1000-500 [ 0.143751] node /plugin-manager/fragment-500-e3325-pcie match with board >=3310-1000-500 [ 0.267159] iommu: Adding device 10003000.pcie-controller to group 50 ubuntu@tegra-ubuntu:~ lspci
ubuntu@tegra-ubuntu:~$

The dtb appears to update. I moved the HDMI and fixed the USB for my carrier. When I couldn’t get the PCIe to work, I went back to the dev kit and noticed that it never worked there unless I used the factory image to flash.

Setting the LOCALVERSION by below command while you build the kernel. Please do a clean build.

export LOCALVERSION=-tegra

Bingo!

Thanks!!