![](/img/trans.png)
[英]Linux Kernel DTSI File Cannot Compile from Yocto for BeagleBone
[英]Building Robert Nelson's Linux kernel into Yocto(daisy) for beaglebone black
我正在尝试从官方存储库https://github.com/beagleboard/linux为beaglebone black构建Linux
我能够获取并运行menuconfig,但是当我尝试编译内核时,我得到了错误。
以下是配方文件的内容。
文件名 :linux-yocto-chipsee_3.14.bb
路径 :/ home / ankur / yocto_daisy / poky / meta-ybdevelop / recipes-example / linux
inherit kernel
require recipes-kernel/linux/linux-yocto.inc
BRANCH = "3.14"
# Override SRC_URI in a bbappend file to point at a different source # tree if you do not want to build from Linus' tree.
SRC_URI = "git://github.com/beagleboard/linux.git;branch=${BRANCH};nocheckout=1;name=machine"
LINUX_VERSION ?= "3.14"
LINUX_VERSION_EXTENSION ?= "-custom"
# Override SRCREV to point to a different commit in a bbappend file to # build a different release of the Linux kernel.
# tag: v3.4 76e10d158efb6d4516018846f60c2ab5501900bc
SRCREV_machine="76e10d158efb6d4516018846f60c2ab5501900bc"
PR = "r1"
PV = "${LINUX_VERSION}+git${SRCPV}"
# Override COMPATIBLE_MACHINE to include your machine in a bbappend # file. Leaving it empty here ensures an early explicit build failure.
COMPATIBLE_MACHINE = "beaglebone"
文件名 :linux-yocto-chipsee_3.14.bbappend
文件路径 :/ home / ankur / yocto_daisy / poky / meta-ybdevelop / recipes-example / linux
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
SRC_URI_append = " file://defconfig"
defconfig路径 :/home/ankur/yocto_daisy/poky/meta-ybdevelop/recipes-example/linux/linux-yocto-chipsee_3.14
通过以上配置,我能够获取并打开获取的Linux内核的menuconfig,我使用的命令如下所示,
# bitbake linux-yocto-chipsee -c menuconfig
但是,当我尝试使用以下命令编译Linux时,出现错误,
# bitbake linux-yocto-chipsee -c compile
得到与gcc有关的错误:(
/bin/sh: 1: arm-poky-linux-gnueabi-gcc: not found
| make[4]: *** [scripts/mod/empty.o] Error 127
| make[3]: *** [scripts/mod] Error 2
| make[3]: *** Waiting for unfinished jobs....
| SHIPPED scripts/genksyms/lex.lex.c
| Generating include/generated/mach-types.h
| SHIPPED scripts/genksyms/keywords.hash.c
| SHIPPED scripts/genksyms/parse.tab.h
| SHIPPED scripts/genksyms/parse.tab.c
| HOSTCC scripts/genksyms/lex.lex.o
| CC kernel/bounds.s
| /bin/sh: 1: arm-poky-linux-gnueabi-gcc: not found
当我尝试使用以下命令进行构建时,它也失败了。
# bitbake linux-yocto-chipsee -c build
ERROR: Multiple .bb files are due to be built which each provide virtual/kernel (/home/ankur/yocto_daisy/poky/meta-ybdevelop/recipes-example/linux/linux-yocto-chipsee_3.14.bb /home/ankur/yocto_daisy/poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb).
This usually means one provides something the other doesn't and should.
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/ankur/yocto_daisy/poky/build_fresh/tmp/work/beaglebone-poky-linux-gnueabi/linux-yocto-chipsee/3.14+gitAUTOINC+76e10d158e-r1/temp/log.do_compile.30878)
ERROR: Logfile of failure stored in: /home/ankur/yocto_daisy/poky/build_fresh/tmp/work/beaglebone-poky-linux-gnueabi/linux-yocto-chipsee/3.14+gitAUTOINC+76e10d158e-r1/temp/log.do_compile.30878
Linux的Bitbake层显示如下输出
仅供参考:
# bitbake-layers show-recipes 'linux*'
Parsing recipes..done.
=== Available recipes matching linux*: ===
linux-dummy:
meta 1.0
linux-firmware:
meta 1:0.0+gitAUTOINC+600caefd83
linux-libc-headers:
meta 3.14
linux-yocto:
meta 3.14.4+gitAUTOINC+183622e809_0143c6ebb4
meta 3.10 (skipped)
meta 3.4 (skipped)
linux-yocto-chipsee:
meta-ybdevelop 3.14+gitAUTOINC+76e10d158e
linux-yocto-dev:
meta unknown (skipped)
linux-yocto-rt:
meta 3.10 (skipped)
meta 3.14 (skipped)
meta 3.4 (skipped)
linux-yocto-tiny:
meta 3.10 (skipped)
meta 3.14 (skipped)
meta 3.4 (skipped)
linuxdoc-tools-native:
meta 0.9.69
linuxptp:
meta-oe 1.4
任何帮助/指针/提示/建议来编译此内容?
谢谢,
问候,安库尔
好吧,我暂时下载了Yocto_daisy(1.6)工具链并将其安装在我的PC中。 并编译了Yocto构建外部的Linux。 这是步骤。
我在安装了ubuntu的virtualbox中按照以下步骤操作。
在Yocto_daisy中使用以下命令构建core-image-sato,
比特烘烤核心图像佐藤
准备带有根文件系统,SPL和U-Boot,uImage,dtb,uEnv.txt的micro SD卡。
使用以下命令克隆beaglebone black Linux
git clone --depth = 1 https://github.com/beagleboard/linux
从以下链接下载yocto-1.6(daisy)工具链。
http://downloads.yoctoproject.org/releases/yocto/yocto-1.6/toolchain/
根据您的机器类型,从i686或x86_64下载
我下载了以下toochain。
http://downloads.yoctoproject.org/releases/yocto/yocto-1.6/toolchain/i686/poky-eglibc-i686-core-image-sato-armv7a-vfp-neon-toolchain-1.6.sh
通过运行下载工具链脚本来安装工具链。 默认情况下,它安装到opt目录中,我将其安装在默认路径中。
在终端中,遍历以上下载的Linux目录。 并通过运行以下命令来设置工具链环境,
源/opt/poky/1.6/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi
现在使用以下命令配置内核,
制作bb.org_defconfig
然后使用以下命令构建内核
使uImage LOADADDR = 0x80008000 -j4
现在我们将使用以下命令将模块安装到本地目录中,
mkdir bbb_modules
导出INSTALL_MOD_PATH = / home / ankur / linux / bbb_modules /
制作modules_install
构建内核后,将uImage
(从/ arch / arm / boot)和am335x-boneblack-bbb-exp-c.dtb
(从/ arch / arm / boot) am335x-boneblack-bbb-exp-c.dtb
到micro SD卡的BOOT分区。
仅供参考,我的uEnv.txt看起来像这样
Disable: HDMI
bootargs=console=ttyO1,115200n8 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait;
bootcmd=mmc rescan ; mmc dev 0 ; fatload mmc 0 0x80007fc0 uImage ; fatload mmc 0 0x80F80000 am335x-boneblack-bbb-exp-c.dtb ; echo Ankur... ${bootcmd}; bootm 0x80007fc0 - 0x80F80000;
uenvcmd=boot;
11。 现在,使用以下命令将模块从本地目录复制到micro SD卡,
cp -a /home/ankur/linux/bbb_modules/lib /media/ankur/ROOT/
sync
12.弹出卡,将其放入Beaglbone Black,然后打开BBB + LCD。
我尚未使LCD可以进行触摸校准,但是一旦找到它,我就会更新答案。
另一个悬而未决的事情是将内核之上的内容构建到Yocto构建系统中。 完成后,我将更新答案。
希望这对遇到同样问题的人有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.