about kernel

I always suggest that you take the default install and save a copy of “/proc/config.gz” to use as the initial starting config. “tegra21_defconfig” in theory will work, but is not necessarily the same as the current running system.

The CONFIG_LOCALVERSION is probably the reason for the failure unless you also built and installed modules. What do you see from “uname -r”? Do you see modules located at:

/lib/modules/$(uname -r)/

Modules are always searched for at the above location. “uname -r” is a combination of the base kernel version and the CONFIG_LOCALVERSION. So if your kernel version is “4.4.38”, and if you have:

CONFIG_LOCALVERSION="-tegra"

…then “uname -r” would be “4.4.38-tegra”. Not matching that would imply a kernel unable to find its modules.

Can you verify your “uname -r” and whether modules exist there? If that is in place, then you can debug, but if not, then you can’t be sure of any bugs being from actual code. If you still have errors, then it would also be good to know what change might have been made from the default config.

hi,Thank you very much for your patience.I just compiled the source code.
Running instructions on board

/lib/modules/$(uname -r)/

kernel version is “4.4.159”.The display is normal.
Later I Added in"tegra21_defconfig" file

CONFIG_LOCALVERSION="-tegra"

kernel version is “4.4.159-Tegra”.The display is normal.
Then I add the modified file and write it in “tegra21_defconfig” file.

CONFIG_VIDEO_TC358748=y

Recompile and download
The following print message will appear. Keep rebooting

[    3.354257] isp 54600000.isp: initialized
[    3.355626] isp 54680000.isp: initialized
[    3.358883] mmcblk0: mmc0:0001 016G32 14.7 GiB 
[    3.359267] clk_cbus_recalc_rate: no gbus parent
[    3.359273] clk_cbus_round_rate: no gbus parent
[    3.359277] clk_cbus_round_rate: no gbus parent
[    3.359285] clk_cbus_recalc_rate: no gbus parent
[    3.369410] clk_cbus_recalc_rate: no gbus parent
[    3.369415] clk_cbus_round_rate: no gbus parent
[    3.369418] clk_cbus_round_rate: no gbus parent
[    3.369424] clk_cbus_recalc_rate: no gbus parent
[    3.369449] tegra_dvfs: GPU-cap: registered
[    3.369536] tegra dvfs: vdd-cpu: nominal 1226mV, offset 708000uV, step 19200uV, scaling enabled
[    3.369540] tegra dvfs: vdd-core: nominal 1075mV, offset 600000uV, step 12500uV, scaling enabled
[    3.369544] tegra dvfs: vdd-gpu: nominal 1090mV, offset 710000uV, step 10000uV, scaling enabled
[    3.380966] mmcblk0rpmb: mmc0:0001 016G32 partition 3 4.00 MiB
[    3.434773]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19
[    3.466147] tegra_dvfs: vdd-gpu-vts: registered
[    3.470811] xhci-tegra 70090000.xusb: can't get usb3-0 phy (-517)
[    3.471567] tegra21x-padctl-uphy 7009f000.pinctrl: padctl mmio start 0x000000007009f000 end 0x000000007009ffff
[    3.471578] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_SKU_CALIB_0 0x71c740e
[    3.471586] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_USB_CALIB_EXT_0 0x4
[    3.472816] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-0 is used by XUSB
[    3.472825] tegra21x-padctl-uphy 7009f000.pinctrl: using UTMI port 0 for otg
[    3.472833] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-2 is used by XUSB
[    3.472847] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
[    3.472861] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 1 maps to USB2 port 2
[    3.472868] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-1 is used by XUSB
[    3.472880] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
[    3.472892] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 0 maps to USB2 port 1
[    3.472907] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 1, set pcie_lanes = 0x2
[    3.472924] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 2, set pcie_lanes = 0x6
[    3.472940] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 3, set pcie_lanes = 0xe
[    3.472956] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 4, set pcie_lanes = 0x1e
[    3.472972] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 0, set pcie_lanes = 0x1f
[    3.472990] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 7, set sata_lanes = 0x80
[    3.473656] usb-vbus1: supplied by vdd-3v3
[    3.476036] tegra21x-padctl-uphy 7009f000.pinctrl: Done tegra21x_padctl_uphy_probe
[    3.478625] tegra-pcie 1003000.pcie-controller: 4x1, 1x1 configuration
[    3.478866] tegra-pcie 1003000.pcie-controller: PCIE: Enable power rails
[    3.479600] clk_cbus_round_rate: no gbus parent
[    3.479607] tegra_gpu_edp gpu_edp: unable to get max GPU freq
[    3.480004] tegra-pcie 1003000.pcie-controller: probing port 0, using 4 lanes
[    3.481898] gk20a 57000000.gpu: GPCPLL initial settings: NA mode, M=1, N=34, P=3
[    3.482216] tegra-pcie 1003000.pcie-controller: probing port 1, using 1 lanes
[    3.483056] gk20a 57000000.gpu: failed to allocate secure buffer -12
[    3.483575] tegra-ahci 70027000.sata: Missing devslp-active state
[    3.492072] tegra-ahci 70027000.sata: AHCI 0001.0301 32 slots 2 ports 3 Gbps 0x1 impl platform mode
[    3.492083] tegra-ahci 70027000.sata: flags: 64bit ncq sntf pm led pmp pio slum part deso sadm apst 
[    3.493274] scsi host0: tegra_ahci
[    3.493681] scsi host1: tegra_ahci
[    3.493907] ata1: SATA max UDMA/133 mmio [mem 0x70027000-0x70028fff] port 0x100 irq 114
[    3.493911] ata2: DUMMY
[    3.497130] tegra-xudc-new 700d0000.xudc: USB charger detection disabled
[    3.497242] tegra-xudc-new 700d0000.xudc: device mode on
[    3.525714] tegra_core_action core_dvfs_cdev_floor: Tegra CORE DVFS 'floor cooling device' registered
[    3.535125] input: tegra-hda HDMI/DP,pcm=3 as /devices/70030000.hda/sound/card0/input0
[    3.545388] tegra_core_action core_dvfs_cdev_cap: Tegra CORE DVFS 'cap cooling device' registered
[    3.545831] tegra_dfll_action dfll-cdev-cap: Tegra DFLL 'cap cooling device' registered
[    3.564000] tegra_dfll_action dfll-cdev-floor: Tegra DFLL 'floor cooling device' registered
[    3.565030] tegra124-dfll 70110000.clock: entered closed loop mode
[    3.569081] xhci-tegra 70090000.xusb: UTMI port 0 has OTG_CAP
[    3.569083] xhci-tegra 70090000.xusb: No USB3 port has OTG_CAP
[    3.572361] xhci-tegra 70090000.xusb: Direct firmware load for tegra21x_xusb_firmware failed with error -2
[    3.572363] xhci-tegra 70090000.xusb: Falling back to user helper
[    3.606863] input: gpio-keys as /devices/gpio-keys/input/input2
[    3.655825] tegra_rtc 7000e000.rtc: setting system clock to 2019-07-15 06:15:05 UTC (1563171305)
[    3.656506] vi 54080000.vi: vi_probe: ++
[    3.814257] ata1: SATA link down (SStatus 0 SControl 300)
[    3.892420] vi 54080000.vi: initialized
[    3.910261] tegra-pcie 1003000.pcie-controller: link 0 down, retrying
[    4.025581] vi 54080000.vi: subdev nvcsi-0 bound
[    4.025584] vi 54080000.vi: subdev tc358748_mipi 6-000e bound
[    4.025651] Unable to handle kernel NULL pointer dereference at virtual address 00000178
[    4.025652] pgd = ffffffc0015fa000
[    4.025657] [00000178] *pgd=000000017a5d8003, *pud=000000017a5d8003, *pmd=000000017a5d9003, *pte=00e8000050041707
[    4.025660] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[    4.025663] Modules linked in:
[    4.025666] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.159-tegra #1
[    4.025667] Hardware name: jetson_tx1 (DT)
[    4.025669] task: ffffffc0fa6f0000 ti: ffffffc0fa6a4000 task.ti: ffffffc0fa6a4000
[    4.025676] PC is at find_matching_color_fmt+0x10/0xa4
[    4.025678] LR is at camera_common_enum_mbus_code+0x44/0xb4
[    4.025680] pc : [<ffffffc0007b6d70>] lr : [<ffffffc0007b6e48>] pstate: 20000045
[    4.025681] sp : ffffffc0fa6a7830
[    4.025684] x29: ffffffc0fa6a7840 x28: 0000000000000018 
[    4.025686] x27: ffffffc0010f1fd0 x26: ffffffc0010f1fd8 
[    4.025689] x25: ffffffc0f8bde050 x24: ffffffc0f8bde050 
[    4.025691] x23: ffffffc07d373be8 x22: ffffffc07d373018 
[    4.025693] x21: ffffffc0fa6a7908 x20: ffffffc0f906cc20 
[    4.025695] x19: ffffffc07d373018 x18: 0000000000000000 
[    4.025697] x17: 0000000000000000 x16: 0000000000000000 
[    4.025699] x15: 0000000000000000 x14: 0fffffffffffffff 
[    4.025701] x13: 0000000000000020 x12: 0101010101010101 
[    4.025703] x11: ffffffc000c5f000 x10: fefefeff64636e6c 
[    4.025705] x9 : 00000000ffffffff x8 : 000000000000fffe 
[    4.025707] x7 : 000000000000008d x6 : 0000000000000002 
[    4.025709] x5 : ffffffc000bdca68 x4 : 000000000000006d 
[    4.025711] x3 : 0000000000000000 x2 : 0000000000000000 
[    4.025713] x1 : 0000000000000000 x0 : 0000000000000170 
[    4.025714] 
[    4.025715] Process swapper/0 (pid: 1, stack limit = 0xffffffc0fa6a4020)
[    4.025716] Call trace:
[    4.025720] [<ffffffc0007b6d70>] find_matching_color_fmt+0x10/0xa4
[    4.025723] [<ffffffc0007ad76c>] tegra_channel_fmts_bitmap_init+0xa8/0x1f4
[    4.025726] [<ffffffc0007aebd8>] tegra_channel_init_subdevices+0x144/0x648
[    4.025729] [<ffffffc0007afed8>] tegra_vi_graph_notify_complete+0x588/0x60c
[    4.025731] [<ffffffc00079a644>] v4l2_async_test_notify+0xe8/0x100
[    4.025733] [<ffffffc00079a788>] v4l2_async_notifier_register+0x12c/0x17c
[    4.025735] [<ffffffc0007b0790>] tegra_vi_graph_init+0x1dc/0x278
[    4.025737] [<ffffffc0007ac914>] tegra_vi_media_controller_init+0x150/0x1dc
[    4.025740] [<ffffffc0007ba2fc>] vi_probe+0x448/0x4e8
[    4.025744] [<ffffffc0005f7494>] platform_drv_probe+0x50/0xb0
[    4.025748] [<ffffffc0005f5190>] driver_probe_device+0x178/0x3b4
[    4.025750] [<ffffffc0005f5430>] __driver_attach+0x64/0x90
[    4.025753] [<ffffffc0005f3158>] bus_for_each_dev+0x50/0x9c
[    4.025756] [<ffffffc0005f4bd4>] driver_attach+0x20/0x28
[    4.025758] [<ffffffc0005f4594>] bus_add_driver+0x130/0x25c
[    4.025761] [<ffffffc0005f6278>] driver_register+0x98/0xe0
[    4.025763] [<ffffffc0005f73f0>] __platform_driver_register+0x54/0x5c
[    4.025767] [<ffffffc001230278>] vi_init+0x2c/0x38
[    4.025770] [<ffffffc000081448>] do_one_initcall+0x110/0x1c4
[    4.025775] [<ffffffc0011f0b98>] kernel_init_freeable+0x1e4/0x290
[    4.025779] [<ffffffc000b819b4>] kernel_init+0x10/0xdc
[    4.025782] [<ffffffc0000847a0>] ret_from_fork+0x10/0x30
[    4.025879] ---[ end trace b42cf103ac74b2fa ]---
[    4.026997] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    4.026997] 
[    4.027036] CPU1: stopping
[    4.027040] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.4.159-tegra #1
[    4.027041] Hardware name: jetson_tx1 (DT)
[    4.027041] Call trace:
[    4.027046] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
[    4.027049] [<ffffffc000089198>] show_stack+0x14/0x1c
[    4.027053] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
[    4.027055] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
[    4.027057] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
[    4.027059] [<ffffffc000083f44>] el1_irq+0x84/0x100
[    4.027063] [<ffffffc00080d9d4>] cpuidle_enter+0x18/0x20
[    4.027066] [<ffffffc0000e2fe8>] call_cpuidle+0x48/0x54
[    4.027068] [<ffffffc0000e32bc>] cpu_startup_entry+0x2c8/0x394
[    4.027070] [<ffffffc00008e514>] secondary_start_kernel+0x15c/0x168
[    4.027072] [<000000008008127c>] 0x8008127c
[    4.027074] CPU3: stopping
[    4.027077] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D         4.4.159-tegra #1
[    4.027078] Hardware name: jetson_tx1 (DT)
[    4.027079] Call trace:
[    4.027083] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
[    4.027086] [<ffffffc000089198>] show_stack+0x14/0x1c
[    4.027088] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
[    4.027090] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
[    4.027092] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
[    4.027094] [<ffffffc000083f44>] el1_irq+0x84/0x100
[    4.027097] [<ffffffc00080d9d4>] cpuidle_enter+0x18/0x20
[    4.027099] [<ffffffc0000e2fe8>] call_cpuidle+0x48/0x54
[    4.027101] [<ffffffc0000e32bc>] cpu_startup_entry+0x2c8/0x394
[    4.027103] [<ffffffc00008e514>] secondary_start_kernel+0x15c/0x168
[    4.027104] [<000000008008127c>] 0x8008127c
[    4.031394] CPU0: stopping
[    4.031397] CPU: 0 PID: 37 Comm: kworker/0:1 Tainted: G      D         4.4.159-tegra #1
[    4.031399] Hardware name: jetson_tx1 (DT)
[    4.031404] Workqueue: events tegra_hdmi_hpd_worker
[    4.031405] Call trace:
[    4.031408] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
[    4.031411] [<ffffffc000089198>] show_stack+0x14/0x1c
[    4.031414] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
[    4.031416] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
[    4.031418] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
[    4.031421] [<ffffffc000083f44>] el1_irq+0x84/0x100
[    4.031425] [<ffffffc0004cbcf0>] tegra_fbcon_set_fb_mode+0xa4/0xb4
[    4.031427] [<ffffffc0004cbf58>] tegra_fb_update_monspecs+0x258/0x278
[    4.031431] [<ffffffc0004bb72c>] tegra_hdmi_hotplug_notify+0x58/0xa0
[    4.031433] [<ffffffc0004bb8e0>] tegra_hdmi_edid_eld_setup+0x16c/0x23c
[    4.031435] [<ffffffc0004bde58>] tegra_hdmi_hpd_worker+0x13c/0x21c
[    4.031438] [<ffffffc0000baf10>] process_one_work+0x234/0x45c
[    4.031440] [<ffffffc0000bb3ac>] worker_thread+0x274/0x488
[    4.031443] [<ffffffc0000c10d0>] kthread+0x110/0x118
[    4.031445] [<ffffffc0000847a0>] ret_from_fork+0x10/0x30
[    6.296928] Rebooting in 30 seconds..

I’ll make some comments on kernel builds just to make sure the config modification you made is not resulting a problem of the build procedure (versus actual code bug…before tracing the problem it has to be narrowed down to being a code issue and not a config/install issue).

Whenever you build a feature as a module (and not all features can be built as a module) the module prerequisites must be found either in the base kernel or in another module. Typically, if you are just adding a module, then all you have to do is copy the module into the module directory. Stated another way, all of the other modules can be reused. If you compile such that “uname -r” is the same between two builds, then it is best that all original features existing in module format still exist in module format, and that none of the non-module features change. The module directory can always be reused without modification for this case (aside from the additional module).

Whenever you change a base feature ("=y" instead of “=m”) which is integrated with the kernel (not a module format), then it is possible you can reuse all of the modules which are there, but this is no longer guaranteed. Some integrated features are very invasive, e.g., adding swap support for virtual memory affects a very large amount of code base. In that case you would be advised to rebuild not just the kernel, but also all of the modules, and to then change the CONFIG_LOCALVERSION to allow new modules in a new location without erasing the original.

It is easy to edit CONFIG_LOCALVERSION directly in the “.config” file…this is known to not have any dependencies. If you do add (or remove) a feature other than CONFIG_LOCALVERSION, then it is best to do so with a config editor, e.g., “make menuconfig” or “make nconfig”. This will account for other features which might be added in a new chain of requirements. Had you made such an edit without the editor, then you might have missed a new requirement.

Can I confirm you used a config editor to make any change other than the CONFIG_LOCALVERSION (you can modify CONFIG_LOCALVERSION in the editor, it just isn’t a requirement)? I want to be sure no special dependency was missed.

As for the more subtle point, since you changed a base feature (you used “=y”…perhaps there is no ability to use “=m” if the feature cannot be a module), you will probably be better off changing “uname -r” to something like “4.4.159-new” (CONFIG_LOCALVERSION="-new") and adding a brand new complete module directory “/lib/modules/4.4.159-new/” with all modules rebuilt. Then boot and verify “uname -r”. The integrated feature change could mean the existing modules are no longer valid when loaded into that base kernel config.

If all of that is in place, then it would be time to have someone reproduce the problem and debug it as a code issue rather than as a kernel/module configuration/install issue.

hi,Can you help me see the device tree?
I mounted two I2C devices TC358748
One is csi0 4lane and I2C address is 0x546c0000
The other is csi4 2lane and I2C address is 0x7000c000
tegra210-camera-e3326-a00.dtsi

/*
 * Copyright (c) 2015-2016, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <dt-bindings/media/camera.h>
#include <dt-bindings/platform/t210/t210.h>

/ {
	host1x {
		vi {
			num-channels = <2>;
			ports {
				#address-cells = <1>;
				#size-cells = <0>;
				port@0 {
					reg = <0>;
					e3326_vi_in0: endpoint {
						csi-port = <0>;
						bus-width = <4>;
						remote-endpoint = <&e3326_csi_out0>;
					};
				};
				port@1 {
					reg = <1>;
					e3326_vi_in1: endpoint {
						csi-port = <4>;
						bus-width = <2>;
						remote-endpoint = <&e3326_csi_out1>;
					};
				};
			};
		};
		nvcsi {
			num-channels = <2>;
			#address-cells = <1>;
			#size-cells = <0>;
			channel@0 {
				reg = <0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						e3326_csi_in0: endpoint@0 {
							csi-port = <0>;
							bus-width = <4>;
							remote-endpoint = <&e3326_tc358748_out0>;
						};
					};
					port@1 {
						reg = <1>;
						e3326_csi_out0: endpoint@1 {
							remote-endpoint = <&e3326_vi_in0>;
						};
					};
				};
			};
			channel@1 {
				reg = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						e3326_csi_in1: endpoint@2 {
							csi-port = <4>;
							bus-width = <2>;
							remote-endpoint = <&e3326_tc358748_out1>;
						};
					};
					port@1 {
						reg = <1>;
						e3326_csi_out1: endpoint@3 {
							remote-endpoint = <&e3326_vi_in1>;
						};
					};
				};
			};
		};
		i2c@546c0000 {
			tc358748_a@0e {
			compatible = "toshiba,tc358748_mipi";
			/* I2C device address */
			reg = <0x0e>;

			/* V4L2 device node location */
			devnode = "video0";

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					e3326_tc358748_out0: endpoint {
						csi-port = <0>;
						bus-width = <4>;
						remote-endpoint = <&e3326_csi_in0>;
					};
				};
			};
		};
	};
	};

i2c@7000c000{
		tc358748_e@0e {
			compatible = "toshiba,tc358748_mipi";
			/* I2C device address */
			reg = <0x0e>;
			devnode = "video1";
			
			/* V4L2 device node location */
			
			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					e3326_tc358748_out1: endpoint {
						csi-port = <4>;
						bus-width = <2>;
						remote-endpoint = <&e3326_csi_in1>;
					};
				};
			};
		};
	};

	tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		/**
		* The general guideline for naming badge_info contains 3 parts, and is as follows,
		* The first part is the camera_board_id for the module; if the module is in a FFD
		* platform, then use the platform name for this part.
		* The second part contains the position of the module, ex. \u201crear\u201d or \u201cfront\u201d.
		* The third part contains the last 6 characters of a part number which is found
		* in the module's specsheet from the vender.
		*/

		num_csi_lanes = <6>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		isp_peak_byte_per_pixel = <2>;
		isp_bw_margin_pct = <25>;
		
		modules {
			module0 {
				badge = "tc358748_topleft_P5V27C";
				position = "topleft";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver's v4l2 device name */
					devname = "tc358748 6-000e";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tc358748_a@0e";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
				};
			};
			module1 {
				badge = "tc358748_topright_P5V27C";
				position = "topright";
				orientation = "0";
				drivernode0 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_sensor";
					/* Driver's v4l2 device name */
					devname = "tc358748 0-000e";
					/* Declare the device-tree hierarchy to driver instance */
					proc-device-tree = "/proc/device-tree/i2c@7000c0000/tc358748_e@0e";
				};
				drivernode1 {
					/* Declare PCL support driver (classically known as guid)  */
					pcl_id = "v4l2_lens";
				};
			};
		};
	};
};

tegra210-jetson-cv-camera-e3326-a00.dtsi

/*
 * Copyright (c) 2015, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "tegra210-camera-e3326-a00.dtsi"

#define CAM0_RST_L0	TEGRA_GPIO(Z, 2)


#define GPIO_CTRL	TEGRA_GPIO(v, 6)

/* camera control gpio definitions */

/ {
	host1x {
		i2c@546c0000 {                              
			tc358748_a@0e {                         
				compatible = "toshiba,tc358748_mipi"; 
				//gpio = <&gpio TEGRA_GPIO(v, 6) GPIO_ACTIVE_HIGH>;
				reg = <0x0e>;                  
				csi_id = <0>;                  
				reset-gpios = <&gpio CAM0_RST_L0 GPIO_ACTIVE_HIGH>;
			};
		};
	};
	i2c@7000c000 {
		tc358748_e@0e {
			compatible = "toshiba,tc358748_mipi";
			//gpio = <&gpio TEGRA_GPIO(v, 6) GPIO_ACTIVE_HIGH>;
			reg = <0x0e>;
			csi_id = <4>;
			
		};
	};
};

tegra210-jetson-cv-camera-modules.dtsi

/*
 * Copyright (c) 2016-2017, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 */

//#include "tegra210-jetson-cv-camera-imx274-a00.dtsi"
//#include "tegra210-jetson-cv-camera-imx185-a00.dtsi"
//#include "tegra210-jetson-cv-camera-e3333-a00.dtsi"
#include "tegra210-jetson-cv-camera-e3326-a00.dtsi"
//#include "tegra210-jetson-cv-camera-e3323-a00.dtsi"

#define CAM0_RST_L	TEGRA_GPIO(S, 4)
#define CAM0_PWDN	TEGRA_GPIO(S, 7)
#define CAM1_RST_L	TEGRA_GPIO(S, 5)
#define CAM1_PWDN	TEGRA_GPIO(T, 0)

/ {
	/* set camera gpio direction to output */
	// gpio: gpio@6000d000 {
		// camera-control-output-low {
			// gpio-hog;
			// output-low;
			// gpios = <CAM0_RST_L 0 CAM0_PWDN 0
				// CAM1_RST_L 0 CAM1_PWDN 0>;
			// label = "cam0-rst", "cam0-pwdn",
				// "cam1-rst", "cam1-pwdn";
        // };
	// };

	/* all cameras are disabled by default */
	host1x {
		vi_base: vi {
			ports {
				vi_port0: port@0 {
					status = "okay";
					vi_in0: endpoint {
						status = "okay";
					};
				};
				vi_port1: port@1 {
					status = "okay";
					vi_in1: endpoint {
						status = "okay";
					};
				};
				
				
			};
		};
		csi_base: nvcsi {
			csi_chan0: channel@0 {
				status = "okay";
				ports {
					csi_chan0_port0: port@0 {
						status = "okay";
						csi_in0: endpoint@0 {
							status = "okay";
						};
					};
					csi_chan0_port1: port@1 {
						status = "okay";
						csi_out0: endpoint@1 {
							status = "okay";
						};
					};
				};
			};
			csi_chan1: channel@1 {
				status = "okay";
				ports {
					csi_chan1_port0: port@0 {
						status = "okay";
						csi_in1: endpoint@2 {
							status = "okay";
						};
					};
					csi_chan1_port1: port@1 {
						status = "okay";
						csi_out1: endpoint@3 {
							status = "okay";
						};
					};
				};
			};
			
		};
		i2c@546c0000 {
		e3326_cam0: tc358748_a@0e {
			status = "okay";
		};
			
			i2c@6{
				e3336_cam0: tc358748_a@0e {
					status = "okay";
				};
				
			};
			
		};
		
		
	};
		i2c@7000c000 {
		e3326_cam1: tc358748_e@0e {
			status = "okay";
		};
			
			i2c@0 {
				e3336_cam1: tc358748_e@0e {
					status = "okay";
				};
				
			};
			
		};
		

	
	tcp: tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";
		
		num_csi_lanes = <6>;	
		//num_csi_lanes = <2>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <10>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <408000>;
		isp_peak_byte_per_pixel = <2>;
		isp_bw_margin_pct = <25>;
		
	
		modules {
			cam_module0: module0 {
				status = "okay";
				cam_module0_drivernode0: drivernode0 {
					status = "okay";
				};
				cam_module0_drivernode1: drivernode1 {
					status = "okay";
					pcl_id = "v4l2_lens";
				};
			};
			cam_module1: module1 {
				status = "okay";
				cam_module1_drivernode0: drivernode0 {
					status = "okay";
				};
				cam_module1_drivernode1: drivernode1 {
					status = "okay";
					pcl_id = "v4l2_lens";
				};
			};
		};
	};
};

tegra210-jetson-cv-camera-plugin-manager.dtsi

/*
 * Copyright (c) 2016-2017, NVIDIA CORPORATION.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; version 2 of the License.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 */

/ {
	/* camera plugin-manager */
	plugin-manager {
		/* E3326 camera board */
		
			fragment-e3326@0 {
			ids = "3326-*";
			/*1*/
			override@0 {
				target = <&e3326_cam0>;
				_overlay_ {
					status = "okay";
				};
			};
			override@1 {
				target = <&cam_module0>;
				_overlay_ {
					status = "okay";
					badge = "tc358748_topleft_P5V27C";
					position = "topleft";
					orientation = "0";
				};
			};
			override@2 {
				target = <&cam_module0_drivernode0>;
				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_sensor";
					devname = "tc358748 6-000e";
					proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tc358748_a@0e";
				};
			};
			override@3 {
				target = <&cam_module0_drivernode1>;
				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_lens";
				};
			};
			/*2*/
			override@4 {
				target = <&e3326_cam1>;
				_overlay_ {
					status = "okay";
				};
			};
			override@5 {
				target = <&cam_module1>;
				_overlay_ {
					status = "okay";
					badge = "tc358748_topright_P5V27C";
					position = "topright";
					orientation = "0";
				};
			};
			override@6 {
				target = <&cam_module1_drivernode0>;
				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_sensor";
					devname = "tc358748 0-000e";
					proc-device-tree = "/proc/device-tree/i2c@7000c000/tc358748_e@0e";
				};
			};
			override@7 {
				target = <&cam_module1_drivernode1>;
				_overlay_ {
					status = "okay";
					pcl_id = "v4l2_lens";
				};
			};
			/* Enable VI ports */
			override@8 {
				target = <&vi_base>;
				_overlay_ {
					num-channels=<2>;
				};
			};
			override@9 {
				target = <&vi_port0>;
				_overlay_ {
					status = "okay";
				};
			};
			override@10 {
				target = <&e3326_vi_in0>;
				_overlay_ {
					status = "okay";
					csi-port = <0>;
					bus-width = <4>;
					remote-endpoint = <&e3326_csi_out0>;
				};
			};
			override@11 {
				target = <&vi_port1>;
				_overlay_ {
					status = "okay";
				};
			};
			override@12 {
				target = <&e3326_vi_in1>;
				_overlay_ {
					status = "okay";
					csi-port = <4>;
					bus-width = <2>;
					remote-endpoint = <&e3326_csi_out1>;
				};
			};
			/* Enable CSI ports */
			override@13 {
				target = <&csi_base>;
				_overlay_ {
					num-channels=<2>;
				};
			};
			override@14 {
				target = <&csi_chan0>;
				_overlay_ {
					status = "okay";
				};
			};
			override@15 {
				target = <&csi_chan0_port0>;
				_overlay_ {
					status = "okay";
				};
			};
			override@16 {
				target = <&e3326_csi_in0>;
				_overlay_ {
					status = "okay";
					csi-port = <0>;
					bus-width = <4>;
					remote-endpoint = <&e3326_tc358748_out0>;
				};
			};
			override@17 {
				target = <&csi_chan0_port1>;
				_overlay_ {
					status = "okay";
				};
			};
			override@18 {
				target = <&e3326_csi_out0>;
				_overlay_ {
					status = "okay";
					remote-endpoint = <&e3326_vi_in0>;
				};
			};

			override@19 {
				target = <&csi_chan1>;
				_overlay_ {
					status = "okay";
				};
			};
			override@20 {
				target = <&csi_chan1_port0>;
				_overlay_ {
					status = "okay";
				};
			};
			override@21 {
				target = <&e3326_csi_in1>;
				_overlay_ {
					status = "okay";
					csi-port = <4>;
					bus-width = <2>;
					remote-endpoint = <&e3326_tc358748_out1>;
				};
			};
			override@22 {
				target = <&csi_chan1_port1>;
				_overlay_ {
					status = "okay";
				};
			};
			override@23 {
				target = <&e3326_csi_out1>;
				_overlay_ {
					status = "okay";
					remote-endpoint = <&e3326_vi_in1>;
				};
			};
			/* tegra-camera-platform settings */
			override@24 {
				target = <&tcp>;
				_overlay_ {
					num_csi_lanes = <6>;
					max_lane_speed = <1500000>;
					min_bits_per_pixel = <10>;
					vi_peak_byte_per_pixel = <2>;
					vi_bw_margin_pct = <25>;
					isp_peak_byte_per_pixel = <5>;
					isp_bw_margin_pct = <25>;
				};
			};			
		};
	};
};

thank you very much

Some releases require more work to actually install various edits. For example, in R28.3 you would want to use flash software so that your tree is signed. Let me start by asking what method you used to install kernel and tree? I’m interested in finding out first if the edits were actually accepted/installed.

One way to verify (other than using flash logs) is to reverse compile the system’s tree and see if your edits made it in:

dtc -I fs -O dts -o extracted.dts /proc/device-tree

I know very little about cameras, but earlier releases did not require the signing process, and so my first question will be whether you know the edits actually made it in (due to the install process perhaps interfering). If you find the edits made it in place, then someone else will be able to answer the questions which are specific to cameras.

hi,I decompiled the device tree. The location of the modification was found and it was correct.
I flash the device tree with instructions

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

download the kernel .
Copy “Image” and “zImage” to " /boot" in the board
Is there anything wrong with me?

Only Image is required, but it doesn’t hurt to have zImage. The 32-bit systems used zImage. Not sure if/when 64-bit will use this again.

Assuming the dtb you intended to change is the one flashed by kernel-dtb, then flash method should be ok since it went through flash.sh (which signs first). There is more than one dtb though.

