Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

U-boot source in yocto project

I am new to yocto project and building the project according to the guide I am able to find from the internet.

When I am following the guide present to build the image i am able to complete it successfully.

http://www.yoctoproject.org/docs/1.8/yocto-project-qs/yocto-project-qs.html

But I dont know where it found the u-boot source code and also tell me to get the kernel source code.

like image 662
ssg Avatar asked Mar 03 '26 22:03

ssg


2 Answers

The best way to find the kernel source code and u-boot source code is to look at the MACHINE variable in your conf/local.conf

E.g.: https://github.com/Freescale/meta-fsl-arm/blob/master/conf/machine/imx6dlsabresd.conf

MACHINEOVERRIDES =. "mx6:mx6dl:"

require conf/machine/include/imx6sabresd-common.inc

KERNEL_DEVICETREE = "imx6dl-sabresd.dtb imx6dl-sabresd-ldo.dtb imx6dl-sabresd-hdcp.dtb \
                     imx6dl-sabresd-enetirq.dtb imx6dl-sabresd-btwifi.dtb"

UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "mx6dlsabresd_config,sdcard"
UBOOT_CONFIG[epdc] = "mx6dlsabresd_epdc_config"
UBOOT_CONFIG[mfgtool] = "mx6dlsabresd_config"

MACHINE_FIRMWARE += "firmware-imx-epdc"

The line require conf/machine/include/imx6sabresd-common.inc tells us to look to imx6sabresd-common.inc and that tells us to look to imx-base.inc

Inside imx-base.inc, it says PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"

On,OpenEmbedded Layer Index, Check for u-boot-fslc, and you will find u-boot-fslc_2016.11.bb, which leads to u-boot-fslc.inc

For kernel, this is the same, look for it the same way as for u-boot:

# Handle default kernel
IMX_DEFAULT_KERNEL = "linux-imx"
IMX_DEFAULT_KERNEL_mxs = "linux-fslc"
IMX_DEFAULT_KERNEL_mx5 = "linux-fslc"
IMX_DEFAULT_KERNEL_mx6 = "linux-fslc-imx"
IMX_DEFAULT_KERNEL_mx7 = "linux-fslc-imx"
IMX_DEFAULT_KERNEL_mx6ul = "linux-fslc-imx"

PREFERRED_PROVIDER_virtual/kernel ??= "${IMX_DEFAULT_KERNEL}"
like image 180
Charles C. Avatar answered Mar 05 '26 16:03

Charles C.


If you're using 1.8 (based on your link above) then you should start by reading https://www.yoctoproject.org/docs/1.8/bsp-guide/bsp-guide.html to understand more about how to do BSP related work. That should lead you to how to work with U-Boot as well once you've understood the kernel example.

like image 27
Tom Rini Avatar answered Mar 05 '26 17:03

Tom Rini



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!