summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package_rpm.bbclass15
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass13
-rw-r--r--meta/classes/rootfs_rpm.bbclass5
3 files changed, 23 insertions, 10 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 7cbdae6256..60127d2ef4 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -155,7 +155,8 @@ resolve_package_rpm () {
155# install a bunch of packages using rpm 155# install a bunch of packages using rpm
156# the following shell variables needs to be set before calling this func: 156# the following shell variables needs to be set before calling this func:
157# INSTALL_ROOTFS_RPM - install root dir 157# INSTALL_ROOTFS_RPM - install root dir
158# INSTALL_PLATFORM_RPM - extra platform 158# INSTALL_PLATFORM_RPM - main platform
159# INSTALL_PLATFORM_EXTRA_RPM - extra platform
159# INSTALL_CONFBASE_RPM - configuration file base name 160# INSTALL_CONFBASE_RPM - configuration file base name
160# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed 161# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed
161# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only 162# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
@@ -166,7 +167,8 @@ resolve_package_rpm () {
166package_install_internal_rpm () { 167package_install_internal_rpm () {
167 168
168 local target_rootfs="${INSTALL_ROOTFS_RPM}" 169 local target_rootfs="${INSTALL_ROOTFS_RPM}"
169 local platforms="${INSTALL_PLATFORM_RPM}" 170 local platform="${INSTALL_PLATFORM_RPM}"
171 local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
170 local confbase="${INSTALL_CONFBASE_RPM}" 172 local confbase="${INSTALL_CONFBASE_RPM}"
171 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" 173 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}"
172 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" 174 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
@@ -176,9 +178,10 @@ package_install_internal_rpm () {
176 178
177 # Setup base system configuration 179 # Setup base system configuration
178 mkdir -p ${target_rootfs}/etc/rpm/ 180 mkdir -p ${target_rootfs}/etc/rpm/
179 if [ ! -z "$platforms" ]; then 181 echo "${platform}-poky-linux-gnu" > ${target_rootfs}/etc/rpm/platform
180 for pt in $platforms ; do 182 if [ ! -z "$platform_extra" ]; then
181 echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform 183 for pt in $platform_extra ; do
184 echo "$pt-.*-linux.*" >> ${target_rootfs}/etc/rpm/platform
182 done 185 done
183 fi 186 fi
184 187
@@ -764,7 +767,7 @@ python do_package_rpm () {
764 os.chmod(pkgwritedir, 0755) 767 os.chmod(pkgwritedir, 0755)
765 768
766 cmd = rpmbuild 769 cmd = rpmbuild
767 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd 770 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + "-poky-linux-gnu --buildroot " + pkgd
768 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" 771 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
769 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" 772 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
770 cmd = cmd + " --define '_use_internal_dependency_generator 0'" 773 cmd = cmd + " --define '_use_internal_dependency_generator 0'"
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index d1797806e2..0afe042fd6 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -33,10 +33,17 @@ fakeroot populate_sdk_rpm () {
33 33
34 #install target 34 #install target
35 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" 35 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
36 export INSTALL_PLATFORM_RPM="${PACKAGE_ARCHS}" 36 export INSTALL_PLATFORM_RPM="${TARGET_ARCHS}"
37 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 37 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
38 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}" 38 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}"
39 39
40 # List must be prefered to least preferred order
41 INSTALL_PLATFORM_RPM=""
42 for each_arch in ${PACKAGE_ARCHS} ; do
43 INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM"
44 done
45 export INSTALL_PLATFORM_RPM
46
40 package_install_internal_rpm 47 package_install_internal_rpm
41 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM} 48 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
42 49
@@ -45,6 +52,7 @@ fakeroot populate_sdk_rpm () {
45 export INSTALL_PLATFORM_RPM="${SDK_ARCH}" 52 export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
46 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}" 53 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
47 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}" 54 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}"
55 export INSTALL_PLATFORM_EXTRA_RPM=""
48 for arch in ${PACKAGE_ARCHS}; do 56 for arch in ${PACKAGE_ARCHS}; do
49 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` 57 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
50 extension="-nativesdk" 58 extension="-nativesdk"
@@ -52,9 +60,10 @@ fakeroot populate_sdk_rpm () {
52 extension="" 60 extension=""
53 fi 61 fi
54 if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then 62 if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then
55 INSTALL_PLATFORM_RPM="$INSTALL_PLATFORM_RPM $sdkarch" 63 INSTALL_PLATFORM_EXTRA_RPM="$sdkarch $INSTALL_PLATFORM_EXTRA_RPM"
56 fi 64 fi
57 done 65 done
66 export INSTALL_PLATFORM_EXTRA_RPM
58 67
59 package_install_internal_rpm 68 package_install_internal_rpm
60 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM} 69 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index a722e68ae1..caafbdc721 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -48,6 +48,7 @@ fakeroot rootfs_rpm_do_rootfs () {
48 48
49 #install pacakges 49 #install pacakges
50 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" 50 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
51 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
51 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 52 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
52 export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" 53 export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}"
53 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" 54 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
@@ -56,9 +57,9 @@ fakeroot rootfs_rpm_do_rootfs () {
56 export INSTALL_TASK_RPM="populate_sdk" 57 export INSTALL_TASK_RPM="populate_sdk"
57 58
58 # List must be prefered to least preferred order 59 # List must be prefered to least preferred order
59 INSTALL_PLATFORM_RPM="" 60 INSTALL_PLATFORM_EXTRA_RPM=""
60 for each_arch in ${PACKAGE_ARCHS} ; do 61 for each_arch in ${PACKAGE_ARCHS} ; do
61 INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM" 62 INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
62 done 63 done
63 export INSTALL_PLATFORM_RPM 64 export INSTALL_PLATFORM_RPM
64 65