2015-06-09 28 views
1

我試圖建立自己的Linux從官方倉庫https://github.com/beagleboard/linux大廈羅伯特·尼爾森的Linux內核爲Yocto(菊花)爲beaglebone黑色

我能夠讀取和運行menuconfig的,但beaglebone黑當我嘗試編譯內核我得到錯誤。

以下是配方文件的內容。

文件名:linux-yocto-chipsee_3.14.bb
路徑:/家庭/ ANKUR/yocto_daisy /狹小/元ybdevelop /食譜,例如/ 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
文件路徑:/家庭/ ANKUR/yocto_daisy /狹小/元ybdevelop /食譜,例如/ 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

有了上面的配置,我能夠獲取和開放對於menuconfig這牽強的Linux內核,我用命令如下,

# bitbake linux-yocto-chipsee -c menuconfig 

但是,當我嘗試編譯Linux上使用下面的命令提示錯誤,

# bitbake linux-yocto-chipsee -c compile 

與海灣合作委員會收到錯誤:(

/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 

BitBake的層爲Linux下面顯示輸出

僅供參考:

# 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 

任何幫助/指針/提示/建議編譯這個?

謝謝

問候, ANKUR

+0

您是否啓動了setup_environment腳本?你是否正確配置local.conf和bblayers.conf? – LPs

+0

感謝您提供調試提示,確實是我已經執行了setup_env腳本。這就是menuconfig工作的bitbake命令的原因。我在bblayers.conf文件中添加了meta-ydevelop。但我並沒有改變local.conf中用於更改內核的任何內容。 local.conf包含MACHINE?=「beaglebone」。 – AnkurTank

+0

您是否嘗試編譯標準poky配方core-image-base或corre-image-minimal? – LPs

回答

0

好時間是我下載了Yocto_daisy(1.6)工具鏈和在我的電腦安裝了它。編譯Yocto構建外部的Linux。這裏是步驟。
我在我的virtualbox安裝的ubuntu下面按照以下步驟操作。

  1. 在Yocto_daisy構建芯圖像佐藤,使用下面的命令,

    bitbake的芯 - 圖像佐藤

  2. 準備與rootfile的屬系統微型SD卡,SPL &的U-Boot,的uImage ,dtb,uEnv.txt。使用下面的命令

    GIT中克隆--depth = 1個https://github.com/beagleboard/linux

  3. 下載yocto-1.6(菊花)工具鏈從下面的鏈接

  4. 克隆beaglebone黑色的Linux。

    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

  5. 通過運行下載工具鏈腳本來安裝工具鏈。默認情況下,它安裝到opt目錄中,我將它安裝在默認路徑中。

  6. 在終端遍歷上面下載的Linux目錄。通過運行以下命令,設置工具鏈環境,

    源/opt/poky/1.6/environment-setup-armv7a-vfp-neon-poky-linux-gnueabi

  7. 現在,使用下面的命令配置內核,

化妝bb.org_defconfig

  • ,然後使用下面的命令建立內核

    做出的uImage LOADADDR = 0x80008000 -j4

  • 現在我們將安裝使用下面的命令模塊到本地目錄,

    的mkdir bbb_modules
    出口INSTALL_MOD_PATH = /家庭/ ANKUR/LINUX/bbb_modules/
    化妝modules_install

  • 將內核複製到複製uImage(from/arch/arm/boot)和am335x-boneblack-bbb-exp-c.dtb(from/arch/arm/boot)到Micro SD卡的引導分區。

  • 對於FYI我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。現在,從本地目錄複製模塊,微型SD卡,使用下面的命令,

    cp -a /home/ankur/linux/bbb_modules/lib /media/ankur/ROOT/ 
    sync 
    

    12彈出卡放入Beaglbone黑色和動力BBB + LCD上。

    我還沒有得到觸摸校準液晶顯示器的工作,但一旦我找到它,我會更新答案。

    另一個懸而未決的事情是在Yocto構建系統上建立內核。一旦我完成了,我會更新答案。

    希望這可以幫助有同樣問題的人。