简体   繁体   English

如何在MX6 SABRE设备上引导Yocto生成的映像

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

Question: What output should I expect from core-image-minimal the U-boot platform, running on i.MX6 quad core Sabre devkit? 问题:在i.MX6四核Sabre开发者工具包上运行时,我希望从最小内核映像的U-boot平台获得什么输出?

I can see a splash screen with the Freescale logo, but then the display goes blank. 我可以看到带有飞思卡尔徽标的启动屏幕,但随后显示为空白。 I was expecting some kind of boot-sequence and a U-Boot> command interface. 我期待某种引导顺序和U-Boot>命令界面。

I also see from uboot_mx6x.pdf the following: By default, U-Boot is configured to display the command prompt and receive serial keyboard input on certain UART ports with 115,200-8-N-1 settings. 我还从uboot_mx6x.pdf中看到以下内容:默认情况下,U-Boot配置为显示命令提示符,并使用115,200-8-N-1设置在某些UART端口上接收串行键盘输入。

Question: Where is this defined? 问题:在哪里定义? How do I change it? 我该如何更改? How do I listen to this? 我该怎么听?

I followed a guide on NXP forums to start understanding Yocto and u-boot. 我遵循了NXP论坛上的指南,开始了解Yocto和u-boot。 I have installed and followed the procedures from here . 我已经从这里安装并遵循了以下步骤。

I have used the command: 我已经使用了命令:

$ bitbake core-image-minimal $ 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 $ wic创建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

Lastly I use the command: 最后,我使用以下命令:

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

After this process, I take the SDCard, and plug it into my sabre development kit, this then boots up the splash screen, after which nothing happens. 完成此过程后,我将SDCard插入到我的佩剑开发套件中,然后启动启动屏幕,此后什么也没有发生。

开机画面

To answer your questions: 要回答您的问题:

  1. You should expect to see u-boots output, followed by the kernel's console output, and finally a login prompt. 您应该期望看到u-boots输出,然后是内核的控制台输出,最后是登录提示。

  2. The console is defined by the SERIAL_CONSOLES variable. 控制台由SERIAL_CONSOLES变量定义。 You would listen to this by connecting a serial cable to the board and using a program like minicom . 您可以通过将串行电缆连接到开发板上并使用minicom之类的程序来收听。

Reading into your questions a bit, I believe the image you are putting on the SD card is not going to work. 仔细阅读您的问题,我相信您放在SD卡上的图像将无法正常工作。 I do not know much about imx-uboot-spl-bootpart other than how it is described in the kickstart file , and can't say for sure which boards it is compatible with. 除了kickstart文件中对imx-uboot-spl-bootpart的描述之外,我对它了解不多,并且无法确定它与哪些板兼容。

You should be able to use the default wic image that is generated once the build is complete. 您应该能够使用构建完成后生成的默认wic映像。 It looks like you are building from Yocto 2.4 Rocko, so once your build is finished you will have two files located here: 看起来您是从Yocto 2.4 Rocko构建的,因此构建完成后,将在此处有两个文件:

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

If these files do not exist you can create them by adding this line to your local.conf file: 如果这些文件不存在,则可以通过将以下行添加到local.conf文件中来创建它们:

IMAGE_FSTYPES += "wic wic.bmap"

I would recommend using bmap-tools instead of dd as it will save you a lot of time. 我建议使用bmap-tools而不是dd,因为它将节省大量时间。

In your example the command should look like this: 在您的示例中,命令应如下所示:

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

That image should boot and you will be given the chance to stop u-boot and land at the u-boot prompt. 该映像将启动,您将有机会停止u-boot并进入u-boot提示符。

It looks like the default Freescale image is currently wic.gz, which bmap-tools should handle as well. 看起来默认的Freescale图像当前是wic.gz,bmap-tools也应该处理该图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM