【问题标题】:U-boot source in yocto projectyocto项目中的U-boot源码
【发布时间】:2017-08-06 07:04:38
【问题描述】:

我是 yocto 项目的新手,并根据我从互联网上找到的指南构建项目。

当我按照本指南构建图像时,我能够成功完成它。

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

但我不知道它在哪里找到了 u-boot 源代码,还告诉我获取内核源代码。

【问题讨论】:

  • 没有多少平台支持 U-Boot 开箱即用,因此,通常答案是它完全取决于您使用的确切平台甚至主板。

标签: linux-kernel yocto u-boot bitbake


【解决方案1】:

找到内核源代码和u-boot源代码的最好方法是查看conf/local.conf中的MACHINE变量

例如: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"

require conf/machine/include/imx6sabresd-common.inc 行告诉我们查看imx6sabresd-common.inc,并告诉我们查看imx-base.inc

imx-base.inc 里面,写着PREFERRED_PROVIDER_virtual/bootloader ??= "u-boot-fslc"

打开,OpenEmbedded Layer Index,检查u-boot-fslc,你会找到u-boot-fslc_2016.11.bb,这导致u-boot-fslc.inc

kernel也是一样,找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}"

【讨论】:

    【解决方案2】:

    如果您使用的是 1.8(基于上面的链接),那么您应该首先阅读 https://www.yoctoproject.org/docs/1.8/bsp-guide/bsp-guide.html 以了解有关如何进行 BSP 相关工作的更多信息。一旦您理解了内核示例,这应该会引导您了解如何使用 U-Boot。

    【讨论】:

      猜你喜欢
      • 2015-11-16
      • 2023-03-25
      • 2018-04-13
      • 2021-11-06
      • 2021-06-26
      • 2022-10-06
      • 2020-09-02
      • 2017-08-29
      • 1970-01-01
      相关资源
      最近更新 更多