-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hadk_tools wrapper to call mk.image for each device
We need to create images for each device we can reuse the hadk_tools infrastructure with some adjustments. Part of SailfishOS-SonyXperia/bugs#19 Signed-off-by: Björn Bidar <bjorn.bidar@thaodan.de>
- Loading branch information
Showing
3 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
scriptdir="$(dirname -- "$( readlink -f -- "$0"; )")" | ||
|
||
. $scriptdir/shared.sh | ||
. $scriptdir/shared.hadk_tools.setup.sh | ||
|
||
usage_description="Fetch device we build for from obs_project and use hadk_tools to build image for each supported devices, requires that plaform SDK has been setup" | ||
|
||
while getopts hr:b:P:p:A:t arg ; do | ||
case $arg in | ||
P) obs_project=$OPTARG;; | ||
A) obs_api_url=$OPTARG;; | ||
t) hadk_tools_templates_dir=$OPT_ARG;; | ||
h) usage; exit 0;; | ||
?|*) usage; exit 1;; | ||
esac | ||
done | ||
shift $(($OPTIND - 1)) | ||
|
||
obs_checkout_prj $obs_project | ||
|
||
osc_parse_env | ||
|
||
TARGET_UNIT=mk.image.hadk | ||
|
||
# Tell the mk.image to use our adaptation repository | ||
# instead of trying to use a local repository | ||
SFOS_ADAPTION0_URL=$(osc_repo_baseurl "$obs_project") | ||
|
||
export SFOS_ADAPTION0_URL | ||
|
||
osc_hadk_setup_supported_devices | ||
|
||
hadk_setup_tmp_unit | ||
|
||
# fetch droid-config-ssu-kickstarts here | ||
for device in $SUPPORTED_DEVICES; do | ||
osc getbinaries "$obs_project" \ | ||
droid-version-$device \ | ||
latest_$adaptation_repo_arch \ | ||
$adaptation_repo_arch | ||
done | ||
|
||
rm -rf hybris/droid-configs/installroot/installroot | ||
mkdir -p hybris/droid-configs/installroot/installroot | ||
( | ||
cd hybris/droid-configs/installroot | ||
rpm2cpio \ | ||
$ANDROID_ROOT/droid-local-repo/$DEVICE_NUM/droid-config-$DEVICE_NUM-ssu-kickstarts-*.$PORT_ARCH.rpm \ | ||
| cpio -idv &> /dev/null | ||
) | ||
|
||
|
||
hadk.build -t "$hadk_tools_templates_dir" -f "$tmp_unit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters