Booting FreeBSD on BeagleBone Black from microSD by default
Ian Lepore
ian at freebsd.org
Tue Apr 12 14:19:38 UTC 2016
On Mon, 2016-04-11 at 06:33 -0700, Tim Kientzle wrote:
> > On Apr 10, 2016, at 9:06 PM, Hal Murray <hmurray at megapathdsl.net>
> > wrote:
> >
> >
> > Does anybody have the recipe for setting things up so that power on
> > boots
> > from the microSD card without holding down the button?
>
> If the ROM cannot boot from eMMC, it will try to boot from microSD.
>
> The easiest way to make the eMMC not bootable is to zero out the
> boot sectors using dd:
>
> dd if=/dev/zero of=<eMMC device> count=100
>
> Of course, this makes the eMMC entirely unusable. I think you
> can then reformat the eMMC (make sure it does not have a FAT
> partition and does not have boot blocks) so it can be used without
> the ROM trying to boot from it.
>
> This way, the ROM will load U-Boot from microSD.
>
> >
> > I'm pretty sure it will be simple after I know how to do it.
> > Google found info on the idea, but I couldn't find the file that
> > needs editing. It's off in uBoot land.
>
> Even if the ROM loads U-Boot from eMMC, the default Linux
> U-Boot setup on the eMMC can be configured to then load
> the Linux kernel from microSD.
>
> If you install the FreeBSD version of U-Boot to eMMC, you might be
> able to
> do the same thing. Personally, I find the recipe above much
> simpler.
>
> Cheers,
>
> Tim
No need to zero out the onboard emmc or mess with its too-complicated
linux-centric env vars... The AM335x ROM boot code loads u-boot from
the first FAT partition it finds with the active/bootable flag set.
Normally that's the emmc, but you can turn it off and then it'll look
for a partition on the external sdcard. Once you've booted to freebsd
normally, do
gpart unset -a active -i 1 mmcsd1
And now it will boot from the sdcard unless you turn the active flag
back on on the emmc.
- Ian
More information about the freebsd-arm
mailing list