Compiled in boot environment and dtbo files

Sascha Hauer sha at pengutronix.de
Sun Jun 20 21:01:55 PDT 2021


On Fri, Jun 18, 2021 at 03:15:32PM +0200, Konstantin Kletschke wrote:
> 
> 
> > In the end it goes down to putting an entry like this into
> > loader/entries/foo.conf into your rootfs:
> 
> I will investigate this definitely carefully since this has nice advantages
> controlling the boot from userspace, especially in order to gain a proper
> failover environment.
> 
> Meanwhile I realized I most probably have no problem with barebox and
> dtb/dtbo handling. At least it _is_ preparing “my” dtbo files and trying to 
> handle them.
> 
> In my initial mail regarding this thread I mentioned how this works on my 
> Beaglebones when I kept the delivered debian environment with u-boot.
> The goal is to have the serial lines enabled as serial after bootup on the
> pinheaders and there
> this works with those dtbo files. Also I realized I can omit them and bitbang
> in the GPIO multiplex mechanism below /sys/platform/... to gain the same
> effect. Because the debian kernel setup (including the dtb file?) is enabling all
> four serial lines at boot, regardless what I do:
> 
> [    0.952482] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
> [    1.713812] console [ttyS0] enabled
> [    1.718482] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
> [    1.728498] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
> [    1.738387] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
> [    1.748351] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
> [    1.758188] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250
> 
> The dtbo files only do some GPIO multiplexing (I realized yesterday).
> 
> In my kernel setup only the first serial interface gets enabled:
> 
> [    0.734644] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 29, base_baud = 3000000) is a OMAP UART0
> [    1.303154] printk: console [ttyO0] enabled
> 
> Maybe the overlays are not working since there are referring to not enabled serial interfaces, 
> like "target = <&uart1>;” for example? I am still investigating where differences between my 
> rather vanilla setup and the debian changes are...
> 
> 
> >> Loading ARM Linux zImage '/boot/uImage'
> >> Loading devicetree from '/boot/am335x-boneblack.dtb'
> >> ERROR: of_resolver: __symbols__ missing from base devicetree
> >> WARNING: Failed to fixup node in of_overlay_fixup+0x1/0x4: Invalid argument
> >> ERROR: of_resolver: __symbols__ missing from base devicetree
> >> WARNING: Failed to fixup node in of_overlay_fixup+0x1/0x4: Invalid argument
> > 
> > You have to compile the device tree with -@ passed to dtc. If you are
> > building the device tree in the Kernel this does the trick:
> > 
> > make dtbs DTC_FLAGS=-@
> 
> I prepared a kernel (usually I use yocto, I did not found where to apply flags for “make dtbs” so I
> prepared a test setup) and dtbo files this way. The compile process spits many warnings and the 
> resulting binary size increases, but the error “[…] Invalid argument" is identical.

Have a look at the generated dtb file with 'dtc -I dtb -O dts <file>'.
It should contain a __symbols__ node.

BTW do you have a good reason to use overlays? Overlays only have a
value when you have different hardware variants in which different
overlays are loaded. If that's not the case I'd just go with a static
devicetree and be done with it.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list