Hi,
I have designed and built a TX1 carrier board that has, among other components, three Raspberry Pi camera connectors. I want to build a custom u-boot/kernel to interface with these cameras.
I am relatively new to porting the kernel but have read through the driver documentation as well as other resources and written myself a guide. If you’re interested here it is:
http://cospandesign.github.io/linux/2016/04/11/tx1-bringup.html
I can boot into userland
Fortunately everything is booting with a custom u-boot and custom kernel but not everything is as I expected.
The major issue is that the root ‘compatible’ value is ‘nvidia,jetson_cv’ and not ‘nvidia,mit_uav_reva’
Custom extlinux.conf
I’ve created and used a new extlinux.conf.emmc to configure the u-boot → kernel handoff, specifying my DTB file
Here is what it looks like:
TIMEOUT 30
DEFAULT primary
MENU TITLE mit-uav-reva eMMC boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-mit-uav-reva.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=${lp0_vec} nvdumper_reserved=${nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait
Here is an excerpt from my base dts file (which is referenced in my tegra210-mit-uav-reva.dts file).
arch/arm64/boot/dts/tegra210-jetson-cv-base-mit-uav-reva.dts
...
#include "tegra210-common.dtsi"
#include "tegra210-platforms/tegra210-audio.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-power-tree-p2597-2180-a00.dtsi"
//#include "tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi"
#include "tegra210-platforms/tegra210-mit-uav-reva-pinmux.dtsi"
#include "tegra210-platforms/tegra210-pinmux-drive-sdmmc-common.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-prods.dtsi"
#include "tegra210-platforms/tegra210-comms-p2530-0930.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-camera-modules.dtsi"
#include "tegra210-platforms/tegra210-pwm-fan-p2530-0930.dtsi"
#include "panel-a-wuxga-8-0.dtsi"
#include "panel-a-edp-1080p-14-0.dtsi"
#include "panel-s-edp-uhdtv-15-6.dtsi"
#include "panel-s-wqxga-10-1.dtsi"
#include "tegra210-platforms/tegra210-ers-hdmi-e2190-1100-a00.dtsi"
#include "tegra210-platforms/tegra210-sdhci.dtsi"
#include "tegra210-platforms/tegra210-p2180-common.dtsi"
#include "tegra210-platforms/tegra210-thermal-fan-est-p2530-0930.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-keys-p2597-2180-a00.dtsi"
#include <dt-bindings/iio/meter/ina3221x.h>
#include "tegra210-platforms/tegra210-foster-e-extcon-p2530-0930-e01.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-emc-p2180-1000-a00.dtsi"
#include "tegra210-platforms/tegra210-edp.dtsi"
#include "tegra210-platforms/tegra210-sysedp.dtsi"
#include "tegra210-platforms/tegra210-thermal-nct72-p2530.dtsi"
#include "tegra210-platforms/tegra210-thermal-Tboard-Tdiode.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-powermon-p2180-1000-a00.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-powermon-p2597.dtsi"
#include "tegra210-platforms/tegra210-jetson-cpufreq.dtsi"
#include "tegra210-platforms/tegra210-overrides/tegra210-power-dvfs-override-ucm1c.dtsi"
#include "tegra210-platforms/tegra210-jetson-cv-super-module-e2614.dtsi"
#include "tegra210-plugin-manager/tegra210-jetson-cv-eeprom-manager.dtsi"
//#include "tegra210-plugin-manager/tegra210-jetson-cv-plugin-manager.dtsi"
#include "tegra210-plugin-manager/tegra210-mit-uav-reva-plugin-manager.dtsi"
/ {
model = "jetson_cv";
compatible = "nvidia,mit-uav-reva", "nvidia,tegra210";
nvidia,dtsfilename = __FILE__;
nvidia,boardids = "C594:2180:A0";
nvidia,proc-boardid = "C594:2180:A0";
nvidia,pmu-boardid = "C594:2180:A0";
#address-cells = <2>;
#size-cells = <2>;
...
After I boot into userland I can navigate to /proc/device-tree and execute:
printf "nvidia,boardids: `cat nvidia,boardid`\n"
Which, correctly outputs this:
nvidia,boardids: C594:2180:A0
As apposed to what is declared with the default dts (tegra210-jetson-cv-base-p2597-2180-a00.dtb)
nvidia,boardids: 2597:2180:A0
So I know that my DTS/DTB is correctly being read but what I don’t understand is why when I output
printf "compatible: `cat compatible`\n"
I get this
nvidia,jetson-cv
What’s wrong? Is there something incorrectly specified in the bootloader. If I were to halt u-boot before I boot the kernel I can use ‘printenv’ to see this
Tegra210 (UAV-REVA-2180) # printenv
arch=arm
baudrate=115200
board=mit-uav-reva
board_name=mit-uav-reva
boot_a_script=load ${devtype} ${devnum}:${bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
boot_extlinux=sysboot ${devtype} ${devnum}:${bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
boot_net_usb_start=usb start
boot_prefixes=/ /boot/
boot_script_dhcp=boot.scr.uimg
boot_scripts=boot.scr.uimg boot.scr
boot_targets=mmc1 mmc0 usb0 pxe dhcp
bootcmd=run distro_bootcmd
bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi
bootcmd_mmc0=setenv devnum 0; run mmc_boot
bootcmd_mmc1=setenv devnum 1; run mmc_boot
bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
bootcmd_usb0=setenv devnum 0; run usb_boot
bootdelay=2
cpu=armv8
distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
fdt_addr_r=0x82000000
fdt_copy_node_names=/memory-controller@7001b000
fdt_copy_src_addr=0x83080000
fdt_high=ffffffffffffffff
initrd_high=ffffffffffffffff
kernel_addr_r=0x80080000
loadaddr=0x80080000
lp0_vec=0x1000@0xff2bf000
mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
nvdumper_reserved=0xff23f000
pxefile_addr_r=0x90100000
ramdisk_addr_r=0x83100000
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${bootpart} bootfstype; then run scan_dev_for_boot; fi; done
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scriptaddr=0x90000000
soc=tegra210
stderr=serial
stdin=serial
stdout=serial
usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
vendor=nvidia
Environment size: 2381/8188 bytes
Tegra210 (UAV-REVA-2180) #
I’m sure some Linux guru can point me in the right direction.
Any help would be greatly appreciated.
Thanks,
Dave