All of lore.kernel.org
 help / color / mirror / Atom feed
* building yocto image from git always switches branch
@ 2013-03-12 16:34 Volker Vogelhuber
  2013-03-15  9:02 ` Volker Vogelhuber
  0 siblings, 1 reply; 5+ messages in thread
From: Volker Vogelhuber @ 2013-03-12 16:34 UTC (permalink / raw)
  To: yocto

I currently try to create a kernel and rootfs image based on yocto 1.3.
I cloned the poky git repository and switched to danny branch.

For some reason during the bitbake run for creating the image the branch 
of my local git repository is always switched to master, which of course 
won't match with the other layers I checked out for danny.

Currently I do the following:

#!/bin/bash

if [ ! -e poky ]; then
   git clone git://git.yoctoproject.org/poky.git
   cd poky
   git checkout -b danny remotes/origin/danny
   cd ..
fi
if [ ! -e poky/meta-ti ]; then
   git clone -b danny git://git.yoctoproject.org/meta-ti poky/meta-ti
fi

After the checkout I copy some configuration files to the build/conf 
directory within the poky directory (bblayers.conf, local.conf) and an 
additional layer for our specific hardware module.

When I change to the build directory and start building the image using 
bitbake, there seems to be a git call somewhere in the recipes that 
switches the branch of the poky git checkout back to master. Of course 
that results in a total misbehaviour of the build process, as the 
underlaying recipes changes during the build.

Can someone explain that behaviour? Is that a bug or is there something 
I'm doing wrong.

Kind regards,
     Volker


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: building yocto image from git always switches branch
  2013-03-12 16:34 building yocto image from git always switches branch Volker Vogelhuber
@ 2013-03-15  9:02 ` Volker Vogelhuber
  2013-03-15 14:34   ` Bruce Ashfield
  0 siblings, 1 reply; 5+ messages in thread
From: Volker Vogelhuber @ 2013-03-15  9:02 UTC (permalink / raw)
  To: yocto

Volker Vogelhuber <v.vogelhuber@...> writes:

> When I change to the build directory and start building the image using 
> bitbake, there seems to be a git call somewhere in the recipes that 
> switches the branch of the poky git checkout back to master. Of course 
> that results in a total misbehaviour of the build process, as the 
> underlaying recipes changes during the build.
It turned out, my own kernel recipe included 
recipes-kernel/linux/linux-yocto.inc 
which seems to require that the kernel is checked out from a git
repository. After removing this include and only inherit from 
kernel.bbclass it worked as expected.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: building yocto image from git always switches branch
  2013-03-15  9:02 ` Volker Vogelhuber
@ 2013-03-15 14:34   ` Bruce Ashfield
  2013-03-15 15:04     ` Volker Vogelhuber
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Ashfield @ 2013-03-15 14:34 UTC (permalink / raw)
  To: Volker Vogelhuber; +Cc: yocto

On 13-03-15 02:02 AM, Volker Vogelhuber wrote:
> Volker Vogelhuber <v.vogelhuber@...> writes:
>
>> When I change to the build directory and start building the image using
>> bitbake, there seems to be a git call somewhere in the recipes that
>> switches the branch of the poky git checkout back to master. Of course
>> that results in a total misbehaviour of the build process, as the
>> underlaying recipes changes during the build.
> It turned out, my own kernel recipe included
> recipes-kernel/linux/linux-yocto.inc
> which seems to require that the kernel is checked out from a git
> repository. After removing this include and only inherit from
> kernel.bbclass it worked as expected.

Interesting. Are you working out of yocto/oe-core master ? The linux
yocto kernel support should always fail if the kernel source dir
isn't a git repo (or convert it into one) and not impact the main
yocto/oe-core tree.

Cheers,

Bruce

