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

时间:2018-04-09 17:11:23

标签: yocto u-boot imx6

问题:在i.MX6四核Saber devkit上运行的U-boot平台的核心映像最小化应该是什么输出?

我可以看到带有飞思卡尔徽标的闪屏,但随后显示屏变为空白。我期待某种启动顺序和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,并将其插入我的军刀开发套件中,然后启动闪屏,之后没有任何反应。

Splash Screen

1 个答案:

答案 0 :(得分:2)

回答你的问题:

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

  2. 控制台由SERIAL_CONSOLES变量定义。您可以通过将串行电缆连接到电路板并使用minicom等程序来听取此信息。

  3. 稍微阅读您的问题,我相信您放在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提示符下着陆。

    看起来默认的飞思卡尔图像目前是wic.gz,bmap-tools也应该处理。