Yocto custom recipe for building beaglebone black's kernel from github for chipsee LCD.

Hi Experts,

I was trying to build Linux for beaglebone black from official repository

I am able to fetch and run menuconfig but when i try to compile the kernel i get error.

Following is the content of the recipe file.

file name : linux-yocto-chipsee_3.14.bb
path: /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”

File name :linux-yocto-chipsee_3.14.bbappend
File path : /home/ankur/yocto_daisy/poky/meta-ybdevelop/recipes-example/linux

defconfig path: /home/ankur/yocto_daisy/poky/meta-ybdevelop/recipes-example/linux/linux-yocto-chipsee_3.14

With above configuration i am able to fetch and open menuconfig for fetched linux kernel, command i used is as follows,

-----Below command works----

bitbake linux-yocto-chipsee -c menuconfig

But when i try to compile linux using below command it gives error,
-----Below command gives below errors----

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

When i try to build using below command that time also it failed.

-----Below command gives below errors along with previous error—

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 layers for linux shows below output

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

Any help/pointer/hint/suggestions to complete this ?

Thank you,

Regards,
Ankur

Hi Ankur,

have you got it to work?

How did you do?

Hi Michael,

I had updated details in below stackoverflow post,
Hope it will help you,
http://stackoverflow.com/questions/30723261/building-robert-nelsons-linux-kernel-into-yoctodaisy-for-beaglebone-black

Thank you,

Regards,
Ankur

Hi Ankur,

i am new with Yocto can you explain in a little bit more detailed?

I commented in blue what i dindt understand.
Can you tell me before doing bitbake waht did you do?

Are you able to use USB/HDMI/SOUND on Chipsee Display?
I have the Capacitive Touch what sould i do different?
It runs on I2C.

Thank you,

Michael

/////////////////////////////////////////////////////////////////////////////////////////////////////

Well for time being i downloaded the Yocto_daisy(1.6) toolchain and installed it in my PC. And compiled the Linux external to Yocto build. Here are steps.
I followed below steps in my virtualbox installed ubuntu.

  1. in Yocto_daisy build core-image-sato, using following command,

  2. bitbake core-image-sato This is the first thing you do?

  3. Prepare micro SD card with rootfile system, SPL & U-Boot, uImage, dtb, uEnv.txt. How do you prepare the SD card?

  4. Clone beaglebone black Linux using following command

    git clone --depth=1 https://github.com/beagleboard/linux

  5. Download yocto-1.6(daisy) toolchain from following link.

    http://downloads.yoctoproject.org/releases/yocto/yocto-1.6/toolchain/
    Based on your machine type download from either i686 or x86_64
    I downloaded following 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

  6. Install toolchain by running download toolchain script. By default it installs into opt directory, I installed it in default path.

  7. In terminal traverse to the above downloaded Linux directory. and set toolchain environment by running following command,

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

  8. Now configure kernel using following command,

make bb.org_defconfig

  1. and then build kernel using following command

    make uImage LOADADDR=0x80008000 -j4

  2. now we shall install the modules into local directory using following commands,

    mkdir bbb_modules
    export INSTALL_MOD_PATH=/home/ankur/linux/bbb_modules/
    make modules_install

  3. when kernel is built copy uImage(from /arch/arm/boot) and am335x-boneblack-bbb-exp-c.dtb(from /arch/arm/boot) to the BOOT partition of the micro SD card.

For FYI my uEnv.txt looks like this

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 . Now copy modules from local directory to the micro SD card, using following commands,

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

  1. Eject the card put it into Beaglbone Black and power on the BBB+LCD.

I am yet to get the Touch calibration working for LCD but once I find it i will update the answer.

Another pending thing is build above kernel into Yocto build system. I will update the answer once i am done with that.

Hope this helps someone with the same issue.