summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2012-06-22 19:38:30 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-03 14:55:00 +0100
commitb70c9154e43f80d95c4e81239b3d6a95983b8cfb (patch)
treea4603b7150268f41e25c612896345e241fcc8241 /meta/classes
parent63c6f46b22fc3c8fd2edd6e3c780200d697b4e45 (diff)
downloadpoky-b70c9154e43f80d95c4e81239b3d6a95983b8cfb.tar.gz
image.bbclass: Add support to build the SDK in parallel with the image
When building an image recipe, you can now build a companion SDK by calling the populate_sdk task: bitbake -c populate_sdk core-image-minimal Note: there are still issues w/ the SDK not working completely with multilibs. A lock is required between rootfs and populate_sdk activities to prevent configuration file clashes and similar package management problems in ipk and deb based systems. (RPM already had a lock for a different reason.) (From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image.bbclass5
-rw-r--r--meta/classes/populate_sdk_base.bbclass1
-rw-r--r--meta/classes/populate_sdk_deb.bbclass2
-rw-r--r--meta/classes/populate_sdk_ipk.bbclass2
-rw-r--r--meta/classes/rootfs_deb.bbclass2
-rw-r--r--meta/classes/rootfs_ipk.bbclass2
6 files changed, 14 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9fae1fe43f..24fd868087 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -3,6 +3,11 @@ inherit rootfs_${IMAGE_PKGTYPE}
3IMAGETEST ?= "dummy" 3IMAGETEST ?= "dummy"
4inherit imagetest-${IMAGETEST} 4inherit imagetest-${IMAGETEST}
5 5
6inherit populate_sdk_base
7
8TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}"
9TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY} ${PACKAGE_GROUP_dev-pkgs} ${PACKAGE_GROUP_dbg-pkgs}"
10
6inherit gzipnative 11inherit gzipnative
7 12
8LICENSE = "MIT" 13LICENSE = "MIT"
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index 6dc66fbbbe..ed2dca0780 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -120,6 +120,7 @@ populate_sdk_log_check() {
120 done 120 done
121} 121}
122 122
123do_populate_sdk[dirs] = "${TOPDIR}"
123do_populate_sdk[nostamp] = "1" 124do_populate_sdk[nostamp] = "1"
124do_populate_sdk[depends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])}" 125do_populate_sdk[depends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])}"
125do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}" 126do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}"
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index c3b3e0cde1..9e9e1e1d8b 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -6,6 +6,8 @@ DEB_SDK_ARCH = "${@[d.getVar('SDK_ARCH', True), "i386"]\
6 [d.getVar('SDK_ARCH', True) in \ 6 [d.getVar('SDK_ARCH', True) in \
7 ["x86", "i486", "i586", "i686", "pentium"]]}" 7 ["x86", "i486", "i586", "i686", "pentium"]]}"
8 8
9do_populate_sdk[lockfiles] += "${WORKDIR}/deb.lock"
10
9populate_sdk_post_deb () { 11populate_sdk_post_deb () {
10 12
11 local target_rootfs=$1 13 local target_rootfs=$1
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
index aa3efde20d..4321afb295 100644
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ b/meta/classes/populate_sdk_ipk.bbclass
@@ -1,6 +1,8 @@
1do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot" 1do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
2do_populate_sdk[recrdeptask] += "do_package_write_ipk" 2do_populate_sdk[recrdeptask] += "do_package_write_ipk"
3 3
4do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
5
4populate_sdk_ipk() { 6populate_sdk_ipk() {
5 7
6 rm -f ${IPKGCONF_TARGET} 8 rm -f ${IPKGCONF_TARGET}
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass
index 6c9767f98e..4ea71daedc 100644
--- a/meta/classes/rootfs_deb.bbclass
+++ b/meta/classes/rootfs_deb.bbclass
@@ -8,6 +8,8 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
8do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot" 8do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
9do_rootfs[recrdeptask] += "do_package_write_deb" 9do_rootfs[recrdeptask] += "do_package_write_deb"
10 10
11do_rootfs[lockfiles] += "${WORKDIR}/deb.lock"
12
11DEB_POSTPROCESS_COMMANDS = "rootfs_install_all_locales; " 13DEB_POSTPROCESS_COMMANDS = "rootfs_install_all_locales; "
12 14
13opkglibdir = "${localstatedir}/lib/opkg" 15opkglibdir = "${localstatedir}/lib/opkg"
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass
index 15800864a6..9732385613 100644
--- a/meta/classes/rootfs_ipk.bbclass
+++ b/meta/classes/rootfs_ipk.bbclass
@@ -12,6 +12,8 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
12do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot" 12do_rootfs[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
13do_rootfs[recrdeptask] += "do_package_write_ipk" 13do_rootfs[recrdeptask] += "do_package_write_ipk"
14 14
15do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
16
15IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite" 17IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} --force-overwrite"
16 18
17OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf" 19OPKG_PREPROCESS_COMMANDS = "package_update_index_ipk; package_generate_ipkg_conf"