diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-07-05 18:48:10 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-07-19 13:19:03 +0200 |
commit | 48007bf7f68571d2f7e42daa3e353c3f9f37c339 (patch) | |
tree | 8d2f1f35f7bacf05a04a6e6bfbf9915a2f2db5cf /scripts | |
parent | cc426a88db63911bc12bc9e9b4fb419871d0bd91 (diff) | |
download | ptxdist-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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/ptxd_make_00-init.sh | 23 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_image_common.sh | 18 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_common.sh | 6 |
3 files changed, 31 insertions, 16 deletions
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 ] |