summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-08-01 12:11:22 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-02 14:32:11 +0100
commitf9da3c269fd7c8260e3457f7f77b22ef659d3752 (patch)
tree53288a5bbee92d57af64b000b4009d80f77840c0 /meta/classes
parent0d5dfb29c359eb778182660e852a6aca273f8179 (diff)
downloadpoky-f9da3c269fd7c8260e3457f7f77b22ef659d3752.tar.gz
bitbake.conf: Add SDK_PACKAGE_ARCHS
Add SDK_PACKAGE_ARCHS to avoid the sed operations we were previously doing inside of the variouns populate_sdk functions and related items. Also add documentation to populate_sdk to explain when the various functions are expected to be doing. Finally fix a bug in populate_sdk_rpm where the wrong value was being set, noticed while working on this change. (From OE-Core rev: 587c1d5bac71fa6faa65ee3a271391cbf931e8f7) 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/package_deb.bbclass6
-rw-r--r--meta/classes/package_ipk.bbclass37
-rw-r--r--meta/classes/package_rpm.bbclass10
-rw-r--r--meta/classes/populate_sdk.bbclass9
-rw-r--r--meta/classes/populate_sdk_deb.bbclass13
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass23
6 files changed, 38 insertions, 60 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 8e363f8d63..48aa232736 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -78,14 +78,10 @@ package_update_index_deb () {
78 return 78 return
79 fi 79 fi
80 80
81 for arch in ${PACKAGE_ARCHS}; do 81 for arch in ${PACKAGE_ARCHS} ${SDK_PACKAGE_ARCHS}; do
82 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
83 if [ -e ${DEPLOY_DIR_DEB}/$arch ]; then 82 if [ -e ${DEPLOY_DIR_DEB}/$arch ]; then
84 debarchs="$debarchs $arch" 83 debarchs="$debarchs $arch"
85 fi 84 fi
86 if [ -e ${DEPLOY_DIR_DEB}/$sdkarch-nativesdk ]; then
87 debarchs="$debarchs $sdkarch-nativesdk"
88 fi
89 done 85 done
90 86
91 for arch in $debarchs; do 87 for arch in $debarchs; do
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 16574e98b4..3768889e1a 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -161,7 +161,7 @@ ipk_log_check() {
161package_update_index_ipk () { 161package_update_index_ipk () {
162 set -x 162 set -x
163 163
164 ipkgarchs="${PACKAGE_ARCHS}" 164 ipkgarchs="${PACKAGE_ARCHS} ${SDK_PACKAGE_ARCHS}"
165 165
166 if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then 166 if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
167 return 167 return
@@ -169,8 +169,7 @@ package_update_index_ipk () {
169 169
170 packagedirs="${DEPLOY_DIR_IPK}" 170 packagedirs="${DEPLOY_DIR_IPK}"
171 for arch in $ipkgarchs; do 171 for arch in $ipkgarchs; do
172 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` 172 packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch"
173 packagedirs="$packagedirs ${DEPLOY_DIR_IPK}/$arch ${DEPLOY_DIR_IPK}/$sdkarch-nativesdk"
174 done 173 done
175 174
176 multilib_archs="${MULTILIB_ARCHS}" 175 multilib_archs="${MULTILIB_ARCHS}"
@@ -193,21 +192,20 @@ package_update_index_ipk () {
193# 192#
194package_generate_ipkg_conf () { 193package_generate_ipkg_conf () {
195 package_generate_archlist 194 package_generate_archlist
196 echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_TARGET}
197 echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_SDK} 195 echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_SDK}
196 ipkgarchs="${SDK_PACKAGE_ARCHS}"
197 for arch in $ipkgarchs; do
198 if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
199 echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_SDK}
200 fi
201 done
202
203 echo "src oe file:${DEPLOY_DIR_IPK}" >> ${IPKGCONF_TARGET}
198 ipkgarchs="${PACKAGE_ARCHS}" 204 ipkgarchs="${PACKAGE_ARCHS}"
199 for arch in $ipkgarchs; do 205 for arch in $ipkgarchs; do
200 if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then 206 if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then
201 echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET} 207 echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${IPKGCONF_TARGET}
202 fi 208 fi
203 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
204 extension=-nativesdk
205 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then
206 extension=""
207 fi
208 if [ -e ${DEPLOY_DIR_IPK}/$sdkarch$extension/Packages ] ; then
209 echo "src oe-$sdkarch$extension file:${DEPLOY_DIR_IPK}/$sdkarch$extension" >> ${IPKGCONF_SDK}
210 fi
211 done 209 done
212 210
213 multilib_archs="${MULTILIB_ARCHS}" 211 multilib_archs="${MULTILIB_ARCHS}"
@@ -219,16 +217,17 @@ package_generate_ipkg_conf () {
219} 217}
220 218
221package_generate_archlist () { 219package_generate_archlist () {
220 ipkgarchs="${SDK_PACKAGE_ARCHS}"
221 priority=1
222 for arch in $ipkgarchs; do
223 echo "arch $arch $priority" >> ${IPKGCONF_SDK}
224 priority=$(expr $priority + 5)
225 done
226
222 ipkgarchs="${PACKAGE_ARCHS}" 227 ipkgarchs="${PACKAGE_ARCHS}"
223 priority=1 228 priority=1
224 for arch in $ipkgarchs; do 229 for arch in $ipkgarchs; do
225 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
226 echo "arch $arch $priority" >> ${IPKGCONF_TARGET} 230 echo "arch $arch $priority" >> ${IPKGCONF_TARGET}
227 extension=-nativesdk
228 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then
229 extension=""
230 fi
231 echo "arch $sdkarch$extension $priority" >> ${IPKGCONF_SDK}
232 priority=$(expr $priority + 5) 231 priority=$(expr $priority + 5)
233 done 232 done
234 233
@@ -237,8 +236,6 @@ package_generate_archlist () {
237 echo "arch $arch $priority" >> ${IPKGCONF_TARGET} 236 echo "arch $arch $priority" >> ${IPKGCONF_TARGET}
238 priority=$(expr $priority + 5) 237 priority=$(expr $priority + 5)
239 done 238 done
240
241
242} 239}
243 240
244python do_package_ipk () { 241python do_package_ipk () {
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 0f16613ba7..abedc68005 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -31,15 +31,7 @@ package_update_index_rpm () {
31 package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs 31 package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs
32 32
33 # Update SDK packages 33 # Update SDK packages
34 base_archs="" 34 base_archs="${SDK_PACKAGE_ARCHS}"
35 for arch in ${PACKAGE_ARCHS}; do
36 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
37 extension="-nativesdk"
38 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then
39 extension=""
40 fi
41 base_archs="$base_archs $sdkarch$extension"
42 done
43 package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs 35 package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs
44} 36}
45 37
diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index 089ed9ab35..0f3591b9d5 100644
--- a/meta/classes/populate_sdk.bbclass
+++ b/meta/classes/populate_sdk.bbclass
@@ -22,6 +22,15 @@ fakeroot do_populate_sdk() {
22 rm -rf ${SDK_OUTPUT} 22 rm -rf ${SDK_OUTPUT}
23 mkdir -p ${SDK_OUTPUT} 23 mkdir -p ${SDK_OUTPUT}
24 24
25 # populate_sdk_<image> is required to construct two images:
26 # SDK_ARCH-nativesdk - contains the cross compiler and associated tooling
27 # target - contains a target rootfs configured for the SDK usage
28 #
29 # the output of populate_sdk_<image> should end up in ${SDK_OUTPUT} it is made
30 # up of:
31 # ${SDK_OUTPUT}/<sdk_arch-nativesdk pkgs>
32 # ${SDK_OUTPUT}/${SDKTARGETSYSROOT}/<target pkgs>
33
25 populate_sdk_${IMAGE_PKGTYPE} 34 populate_sdk_${IMAGE_PKGTYPE}
26 35
27 # Don't ship any libGL in the SDK 36 # Don't ship any libGL in the SDK
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index a5b6384f7e..25d90c7eda 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -34,18 +34,7 @@ fakeroot populate_sdk_deb () {
34 export INSTALL_ROOTFS_DEB="${SDK_OUTPUT}" 34 export INSTALL_ROOTFS_DEB="${SDK_OUTPUT}"
35 export INSTALL_BASEARCH_DEB="${SDK_ARCH}" 35 export INSTALL_BASEARCH_DEB="${SDK_ARCH}"
36 export INSTALL_PACKAGES_NORMAL_DEB="${TOOLCHAIN_HOST_TASK}" 36 export INSTALL_PACKAGES_NORMAL_DEB="${TOOLCHAIN_HOST_TASK}"
37 INSTALL_ARCHS_DEB="" 37 export INSTALL_ARCHS_DEB="${SDK_PACKAGE_ARCHS}"
38 for arch in ${PACKAGE_ARCHS}; do
39 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
40 extension="-nativesdk"
41 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then
42 extension=""
43 fi
44 if [ -e ${DEPLOY_DIR_DEB}/$sdkarch$extension ]; then
45 INSTALL_ARCHS_DEB="$INSTALL_ARCHS_DEB $sdkarch$extension"
46 fi
47 done
48 export INSTALL_ARCHS_DEB
49 38
50 package_install_internal_deb 39 package_install_internal_deb
51 populate_sdk_post_deb ${SDK_OUTPUT}/${SDKPATHNATIVE} 40 populate_sdk_post_deb ${SDK_OUTPUT}/${SDKPATHNATIVE}
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index da308c12cd..560e40c685 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -34,16 +34,16 @@ fakeroot populate_sdk_rpm () {
34 34
35 #install target 35 #install target
36 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" 36 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
37 export INSTALL_PLATFORM_RPM="${TARGET_ARCHS}" 37 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
38 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 38 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
39 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}" 39 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}"
40 40
41 # List must be prefered to least preferred order 41 # List must be prefered to least preferred order
42 INSTALL_PLATFORM_RPM="" 42 INSTALL_PLATFORM_EXTRA_RPM=""
43 for each_arch in ${PACKAGE_ARCHS} ; do 43 for each_arch in ${PACKAGE_ARCHS} ; do
44 INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM" 44 INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
45 done 45 done
46 export INSTALL_PLATFORM_RPM 46 export INSTALL_PLATFORM_EXTRA_RPM
47 47
48 package_install_internal_rpm 48 package_install_internal_rpm
49 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM} 49 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
@@ -53,16 +53,11 @@ fakeroot populate_sdk_rpm () {
53 export INSTALL_PLATFORM_RPM="${SDK_ARCH}" 53 export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
54 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}" 54 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
55 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}" 55 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}"
56 export INSTALL_PLATFORM_EXTRA_RPM="" 56
57 for arch in ${PACKAGE_ARCHS}; do 57 # List must be prefered to least preferred order
58 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` 58 INSTALL_PLATFORM_EXTRA_RPM=""
59 extension="-nativesdk" 59 for each_arch in ${SDK_PACKAGE_ARCHS} ; do
60 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then 60 INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
61 extension=""
62 fi
63 if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then
64 INSTALL_PLATFORM_EXTRA_RPM="$sdkarch $INSTALL_PLATFORM_EXTRA_RPM"
65 fi
66 done 61 done
67 export INSTALL_PLATFORM_EXTRA_RPM 62 export INSTALL_PLATFORM_EXTRA_RPM
68 63