>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: building yocto image from git always switches branch
  2013-03-15 14:34   ` Bruce Ashfield
@ 2013-03-15 15:04     ` Volker Vogelhuber
  2013-03-15 16:00       ` Bruce Ashfield
  0 siblings, 1 reply; 5+ messages in thread
From: Volker Vogelhuber @ 2013-03-15 15:04 UTC (permalink / raw)
  To: yocto

Hi,

> Interesting. Are you working out of yocto/oe-core master ? The linux
> yocto kernel support should always fail if the kernel source dir
> isn't a git repo (or convert it into one) and not impact the main
> yocto/oe-core tree.
As mentioned in the first post, I checked out the danny branch. 

I used the following bitbake recipe for kernel compilation:

inherit kernel
require recipes-kernel/linux/linux-yocto.inc

SECTION = "kernel"
LICENSE = "GPLv2"

LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"


DESCRIPTION = "Linux kernel for the tao-boards"
KERNEL_IMAGETYPE = "uImage"
KERNEL_CC_append += "-mno-unaligned-access "

COMPATIBLE_MACHINE = "(tao)"

PV = "2.6.37"

MACHINE_KERNEL_PR_append = "c+tn"

SRC_URI = "file://linux-2.6.37-tn.tar.xz \
           file://defconfig \
           file://nonetwork.patch \
           file://rtc.patch \
	   file://multitouch.patch"

S = "${WORKDIR}/linux-2.6.37-tn"

# Sadly perf is broken:
do_compile_perf() {
	:
}

do_validate_branches() {
	  :
}

do_install_perf() {
	:
}


After I removed the require recipes-kernel/linux/linux-yocto.inc
line it worked. As you can see I have a .tar.xz file for the kernel source, so 
no git. But the git command within the linux-yocto.inc file
realizes, that there is a git repository. But it's not one from the
kernel, but from the poky repository the whole build environment is 
located in.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: building yocto image from git always switches branch
  2013-03-15 15:04     ` Volker Vogelhuber
@ 2013-03-15 16:00       ` Bruce Ashfield
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Ashfield @ 2013-03-15 16:00 UTC (permalink / raw)
  To: Volker Vogelhuber; +Cc: yocto

On 13-03-15 08:04 AM, Volker Vogelhuber wrote:
> Hi,
>
>> Interesting. Are you working out of yocto/oe-core master ? The linux
>> yocto kernel support should always fail if the kernel source dir
>> isn't a git repo (or convert it into one) and not impact the main
>> yocto/oe-core tree.
> As mentioned in the first post, I checked out the danny branch.
>
> I used the following bitbake recipe for kernel compilation:
>
> inherit kernel
> require recipes-kernel/linux/linux-yocto.inc
>
> SECTION = "kernel"
> LICENSE = "GPLv2"
>
> LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
>
>
> DESCRIPTION = "Linux kernel for the tao-boards"
> KERNEL_IMAGETYPE = "uImage"
> KERNEL_CC_append += "-mno-unaligned-access "
>
> COMPATIBLE_MACHINE = "(tao)"
>
> PV = "2.6.37"
>
> MACHINE_KERNEL_PR_append = "c+tn"
>
> SRC_URI = "file://linux-2.6.37-tn.tar.xz \
>             file://defconfig \
>             file://nonetwork.patch \
>             file://rtc.patch \
> 	   file://multitouch.patch"
>
> S = "${WORKDIR}/linux-2.6.37-tn"
>
> # Sadly perf is broken:
> do_compile_perf() {
> 	:
> }
>
> do_validate_branches() {
> 	  :
> }
>
> do_install_perf() {
> 	:
> }
>
>
> After I removed the require recipes-kernel/linux/linux-yocto.inc
> line it worked. As you can see I have a .tar.xz file for the kernel source, so
> no git. But the git command within the linux-yocto.inc file
> realizes, that there is a git repository. But it's not one from the
> kernel, but from the poky repository the whole build environment is
> located in.

Hmmm. This is definitely supposed to error in the build process.
If you use linux-yocto-custom as a baseline recipe (from meta-skeleton),
you'll find the tgz that is unpacked by the build system is converted
to a git repository before the build starts, allow all the tool extensions
to work with configs that for one reason or another can't use a git
backed tree.

I just tested it here, and it worked, using the latest code in master.

Cheers,

Bruce

>
>
>
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-03-15 16:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 16:34 building yocto image from git always switches branch Volker Vogelhuber
2013-03-15  9:02 ` Volker Vogelhuber
2013-03-15 14:34   ` Bruce Ashfield
2013-03-15 15:04     ` Volker Vogelhuber
2013-03-15 16:00       ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.