dragonboard: Make provision-device script usable outside tree.
Update script to support ANDROID_PROVISION_OS_PARTITONS and
ANDROID_PROVISION_VENDOR_PARTITIONS environment variables.
To test that this work outside the tree, I ran 'm dist' and unzipped the
resulting vendor_partitions.zip file in a temporary directory from a
fresh shell:
~$ mkdir tmp && cd tmp
~/tmp$ unzip /ssd/android/out/dist/dragonboard-vendor_partitions-eng.zeuthen.zip
~/tmp$ find .
.
./vendor_partitions
./vendor_partitions/modemst2.bin
./vendor_partitions/modem.bin
./vendor_partitions/sec.bin
./vendor_partitions/fsc.bin
./vendor_partitions/DDR.bin
./vendor_partitions/rpm.bin
./vendor_partitions/hyp.bin
./vendor_partitions/modemst1.bin
./vendor_partitions/aboot.bin
./vendor_partitions/sbl1.bin
./vendor_partitions/tz.bin
./vendor_partitions/fsg.bin
./partitions
./partitions/partition-tables.bin
./partitions/misc.bin
./provision-device
~/tmp$ PATH=/ssd/android/out/host/linux-x86/bin
ANDROID_PROVISION_OS_PARTITIONS=/ssd/android/out/target/product/dragonboard
ANDROID_PROVISION_VENDOR_PARTITIONS=$(pwd) ./provision-device
target reported max download size of 268435456 bytes
sending 'partition' (33 KB)...
OKAY [ 0.008s]
writing 'partition'...
OKAY [ 0.331s]
sending 'modem' (65536 KB)...
OKAY [ 2.557s]
writing 'modem'...
OKAY [ 1.781s]
sending 'fsc' (1 KB)...
[...]
OKAY [ 1.026s]
writing 'userdata'...
OKAY [ 1.925s]
finished. total time: 30.983s
~/tmp$
which demonstrates it works as expected. In e.g. the lab, the fastboot
command would be part of the lab and ANDROID_PROVISION_OS_PARTITIONS
would come from e.g. target_files.zip or img.zip.
I also ran the 'provision' command inside the build environment to check
that provisioing still works in the inside-tree case.
Bug: 25648550
Change-Id: I6fb82f7dc36c169fd9cc5998626b93414c7f5e68
Test: Manually tested (see above).
1 file changed