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: Thu, 17 Jun 2021 08:41:44 +0200	[thread overview]
Message-ID: <20210617064144.GZ9782@pengutronix.de> (raw)
In-Reply-To: <D8E37CF9-C7A1-40AE-B747-69E000D1B727@inside-m2m.de>

On Wed, Jun 16, 2021 at 05:57:09PM +0200, Konstantin Kletschke wrote:
> 
> > defaultenv/defaultenv-2-base/boot is the generic place used for all
> > boards. As you are using the beaglebone you should rather manipulate
> > arch/arm/boards/beaglebone/defaultenv-beaglebone/. This directory is
> > added with defaultenv_append_directory(defaultenv_beaglebone) to the
> > environment once we actually know we are running on the beaglebone.
> 
> I moved my customisations to the board specific part of the tree, works
> like a charm. Thanks for the clarification about its role.
> 
> > https://systemd.io/BOOT_LOADER_SPECIFICATION/. With that you can put
> > Kernel and device tree into the rootfs and start the whole thing with
> > "boot emmc".
> 
> Well, I am rather open minded to do that, even if I can configure the kernel and
> device tree from rootfs. But I need to investigate on how this is done properly…

In the end it goes down to putting an entry like this into
loader/entries/foo.conf into your rootfs:

title      brand new stuff
version    5.13-rc6
machine-id 6a9857a393724b7a981ebb5b8495b9ea
linux      /boot/sha-linux-phyFLEX-i.MX6
devicetree /boot/sha-oftree-phyFLEX-i.MX6
linux-appendroot true

Linux and device tree paths are relative to the top of the rootfs.
The good thing about it is that now you can exchange Kernel and device
tree as part of your rootfs or even with your distros package
management. The linux-appendroot property is barebox specific. When this
is found then barebox will add a suitable root= option to the Kernel
commandline, so you don't have to care about that anymore.

> 
> In both cases I get an error+warning:
> 
> Booting entry 'insidem2m'
> mounted /dev/mmc1.1 on /mnt/mmc1.1
> 
> 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=-@

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

  parent reply	other threads:[~2021-06-17  6:43 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 [this message]
2021-06-18 13:15       ` Konstantin Kletschke
2021-06-21  4:01         ` Sascha Hauer
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=20210617064144.GZ9782@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