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:
- Reset the board while holding the space bar. This will get us into the U-Boot command prompt.
- 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
- 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:
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