Extlinux.conf: Kernel command line options not appended when using FDT

Hi,

when specifying a device tree in extlinux.conf, the appended kernel command line option are not used by the kernel.
I see the same behavior with my custom device tree or the NVIDIA provided device tree tegra210-p3448-0000-p3449-0000-b00.dtb.
My board is a Jetson Nano Developer Kit with a flashed NVIDIA jetson-nano-jp451-sd-card-image.zip image.

/boot/extlinux/extlinux.conf:

TIMEOUT 30
DEFAULT My overlay

MENU TITLE L4T boot options

LABEL My overlay
	MENU LABEL My overlay
	LINUX /boot/Image
#	FDT /boot/kernel_tegra210-p3448-0000-p3449-0000-b00-my-overlay.dtb
	FDT /boot/tegra210-p3448-0000-p3449-0000-b00.dtb
	INITRD /boot/initrd
	APPEND ${cbootargs} mem=3G

Boot log:

U-Boot 2020.04-g6b630d64fd (Feb 19 2021 - 08:37:46 -0800)

SoC: tegra210
Model: NVIDIA Jetson Nano Developer Kit
Board: NVIDIA P3450-0000
DRAM:  4 GiB
MMC:   sdhci@700b0000: 1, sdhci@700b0600: 0
Loading Environment from SPI Flash... SF: Detected mx25u3235f with page size 256 Bytes, erase size 4 KiB, total 4 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
Hit any key to stop autoboot:  2  1  0 
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
1195 bytes read in 26 ms (43.9 KiB/s)
L4T boot options
1:	primary kernel
2:	My overlay
Enter choice: 2:	My overlay
Retrieving file: /boot/initrd
7159841 bytes read in 329 ms (20.8 MiB/s)
Retrieving file: /boot/Image
34338824 bytes read in 1503 ms (21.8 MiB/s)
append: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M 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 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 mem=3G
Retrieving file: /boot/tegra210-p3448-0000-p3449-0000-b00.dtb
243342 bytes read in 30 ms (7.7 MiB/s)
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
ERROR: reserving fdt memory region failed (addr=0 size=0)
ERROR: reserving fdt memory region failed (addr=0 size=0)
   Using Device Tree in place at 0000000083000000, end 000000008303e68d
copying carveout for /host1x@50000000/dc@54200000...
copying carveout for /host1x@50000000/dc@54240000...
DT property /chosen/nvidia,bluetooth-mac missing in source; can't copy
DT property /chosen/nvidia,wifi-mac missing in source; can't copy
DT property /psci/nvidia,system-lp0-disable missing in source; can't copy

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.201-tegra (buildbrain@mobile-u64-5294-d8000) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Fri Feb 19 08:40:32 PST 2021
[    0.000000] Boot CPU: AArch64 Processor [411fd071]
[    0.000000] OF: fdt:memory scan node memory@80000000, reg size 32,
[    0.000000] OF: fdt: - 80000000 ,  7ee00000
[    0.000000] OF: fdt: - 100000000 ,  7f200000
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000070006000 (options '')
[    0.000000] bootconsole [uart8250] enabled
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb1_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb1_carveout': base 0x0000000000000000, size 0 MiB
[    0.000000] OF: reserved mem: initialized node vpr-carveout, compatible id nvidia,vpr-carveout
[    0.000000] OF: reserved mem: initialized node iram-carveout, compatible id nvidia,iram-carveout
[    0.000000] OF: reserved mem: initialized node ramoops_carveout, compatible id nvidia,ramoops
[    0.000000] cma: Reserved 64 MiB at 0x00000000fac00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.1
[    0.000000] percpu: Embedded 24 pages/cpu s57560 r8192 d32552 u98304
[    0.000000] CPU features: enabling workaround for ARM erratum 832075
[    0.000000] Speculative Store Bypass Disable mitigation not required
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1023544
[    0.000000] Kernel command line: tegraid=21.1.2.0.0 ddr_die=4096M@2048M section=512M 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 console=ttyS0,115200n8 debug_uartport=lsport,4 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=0x1000@0xff780000 core_edp_mv=1125 core_edp_ma=4000 gpt  earlycon=uart8250,mmio32,0x70006000  root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0  

Changes of the bootargs (here: bootargs = "earlycon=uart8250,mmio32,0x70006000";) in the device tree file are ignored as well.
Only if the FDT line is omitted or commented out in extlinux.conf the appended kernel command line options are seen by the kernel.

So how can I add some kernel command line options and use a custom device tree at the same time?

Best regards

hello ruediger.koepke,

it’s CBoot functionality to include a default booting scan sequence, device tree blob is loaded via FDT entry from filesystem, otherwise, it’s loaded from DTB partition.
please also check CBoot session for more details.

there’s flash configuration file (i.e. p3448-0000.conf.common) to include boot args. please have modification of CMDLINE_ADD and flash the target to see if it works.
thanks

Hi JerryChang,

flashing the target for changing the kernel command line is not a good practical option for us. We found another work-around using boot.src instead of extlinux.conf.

On Jetson Xavier NX the FDT and APPEND mechanism with extlinux.conf works as expected. There CBoot handles this, not U-Boot as for the Jetson Nano.
So I would like to treat this issue as a bug report.

Best regards

hello ruediger.koepke,

how about remove U‑Boot as the secondary bootloader by setting USE_UBOOT=0.
you can set the environment variable through flash.sh, for example, $ sudo ./flash.sh USE_UBOOT=0 jetson-nano mmcblk0p1
thanks

Hello JerryChang,

I was about to start a post on that very same subject

With jetpack-4.5.1, adding options in the APPEND line in /boot/extlinux/extlinux.conf (like ignore_loglevel, or init=/bin/sh, or initcall_debug) is not taken into account and is not reflected in what linux shows in /proc/cmdline. Actually it seems that the whole APPEND line is ignored and that some other content is used instead. Using ‘APPEND’ to specify the linux command line must work !!!

yes, I’ve also notice it, and this looks like JetPack-4.5.1 regression.

Do you know if that regression was already present in Jetpack-4.5[.0] for TX2 ?

I try to upgrade my kernels from jetpack-4.3 to jetpack-4.5.1 because we want to have a common kernel base for our TX2-based and our Nano-based boards.

hello phdm,

sorry, I am not sure; at least this don’t seem with JetPack-4.4.1

Update: this should be fixed in rel-32.6.1. Please try.

Thanks.