[OE-core] [PATCH 1/6] self-hosted-image: pre-populate the builder user with poky source
Paul Eggleton
paul.eggleton at linux.intel.com
Wed Mar 28 20:45:23 UTC 2012
On Monday 26 March 2012 22:42:55 Saul Wold wrote:
> From: Dexuan Cui <dexuan.cui at 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 at intel.com>
>
> Added code for supporting target based pseudo
> fixed indentation
>
> Signed-off-by: Saul Wold <sgw at 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
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list