From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 6540EE01757 for ; Thu, 7 Nov 2013 12:43:36 -0800 (PST) Received: by mail-qe0-f53.google.com with SMTP id cy11so1059068qeb.12 for ; Thu, 07 Nov 2013 12:43:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=LpQdpL+5qvqjmRM5Q1njVdWIfBfzOPQhbfGJqgs8w5g=; b=V1K/fuugUlQYpPuBWaFS47CfoQbO4KIsj2So5Iu/v6gNjtdu0VGIJ/KFl80i66PDnl itHSTGfUqBIcyo/pMVyGOEDNRQNUlPN6W6iwMGWaEfaiQ7Jerq+nNgJa8urkEWDxTmwc DR85SUFYNnhTgOL/bVu8bUGZwjvP6FMTxauUAtkLpWSvDHeeAWmqWWBrIcX/QhZaVE+D CWGZ9+sQ9H644H9XRkCwpzEJ7REn73vrxLa3rDDqR7E9OxzAJXblsJ6tzW+YaN3RtgjN bBstnZWlBkHQoLaIryp0rY98K76JaO+Auytlz2cCgmayVbtWdhm2SBxdtonSXf61AmbS 69QA== X-Received: by 10.236.75.202 with SMTP id z50mr1730178yhd.6.1383857015159; Thu, 07 Nov 2013 12:43:35 -0800 (PST) Received: from goober.local ([75.76.228.60]) by mx.google.com with ESMTPSA id r1sm9398997yhf.17.2013.11.07.12.43.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 07 Nov 2013 12:43:34 -0800 (PST) Message-ID: <527BFB76.5060101@gmail.com> Date: Thu, 07 Nov 2013 14:43:34 -0600 From: John Weber User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: meta-freescale@yoctoproject.org References: <527B8C95.8000402@freescale.com> In-Reply-To: Subject: Re: Build a gstreamer application with yocto for imx6 Wandboard X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 20:43:39 -0000 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Norman,

You only really need to use a recipe if you want to have bitbake build the package for you, which is ultimately good in order to automate the installation of that package and dependencies of it with the generated image.

If in the short term you want to build a Makefile (or use Autotools), and run it on a Yocto-generated filesystem, then you can build an environment script that can be sourced:

> bitbake meta-ide-support

...wait for it to complete...

> source tmp/environment-blah-blah-blah

This sets up all of the PATH and toolchain settings to your Yocto sysroots that can used by most well-behaved makefiles.

> cd <your gstreamer application project directory>
> make

Then you can copy the generated binaries to your Yocto rootfs, or use Eclipse with RSE to do it via SSH/SCP.

Here is an example Makefile I use to build a gstreamer application I have called videoserver.  It is not the prettiest thing, I know.  It works, though.  Note the use of pkg-config, which automatically feeds the library include file and location information to the CC line.

#
# Makefile
#

BINDIR = bin
SRCDIR = src
INCLUDEDIR = include
SRCS = $(SRCDIR)/videoserver.c
OUTNAME = videoserver
OBJS = $(SRCS:.c*=.o)

# Target Cross Tools
CC = $(CROSS_COMPILE)gcc
PKG_CFG_STRING=$(shell pkg-config --cflags --libs gstreamer-0.10 libconfig)
CFLAGS += -I$(INCLUDEDIR)

# Debugging
ifdef DEBUG
CFLAGS += -DDEBUG -O0 -g
endif

all: $(OUTNAME)
       
$(OUTNAME) : $(OBJS) Makefile
        $(CC) $(CFLAGS) $(SRCDIR)/videoserver.c -o $(BINDIR)/videoserver $(PKG_CFG_STRING) $(LDFLAGS)

.PHONY : clean
       
clean:
        @rm -f $(BINDIR)/$(OUTNAME)



On 11/7/13 2:31 PM, br jer wrote:
Daiane,

Thanks for sending my the examples, I am sorry that I am not grasping the examples.

Looking at the "tiny example" below, it inherits autotools, so that is good, as I am using autools in my project to generate Makefile as well.

My questions: 
- Where in this recipe below points to my project directory?
- Is ${FSL_MIRROR}/${PN} where I place my project?  Or 
- where in the build/tmp/work/... area should I place my project? In my case, what environment variables shall I use?

How can I skip the SRC_URI checksums?  I don't need that as I am placing trusted source in the the tree.

Would BB automatically run ./configure , make and make install ?

How would this recipe get called ? entry in my conf.local?

Many Thanks,

Norman


# Copyright (C) 2013 Freescale Semiconductor
# Released under the MIT license (see COPYING.MIT for the terms)
DESCRIPTION = "Freescale Multimedia VPU wrapper"
DEPENDS = "imx-vpu"
LICENSE = "Proprietary"
SECTION = "multimedia"

# FIXME: Inspecting the source code the content is in fact 1.0.40
SRC_URI = "${FSL_MIRROR}/${PN}-3.10.9-1.0.0.bin;fsl-eula=true"
SRC_URI[md5sum] = "25891ef8d92e82d9b2e999a74a327971"
SRC_URI[sha256sum] = "84d610c478963e7b6a9660a38547b5365ca910159972b3860d7356aee33b9b41"

S = "${WORKDIR}/${PN}-3.10.9-1.0.0"

inherit fsl-eula-unpack autotools pkgconfig

do_install_append() {
    # FIXME: Drop examples for now
    rm -r ${D}${datadir}/imx-mm
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6s)"





On Thu, Nov 7, 2013 at 4:50 AM, Daiane Angolini <daiane.angolini@freescale.com> wrote:
On 07-11-2013 02:16, br jer wrote:
I am using the "master" branch of Yocto.  I have a gstreamer application
that is compiled and tested on Ubuntu.  I have a Makefile for this
application.  The Yocto build I use fsl-image-test and added a few
plugins in my conf.local.  I have tested all the plugins/pipeline that
is needed for this app with gst-launch.

I just want to run a quick test of the code on the wandboard,  what is
the fastest way to do a make and produce a executable ?  I looked at the
Yocto manual and it seems that it calls for creating a recipe etc.  Is
there a simple template that I can use?

You can try to use your already built binary into any rootfs.

If you decide to try to make the recipe, you can share here your problems, but, please take care of proprietary stuff.

You can try at first an tiny example:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-multimedia/libfslvpuwrap/libfslvpuwrap_1.0.40.bb?h=master-next&id=9135a32b50800cac2c3feb0bac1f19c3d6743add


and then go to a more complex one:

http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/tree/recipes-multimedia/gst-plugins/gst-fsl-plugin_3.0.9.bb?h=master-next&id=9135a32b50800cac2c3feb0bac1f19c3d6743add


Daiane

Thanks,
Norman


_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale



--
Daiane




_______________________________________________
meta-freescale mailing list
meta-freescale@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-freescale