Patchwork [1/6] self-hosted-image: pre-populate the builder user with poky source

login
register
mail settings
Submitter Saul Wold
Date March 27, 2012, 5:42 a.m.
Message ID <5e91d5cc67fa356f9ed065aad28f978da7d29452.1332826876.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/24611/
State New
Headers show

Comments

Saul Wold - March 27, 2012, 5:42 a.m.
From: Dexuan Cui <dexuan.cui@intel.com>

This patch installs the poky source into the /home/builder/poky/ of the
self-hosted-image.
This makes the user of self-hosted-image easier to start a build.

I think the recent poky master is stable enough, so I specify
a commit number by SRCREV -- we may want to update this number before
releasing 1.2.

This patch fixes [YOCTO #2065]

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>

Added code for supporting target based pseudo
fixed indentation

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/images/self-hosted-image.bb |   41 +++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 2 deletions(-)
Dexuan Cui - March 28, 2012, 3:35 p.m.
Hi Saul,
Did you test "bitbake core-image-minimal" inside the vmware guest?
I got the following ERROR immediately:

------------------------
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Pseudo is not functioning correctly, which will cause failures during package installation. Please check your configuration.

ERROR: Execution of event handler 'check_sanity_eventhandler' failed
------------------------

I suspect in the guest, pseudo is not setup properly?

Thanks,
-- Dexuan

> -----Original Message-----
> From: Saul Wold [mailto:sgw@linux.intel.com]
> Sent: Tuesday, March 27, 2012 1:43 PM
> To: openembedded-core@lists.openembedded.org
> Cc: Cui, Dexuan
> Subject: [PATCH 1/6] self-hosted-image: pre-populate the builder user with
> poky source
> 
> From: Dexuan Cui <dexuan.cui@intel.com>
> 
> This patch installs the poky source into the /home/builder/poky/ of the
> self-hosted-image.
> This makes the user of self-hosted-image easier to start a build.
> 
> I think the recent poky master is stable enough, so I specify a commit number
> by SRCREV -- we may want to update this number before releasing 1.2.
> 
> This patch fixes [YOCTO #2065]
> 
> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
> 
> Added code for supporting target based pseudo fixed indentation
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta/recipes-core/images/self-hosted-image.bb |   41
> +++++++++++++++++++++++-
>  1 files changed, 39 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/images/self-hosted-image.bb
> b/meta/recipes-core/images/self-hosted-image.bb
> index d56c2cb..5aa670d 100644
> --- a/meta/recipes-core/images/self-hosted-image.bb
> +++ b/meta/recipes-core/images/self-hosted-image.bb
> @@ -4,7 +4,7 @@ LICENSE = "MIT"
>  LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
> 
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de
> 20420"
> 
> -PR = "r5"
> +PR = "r6"
> 
>  CORE_IMAGE_EXTRA_INSTALL = "\
>      task-self-hosted \
> @@ -13,7 +13,10 @@ CORE_IMAGE_EXTRA_INSTALL = "\  IMAGE_FEATURES
> += "x11-mini package-management"
> 
>  # Ensure there's enough space to do a core-image-minimal build, with
> rm_work enabled -IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
> +IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
> 
>  # Do a quiet boot with limited console messages  APPEND += "quiet"
> @@ -21,3 +24,37 @@ APPEND += "quiet"
>  IMAGE_FSTYPES = "vmdk"
> 
>  inherit core-image
> +
> +SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
> +SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
> +
> +fakeroot do_populate_poky_src () {
> +	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
> +	# will become invalid in the target.
> +	rm -rf ${WORKDIR}/git/.git
> +	rm -f ${WORKDIR}/git/.gitignore
> +
> +	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
> +
> +	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
> +	cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build
> +	echo "/usr/bin" >
> ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
> +	echo "BB_NO_NETWORK = \"1\"" >
> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
> +	echo "INHERIT += \"rm_work\"" >>
> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
> +        mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
> +        echo "export PSEUDO_PREFIX=/usr" >>
> ${IMAGE_ROOTFS}/home/builder/.bashrc
> +        echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >>
> ${IMAGE_ROOTFS}/home/builder/.bashrc
> +        echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >>
> +${IMAGE_ROOTFS}/home/builder/.bashrc
> +
> +        chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
> +
> +	chown -R builder.builder  ${IMAGE_ROOTFS}/home/builder/poky }
> +
> +IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
> +
> +python do_get_poky_src () {
> +    bb.build.exec_func('base_do_fetch', d)
> +    bb.build.exec_func('base_do_unpack', d) } addtask do_get_poky_src
> +before do_rootfs
> --
> 1.7.7.6
Paul Eggleton - March 28, 2012, 8:45 p.m.
On Monday 26 March 2012 22:42:55 Saul Wold wrote:
> From: Dexuan Cui <dexuan.cui@intel.com>
> 
> This patch installs the poky source into the /home/builder/poky/ of the
> self-hosted-image.
> This makes the user of self-hosted-image easier to start a build.
> 
> I think the recent poky master is stable enough, so I specify
> a commit number by SRCREV -- we may want to update this number before
> releasing 1.2.
> 
> This patch fixes [YOCTO #2065]
> 
> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
> 
> Added code for supporting target based pseudo
> fixed indentation
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta/recipes-core/images/self-hosted-image.bb |   41
> +++++++++++++++++++++++- 1 files changed, 39 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/images/self-hosted-image.bb
> b/meta/recipes-core/images/self-hosted-image.bb index d56c2cb..5aa670d
> 100644
> --- a/meta/recipes-core/images/self-hosted-image.bb
> +++ b/meta/recipes-core/images/self-hosted-image.bb
> @@ -4,7 +4,7 @@ LICENSE = "MIT"
>  LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> 
> -PR = "r5"
> +PR = "r6"
> 
>  CORE_IMAGE_EXTRA_INSTALL = "\
>      task-self-hosted \
> @@ -13,7 +13,10 @@ CORE_IMAGE_EXTRA_INSTALL = "\
>  IMAGE_FEATURES += "x11-mini package-management"
> 
>  # Ensure there's enough space to do a core-image-minimal build, with
> rm_work enabled -IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
> +IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
> +#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
> 
>  # Do a quiet boot with limited console messages
>  APPEND += "quiet"
> @@ -21,3 +24,37 @@ APPEND += "quiet"
>  IMAGE_FSTYPES = "vmdk"
> 
>  inherit core-image
> +
> +SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
> +SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
> +
> +fakeroot do_populate_poky_src () {
> +	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
> +	# will become invalid in the target.
> +	rm -rf ${WORKDIR}/git/.git
> +	rm -f ${WORKDIR}/git/.gitignore
> +
> +	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
> +
> +	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
> +	cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build

Could we change this last line to:

mkdir ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
cp -RpL  ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/

This does two things:

1) Handles if DL_DIR on the build machine is not called "downloads" (which by 
chance mine was not when I tested it)

2) I notice if you set up a separate downloads directory and then use own-
mirrors to fetch from your original downloads directory (possibly unorthodox, 
but it gets you a clean downloads directory without redownloading everything) 
you get symlinks into the original downloads dir rather than copied files. I 
don't know how many people will hit this but since we never want any symlinks 
in this directory in the self-hosted image, I think using -L is worth doing 
here.

Cheers,
Paul
Saul Wold - March 28, 2012, 9:07 p.m.
On 03/28/2012 08:35 AM, Cui, Dexuan wrote:
> Hi Saul,
> Did you test "bitbake core-image-minimal" inside the vmware guest?
> I got the following ERROR immediately:
>
This should be addressed by the 5/6 patch that adds the correct PSEUDO_* 
setup into the minix session script.

I guess that you tried to run this on the command line and as you might 
notice I modified the bashrc, but for some reason that did not get 
picked up when the shell started up, I think we need to force the 
builder user to get /bin/bash as a shell not /bin/sh

Sau!

> ------------------------
> ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
>      Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
>      Following is the list of potential problems / advisories:
>
>      Pseudo is not functioning correctly, which will cause failures during package installation. Please check your configuration.
>
> ERROR: Execution of event handler 'check_sanity_eventhandler' failed
> ------------------------
>
> I suspect in the guest, pseudo is not setup properly?
>
> Thanks,
> -- Dexuan
>
>> -----Original Message-----
>> From: Saul Wold [mailto:sgw@linux.intel.com]
>> Sent: Tuesday, March 27, 2012 1:43 PM
>> To: openembedded-core@lists.openembedded.org
>> Cc: Cui, Dexuan
>> Subject: [PATCH 1/6] self-hosted-image: pre-populate the builder user with
>> poky source
>>
>> From: Dexuan Cui<dexuan.cui@intel.com>
>>
>> This patch installs the poky source into the /home/builder/poky/ of the
>> self-hosted-image.
>> This makes the user of self-hosted-image easier to start a build.
>>
>> I think the recent poky master is stable enough, so I specify a commit number
>> by SRCREV -- we may want to update this number before releasing 1.2.
>>
>> This patch fixes [YOCTO #2065]
>>
>> Signed-off-by: Dexuan Cui<dexuan.cui@intel.com>
>>
>> Added code for supporting target based pseudo fixed indentation
>>
>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>> ---
>>   meta/recipes-core/images/self-hosted-image.bb |   41
>> +++++++++++++++++++++++-
>>   1 files changed, 39 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/images/self-hosted-image.bb
>> b/meta/recipes-core/images/self-hosted-image.bb
>> index d56c2cb..5aa670d 100644
>> --- a/meta/recipes-core/images/self-hosted-image.bb
>> +++ b/meta/recipes-core/images/self-hosted-image.bb
>> @@ -4,7 +4,7 @@ LICENSE = "MIT"
>>   LIC_FILES_CHKSUM =
>> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
>>
>> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de
>> 20420"
>>
>> -PR = "r5"
>> +PR = "r6"
>>
>>   CORE_IMAGE_EXTRA_INSTALL = "\
>>       task-self-hosted \
>> @@ -13,7 +13,10 @@ CORE_IMAGE_EXTRA_INSTALL = "\  IMAGE_FEATURES
>> += "x11-mini package-management"
>>
>>   # Ensure there's enough space to do a core-image-minimal build, with
>> rm_work enabled -IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
>> +IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
>>
>>   # Do a quiet boot with limited console messages  APPEND += "quiet"
>> @@ -21,3 +24,37 @@ APPEND += "quiet"
>>   IMAGE_FSTYPES = "vmdk"
>>
>>   inherit core-image
>> +
>> +SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
>> +SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
>> +
>> +fakeroot do_populate_poky_src () {
>> +	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
>> +	# will become invalid in the target.
>> +	rm -rf ${WORKDIR}/git/.git
>> +	rm -f ${WORKDIR}/git/.gitignore
>> +
>> +	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
>> +
>> +	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
>> +	cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build
>> +	echo "/usr/bin">
>> ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
>> +	echo "BB_NO_NETWORK = \"1\"">
>> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
>> +	echo "INHERIT += \"rm_work\"">>
>> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
>> +        mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
>> +        echo "export PSEUDO_PREFIX=/usr">>
>> ${IMAGE_ROOTFS}/home/builder/.bashrc
>> +        echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo">>
>> ${IMAGE_ROOTFS}/home/builder/.bashrc
>> +        echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64">>
>> +${IMAGE_ROOTFS}/home/builder/.bashrc
>> +
>> +        chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
>> +
>> +	chown -R builder.builder  ${IMAGE_ROOTFS}/home/builder/poky }
>> +
>> +IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
>> +
>> +python do_get_poky_src () {
>> +    bb.build.exec_func('base_do_fetch', d)
>> +    bb.build.exec_func('base_do_unpack', d) } addtask do_get_poky_src
>> +before do_rootfs
>> --
>> 1.7.7.6
>
>
Saul Wold - March 28, 2012, 9:08 p.m.
On 03/28/2012 01:45 PM, Paul Eggleton wrote:
> On Monday 26 March 2012 22:42:55 Saul Wold wrote:
>> From: Dexuan Cui<dexuan.cui@intel.com>
>>
>> This patch installs the poky source into the /home/builder/poky/ of the
>> self-hosted-image.
>> This makes the user of self-hosted-image easier to start a build.
>>
>> I think the recent poky master is stable enough, so I specify
>> a commit number by SRCREV -- we may want to update this number before
>> releasing 1.2.
>>
>> This patch fixes [YOCTO #2065]
>>
>> Signed-off-by: Dexuan Cui<dexuan.cui@intel.com>
>>
>> Added code for supporting target based pseudo
>> fixed indentation
>>
>> Signed-off-by: Saul Wold<sgw@linux.intel.com>
>> ---
>>   meta/recipes-core/images/self-hosted-image.bb |   41
>> +++++++++++++++++++++++- 1 files changed, 39 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/images/self-hosted-image.bb
>> b/meta/recipes-core/images/self-hosted-image.bb index d56c2cb..5aa670d
>> 100644
>> --- a/meta/recipes-core/images/self-hosted-image.bb
>> +++ b/meta/recipes-core/images/self-hosted-image.bb
>> @@ -4,7 +4,7 @@ LICENSE = "MIT"
>>   LIC_FILES_CHKSUM =
>> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
>> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>>
>> -PR = "r5"
>> +PR = "r6"
>>
>>   CORE_IMAGE_EXTRA_INSTALL = "\
>>       task-self-hosted \
>> @@ -13,7 +13,10 @@ CORE_IMAGE_EXTRA_INSTALL = "\
>>   IMAGE_FEATURES += "x11-mini package-management"
>>
>>   # Ensure there's enough space to do a core-image-minimal build, with
>> rm_work enabled -IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
>> +IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
>> +#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
>>
>>   # Do a quiet boot with limited console messages
>>   APPEND += "quiet"
>> @@ -21,3 +24,37 @@ APPEND += "quiet"
>>   IMAGE_FSTYPES = "vmdk"
>>
>>   inherit core-image
>> +
>> +SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
>> +SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
>> +
>> +fakeroot do_populate_poky_src () {
>> +	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
>> +	# will become invalid in the target.
>> +	rm -rf ${WORKDIR}/git/.git
>> +	rm -f ${WORKDIR}/git/.gitignore
>> +
>> +	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
>> +
>> +	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
>> +	cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build
>
> Could we change this last line to:
>
> mkdir ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
> cp -RpL  ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
>
> This does two things:
>
> 1) Handles if DL_DIR on the build machine is not called "downloads" (which by
> chance mine was not when I tested it)
>
> 2) I notice if you set up a separate downloads directory and then use own-
> mirrors to fetch from your original downloads directory (possibly unorthodox,
> but it gets you a clean downloads directory without redownloading everything)
> you get symlinks into the original downloads dir rather than copied files. I
> don't know how many people will hit this but since we never want any symlinks
> in this directory in the self-hosted image, I think using -L is worth doing
> here.
>
That seems like a completely reasonable change and makes good sense, 
your right I did assume DL_DIR would include downloads.

Sau!

> Cheers,
> Paul
>
Dexuan Cui - March 29, 2012, 7:15 a.m.
Saul Wold wrote on 2012-03-29:
> On 03/28/2012 08:35 AM, Cui, Dexuan wrote:
>> Hi Saul,
>> Did you test "bitbake core-image-minimal" inside the vmware guest?
>> I got the following ERROR immediately:
>>      Pseudo is not functioning correctly, which will cause failures
>> I suspect in the guest, pseudo is not setup properly? 
> This should be addressed by the 5/6 patch that adds the correct
> PSEUDO_* setup into the minix session script.
> I guess that you tried to run this on the command line and as you
> might notice I modified the bashrc, but for some reason that did not
> get picked up when the shell started up, I think we need to force the
> builder user to get /bin/bash as a shell not /bin/sh
Hi Saul,
I'm sorry -- this is actually a false alarm -- I didn't use the updated
branch...
With the latest poky master, bitbake in cmd line can work fine.
Hob is automatically started and can work fine, too.

Thanks,
-- Dexuan

Patch

diff --git a/meta/recipes-core/images/self-hosted-image.bb b/meta/recipes-core/images/self-hosted-image.bb
index d56c2cb..5aa670d 100644
--- a/meta/recipes-core/images/self-hosted-image.bb
+++ b/meta/recipes-core/images/self-hosted-image.bb
@@ -4,7 +4,7 @@  LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-PR = "r5"
+PR = "r6"
 
 CORE_IMAGE_EXTRA_INSTALL = "\
     task-self-hosted \
@@ -13,7 +13,10 @@  CORE_IMAGE_EXTRA_INSTALL = "\
 IMAGE_FEATURES += "x11-mini package-management"
 
 # Ensure there's enough space to do a core-image-minimal build, with rm_work enabled
-IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
+IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
+#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
+#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
+#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
 
 # Do a quiet boot with limited console messages
 APPEND += "quiet"
@@ -21,3 +24,37 @@  APPEND += "quiet"
 IMAGE_FSTYPES = "vmdk"
 
 inherit core-image
+
+SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
+SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
+
+fakeroot do_populate_poky_src () {
+	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
+	# will become invalid in the target.
+	rm -rf ${WORKDIR}/git/.git
+	rm -f ${WORKDIR}/git/.gitignore
+
+	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+
+	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
+	cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build
+	echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
+	echo "BB_NO_NETWORK = \"1\"" > ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
+	echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
+        mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
+        echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+        echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+        echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+        chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
+
+	chown -R builder.builder  ${IMAGE_ROOTFS}/home/builder/poky
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+
+python do_get_poky_src () {
+    bb.build.exec_func('base_do_fetch', d)
+    bb.build.exec_func('base_do_unpack', d)
+}
+addtask do_get_poky_src before do_rootfs