summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
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:26:36 +0100
commita490a71677cf9ba72bac077f47518f24f68a0617 (patch)
tree611f619c4032d22e44bead85f36228003a3454aa /meta/recipes-core
parent2e4ca98b7c1294a1001b5a0a8cb4a969ab421552 (diff)
downloadpoky-a490a71677cf9ba72bac077f47518f24f68a0617.tar.gz
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] (From OE-Core rev: 1f2d9be4516cd8c1ed5ce468cb2276f062296ad1) 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')
-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"
4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ 4LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
5 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 5 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6 6
7PR = "r5" 7PR = "r6"
8 8
9CORE_IMAGE_EXTRA_INSTALL = "\ 9CORE_IMAGE_EXTRA_INSTALL = "\
10 task-self-hosted \ 10 task-self-hosted \
@@ -13,7 +13,10 @@ CORE_IMAGE_EXTRA_INSTALL = "\
13IMAGE_FEATURES += "x11-mini package-management" 13IMAGE_FEATURES += "x11-mini package-management"
14 14
15# Ensure there's enough space to do a core-image-minimal build, with rm_work enabled 15# Ensure there's enough space to do a core-image-minimal build, with rm_work enabled
16IMAGE_ROOTFS_EXTRA_SPACE = "2621440" 16IMAGE_ROOTFS_EXTRA_SPACE = "1048576"
17#IMAGE_ROOTFS_EXTRA_SPACE = "2621440"
18#IMAGE_ROOTFS_EXTRA_SPACE = "20971520"
19#IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
17 20
18# Do a quiet boot with limited console messages 21# Do a quiet boot with limited console messages
19APPEND += "quiet" 22APPEND += "quiet"
@@ -21,3 +24,37 @@ APPEND += "quiet"
21IMAGE_FSTYPES = "vmdk" 24IMAGE_FSTYPES = "vmdk"
22 25
23inherit core-image 26inherit core-image
27
28SRCREV = "26a46938d3ea1821e7bec4fa6cc8379babad238b"
29SRC_URI = "git://git.yoctoproject.org/poky;protocol=git"
30
31fakeroot do_populate_poky_src () {
32 # Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
33 # will become invalid in the target.
34 rm -rf ${WORKDIR}/git/.git
35 rm -f ${WORKDIR}/git/.gitignore
36
37 cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
38
39 mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
40 cp -Rp ${DL_DIR} ${IMAGE_ROOTFS}/home/builder/poky/build
41 echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
42 echo "BB_NO_NETWORK = \"1\"" > ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
43 echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
44 mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
45 echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
46 echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
47 echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
48
49 chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
50
51 chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
52}
53
54IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
55
56python do_get_poky_src () {
57 bb.build.exec_func('base_do_fetch', d)
58 bb.build.exec_func('base_do_unpack', d)
59}
60addtask do_get_poky_src before do_rootfs