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, a.fatoum@pengutronix.de
Subject: Re: Boot from SD if SD-Card is present - Beaglebone Black
Date: Thu, 5 May 2022 10:25:07 +0200	[thread overview]
Message-ID: <20220505082507.GM4012@pengutronix.de> (raw)
In-Reply-To: <YnN7wHE7AgE0FC0h@Hephaistos>

On Thu, May 05, 2022 at 09:24:48AM +0200, Konstantin Kletschke wrote:
> 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 :-|

Is this a DOS partition table or GPT on this card?
I assume it's a DOS partition table in which case you should have a
variable mmc1.nt_signature. Set this to some arbitrary 32bit value.
Several partitioning tools set this automatically, but not all it seems.

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:[~2022-05-05  8:26 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
2022-05-05  8:25         ` Sascha Hauer [this message]
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:
  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=20220505082507.GM4012@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@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