summaryrefslogtreecommitdiff
path: root/meta/recipes-core/images
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2012-03-26 22:42:55 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-27 13:21:16 +0100
commit1f2d9be4516cd8c1ed5ce468cb2276f062296ad1 (patch)
treecdd0816e072a3cb70c1af4c63af5f27522bfde91 /meta/recipes-core/images
parente2fd32919e1d96136528c61677bdfeee2b064320 (diff)
downloadopenembedded-core-1f2d9be4516cd8c1ed5ce468cb2276f062296ad1.tar.gz
openembedded-core-1f2d9be4516cd8c1ed5ce468cb2276f062296ad1.tar.bz2
openembedded-core-1f2d9be4516cd8c1ed5ce468cb2276f062296ad1.zip
self-hosted-image: pre-populate the builder user with poky source
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/images')
-rw-r--r--meta/recipes-core/images/self-hosted-image.bb41
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 d56c2cb37f..5aa670d0d9 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