uboot can't load kernel may due to uEnv.txt on BBB

Hi community:

I am trying to compile uboot and kernel from source then download them to SD card. When am3359 boot from SD card, I get the information as below.

U-Boot SPL 2019.04 (Apr 21 2025 - 20:56:18 +0800)
Trying to boot from MMC1
Loading Environment from EXT4... 
** Unable to use mmc 0:1 for loading the env **


U-Boot 2019.04 (Apr 21 2025 - 20:56:18 +0800)

CPU  : AM335X-GP rev 2.0
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... 
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone Cape EEPROM: no EEPROM at address: 0x54
BeagleBone Cape EEPROM: no EEPROM at address: 0x55
BeagleBone Cape EEPROM: no EEPROM at address: 0x56
BeagleBone Cape EEPROM: no EEPROM at address: 0x57
Net:   eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[t] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
16 bytes read in 10 ms (1000 Bytes/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
** Invalid partition 3 **
** Invalid partition 4 **
** Invalid partition 5 **
** Invalid partition 6 **
** Invalid partition 7 **
switch to partitions #0, OK

It seems like that uboot run uname_boot and cause errors. My uEnv.txt has only one line as below

uname_r=6.12.13

So is this file right? If it’s wrong how can I generate the right uEnv.txt? If it’s right what should I do next?

Thanks
Sincerely!

Here’s a log to help you see what it’s looking for:

Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-6.15.0-rc2-bone5 ...
8032768 bytes read in 511 ms (15 MiB/s)
debug: [enable_uboot_overlays=] ...
loading /boot/dtbs/6.15.0-rc2-bone5/am335x-boneblack-revd.dtb ...
100176 bytes read in 11 ms (8.7 MiB/s)
uboot_overlays: add [enable_uboot_overlays=1] to /boot/uEnv.txt to enable...
loading /boot/initrd.img-6.15.0-rc2-bone5 ...
8813626 bytes read in 567 ms (14.8 MiB/s)
debug: [console=ttyS0,115200n8 root=/dev/mmcblk0p3 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100] ...
debug: [bootz 0x82000000 0x88080000:867c3a 0x88000000] ...
Kernel image @ 0x82000000 [ 0x000000 - 0x7a9200 ]
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f798000, end 8ffffc3a ... OK
   Loading Device Tree to 8f77c000, end 8f79774f ... OK

Starting kernel ...

You’ve set: uname_r=6.12.13

So its looking for an ext4 partition with /boot/vmlinuz-6.12.13

Regards,

I used to read your tutorial on techforum and just think that you typed the wrong letter ! Because the ‘x’ and ‘z’ are near on keyboard. So I name the zImage vmlinux wrongly but not vmlinuz. Now the kernel has been found by uboot
Thank you very much~~

1 Like