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 09:06:02 +0200 [thread overview] Message-ID: <20220505070602.GG4012@pengutronix.de> (raw) In-Reply-To: <YnE4zTD4Klact2eQ@Hephaistos> 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
next prev parent reply other threads:[~2022-05-05 7:07 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 [this message] 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
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=20220505070602.GG4012@pengutronix.de \ --to=sha@pengutronix.de \ --cc=a.fatoum@pengutronix.de \ --cc=barebox@lists.infradead.org \ --cc=konstantin.kletschke@inside-m2m.de \ --subject='Re: Boot from SD if SD-Card is present - Beaglebone Black' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox