mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Konstantin Kletschke <konstantin.kletschke@inside-m2m.de>
Cc: barebox@lists.infradead.org
Subject: Re: Compiled in boot environment and dtbo files
Date: Mon, 21 Jun 2021 06:01:55 +0200	[thread overview]
Message-ID: <20210621040155.GD9782@pengutronix.de> (raw)
In-Reply-To: <A4554499-51AF-4180-9D58-625A8CA58C97@inside-m2m.de>

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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2021-06-21  4:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16  8:10 Konstantin Kletschke
2021-06-16 12:34 ` Sascha Hauer
2021-06-16 15:57   ` Konstantin Kletschke
2021-06-16 19:55     ` Trent Piepho
2021-06-18 12:43       ` Konstantin Kletschke
2021-06-17  6:41     ` Sascha Hauer
2021-06-18 13:15       ` Konstantin Kletschke
2021-06-21  4:01         ` Sascha Hauer [this message]
2021-06-21 14:21           ` Konstantin Kletschke
2021-06-22 10:40             ` Konstantin Kletschke
2021-06-18  6:48 ` Ahmad Fatoum
2021-06-18 13:16   ` Konstantin Kletschke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621040155.GD9782@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=konstantin.kletschke@inside-m2m.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox