如何在 MX6 SABRE 设备上启动 Yocto 生成的映像

How do I boot a Yocto generated image on the MX6 SABRE devices

问题:在 i.MX6 四核 Sabre devkit 上 运行,U-boot 平台的 core-image-minimal 我应该期待什么输出?

我可以看到带有 Freescale 徽标的启动画面,但随后显示屏变为空白。我期待某种引导序列和 U-Boot> 命令界面。

我还从 uboot_mx6x.pdf 中看到以下内容: 默认情况下,U-Boot 配置为在具有 115,200-8-N-1 设置的某些 UART 端口上显示命令提示符和接收串行键盘输入。

问:这个是在哪里定义的?我该如何改变它?我怎么听这个?

我按照 NXP forums 上的指南开始了解 Yocto 和 u-boot。 我已经安装并遵循了 here.

中的程序

我用过命令:

$ bitbake core-image-minimal

Loading cache: 100%     |#######################################| Time: 0:00:00
Loaded 2274 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "imx6qdlsabresd"
DISTRO               = "fslc-framebuffer"
DISTRO_VERSION       = "2.4"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            = "HEAD:fdeecc901196bbccd7c5b1ea4268a2cf56764a62"
meta-oe              
meta-multimedia      = "HEAD:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta-freescale       = "HEAD:d6141ea291a1ac9ab8fb1dd1110d408f840fda57"
meta-freescale-3rdparty = "HEAD:62de01743c9233ea718de22991c47b73a78b4857"
meta-freescale-distro = "HEAD:0ec6d7e206705702b5b534611754de0787f92b72"

Initialising tasks: 100%     |###################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 3032 tasks of which 2366 didn't need to be     rerun and all succeeded.
NOTE: Writing buildhistory

$ wic create imx-uboot-spl-bootpart -e core-image-minimal

INFO: Building wic-tools...

Previous bitbake instance shutting down?, waiting to retry...
Loading cache: 100% |###################################| Time: 0:00:00
Loaded 2274 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.36.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "imx6qdlsabresd"
DISTRO               = "fslc-framebuffer"
DISTRO_VERSION       = "2.4"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            = "HEAD:fdeecc901196bbccd7c5b1ea4268a2cf56764a62"
meta-oe              
meta-multimedia      = "HEAD:dacfa2b1920e285531bec55cd2f08743390aaf57"
meta-freescale       = "HEAD:d6141ea291a1ac9ab8fb1dd1110d408f840fda57"
meta-freescale-3rdparty = "HEAD:62de01743c9233ea718de22991c47b73a78b4857"
meta-freescale-distro = "HEAD:0ec6d7e206705702b5b534611754de0787f92b72"

Initialising tasks: 100% |#####################################| Time: 0:00:00
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 380 tasks of which 380 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
INFO: Creating image(s)...

INFO: The new image(s) can be found here:
  ./imx-uboot-spl-bootpart-201804091703-mmcblk.direct

The following build artifacts were used to create the image(s):
  ROOTFS_DIR:                   /media/mattis/7228221d-c3f3-424e-8443-8e97176c6a6d/sandbox/fsl-community-bsp/tmp.wic.yc_b166n/rootfs_copy
  BOOTIMG_DIR:                  /media/mattis/7228221d-c3f3-424e-8443-8e97176c6a6d/sandbox/fsl-community-bsp/build/tmp/work/imx6qdlsabresd-fslc-linux-gnueabi/core-image-base/1.0-r0/recipe-sysroot/usr/share
  KERNEL_DIR:                   /media/mattis/7228221d-c3f3-424e-8443-8e97176c6a6d/sandbox/fsl-community-bsp/build/tmp/deploy/images/imx6qdlsabresd
  NATIVE_SYSROOT:               /media/mattis/7228221d-c3f3-424e-8443-8e97176c6a6d/sandbox/fsl-community-bsp/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/wic-tools/1.0-r0/recipe-sysroot-native

INFO: The image(s) were created using OE kickstart file:
  /media/mattis/7228221d-c3f3-424e-8443-8e97176c6a6d/sandbox/fsl-community-bsp/sources/meta-freescale/wic/imx-uboot-spl-bootpart.wks

最后我使用命令:

dd if=imx-uboot-spl-bootpart-201804091703-mmcblk.direct of=/dev/sdb

完成此过程后,我将 SDCard 插入我的 saber 开发工具包中,然后启动启动画面,之后没有任何反应。

回答您的问题:

  1. 您应该会看到 u-boots 输出,然后是内核的控制台输出,最后是登录提示。

  2. 控制台由SERIAL_CONSOLES variable. You would listen to this by connecting a serial cable to the board and using a program like minicom定义。

仔细阅读你的问题,我相信你放在 SD 卡上的图像是行不通的。除了 kickstart file 中的描述外,我对 imx-uboot-spl-bootpart 知之甚少,也不能确定它与哪些板兼容。

您应该能够使用构建完成后生成的默认 wic 图像。看起来您是从 Yocto 2.4 Rocko 构建的,因此构建完成后,您将在此处找到两个文件:

$BUILD_DIR/tmp/deploy/images/imx6qdlsabresd/...  
core-image-minimal-imx6qdlsabresd.wic  
core-image-minimal-imx6qdlsabresd.wic.bmap

如果这些文件不存在,您可以通过将此行添加到您的 local.conf 文件来创建它们:

IMAGE_FSTYPES += "wic wic.bmap"

我建议使用 bmap-tools 而不是 dd,因为它会为您节省很多时间。

在您的示例中,命令应如下所示:

 bmaptool copy /path/to/core-image-minimal-imx6qdlsabresd.wic /dev/sdb

该映像应该启动,您将有机会停止 u-boot 并在 u-boot 提示符处着陆。

看起来默认的 Freescale 图像当前是 wic.gz,bmap-tools 也应该处理。