summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2010-07-05 18:48:10 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2010-07-19 13:19:03 +0200
commit48007bf7f68571d2f7e42daa3e353c3f9f37c339 (patch)
tree8d2f1f35f7bacf05a04a6e6bfbf9915a2f2db5cf
parentcc426a88db63911bc12bc9e9b4fb419871d0bd91 (diff)
downloadptxdist-48007bf7f68571d2f7e42daa3e353c3f9f37c339.tar.gz
ptxdist-48007bf7f68571d2f7e42daa3e353c3f9f37c339.tar.xz
[platform] make it possible to use a collectionconfig with a base platform
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/other/Toplevel.make5
-rw-r--r--rules/post/ptxd_make_image_common.make2
-rw-r--r--scripts/lib/ptxd_make_00-init.sh23
-rw-r--r--scripts/lib/ptxd_make_image_common.sh18
-rw-r--r--scripts/lib/ptxd_make_xpkg_common.sh6
5 files changed, 37 insertions, 17 deletions
diff --git a/rules/other/Toplevel.make b/rules/other/Toplevel.make
index 35785e0cd..e891b01bb 100644
--- a/rules/other/Toplevel.make
+++ b/rules/other/Toplevel.make
@@ -83,6 +83,11 @@ PTX_PACKAGES_SELECTED := \
$(CROSS_PACKAGES) \
$(HOST_PACKAGES)
+PTX_PACKAGES_INSTALL := \
+ $(PACKAGES) \
+ $(PTXDIST_BASE_PACKAGES) \
+ $(PACKAGES-b)
+
# might be non existent
include $(wildcard $(POSTRULESDIR)/*.make)
include $(wildcard $(PROJECTPOSTRULESDIR)/*.make)
diff --git a/rules/post/ptxd_make_image_common.make b/rules/post/ptxd_make_image_common.make
index 277254cae..132d9c2ed 100644
--- a/rules/post/ptxd_make_image_common.make
+++ b/rules/post/ptxd_make_image_common.make
@@ -17,7 +17,7 @@ DOPERMISSIONS := '{ \
image/env = \
$(call ptx/env) \
PTXCONF_IPKG_IPKG_CONF_URL="$(call ptx/escape,$(call remove_quotes,$(PTXCONF_IPKG_IPKG_CONF_URL)))" \
- image_pkgs_selected_target="$(call ptx/escape,$(PACKAGES))" \
+ image_pkgs_selected_target="$(call ptx/escape,$(PTX_PACKAGES_INSTALL))" \
\
image_work_dir="$(call ptx/escape,$(image/work_dir))" \
image_permissions="$(call ptx/escape,$(image/permissions))"
diff --git a/scripts/lib/ptxd_make_00-init.sh b/scripts/lib/ptxd_make_00-init.sh
index 047cc684d..591b780e8 100644
--- a/scripts/lib/ptxd_make_00-init.sh
+++ b/scripts/lib/ptxd_make_00-init.sh
@@ -109,6 +109,28 @@ ptxd_init_get_sysroot_base_platform() {
}
+#
+# fixup collectionconfig when using another platform
+#
+# out:
+# PTXDIST_BASE_PACKAGES packages of the used platform (without 'm' when using a collection)
+# PTXDIST_COLLECTIONCONFIG a modified collectionconfig (for packages from the other platform)
+#
+ptxd_init_collectionconfig() {
+ if [ -e "${PTXDIST_COLLECTIONCONFIG}" ]; then
+ local new_collection="${PTXDIST_TEMPDIR}/collectionconfig"
+ sed -e 's/=y$/=b/' "${PTXDIST_COLLECTIONCONFIG}" > "${new_collection}"
+ export PTXDIST_COLLECTIONCONFIG="${new_collection}"
+ PTXDIST_BASE_PACKAGES="$(PTXDIST_PTXCONFIG="${PTXDIST_BASE_PLATFORMDIR}/selected_ptxconfig"
+ PTXDIST_PLATFORMCONFIG="${PTXDIST_BASE_PLATFORMDIR}/selected_platformconfig"
+ ptxd_make_log "print-PACKAGES-y")"
+ else
+ PTXDIST_BASE_PACKAGES="$(PTXDIST_PTXCONFIG="${PTXDIST_BASE_PLATFORMDIR}/selected_ptxconfig"
+ PTXDIST_PLATFORMCONFIG="${PTXDIST_BASE_PLATFORMDIR}/selected_platformconfig"
+ ptxd_make_log "print-PACKAGES")"
+ fi
+ export PTXDIST_BASE_PACKAGES
+}
#
# gather all sysroots
@@ -127,6 +149,7 @@ ptxd_init_ptxdist_path_sysroot() {
if ptxd_init_get_sysroot_base_platform; then
sysroot="${sysroot}:${sysroot_base_platform}"
sysroot_prefix="${sysroot_prefix}:${sysroot_base_platform}:${sysroot_base_platform}/usr"
+ ptxd_init_collectionconfig
fi
local sysroot_all="${sysroot}"
diff --git a/scripts/lib/ptxd_make_image_common.sh b/scripts/lib/ptxd_make_image_common.sh
index b0525d746..035afb765 100644
--- a/scripts/lib/ptxd_make_image_common.sh
+++ b/scripts/lib/ptxd_make_image_common.sh
@@ -49,21 +49,6 @@ Run first 'ptxdist clean root' then 'ptxdist images' again.
shift
done
-
- #
- # take care about production build
- #
- if [ -n "${PTXDIST_BASE_PLATFORMDIR}" ]; then
- if ! ptxd_get_path "${PTXDIST_BASE_PLATFORMDIR}/packages/*.ipk"; then
- ptxd_bailout "use production BSP: no ipkg files found in '${PTXDIST_BASE_PLATFORMDIR}/packages'"
- fi
- ptxd_reply_ipkg_files=( "${ptxd_reply_ipkg_files[@]}" "${ptxd_reply[@]}" )
-
- if ! ptxd_get_path "${PTXDIST_BASE_PLATFORMDIR}/state/*.perms"; then
- ptxd_bailout "use production BSP: no perms files found in '${PTXDIST_BASE_PLATFORMDIR}/state"
- fi
- ptxd_reply_perm_files=( "${ptxd_reply_perm_files[@]}" "${ptxd_reply[@]}" )
- fi
}
export -f ptxd_get_ipkg_files
@@ -73,5 +58,8 @@ export -f ptxd_get_ipkg_files
#
ptxd_make_image_init() {
image_ipkg_repo_dirs=( "${ptx_pkg_dir}" )
+ if [ -n "${PTXDIST_BASE_PLATFORMDIR}" ]; then
+ image_ipkg_repo_dirs[${#image_ipkg_repo_dirs[@]}]="${PTXDIST_BASE_PLATFORMDIR}/packages"
+ fi
}
export -f ptxd_make_image_init
diff --git a/scripts/lib/ptxd_make_xpkg_common.sh b/scripts/lib/ptxd_make_xpkg_common.sh
index 5b925ec05..deccd1221 100644
--- a/scripts/lib/ptxd_make_xpkg_common.sh
+++ b/scripts/lib/ptxd_make_xpkg_common.sh
@@ -40,7 +40,11 @@ export -f ptxd_dopermissions
# ptxd_reply (array)
#
ptxd_do_xpkg_map() {
- set -- "${@/#/${ptx_state_dir}/}"
+ if [ -n "${PTXDIST_BASE_PLATFORMDIR}" ]; then
+ set -- "${@/#/${ptx_state_dir}/}" "${@/#/${PTXDIST_BASE_PLATFORMDIR}/state/}"
+ else
+ set -- "${@/#/${ptx_state_dir}/}"
+ fi
ptxd_reply=( $(cat "${@/%/.xpkg.map}" 2>/dev/null) )
[ ${#ptxd_reply[@]} -ne 0 ]