Yocto and Beaglebone black: U-Boot seems to miss some files (kernel?)

Hello, I just created an image with Yocto, the layers are:

meta                      /home/USER/BBB/source/poky/meta       5
meta-poky             /home/USER/BBB/source/poky/meta-poky  5
meta-yocto-bsp     /home/USER/BBB/source/poky/meta-yocto-bsp  5
meta-oe                 /home/USER/BBB/source/meta-openembedded/meta-oe  5
meta-python          /home/USER/BBB/source/meta-openembedded/meta-python  5
meta-arm-toolchain    /home/USER/BBB/source/meta-arm/meta-arm-toolchain  5
meta-arm              /home/USER/BBB/source/meta-arm/meta-arm  5
meta-ti-bsp           /home/USER/BBB/source/meta-ti/meta-ti-bsp  6

branch: kirkstone - 4.0 - April 2022 - LTS until Apr. 2026

I built an image-core-minimal and copied the following files on SD card:

partition 1, label BOOT, fat32 (boot+lba flags)

  • MLO
  • u-boot.img
  • zImage
  • am335x-boneblack.dtb
  • am335x-boneblack-beaglebone-yocto.dtb
  • am335x-bone-beaglebone-yocto.dtb
  • am335x-bone.dtb (4 dtb files to be sure…)

partition 2, label ROOT, ext-4

  • all the content of $sudo tar -xf core-image-minimal-beaglebone-yocto.tar.bz2 -C /media/USER/ROOT/

Well, inserting the SD and booting with/without S2 button pressed
(tried also erasing the eMMC with commands

mmc dev 1
mmc erase 0 1000

)

the result seems to be that U-Boot is working but cannot find some files and falls into ethernet DHCP:

U-Boot SPL 2022.01 (Jan 10 2022 - 18:46:34 +0000)                               
Trying to boot from MMC1                                                        
                                                             
U-Boot 2022.01 (Jan 10 2022 - 18:46:34 +0000)                                   
                                                                                
CPU  : AM335X-GP rev 2.1                                                        
Model: TI AM335x BeagleBone Black                                               
DRAM:  512 MiB                                                                  
WDT:   Started wdt@44e35000 with servicing (60s timeout)                        
NAND:  0 MiB                                                                    
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1                                           
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... <ethaC
Net:   eth2: ethernet@4a100000, eth3: usb_ether                                 
Hit any key to stop autoboot:  0                                                
switch to partitions #0, OK                                                     
mmc0 is current device                                                          
Scanning mmc 0:1...                                                             
67151 bytes read in 7 ms (9.1 MiB/s)                                            
Scanning disk mmc@48060000.blk...                                               
Scanning disk mmc@481d8000.blk...                                               
Found 4 disks                                                                   
No EFI system partition                                                         
BootOrder not defined                                                           
EFI boot manager: Cannot load any image                                         
switch to partitions #0, OK                                                     
mmc1(part 0) is current device                                                  
** No partition table - mmc 1 **                                                
Couldn't find partition mmc 1:1                                                 
## Error: "bootcmd_nand0" not defined                                           
starting USB...                                                                 
Bus usb@47401800: Port not available.                                           
USB is stopped. Please issue 'usb start' first.                                 
starting USB...                                                                 
Bus usb@47401800: Port not available.                                           
ethernet@4a100000 Waiting for PHY auto negotiation to complete......user interr!
using musb-hdrc, OUT ep1out IN ep1in STATUS ep2in                               
MAC de:ad:be:ef:00:01                                                           
HOST MAC de:ad:be:ef:00:00                                                      
RNDIS ready                                                                     
musb-hdrc: peripheral reset irq lost!                                           
high speed config #2: 2 mA, Ethernet Gadget, using RNDIS                        
missing environment variable: pxeuuid                                           
Retrieving file: pxelinux.cfg/01-34-84-e4-f1-17-96                              
ethernet@4a100000 Waiting for PHY auto negotiation ............

what is wrong with that SD content?
Other points I am missing?

Thank you

Looks like you have the correct layers.

What is your MACHINE=

Tried either:
#MACHINE ??= "beaglebone"
and
#MACHINE ??= "beaglebone-yocto"
same errors.

While using qemu
#MACHINE ?= "qemuarm"

the emulation runs (to me means kernel is compiled correctly)

You need to generate: /boot/extlinux/extlinux.conf in your fat partition for u-boot to read and decide what to do… Does poky not generate this?

Regards,

Just checked… the file is in the folder made by Yocto using TI layers (with
#MACHINE ??= "beaglebone"

# Generic Distro Configuration file generated by OpenEmbedded
LABEL Poky (Yocto Project Reference Distro)
	KERNEL ../zImage
	FDTDIR ../
	APPEND root=PARTUUID=${uuid} rootwait rw earlycon console=${console},${baudrate}

in the folder made using the pure reference Yocto layers, no file is present
#MACHINE ??= "beaglebone-yocto"

Do you mean just copy this file in FAT32 partition? Sure, I will and let you know

thank you so much

Correct, mount your boot partition, create a base directory extlinux and copy extlinux.conf into it…

Regards,

Hello Robert,

thank you and sorry for coming back late, I managed to solve the issue just now. I’m a little bit confused: before posting the request, I searched on the internet, forum, so I didn’t find any mention to this extlinux.conf file.
Is this a new required file for newer U-Boot version? If yes, probably I saw obsolete information on the web.

Then I have three more questions:

  1. why there are 2 links that point to the same file and why choose one instead of the other? In other words who defines the naming criteria? I know they point always to the newer file with the timestamp

example:
extlinux.conf
extlinux.conf-beaglebone
and the file itself: extlinux.conf-beaglebone-r0

the same for:
MLO
MLO-beaglebone

u-boot.img
u-boot-beaglebone.img

.dtb

  1. What’s the content of this file modules-beaglebone.tgz? It is needed?

  2. Is the file u-boot-spl.bin needed ? If yes, do the boot process load and use the one present in eMMC on board since I didn’t put this on SD card?

Sorry for the long question but I’m confused at this point with these files.

best regards