mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Konstantin Kletschke <konstantin.kletschke@inside-m2m.de>
To: Sascha Hauer <sha@pengutronix.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:58:20 +0200	[thread overview]
Message-ID: <YnORrP0yMWAtYkW+@Hephaistos> (raw)
In-Reply-To: <20220505082507.GM4012@pengutronix.de>

On Thu, May 05, 2022 at 10:25:07AM +0200, Sascha Hauer wrote:

> 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.

I investigated from running system:

/dev/mmcblk1p3: LABEL="rootfs.1" UUID="6bd1a1f7-f1cb-4121-b1e1-4abe41aa05e6" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mmcblk1p1: SEC_TYPE="msdos" UUID="ACC9-583C" BLOCK_SIZE="512" TYPE="vfat"
/dev/mmcblk1p4: UUID="348c5617-7055-44f9-a658-562d8bb299a1" BLOCK_SIZE="512" TYPE="xfs"
/dev/mmcblk1p2: UUID="e15c856f-aa7f-46b2-9f2e-58672eaaeca5" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mmcblk0p2: UUID="f4c88afd-2420-4d50-8672-9ed4cd2d3ff9" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="eaabcc21-02"
/dev/mmcblk0p1: SEC_TYPE="msdos" UUID="CBEC-9FB6" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="eaabcc21-01"

You mean this PARTUUID stuff, right? Interestingly the external SD-Card
has something like this. So I tested bootloaderspec booting from there:

barebox@TI AM335x BeagleBone black:/ mount mmc0.1
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
mounted /dev/mmc0.1 on /mnt/mmc0.1
barebox@TI AM335x BeagleBone black:/ devinfo ext40
Driver: ext4
Bus: fs
Parent: mmc0
Parameters:
  linux.bootargs: root=PARTUUID=eaabcc21-02 (type: string)
barebox@TI AM335x BeagleBone black:/ boot mmc0.1
Booting entry 'BeagleBone Black - Inside M2M (/mnt/mmc0.1/loader/entries/boneblack.conf)'
blspec: booting BeagleBone Black - Inside M2M from mmc0
Adding "root=PARTUUID=eaabcc21-02" to Kernel commandline

Loading ARM Linux zImage '/mnt/mmc0.1//boot/zImage'
Loading devicetree from '/mnt/mmc0.1//boot/am335x-boneblack.dtb'
commandline: root=PARTUUID=eaabcc21-02 console=ttyS0,115200n8 rootwait
Booting Linux on physical CPU 0x0

[...] blablabla [...]

mmcblk0: mmc0:aaaa SC16G 14.8 GiB
 mmcblk0: p1 p2
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) readonly on device 179:26.

Thanks for pointing out to the root cause!
Either I change my sfdisk scripting to create partitions including
PARTUUIDs or... is utilizing this "variable mmc1.nt_signature" a
sufficient workaround in barebox? I can not handle this information,
yet.

Kind Regards
Konsti

-- 
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

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

konstantin.kletschke@inside-m2m.de
http://www.inside-m2m.de 

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


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


  reply	other threads:[~2022-05-05  9:00 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
2022-05-05  8:58           ` Konstantin Kletschke [this message]
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=YnORrP0yMWAtYkW+@Hephaistos \
    --to=konstantin.kletschke@inside-m2m.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sha@pengutronix.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