diff options
-rw-r--r-- | build-scripts/build-android | 10 | ||||
-rw-r--r-- | build-scripts/helpers | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/build-scripts/build-android b/build-scripts/build-android index c1dde71..29bd674 100644 --- a/build-scripts/build-android +++ b/build-scripts/build-android @@ -116,6 +116,16 @@ if [ -n "$BUILD_SYSROOT" ]; then tar -cj -C /tmp/sysroot -f out/sysroot.tar.bz2 . fi +# Create filesystem images +if [ -n "$BUILD_FS_IMAGE" ]; then + sudo linaro-android-media-create \ + --dev `product2lamc_dev $TARGET_PRODUCT` \ + --system out/target/product/$TARGET_PRODUCT/system.tar.bz2 \ + --userdata out/target/product/$TARGET_PRODUCT/userdata.tar.bz2 \ + --boot out/target/product/$TARGET_PRODUCT/boot.tar.bz2 \ + --image-file out/target/product/$TARGET_PRODUCT/$TARGET_PRODUCT.img +fi + # Store kernel .config as a build artifact if [ -f kernel/.config ]; then cp kernel/.config out/kernel_config diff --git a/build-scripts/helpers b/build-scripts/helpers index 56094e4..6908b26 100644 --- a/build-scripts/helpers +++ b/build-scripts/helpers @@ -145,3 +145,16 @@ infrastructure_error () { # Interpreted as NOT_BUILT by Shell Status plugin exit 123 } + +# Convert Android's TARGET_PRODUCT to linaro-android-media-create --dev option value +product2lamc_dev () { +# Inventory: vexpress,snowball_emmc,mx6qsabrelite,vexpress-a9,panda,iMX53,smdkv310,snowball_sd,beagle,origen,mx53loco + case "$1" in + "pandaboard") + echo -n "panda";; + "snowball") + echo -n "snowball_sd";; + *) + echo -n "$1";; + esac +} |