mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Konstantin Kletschke <>
To: Sascha Hauer <>
Subject: Re: Boot from SD if SD-Card is present - Beaglebone Black
Date: Thu, 5 May 2022 09:24:48 +0200	[thread overview]
Message-ID: <YnN7wHE7AgE0FC0h@Hephaistos> (raw)
In-Reply-To: <>

Hey Sascha,

On Thu, May 05, 2022 at 09:06:02AM +0200, Sascha Hauer wrote:

> It's only "bootsource" and "bootsource_instance", without the global.
> prefix for historic reasons.

Ah okay. Those varables are existing.

If I boot from internal MMC bootsource is mmc and instance is 1.
If I boot from external SD-Card bootsource is mmc and instance is 0.

I hope I did not confuse, my use case is to boot from internal MMC
always, booting from external SD-Card (i.e. use SD-Cards bootloader)
requires pressing a button which is not accessible. Boot from internal
always, if SD-Card is there use its rernel/rootfs.

So it is 100% sufficient (succesfully tested already) doing something like:
* boot.default=insidem2m_sd bootchooser
** /env/boot/insidem2m_sd mounts and boots mmc0.1
** bootchooser targets (system0, system1) mount and boot mmc1.1/mmc1.2 

Haken dran!

> Try mounting manually with "mount mmc1.2". What does "devinfo ext40" say
> then? It should contain a linux.bootargs option.

barebox@TI AM335x BeagleBone black:/ mount mmc1.2
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
mounted /dev/mmc1.2 on /mnt/mmc1.2
barebox@TI AM335x BeagleBone black:/ cat /mnt/mmc1.2/loader/entries/boneblack.conf 
title		BeagleBone Black - Inside M2M
version		5.14
options		rootwait
linux		/boot/zImage
devicetree	/boot/am335x-boneblack.dtb
linux-appendroot truebarebox@TI AM335x BeagleBone black:/ devinfo ext40
Driver: ext4
Bus: fs
Parent: mmc1
barebox@TI AM335x BeagleBone black:/ 

So, no bootargs option :-|

> > Where is this scripting stuff going into? It is not boot.default (gives

> It would go to /env/boot/somename

Thanks for pointing this out!

Kind Regards,

Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010 

Geschäftsführung: Michael Emmert, Ingo Haase, Dr. Fred Könemann, Derek Uhlig
HRB: 111204, AG Hannover

barebox mailing list

  reply	other threads:[~2022-05-05  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-01 16:18 Konstantin Kletschke
2022-05-02  6:35 ` Ahmad Fatoum
2022-05-03 14:14   ` Konstantin Kletschke
2022-05-05  7:06     ` Sascha Hauer
2022-05-05  7:24       ` Konstantin Kletschke [this message]
2022-05-05  8:25         ` Sascha Hauer
2022-05-05  8:58           ` Konstantin Kletschke
2022-05-05  9:38           ` Konstantin Kletschke
2022-05-06 12:20             ` Ahmad Fatoum
2022-05-09  8:04               ` 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:

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

  git send-email \
    --in-reply-to=YnN7wHE7AgE0FC0h@Hephaistos \ \ \ \ \

* 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