Manual U-Boot commands to boot from eMMC

I am trying to boot Linux manually from eMMC using U-Boot commands so I can better understand the booting process. However, booting keeps failing when trying to mount the root filesystem. It doesn’t look like it finds any partitions since the output is blank (see following screenshot):

Here are the exact steps to reproduce:

  1. Reset the board while holding the space bar. This will get us into the U-Boot command prompt.
  2. Type in the following commands:
    setenv bootargs console=ttyO0,115200 root=/dev/mmcblk1p1 ro rootfstype=ext4
    load mmc 1:1 0x82000000 /boot/vmlinuz-5.10.168-ti-r71
    load mmc 1:1 0x88000000 /boot/dtbs/5.10.168-ti-r71/am335x-boneblack-uboot-univ.dtb
    bootz 0x82000000 - 0x88000000
  1. Kernel panic will happen with the issue shown in screenshot above where it can’t open mmcblk1p1

Since the output is showing no available partitions, I’m wondering if there’s a step missing in my commands above.

I got root=/dev/mmcblk1p1 from the output when I just reset my board and allow it to boot automatically. Allowing the board to boot automatically like this works, I can log in. Please see the screenshot below.

Please note that I took out the rootwait so that I could see the kernel panic and other debug output, otherwise it would hang.

The exact image I flashed into my eMMC is this one:
image

I also took a look at /boot/uEnv.txt to see what that’s doing, but I don’t see the commands I’m looking for in there. Here is /boot/uEnv.txt, and this is the default file that came with the image I downloaded. I did not make any changes in this, and there is no other uEnv.txt.

debian@BeagleBone:/$ cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=5.10.168-ti-r71
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=<file0>.dtbo
#uboot_overlay_addr1=<file1>.dtbo
#uboot_overlay_addr2=<file2>.dtbo
#uboot_overlay_addr3=<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=<file4>.dtbo
#uboot_overlay_addr5=<file5>.dtbo
#uboot_overlay_addr6=<file6>.dtbo
#uboot_overlay_addr7=<file7>.dtbo
###
###Custom Cape
#dtb_overlay=<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
#disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

console=ttyS0,115200n8
cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet overlayroot=tmpfs

##enable Generic eMMC Flasher:
#cmdline=init=/usr/sbin/init-beagle-flasher
1 Like

am335x-boneblack-uboot-univ.dtb has eMMC (and all on-board shared resource devices) disabled… Beagleboard:BeagleBoneBlack Debian - eLinux.org

use am335x-boneblack.dtb if you want things in a default state.

Regards,

2 Likes

That worked, Thanks!

How did you know that am335x-boneblack-uboot-univ.dtb has eMMC and all on-board shared resource devices disabled and that am335x-boneblack.dtb was the default one?

With u-boot overlays, adding nodes is easy… removing nodes doesn’t work so this falls on in it’s face… Thus whenever u-boot overlays is used, everything is disabled (am335x-boneblack-uboot.dtb/am335x-boneblack-uboot-univ.dtb)… Here’s my docs on this: Beagleboard:BeagleBoneBlack Debian - eLinux.org

Default Device Tree: am335x-boneblack.dtb

Default Device Tree + U-Boot Overlays enabled (/boot/uEnv.txt): am335x-boneblack-uboot.dtb

enable_uboot_overlays=1

Default Device Tree + U-Boot Overlays + Cape Universal enable (thru /boot/uEnv.txt): am335x-boneblack-uboot-univ.dtb

enable_uboot_overlays=1
enable_uboot_cape_universal=1

When U-Boot Overlays is enabled, you get access to disabling/enabling all onboard devices: Beagleboard:BeagleBoneBlack Debian - eLinux.org

Regards,

2 Likes