Also, can we verify the following (I’m hoping to consolidate this information in one place):

  • The specific changes made to the config of the kernel you added, and if it was done through a config tool such as "make menuconfig" or "make nconfig", versus just an editor (I dont' care about how the CONFIG_LOCALVERSION was edited, this is independent of anything else, but kernel features have dependencies I want to make sure were not broken).
  • Which specific dtb file name was used, and the exact location of the file within "Linux_for_Tegra/"?
    • Part of the reason for asking is that a pristine copy is copied to a working location and only then signed...if it wasn't the original location prior to copy, then the copy operation might have overwritten your version.
    • Another part of the reason is that there will be different device trees placed in different locations, and not all are for the booted kernel (some are used in boot-related partitions).
  • Is there any hardware attached to the TX1 during boot other than network, keyboard, mouse, monitor? If there is other hardware, then does the boot still fail when only network/keyboard/mouse/monitor is attached?
  • Specifically if there is an HDMI monitor, and if there is anything unusual about it, or if any adapters are being used on the cable?
  • I am assuming this is a standard developer kit and not a custom carrier board (let me know if it is a custom carrier).
  • One other test before going on to try to differentiate between whether it is a kernel issue or a device tree issue: Can you flash the original dtb back in place and see if it boots ok? I wouldn’t expect any hardware requiring the tree edit to work, but I would expect that if the tree is involved in the boot failure that it will boot again without that edited tree. If this still does not boot, then try the reverse: Put the original kernel back in place, but flash the tree, and see if it then boots.

    hi,I described my previous posts on the modified device tree.

  • I modified the following files in the kernel。 I added TC358748 module. I copy three files (TC358748.h, TC358748.c ,tc358748_mode_tbls.h)to"kernel_src/kernel/kernel-4.4/drivers/media/i2c".

    Add the following line in file “Makefile” (kernel_src/kernel/kernel-4.4/drivers/media/i2c)

    obj-$(CONFIG_VIDEO_TC358748)+= tc358748.o
    

    Add the following line in file “kconfig”(kernel_src/kernel/kernel-4.4/drivers/media/i2c)

    config VIDEO_TC358748
            tristate "TC358748 camera sensor support"
            depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
            ---help---
              This is a Video4Linux2 sensor-level driver for the Intesel
              TC358748 camera chip.
    
              To compile this driver as a module, choose M here: the module
              will be called TC358748.
    

    Add the following line in file “tegra21_defconfig”(kernel_src/kernel/kernel-4.4/arch/arm64/configs)

    CONFIG_VIDEO_TC358748=y
    
  • There were four DTB files in "Linux_for_Tegra/kernel/dtb". recompiling the kernel and device tree, I took the four files with the same name in "SOURCE/kernel_src/kernel_out/arch/arm64/boot" to "Linux_for_Tegra/kernel/dtb".
  • when only network/keyboard/mouse/monitor is attached boot still fail
  • HDMI displays a black screen. The following print message will appear. Keep rebooting
    [    3.354257] isp 54600000.isp: initialized
    [    3.355626] isp 54680000.isp: initialized
    [    3.358883] mmcblk0: mmc0:0001 016G32 14.7 GiB 
    [    3.359267] clk_cbus_recalc_rate: no gbus parent
    [    3.359273] clk_cbus_round_rate: no gbus parent
    [    3.359277] clk_cbus_round_rate: no gbus parent
    [    3.359285] clk_cbus_recalc_rate: no gbus parent
    [    3.369410] clk_cbus_recalc_rate: no gbus parent
    [    3.369415] clk_cbus_round_rate: no gbus parent
    [    3.369418] clk_cbus_round_rate: no gbus parent
    [    3.369424] clk_cbus_recalc_rate: no gbus parent
    [    3.369449] tegra_dvfs: GPU-cap: registered
    [    3.369536] tegra dvfs: vdd-cpu: nominal 1226mV, offset 708000uV, step 19200uV, scaling enabled
    [    3.369540] tegra dvfs: vdd-core: nominal 1075mV, offset 600000uV, step 12500uV, scaling enabled
    [    3.369544] tegra dvfs: vdd-gpu: nominal 1090mV, offset 710000uV, step 10000uV, scaling enabled
    [    3.380966] mmcblk0rpmb: mmc0:0001 016G32 partition 3 4.00 MiB
    [    3.434773]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19
    [    3.466147] tegra_dvfs: vdd-gpu-vts: registered
    [    3.470811] xhci-tegra 70090000.xusb: can't get usb3-0 phy (-517)
    [    3.471567] tegra21x-padctl-uphy 7009f000.pinctrl: padctl mmio start 0x000000007009f000 end 0x000000007009ffff
    [    3.471578] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_SKU_CALIB_0 0x71c740e
    [    3.471586] tegra21x-padctl-uphy 7009f000.pinctrl: TEGRA_FUSE_USB_CALIB_EXT_0 0x4
    [    3.472816] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-0 is used by XUSB
    [    3.472825] tegra21x-padctl-uphy 7009f000.pinctrl: using UTMI port 0 for otg
    [    3.472833] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-2 is used by XUSB
    [    3.472847] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 5, set usb3_lanes = 0x20
    [    3.472861] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 1 maps to USB2 port 2
    [    3.472868] tegra21x-padctl-uphy 7009f000.pinctrl: UTMI-1 is used by XUSB
    [    3.472880] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 6, set usb3_lanes = 0x60
    [    3.472892] tegra21x-padctl-uphy 7009f000.pinctrl: USB3 port 0 maps to USB2 port 1
    [    3.472907] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 1, set pcie_lanes = 0x2
    [    3.472924] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 2, set pcie_lanes = 0x6
    [    3.472940] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 3, set pcie_lanes = 0xe
    [    3.472956] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 4, set pcie_lanes = 0x1e
    [    3.472972] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 0, set pcie_lanes = 0x1f
    [    3.472990] tegra21x-padctl-uphy 7009f000.pinctrl: uphy_lane = 7, set sata_lanes = 0x80
    [    3.473656] usb-vbus1: supplied by vdd-3v3
    [    3.476036] tegra21x-padctl-uphy 7009f000.pinctrl: Done tegra21x_padctl_uphy_probe
    [    3.478625] tegra-pcie 1003000.pcie-controller: 4x1, 1x1 configuration
    [    3.478866] tegra-pcie 1003000.pcie-controller: PCIE: Enable power rails
    [    3.479600] clk_cbus_round_rate: no gbus parent
    [    3.479607] tegra_gpu_edp gpu_edp: unable to get max GPU freq
    [    3.480004] tegra-pcie 1003000.pcie-controller: probing port 0, using 4 lanes
    [    3.481898] gk20a 57000000.gpu: GPCPLL initial settings: NA mode, M=1, N=34, P=3
    [    3.482216] tegra-pcie 1003000.pcie-controller: probing port 1, using 1 lanes
    [    3.483056] gk20a 57000000.gpu: failed to allocate secure buffer -12
    [    3.483575] tegra-ahci 70027000.sata: Missing devslp-active state
    [    3.492072] tegra-ahci 70027000.sata: AHCI 0001.0301 32 slots 2 ports 3 Gbps 0x1 impl platform mode
    [    3.492083] tegra-ahci 70027000.sata: flags: 64bit ncq sntf pm led pmp pio slum part deso sadm apst 
    [    3.493274] scsi host0: tegra_ahci
    [    3.493681] scsi host1: tegra_ahci
    [    3.493907] ata1: SATA max UDMA/133 mmio [mem 0x70027000-0x70028fff] port 0x100 irq 114
    [    3.493911] ata2: DUMMY
    [    3.497130] tegra-xudc-new 700d0000.xudc: USB charger detection disabled
    [    3.497242] tegra-xudc-new 700d0000.xudc: device mode on
    [    3.525714] tegra_core_action core_dvfs_cdev_floor: Tegra CORE DVFS 'floor cooling device' registered
    [    3.535125] input: tegra-hda HDMI/DP,pcm=3 as /devices/70030000.hda/sound/card0/input0
    [    3.545388] tegra_core_action core_dvfs_cdev_cap: Tegra CORE DVFS 'cap cooling device' registered
    [    3.545831] tegra_dfll_action dfll-cdev-cap: Tegra DFLL 'cap cooling device' registered
    [    3.564000] tegra_dfll_action dfll-cdev-floor: Tegra DFLL 'floor cooling device' registered
    [    3.565030] tegra124-dfll 70110000.clock: entered closed loop mode
    [    3.569081] xhci-tegra 70090000.xusb: UTMI port 0 has OTG_CAP
    [    3.569083] xhci-tegra 70090000.xusb: No USB3 port has OTG_CAP
    [    3.572361] xhci-tegra 70090000.xusb: Direct firmware load for tegra21x_xusb_firmware failed with error -2
    [    3.572363] xhci-tegra 70090000.xusb: Falling back to user helper
    [    3.606863] input: gpio-keys as /devices/gpio-keys/input/input2
    [    3.655825] tegra_rtc 7000e000.rtc: setting system clock to 2019-07-15 06:15:05 UTC (1563171305)
    [    3.656506] vi 54080000.vi: vi_probe: ++
    [    3.814257] ata1: SATA link down (SStatus 0 SControl 300)
    [    3.892420] vi 54080000.vi: initialized
    [    3.910261] tegra-pcie 1003000.pcie-controller: link 0 down, retrying
    [    4.025581] vi 54080000.vi: subdev nvcsi-0 bound
    [    4.025584] vi 54080000.vi: subdev tc358748_mipi 6-000e bound
    [    4.025651] Unable to handle kernel NULL pointer dereference at virtual address 00000178
    [    4.025652] pgd = ffffffc0015fa000
    [    4.025657] [00000178] *pgd=000000017a5d8003, *pud=000000017a5d8003, *pmd=000000017a5d9003, *pte=00e8000050041707
    [    4.025660] Internal error: Oops: 96000005 [#1] PREEMPT SMP
    [    4.025663] Modules linked in:
    [    4.025666] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.159-tegra #1
    [    4.025667] Hardware name: jetson_tx1 (DT)
    [    4.025669] task: ffffffc0fa6f0000 ti: ffffffc0fa6a4000 task.ti: ffffffc0fa6a4000
    [    4.025676] PC is at find_matching_color_fmt+0x10/0xa4
    [    4.025678] LR is at camera_common_enum_mbus_code+0x44/0xb4
    [    4.025680] pc : [<ffffffc0007b6d70>] lr : [<ffffffc0007b6e48>] pstate: 20000045
    [    4.025681] sp : ffffffc0fa6a7830
    [    4.025684] x29: ffffffc0fa6a7840 x28: 0000000000000018 
    [    4.025686] x27: ffffffc0010f1fd0 x26: ffffffc0010f1fd8 
    [    4.025689] x25: ffffffc0f8bde050 x24: ffffffc0f8bde050 
    [    4.025691] x23: ffffffc07d373be8 x22: ffffffc07d373018 
    [    4.025693] x21: ffffffc0fa6a7908 x20: ffffffc0f906cc20 
    [    4.025695] x19: ffffffc07d373018 x18: 0000000000000000 
    [    4.025697] x17: 0000000000000000 x16: 0000000000000000 
    [    4.025699] x15: 0000000000000000 x14: 0fffffffffffffff 
    [    4.025701] x13: 0000000000000020 x12: 0101010101010101 
    [    4.025703] x11: ffffffc000c5f000 x10: fefefeff64636e6c 
    [    4.025705] x9 : 00000000ffffffff x8 : 000000000000fffe 
    [    4.025707] x7 : 000000000000008d x6 : 0000000000000002 
    [    4.025709] x5 : ffffffc000bdca68 x4 : 000000000000006d 
    [    4.025711] x3 : 0000000000000000 x2 : 0000000000000000 
    [    4.025713] x1 : 0000000000000000 x0 : 0000000000000170 
    [    4.025714] 
    [    4.025715] Process swapper/0 (pid: 1, stack limit = 0xffffffc0fa6a4020)
    [    4.025716] Call trace:
    [    4.025720] [<ffffffc0007b6d70>] find_matching_color_fmt+0x10/0xa4
    [    4.025723] [<ffffffc0007ad76c>] tegra_channel_fmts_bitmap_init+0xa8/0x1f4
    [    4.025726] [<ffffffc0007aebd8>] tegra_channel_init_subdevices+0x144/0x648
    [    4.025729] [<ffffffc0007afed8>] tegra_vi_graph_notify_complete+0x588/0x60c
    [    4.025731] [<ffffffc00079a644>] v4l2_async_test_notify+0xe8/0x100
    [    4.025733] [<ffffffc00079a788>] v4l2_async_notifier_register+0x12c/0x17c
    [    4.025735] [<ffffffc0007b0790>] tegra_vi_graph_init+0x1dc/0x278
    [    4.025737] [<ffffffc0007ac914>] tegra_vi_media_controller_init+0x150/0x1dc
    [    4.025740] [<ffffffc0007ba2fc>] vi_probe+0x448/0x4e8
    [    4.025744] [<ffffffc0005f7494>] platform_drv_probe+0x50/0xb0
    [    4.025748] [<ffffffc0005f5190>] driver_probe_device+0x178/0x3b4
    [    4.025750] [<ffffffc0005f5430>] __driver_attach+0x64/0x90
    [    4.025753] [<ffffffc0005f3158>] bus_for_each_dev+0x50/0x9c
    [    4.025756] [<ffffffc0005f4bd4>] driver_attach+0x20/0x28
    [    4.025758] [<ffffffc0005f4594>] bus_add_driver+0x130/0x25c
    [    4.025761] [<ffffffc0005f6278>] driver_register+0x98/0xe0
    [    4.025763] [<ffffffc0005f73f0>] __platform_driver_register+0x54/0x5c
    [    4.025767] [<ffffffc001230278>] vi_init+0x2c/0x38
    [    4.025770] [<ffffffc000081448>] do_one_initcall+0x110/0x1c4
    [    4.025775] [<ffffffc0011f0b98>] kernel_init_freeable+0x1e4/0x290
    [    4.025779] [<ffffffc000b819b4>] kernel_init+0x10/0xdc
    [    4.025782] [<ffffffc0000847a0>] ret_from_fork+0x10/0x30
    [    4.025879] ---[ end trace b42cf103ac74b2fa ]---
    [    4.026997] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
    [    4.026997] 
    [    4.027036] CPU1: stopping
    [    4.027040] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.4.159-tegra #1
    [    4.027041] Hardware name: jetson_tx1 (DT)
    [    4.027041] Call trace:
    [    4.027046] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
    [    4.027049] [<ffffffc000089198>] show_stack+0x14/0x1c
    [    4.027053] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
    [    4.027055] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
    [    4.027057] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
    [    4.027059] [<ffffffc000083f44>] el1_irq+0x84/0x100
    [    4.027063] [<ffffffc00080d9d4>] cpuidle_enter+0x18/0x20
    [    4.027066] [<ffffffc0000e2fe8>] call_cpuidle+0x48/0x54
    [    4.027068] [<ffffffc0000e32bc>] cpu_startup_entry+0x2c8/0x394
    [    4.027070] [<ffffffc00008e514>] secondary_start_kernel+0x15c/0x168
    [    4.027072] [<000000008008127c>] 0x8008127c
    [    4.027074] CPU3: stopping
    [    4.027077] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G      D         4.4.159-tegra #1
    [    4.027078] Hardware name: jetson_tx1 (DT)
    [    4.027079] Call trace:
    [    4.027083] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
    [    4.027086] [<ffffffc000089198>] show_stack+0x14/0x1c
    [    4.027088] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
    [    4.027090] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
    [    4.027092] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
    [    4.027094] [<ffffffc000083f44>] el1_irq+0x84/0x100
    [    4.027097] [<ffffffc00080d9d4>] cpuidle_enter+0x18/0x20
    [    4.027099] [<ffffffc0000e2fe8>] call_cpuidle+0x48/0x54
    [    4.027101] [<ffffffc0000e32bc>] cpu_startup_entry+0x2c8/0x394
    [    4.027103] [<ffffffc00008e514>] secondary_start_kernel+0x15c/0x168
    [    4.027104] [<000000008008127c>] 0x8008127c
    [    4.031394] CPU0: stopping
    [    4.031397] CPU: 0 PID: 37 Comm: kworker/0:1 Tainted: G      D         4.4.159-tegra #1
    [    4.031399] Hardware name: jetson_tx1 (DT)
    [    4.031404] Workqueue: events tegra_hdmi_hpd_worker
    [    4.031405] Call trace:
    [    4.031408] [<ffffffc000089090>] dump_backtrace+0x0/0xf4
    [    4.031411] [<ffffffc000089198>] show_stack+0x14/0x1c
    [    4.031414] [<ffffffc000380ab8>] dump_stack+0xac/0xe4
    [    4.031416] [<ffffffc00008e964>] handle_IPI+0x16c/0x328
    [    4.031418] [<ffffffc000080f44>] gic_handle_irq+0x94/0xbc
    [    4.031421] [<ffffffc000083f44>] el1_irq+0x84/0x100
    [    4.031425] [<ffffffc0004cbcf0>] tegra_fbcon_set_fb_mode+0xa4/0xb4
    [    4.031427] [<ffffffc0004cbf58>] tegra_fb_update_monspecs+0x258/0x278
    [    4.031431] [<ffffffc0004bb72c>] tegra_hdmi_hotplug_notify+0x58/0xa0
    [    4.031433] [<ffffffc0004bb8e0>] tegra_hdmi_edid_eld_setup+0x16c/0x23c
    [    4.031435] [<ffffffc0004bde58>] tegra_hdmi_hpd_worker+0x13c/0x21c
    [    4.031438] [<ffffffc0000baf10>] process_one_work+0x234/0x45c
    [    4.031440] [<ffffffc0000bb3ac>] worker_thread+0x274/0x488
    [    4.031443] [<ffffffc0000c10d0>] kthread+0x110/0x118
    [    4.031445] [<ffffffc0000847a0>] ret_from_fork+0x10/0x30
    [    6.296928] Rebooting in 30 seconds..
    
  • this is a standard developer kit
  • It works well when only the device tree is updated. Reboot occurs when the kernel is updated
  • Keep in mind as we go that I am not a sensor driver programmer, but this is the start of the kernel failure:

    [ 4.089149] Unable to handle kernel NULL pointer dereference at virtual address 00000178
    

    You configured with “=y”, so it is an integrated feature. Not all drivers can work as a module, but if they can, I’d try with “=m” to see debug messages during an insmod (the system would boot and the failure would only be upon insmod). If that isn’t possible you’ll have to go from where you have already started.

    There are actually a couple of components to what you are adding. One is i2c for communications, the other is the actual driver. In the case of i2c there will be mandatory device tree edits; otherwise the driver will not be able to correctly talk to the hardware. This is one possibility of a NULL dereference. Note that HDMI also uses i2c to query the monitor.

    You did say it only works well when the device tree is updated. Is it possible for you to build this particular driver as a module instead of as integrated? Someone else who has worked on this driver can probably spot what is going on based on what you have already posted, but if not, then you’ll want to see what happens if you insmod the module after boot is complete and while monitoring “dmesg --follow” from a serial console (assumes this can be built as a module).

    hi
    My problem has not been solved, I found a problem, burning the same file system and kernel, the old TX1 module can not be started, the newly bought TX1 can be started 。why?

    By “same file system and kernel”, are you saying the default which comes with a given JetPack or L4T release? Or are you saying a default install followed by a kernel change?

    When you say the system cannot be started, are you going by serial console or the GUI? If going by serial console, then this is a good basis to say it didn’t boot. If going by GUI, then this won’t tell you if the system booted or not when display fails during the GUI stage.

    If this was just a kernel update, then the kernel has to have the right configuration. Also, if the kernel build changed the output of “uname -r”, then you must reinstall every single module to the new location of “/lib/modules/$(uname -r)/” (none of the older modules could be reached if “uname -r” changes).

    Additionally, any kernel update would require starting with a working configuration, and only then have any changes made. If the kernel version itself changed what drivers or ABIs are available, then it is possible there is no way to match the original configuration. Even two kernels made from the same kernel source could be completely incompatible if their configurations and CONFIG_LOCALVERSION (which takes part in “uname -r”) do not match.

    hi
    Thank you very much for your patience.
    I think there is a problem with my method, so I decided to relearn to modify the kernel.
    I am cross-compiling the kernel on a non-tegra system.
    I am reading Kernel customization
    https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fkernel_custom.html%23wwpID0ESHA

    I downloaded and compiled the source kernel.
    When compiling externally, I found that I would not edit it. Such as hello.c
    I modified a device tree, I don’t know how to compile it.
    I have a file driver, how can I compile it?
    How to compile the file into the kernel?
    Thank you

    Some definitions or descriptions of how the kernel is arranged will probably help, so bear with me while I write [far] too much :P The confusion is common, so I’ll just write it down for other people as well.

    The kernel itself can be either one monolithic set of code without any modules, or some parts of the kernel can be loaded or unloaded while the kernel runs…those are modules. Not all parts of the kernel can be unloaded/reloaded as a module, but many parts can. If I say integrated, then it implies “a feature enabled when configuring the kernel such that the feature is not a separate module”.

    There are many kernel features. Some provide services or features which are not drivers, but which are used by some part of the kernel. As an example, if virtual memory is enabled to allow a swap file, then virtual memory is not a driver, but it does use the driver to the hard disk to read/write the swap file. If I say driver, then the driver might or might not be a module, but you can consider that a driver interacts with hardware and is not just some sort of support algorithm. Some modules are drivers, some are not. Some kernel features interact with hardware, some do not.

    The bootloader has the job of setting up an environment for the Linux kernel, and then ending its own life by overwriting itself with the kernel. At the time of load the kernel may look at the inherited environment for clues on how to set itself up. Arguments will be passed to the kernel on the command line just like any other program (see “cat /proc/cmdline” and you’ll know what was passed as an argument).

    Kernel arguments can either be from a set of standard arguments all kernels work with, or they might be something else only some custom part of the kernel understands. When the kernel loads every driver can see every command line argument, but arguments the component doesn’t know about are thrown away and ignored. If an argument is custom, but the driver sees the argument and is programmed to use that argument, then suddenly the argument has meaning. Some of the environment passed on is similar in that different parts of the kernel might find meaning in the environment, or might throw away environment.

    Drivers can have arguments passed to them at the time they load (part of the “insmod” command). Integrated features only deal with arguments at the time the kernel loads and don’t really accept arguments the same way as loading(“insmod”)/unloading(“rmmod”)/reloading(“rmmod”+“insmod”) of a module does.

    Command line arguments tend to be for features of a driver which are more or less an abstract concept, and although that concept may not exist outside of the driver, the argument is something generic that the driver will understand even if the hardware implementation is different. For example, a given chipset will use the same driver, but on different motherboards may be located at a different base address. It wouldn’t matter what the base address is, such arguments are valid regardless of this.

    Then comes the part most people outside of the embedded world never hear about: The device tree. A long time ago drivers would require a different driver even with the same chipset if their base address or some other non-chipset-dependent never changed. E.g., one driver for the chipset on one motherboard brand, and a different driver for the same chipset on another motherboard brand. You might even make an adapter so a generic kernel driver for the chipset could load after the adapter adjusted for the different base address (or any such similar detail). Linux Torvalds became a bit upset about how fast the kernel was growing just for these simple details. So we got the device tree.

    The device tree is yet another way of passing arguments to drivers. However, the device tree is special in that it has a unified mechanism to read the tree and a unified layout. Like command line arguments, if a driver does not know about the argument, then that part of the tree will simply be ignored. However, drivers of non-Plug-n-Play devices became responsible for dealing with custom base addresses and other details which differ even when the actual chipset remains constant. In addition, recall that I mentioned that the bootloader also sets up an environment prior to loading the kernel…the bootloader itself can use device tree content for setting up hardware and drivers prior to the kernel ever loading. This then gets passed on to the kernel as it loads, and drivers see whatever content applies to them, e.g., the driver will now know there is a serial port at an address via a “serial@12345678” type entry (the “12345678” is a contrived base address).

    Device trees can be built entirely independently from the kernel source. Many people work on device trees without ever touching the kernel source. However, since given drivers which may or may not be configured to exist in a kernel also determines whether or not some piece of a device tree will matter you will find that can compile a device tree along with the kernel. Depending on which drivers you select, you will find different “.dtsi” device tree files are combined in order to create a single device tree. You could compile for various drivers you don’t need, and this would simply be ignored, but why bother?

    In older releases the bootloader simply read a device tree file from the ext4 filesystem. In that case only U-Boot and Linux needed this. However, in more recent releases (which are gearing up for Secure Boot and redundancy), you will find the device tree migrated to a separate binary partition instead of the ext4 filesystem. This is because those stages of boot prior to U-Boot do not have an ext4 driver. Instead those earlier stages read directly from a partition, and even U-Boot inherits the tree which those earlier stages pass on to it…and then the kernel inherits from the bootloader.

    As such, where you used to simply be able to copy a file into “/boot” for device tree changes, you must now use flash software to put the tree into a partition (and this includes cryptographic signing…if signing is not correct, then the content will be rejected).


    For actual procedures, you must expect that anything you do with a kernel requires the kernel to be first configured. Often there is a “make” target of some sort of default config, the “something_defconfig”. Many Tegra platforms inherit hardware from earlier releases, and sometimes you will see just “tegra” for a series of different Jetsons, or even drivers named for a Tegra release which is different from what you have. When you see references in the docs to “make tegra_defconfig”, what you are doing is creating a “.config” file at the base of your kernel output location, and that config is valid as a base starting point for that platform.

    On a running system you will also find a pseudo file (part of a driver and not actually on the hard drive) of “/proc/config.gz”. I tend to start with this, because other than one detail, this is an absolute guarantee that the kernel I am building (the features selected) are an exact match to what I already have in place.

    After you make tegra_defconfig, or after you’ve placed a gunzip decompressed copy of the “/proc/config.gz” in the build output location as name “.config”, then you can make modifications. Or just build things. However, that “one detail” which does not exist as an exact match to the running system still needs to be addressed.

    When a kernel loads a module it needs to know where to find the module. The command “uname -r” is a combination of the base kernel version, e.g., “4.4.38”, combined with a suffix. The suffix is usually from the “.config” file’s “CONFIG_LOCALVERSION”. You’ll see this as “-tegra” by default. So if you were to manually edit the “.config”, then this is what you’d want for that one line:

    CONFIG_LOCALVERSION="-tegra"
    

    A module loads at “/lib/modules/$(uname -r)/”, and thus if you didn’t preserve the old “uname -r”, and install a new kernel, then 100% of the modules need to be rebuilt and put back into place with the new “uname -r”. Sometimes you actually want this, e.g., if you changed a feature in the kernel Image which invalidates the existing modules. Before and after you install a kernel Image make sure to check “uname -r” to find that suffix to append to “CONFIG_LOCALVERSION”, and to see if what you installed is what you expected.

    Regardless of what you build I suggest that after you configure the kernel that you always build the “Image” target once to see if it works. This also sets up some dependencies which are needed before building modules or device tree (there are other ways to set up those dependencies, but if you can’t build Image, then none of your other build targets will be valid). If for example you build modules prior to building Image (or alternatively, “make modules_depend”) build will fail due to invalid configuration.

    The “make dtbs” target builds a device tree binary. Device tree source files are “.dts” files, device tree binary files are “.dtb” files, and a “.dtsi” file is a device tree include file only used by the kernel. You’ll need to consult the documentation of the particular L4T/JetPack release for how to install a device tree. The particular device tree binary you put in the flash software area will have a name which is based on both the module and the carrier board (and perhaps the carrier board revision). If you ever flash a Jetson, then always save a log so you can see which specific device tree files are used for your particular board.

    FYI, the device tree does not compile “into” the kernel. This is a separate and independent file and ends up in a partition, but the kernel does see its content. Modules will end up somewhere in “/lib/modules/$(uname -r)/”. The “Image” file (the uncompressed integrated kernel) will be in “/boot/”.

    You can always ask more questions, but due to how details change with release, I suggest going through the official documents and asking about specific instructions after naming your exact JetPack/L4T/SDK Manager version. You already mentioned for a TX1 devel board, but you’d want to mention that again at the start of any new thread.

    thank you very much
    I dowload
    https://developer.nvidia.com/embedded/linux-tegra L4T 32.2.1
    flash
    sudo ./flash.sh jetson-tx1 mmcblk0p1
    flash finish

    *** The target t210ref has been flashed successfully. ***
    Reset the board to boot from internal eMMC.
    

    reboot following print message will appear.

    [0002.656] iframe 0x92ca2ce0:
    [0002.659] x0  0x               0 x1  0x               0 x2  0x        92ca12f8 x3  0x              30
    [0002.668] x4  0x               a x5  0x        92ca12f8 x6  0x              20 x7  0x               5
    [0002.678] x8  0x        83000000 x9  0x           21cdb x10 0x           21ccc x11 0x        92ca2fbc
    [0002.687] x12 0x        83000000 x13 0x        92ca303c x14 0x        83000000 x15 0x        92ca9158
    [0002.696] x16 0x           ffff0 x17 0x           10000 x18 0x               0 x19 0x               9
    [0002.705] x20 0x        83000000 x21 0x               1 x22 0x        92ca0468 x23 0x               5
    [0002.715] x24 0x        92c5d000 x25 0x        92ca0000 x26 0x        92ca04ec x27 0x        92c9f1f8
    [0002.724] x28 0x        92c5df72 x29 0x        92ca3000 lr  0x        92c0f054 sp  0x        92ca2dd0
    [0002.733] elr 0x        92c0f058
    [0002.737] spsr 0x        60000309
    [0002.740] -----------------------------------------------
    [0002.745] panic (caller 0x92c01238): die
    [0002.749] HALT: spinning forever...
    

    why?
    how to solve this problem?

    Prior to the flash.sh command, did add a sample rootfs into the “Linux_for_Tegra/rootfs/” directory? Did you then run (from “Linux_for_Tegra/”) the command “sudo ./apply_binaries.sh”? The basic flash command is correct, but if you didn’t load the NVIDIA-specific files onto the sample rootfs, then boot would fail.

    I added a sample rootfs into the “Linux_for_Tegra/rootfs/” directory
    then run sudo ./apply_binaries.sh (from Linux_for_Tegra/)
    then flash,sh
    dowload Tegra210_Linux_R32.2.1_aarch64.tbz2 and egra_Linux_Sample-Root-Filesystem_R32.2.1_aarch64.tbz2 (https://developer.nvidia.com/embedded/linux-tegra)

    The basic procedure you’ve used seems correct.

    Was the driver package (the part which creates the “Linux_for_Tegra/” directory) from the same release as the sample rootfs? Also, a lot of disk space is used, and it must be type ext4, so what do you see from the “Linux_for_Tegra/” directory on the host PC if you run this command (the “.” is important):

    df -H -T .
    

    If there was insufficient space, then the image would truncate. If the filesystem type was not ext4, then flash wouldn’t know about this, and would happily install the wrong filesystem type. If there is a difference in release used for the driver package versus the sample rootfs, then this too would cause an issue. If all of those are ruled out, then it would be useful to see the complete serial console boot log (the error shown is definitely a kernel issue, but it doesn’t say at what stage and gives no idea what lead up to the issue).

    thank you very much
    I command

    df -H -T .
    

    result:

    /dev/sda1      ext4  105G   93G  6.9G   94% /
    



    Not long ago I showed the following error in debugging the kernel.

    Unable to handle kernel NULL pointer dereference at virtual address 00000178
    [ 4.089150] pgd = ffffffc0015fa000
    [ 4.089155] [00000178] *pgd=000000017a5d8003, *pud=000000017a5d8003, *pmd=000000017a5d9003, *pte=00e8000050041707
    [ 4.089158] Internal error: Oops: 96000005 [#1] PREEMPT SMP
    [ 4.089160] Modules linked in:
    [ 4.089164] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.159 #1
    [ 4.089165] Hardware name: jetson_tx1 (DT)
    [ 4.089167] task: ffffffc0fa6f0000 ti: ffffffc0fa6a4000 task.ti: ffffffc0fa6a4000
    [ 4.089174] PC is at find_matching_color_fmt+0x10/0xa4
    [ 4.089177] LR is at camera_common_enum_mbus_code+0x44/0xb4
    [ 4.089179] pc : [<ffffffc0007b6d40>] lr : [<ffffffc0007b6e18>] pstate: 20000045
    [ 4.089180] sp : ffffffc0fa6a7830
    [ 4.089182] x29: ffffffc0fa6a7840 x28: 0000000000000018 
    [ 4.089185] x27: ffffffc0010f1fa0 x26: ffffffc0010f1fa8 
    [ 4.089187] x25: ffffffc0f8bb2050 x24: ffffffc0f8bb2050 
    [ 4.089189] x23: ffffffc07d35dbe8 x22: ffffffc07d35d018 
    [ 4.089191] x21: ffffffc0fa6a7908 x20: ffffffc0f9094c20 
    [ 4.089193] x19: ffffffc07d35d018 x18: 0000000000000000 
    [ 4.089195] x17: 0000000000000000 x16: 0000000000000000 
    [ 4.089197] x15: 0000000000000000 x14: 0ffffffffffffffe 
    [ 4.089200] x13: 0000000000000020 x12: 0101010101010101
    

    I am using the command "make menuconfig "now.
    And set “Compile the kernel with debug info” save and Recompile the kernel

    Then I find vmlinux in the kernel_out directory
    command “GDB vmlinux”

    ~/TX1283/kernel_sc/kernel_out$ sudo gdb vmlinux  
    GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
    Copyright (C) 2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "x86_64-linux-gnu".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from vmlinux...done.
    (gdb) l *find_matching_color_fmt+0x10/0xa4
    (gdb)
    

    But there is no error code.Where is it wrong?

    At least part of the problem is that you seem to be out of disk space (“out of space” is a relative thing…a flash probably needs 34GB 20GB (TX1 has a smaller image than TX2…the previously mentioned 34GB was for TX2 for safe extra space) or more of empty space). A result of flashing when out of space would be that the flash appears to run normally, but the image on the installed filesystem would be truncated (and this is unpredictable as to what would happen). You only have 6.9GB. You could delete these two files, and measure again with “df -H” to see if spare disk space is at least 32GB 20GB (I’d actually recommend more):

    cd "...wherever.../Linux_for_Tegra/bootloader/
    sudo rm system.img.*
    df -H -T .
    

    Note that not all flash operations need that file space, but if you flash the rootfs without space, then it is guaranteed you will have unexpected issues. Your most recent command would include flashing the rootfs. It is possible the issues you are running into are caused by this, but it isn’t certain.

    The actual error is related to camera color, but I couldn’t say specifically…someone knowing more about camera drivers would need to answer, but there is no way to answer unless we know the installed image is valid. You could verify at least that some of the NVIDIA-specific drivers are in place, but beware this is just a tiny amount of content (and for certain your camera software is not checked by this command):

    sha1sum -c /etc/nv_tegra_release