* Boot from SD if SD-Card is present - Beaglebone Black
@ 2022-05-01 16:18 Konstantin Kletschke
2022-05-02 6:35 ` Ahmad Fatoum
0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-01 16:18 UTC (permalink / raw)
To: barebox
Hi All,
I have a Beaglebone Black whith internal MMC and external SD-Card
interface.
I boot from internal MMC always. The system itself aways boots from
internal MMC.
Is there a way - may be scriptable in boot entry - to start system from
external SD-Card, if it is present?
Normally I boot this way, bootchooser select system0 or system1:
#!/bin/sh
mount mmc1.1
global.bootm.image=/mnt/mmc1.1/boot/zImage
global.bootm.oftree=/mnt/mmc1.1/boot/am335x-boneblack.dtb
global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
If I stop autoboot and want to use external SD-Card I manually select
insidem2m_sd as a boot entry:
#!/bin/sh
mount mmc0.1
global.bootm.image=/mnt/mmc0.1/boot/zImage
global.bootm.oftree=/mnt/mmc0.1/boot/am335x-boneblack.dtb
global.linux.bootargs.dyn.root="root=/dev/mmcblk1p2 rootfstype=ext4 rootwait"
Can this be something like:
IF external SD-CARD IS PRESENT bootentry is insidem2m_sd ELSE
bootchooser
?
Please obey if you are inspecting the CMDLINE, in more recent Kernels
the mmcblk0 and mmcblk1 numbering is exchanged.
Kind Regards
Konstantin
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-01 16:18 Boot from SD if SD-Card is present - Beaglebone Black Konstantin Kletschke
@ 2022-05-02 6:35 ` Ahmad Fatoum
2022-05-03 14:14 ` Konstantin Kletschke
0 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2022-05-02 6:35 UTC (permalink / raw)
To: Konstantin Kletschke, barebox
Hello Konstantin,
On 01.05.22 18:18, Konstantin Kletschke wrote:
> Hi All,
>
> I have a Beaglebone Black whith internal MMC and external SD-Card
> interface.
>
> I boot from internal MMC always. The system itself aways boots from
> internal MMC.
>
> Is there a way - may be scriptable in boot entry - to start system from
> external SD-Card, if it is present?
There is, but I'd check first if it's possible to boot from eMMC only
as a fallback if SD boot failed. On some bootroms, this is possible
and can easily be scripted in barebox with $global.bootsource
and $global.bootsource_instance variables.
>
> Normally I boot this way, bootchooser select system0 or system1:
>
> #!/bin/sh
>
> mount mmc1.1
>
> global.bootm.image=/mnt/mmc1.1/boot/zImage
> global.bootm.oftree=/mnt/mmc1.1/boot/am335x-boneblack.dtb
> global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
"The barebox way" is to keep this configuration confined to the rootfs
as it makes it easier to change this parameters without changing the
bootloader. We usually do that with bootloader spec file (name it e.g.
/loader/entries/boneblack.conf):
title BeagleBone Black - M2M
version 5.17
options rootwait
linux /boot/zImage
devicetree /boot/am335x-boneblack.dtb
linux-appendroot true
This way, you can just type boot mmc1.1 to boot. linux-appendroot
will have barebox add a root= option pointing at the device it read
the bootloader spec file from. You'll want to set CONFIG_MMCBLKDEV_ROOTARG=y
to get root=/dev/mmcblk* fixups instead of partuuid (which might be the
same if you have the exact same image on SD and eMMC).
> If I stop autoboot and want to use external SD-Card I manually select
> insidem2m_sd as a boot entry:
>
> #!/bin/sh
>
> mount mmc0.1
>
> global.bootm.image=/mnt/mmc0.1/boot/zImage
> global.bootm.oftree=/mnt/mmc0.1/boot/am335x-boneblack.dtb
> global.linux.bootargs.dyn.root="root=/dev/mmcblk1p2 rootfstype=ext4 rootwait"
>
> Can this be something like:
>
> IF external SD-CARD IS PRESENT bootentry is insidem2m_sd ELSE
> bootchooser
boot already accepts multiple boot targets to try in order,
so you could do boot mmc0.1 mmc1.1
Or if it yields better error messages:
if detect mmc0; then
boot mmc0.1
fi
boot mmc1.1
> Please obey if you are inspecting the CMDLINE, in more recent Kernels
> the mmcblk0 and mmcblk1 numbering is exchanged.
On less recent kernels, the order might change, but at least now it's
fixed (with aliases).
Cheers,
Ahmad
>
>
> Kind Regards
> Konstantin
>
>
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-02 6:35 ` Ahmad Fatoum
@ 2022-05-03 14:14 ` Konstantin Kletschke
2022-05-05 7:06 ` Sascha Hauer
0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-03 14:14 UTC (permalink / raw)
To: barebox; +Cc: a.fatoum
On Mon, May 02, 2022 at 08:35:55AM +0200, Ahmad Fatoum wrote:
> There is, but I'd check first if it's possible to boot from eMMC only
> as a fallback if SD boot failed. On some bootroms, this is possible
> and can easily be scripted in barebox with $global.bootsource
> and $global.bootsource_instance variables.
When I type "magicvars" I have no global.boosource. Is that a "no
bootsource in your bootrom" or has this a fetaure to be enabled as
a CONFIG_ at compile time?
However, booting from internal MMC is normal use case, SD-Cards are only
inserted for updates and if some invalid SD-Card is inserted and system
does not boot because of that I can live with that.
> title BeagleBone Black - M2M
> version 5.17
> options rootwait
> linux /boot/zImage
> devicetree /boot/am335x-boneblack.dtb
> linux-appendroot true
>
> This way, you can just type boot mmc1.1 to boot. linux-appendroot
> will have barebox add a root= option pointing at the device it read
> the bootloader spec file from. You'll want to set CONFIG_MMCBLKDEV_ROOTARG=y
> to get root=/dev/mmcblk* fixups instead of partuuid (which might be the
> same if you have the exact same image on SD and eMMC).
I already investigated bootloader spec but have it much more complicated
in memory. This is darn simple and allows me to boot from different
partitions with this same identical setup, right? I will go for it.
I have no CONFIG_MMCBLKDEV_ROOTARG=y, UUID is fine since all roots are
individually formatted, no same image.
But alas, the rootfs is not appended. I created an entry just like you
proposed and this happens:
barebox@TI AM335x BeagleBone black:/ boot mmc1.2
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
Booting entry 'BeagleBone Black - M2M (/mnt/mmc1.2/loader/entries/boneblack.conf)'
blspec: booting BeagleBone Black - M2M from mmc1
Loading ARM Linux zImage '/mnt/mmc1.2//boot/zImage'
Loading devicetree from '/mnt/mmc1.2//boot/am335x-boneblack.dtb'
commandline: console=ttyS0,115200n8 rootwait
[...]
Waiting for root device ...
What could I do about this?
> boot already accepts multiple boot targets to try in order,
Okay, I was just not aware somehow. To use it for that.
So /env/nv/boot.default will take "mmc0.1 bootchooser" with bootchooser
deciding between internal mmc1.1 and mmc1.2.
If i get bootloader spec booting to fly.
> if detect mmc0; then
> boot mmc0.1
> fi
>
> boot mmc1.1
Where is this scripting stuff going into? It is not boot.default (gives
me errors like "no entry if ... found"), is this going into entry
boot.default points to?
Since I have bootloader spec not running yet, I have "insidem2m_sd
bootchooser" in /env/nv/boot.default. This works well, if no SD-Card is
inserted and I get a nasty red error with both variants.
Without the detect mechanism in insidem2m_sd I get
Booting entry 'insidem2m_sd'
mount: No such file or directory
could not open /mnt/mmc0.1/boot/zImage: No such file or directory
ERROR: Booting entry 'insidem2m_sd' failed
Booting entry 'bootchooser'
with this detect mechanism I get
Booting entry 'insidem2m_sd'
detect: Connection timed out
ERROR: Running script '/env/boot/insidem2m_sd' failed: error -127
ERROR: Booting entry 'insidem2m_sd' failed
Booting entry 'bootchooser'
Each time it goes to bootchooser which successfully boots internal
MMC... When SD-Card is inserted it chooses it successfully in both ways,
so both variants work well.
> On less recent kernels, the order might change, but at least now it's
> fixed (with aliases).
I spent the whole day to update Kernel, bootloader, rescue SD-Cards,
Install scripts so now internal mmc is mmcblk1, external SD-Card is
mmcblk0 (5.10.12 -> 5.10.63). Like barebox was alaways.
Kind Regards
Konstantin Kletschke
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-03 14:14 ` Konstantin Kletschke
@ 2022-05-05 7:06 ` Sascha Hauer
2022-05-05 7:24 ` Konstantin Kletschke
0 siblings, 1 reply; 10+ messages in thread
From: Sascha Hauer @ 2022-05-05 7:06 UTC (permalink / raw)
To: Konstantin Kletschke; +Cc: barebox, a.fatoum
Hey Konsti,
On Tue, May 03, 2022 at 04:14:37PM +0200, Konstantin Kletschke wrote:
> On Mon, May 02, 2022 at 08:35:55AM +0200, Ahmad Fatoum wrote:
>
> > There is, but I'd check first if it's possible to boot from eMMC only
> > as a fallback if SD boot failed. On some bootroms, this is possible
> > and can easily be scripted in barebox with $global.bootsource
> > and $global.bootsource_instance variables.
>
> When I type "magicvars" I have no global.boosource. Is that a "no
> bootsource in your bootrom" or has this a fetaure to be enabled as
> a CONFIG_ at compile time?
It's only "bootsource" and "bootsource_instance", without the global.
prefix for historic reasons.
>
> However, booting from internal MMC is normal use case, SD-Cards are only
> inserted for updates and if some invalid SD-Card is inserted and system
> does not boot because of that I can live with that.
>
> > title BeagleBone Black - M2M
> > version 5.17
> > options rootwait
> > linux /boot/zImage
> > devicetree /boot/am335x-boneblack.dtb
> > linux-appendroot true
> >
> > This way, you can just type boot mmc1.1 to boot. linux-appendroot
> > will have barebox add a root= option pointing at the device it read
> > the bootloader spec file from. You'll want to set CONFIG_MMCBLKDEV_ROOTARG=y
> > to get root=/dev/mmcblk* fixups instead of partuuid (which might be the
> > same if you have the exact same image on SD and eMMC).
>
> I already investigated bootloader spec but have it much more complicated
> in memory. This is darn simple and allows me to boot from different
> partitions with this same identical setup, right? I will go for it.
>
> I have no CONFIG_MMCBLKDEV_ROOTARG=y, UUID is fine since all roots are
> individually formatted, no same image.
>
> But alas, the rootfs is not appended. I created an entry just like you
> proposed and this happens:
>
>
> barebox@TI AM335x BeagleBone black:/ boot mmc1.2
> ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
> Booting entry 'BeagleBone Black - M2M (/mnt/mmc1.2/loader/entries/boneblack.conf)'
> blspec: booting BeagleBone Black - M2M from mmc1
>
> Loading ARM Linux zImage '/mnt/mmc1.2//boot/zImage'
> Loading devicetree from '/mnt/mmc1.2//boot/am335x-boneblack.dtb'
> commandline: console=ttyS0,115200n8 rootwait
> [...]
> Waiting for root device ...
>
> What could I do about this?
Try mounting manually with "mount mmc1.2". What does "devinfo ext40" say
then? It should contain a linux.bootargs option.
>
> > boot already accepts multiple boot targets to try in order,
>
> Okay, I was just not aware somehow. To use it for that.
>
> So /env/nv/boot.default will take "mmc0.1 bootchooser" with bootchooser
> deciding between internal mmc1.1 and mmc1.2.
> If i get bootloader spec booting to fly.
>
>
> > if detect mmc0; then
> > boot mmc0.1
> > fi
> >
> > boot mmc1.1
>
> Where is this scripting stuff going into? It is not boot.default (gives
> me errors like "no entry if ... found"), is this going into entry
> boot.default points to?
It would go to /env/boot/somename
Regards,
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-05 7:06 ` Sascha Hauer
@ 2022-05-05 7:24 ` Konstantin Kletschke
2022-05-05 8:25 ` Sascha Hauer
0 siblings, 1 reply; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-05 7:24 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, a.fatoum
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,
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-05 7:24 ` Konstantin Kletschke
@ 2022-05-05 8:25 ` Sascha Hauer
2022-05-05 8:58 ` Konstantin Kletschke
2022-05-05 9:38 ` Konstantin Kletschke
0 siblings, 2 replies; 10+ messages in thread
From: Sascha Hauer @ 2022-05-05 8:25 UTC (permalink / raw)
To: Konstantin Kletschke; +Cc: barebox, a.fatoum
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-05 8:25 ` Sascha Hauer
@ 2022-05-05 8:58 ` Konstantin Kletschke
2022-05-05 9:38 ` Konstantin Kletschke
1 sibling, 0 replies; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-05 8:58 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, a.fatoum
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
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
1 sibling, 1 reply; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-05 9:38 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox, a.fatoum
On Thu, May 05, 2022 at 10:25:07AM +0200, Sascha Hauer wrote:
> Several partitioning tools set this automatically, but not all it seems.
I got it. The partitions are created via sfdisk. No PARTUUID.
If I change the disk identifier with fdisk afterwards, the partitions
magically also get PARTUUIDs. This can be scripted (by me):
Something like
fdisk /dev/mmcblk1
x
i
0xaffedead
r
w
Problem solved, with this the bootloader spec is working and I will
implement that!
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-05 9:38 ` Konstantin Kletschke
@ 2022-05-06 12:20 ` Ahmad Fatoum
2022-05-09 8:04 ` Konstantin Kletschke
0 siblings, 1 reply; 10+ messages in thread
From: Ahmad Fatoum @ 2022-05-06 12:20 UTC (permalink / raw)
To: Konstantin Kletschke, Sascha Hauer; +Cc: barebox
Hello Konstantin,
On 05.05.22 11:38, Konstantin Kletschke wrote:
> On Thu, May 05, 2022 at 10:25:07AM +0200, Sascha Hauer wrote:
>
>> Several partitioning tools set this automatically, but not all it seems.
>
> I got it. The partitions are created via sfdisk. No PARTUUID.
>
> If I change the disk identifier with fdisk afterwards, the partitions
> magically also get PARTUUIDs. This can be scripted (by me):
> Something like
> fdisk /dev/mmcblk1
> x
> i
> 0xaffedead
> r
> w
>
>
> Problem solved, with this the bootloader spec is working and I will
> implement that!
Great that you got it working. I'd still suggest that CONFIG_MMCBLKDEV_ROOTARG=y
be used for new projects with new kernels an with the same aliases hardcoded in
barebox and Linux. PARTUUID might be the best thing you can on x86 without
an initramfs, but we have device tree, so why not make use of that to
be absolutely sure bootloader and Linux address the same partition.
Cheers,
Ahmad
>
> Regards
> Konsti
>
--
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Boot from SD if SD-Card is present - Beaglebone Black
2022-05-06 12:20 ` Ahmad Fatoum
@ 2022-05-09 8:04 ` Konstantin Kletschke
0 siblings, 0 replies; 10+ messages in thread
From: Konstantin Kletschke @ 2022-05-09 8:04 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: Sascha Hauer, barebox
On Fri, May 06, 2022 at 02:20:04PM +0200, Ahmad Fatoum wrote:
> Great that you got it working. I'd still suggest that CONFIG_MMCBLKDEV_ROOTARG=y
> be used for new projects with new kernels an with the same aliases hardcoded in
Looks great, works:
barebox@TI AM335x BeagleBone black:/ boot mmc1.1
ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64
Booting entry 'BeagleBone Black - Inside M2M (/mnt/mmc1.1/loader/entries/boneblack.conf)'
blspec: booting BeagleBone Black - Inside M2M from mmc1
Adding "root=/dev/mmcblk1p2" to Kernel commandline
Thank you!
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
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-05-09 8:06 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 16:18 Boot from SD if SD-Card is present - Beaglebone Black 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
2022-05-05 9:38 ` Konstantin Kletschke
2022-05-06 12:20 ` Ahmad Fatoum
2022-05-09 8:04 ` Konstantin Kletschke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox