Beagleboneblack MMC Boot Not Working

Hi folks,

I struggled to boot from MMC without SD Card on Beagleboneblack. I think U-Boot didnt read
my uboot.env.Because i checked it U-Boot terminal, bootcmd different than my uboot.env and bootargs not defined.
Also when i try to save the modified environment variable, i couldnt do it, i got the
"=> saveenv
Saving Environment to FAT… Failed (1)
"
What kind of modification i need to make on U-Boot for boot from SD Card and after writing eMMC , it boot from MMC without SD Card?

Best regards.

U-boot 2022.04
Rootfs ubuntu-20.04.6-minimal-armhf-2023-08-22
Kernel Linux arm 6.1.67-dirty

I also share my U-Boot .config file

U-Boot SPL 2022.04 (Nov 02 2023 - 14:35:50 +0300)
Trying to boot from MMC2


U-Boot 2022.04 (Nov 02 2023 - 14:35:50 +0300)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Core:  150 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth2: ethernet@4a100000, eth3: usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Disk mmc@48060000.blk not ready
Scanning disk mmc@481d8000.blk...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800:
U-Boot SPL 2022.04 (Nov 02 2023 - 14:35:50 +0300)
Trying to boot from MMC2


U-Boot 2022.04 (Nov 02 2023 - 14:35:50 +0300)

CPU  : AM335X-GP rev 2.1
Model: TI AM335x BeagleBone Black
DRAM:  512 MiB
Core:  150 devices, 14 uclasses, devicetree: separate
WDT:   Started wdt@44e35000 with servicing (60s timeout)
NAND:  0 MiB
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... <ethaddr> not set. Validating first E-fuse MAC
Net:   Could not get PHY for ethernet@4a100000: addr 0
eth2: ethernet@4a100000, eth3: usb_ether
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@48060000.blk...
Disk mmc@48060000.blk not ready
Scanning disk mmc@481d8000.blk...
Found 3 disks
No EFI system partition
BootOrder not defined
EFI boot manager: Cannot load any image
## Error: "bootcmd_nand0" not defined
starting USB...
Bus usb@47401800:
....

When i enter the U-boot command line,

=> mmc list
OMAP SD/MMC: 0
OMAP SD/MMC: 1

=> ls mmc 1:1
   108732   MLO
    67693   dtb
  1229452   u-boot.img
  5060464   zImage
   131072   uboot.env

5 file(s), 0 dir(s)

=> ls mmc 1:2
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 srv
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 proc
<DIR>       4096 etc
<DIR>       4096 run
<DIR>       4096 var
<DIR>       4096 opt
<DIR>       4096 mnt
<DIR>       4096 media
<DIR>       4096 sys
<DIR>       4096 root
<DIR>       4096 home
<DIR>       4096 bin
<DIR>       4096 tmp
<DIR>       4096 sbin
<DIR>       4096 lib
<DIR>       4096 usr

=> part list mmc 0
=> part list mmc 1

Partition Map for MMC device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            262144          e5aac4bd-01     0e Boot
  2     264192          7141376         e5aac4bd-02     83



=> setenv bootcmd 'load mmc 1:1 81000000 zImage; load mmc 1:1 82000000 dtb; bootz 81000000 - 82000000'
=> setenv bootargs console=ttyS0,115200n8 root=/dev/mmcblk1p2 rootwait ro
=> setenv bootdelay 0
=> saveenv
Saving Environment to FAT... Failed (1)

=> part list mmc 0
=> part list mmc 1

Partition Map for MMC device 1  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     2048            262144          e5aac4bd-01     0e Boot
  2     264192          7141376         e5aac4bd-02     83

=> boot

It successfully boot.
uboot_config.txt (49.0 KB)

1 Like

Hi, did you ever manage to solve this issue? I am facing the same one now.

Sorry to be bringing back a 4 month old post but to anyone who has come across this issue before I would be very grateful of your help. I think I may have tracked the source of the issue to the u-boot defconfig as seen here:

This recommends fixes that are mentioned on the u-boot mailing list:
https://lists.denx.de/pipermail/u-boot/2019-September/383877.html
However u-boot never implemented the fix and when I try the suggested workaround I get the same results as before.
If anyone has any suggestions on how to proceed I’d love to hear them.
Perhaps even a quick walkthrough of how to add a uEnv.txt file to my u-boot instead of having to saveenv in the first place?
Thanks,
Ciarán

Hi Ciaran,

I assume that your are write the U-boot file the specified eMMC partition and normaly use the linux from SD Card

  1. Write the U-boot(and Linux,rootfs etc.) to eMMC.
  2. Back up the uboot.uenv of SD Card.
  3. Reboot the Linux when you are runnig on SD Card and interrupt the boot process , and then change the uboot environment as if you working on eMMC and save the environment variable and power off the board
  4. Insert the SD card your host computer(Linux based) . Move the changed uboot.uenv for eMMC , and copy the preserved uboot.uenv on that place .
  5. Boot BBB from SD card , and then mount the eMMC partition on /media/,
  6. Copy the changed uboot.uenv to eMMC U-Boot place

After this steps, you can able to boot from eMMC. Tihs solution not efficient but it enough for a now.

Best regards.

1 Like