endian-benjamin
Posts: 1
Joined: Mon Oct 01, 2018 1:19 pm

bootROM mangling my cmdline? (pi-3 with u-boot + mender)

Mon Oct 01, 2018 1:31 pm

Hi,

I'm attempting to switch from the miniuart to the pl011 uart for the serial console. Without U-Boot's involvment, this goes fine with the standard dtoverlay addition to config.txt, but with U-Boot, weird things happen. First of all, it refuses to accept the "/aliases" overlay on serial0 and serial1 without crashing. But removing that, weird things still happen -- something's changing my cmdline.txt settings and I can't figure out what it is:

Code: Select all

root@raspberrypi3:~# cat /proc/cmdline 
8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3e200000 vc_mem.mem_size=0x3f600000 dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait vt.global_cursor_default=0 console=ttyS0,115200 root=/dev/mmcblk0p2 fbcon=map:10 fbcon=font:VGA8x8
but

Code: Select all

# cat cmdline.txt 
dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait vt.global_cursor_default=0 console=ttyAMA0,115200 root=${mender_kernel_root}
and, even weirder:

Code: Select all

U-Boot> fdt addr $fdt_addr
U-Boot> fdt get value bootargs /chosen bootargs
U-Boot> print bootargs
bootargs=8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3e200000 vc_mem.mem_size=0x3f600000  dwc_otg.lpm_enable=0 rootfstype=ext4 rootwait vt.global_cursor_default=0 console=ttyS0,115200 root=${mender_kernel_root}
Three opinions, three different consoles -- anyone know what I have to do to get cmdline.txt to propagate to the kernel?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26650
Joined: Sat Jul 30, 2011 7:41 pm

Re: bootROM mangling my cmdline? (pi-3 with u-boot + mender)

Mon Oct 01, 2018 4:03 pm

The 'bootcode' on the VC4 adjusts the command line according to the device tree, and as you can see, according to what frame buffer is created by the VC4. Probably some other changes as well depending on what the VC4 detects/sets up.

Which particular bit is causing problems?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

rduo
Posts: 5
Joined: Fri Dec 14, 2018 11:42 pm

Re: bootROM mangling my cmdline? (pi-3 with u-boot + mender)

Mon Dec 17, 2018 6:50 pm

I work on the Mender open source project, and happy to let you know that we just released support for Raspbian: https://hub.mender.io/t/raspberry-pi-3- ... b-raspbian

Following this guide should be much easier than trying to modify the boot logic yourself. Hope this helps!

Return to “Advanced users”