mbed TLS Build

Dependents:   Encrypt_Decrypt1 mbed_blink_tls encrypt encrypt

Committer:
markrad
Date:
Thu Jan 05 00:18:44 2017 +0000
Revision:
0:cdf462088d13
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
markrad 0:cdf462088d13 1 # Purpose:
markrad 0:cdf462088d13 2 # - To test and prove that a new commit in the mbed TLS repository builds
markrad 0:cdf462088d13 3 # and integrates with mbed-os properly.
markrad 0:cdf462088d13 4 # AND
markrad 0:cdf462088d13 5 # - To test and prove that the current development head of mbed TLS builds
markrad 0:cdf462088d13 6 # and integrates with the current mbed-os master branch.
markrad 0:cdf462088d13 7 #
markrad 0:cdf462088d13 8 # The script fetches all the prerequisites and builds the mbed TLS 'tls-client'
markrad 0:cdf462088d13 9 # example. This script is triggered by every commit and once each night and the
markrad 0:cdf462088d13 10 # exact behaviour depends on how it was triggered:
markrad 0:cdf462088d13 11 # - If it is a nightly build then it builds the mbed TLS development head with
markrad 0:cdf462088d13 12 # mbed-os master.
markrad 0:cdf462088d13 13 # - If it was triggered by the commit, then it builds the example with mbed TLS
markrad 0:cdf462088d13 14 # at that commit and mbed-os at the commit pointed by mbed-os.lib in the
markrad 0:cdf462088d13 15 # example repository.
markrad 0:cdf462088d13 16
markrad 0:cdf462088d13 17 test:
markrad 0:cdf462088d13 18 override:
markrad 0:cdf462088d13 19 - cd ../mbed-os-example-tls/tls-client/ && mbed compile -m K64F -t GCC_ARM -c
markrad 0:cdf462088d13 20
markrad 0:cdf462088d13 21 dependencies:
markrad 0:cdf462088d13 22 pre:
markrad 0:cdf462088d13 23 # Install gcc-arm
markrad 0:cdf462088d13 24 - cd .. && wget "https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2"
markrad 0:cdf462088d13 25 - cd .. && tar -xvjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
markrad 0:cdf462088d13 26 - ln -s ../gcc-arm-none-eabi-4_9-2015q3/bin/* ../bin/
markrad 0:cdf462088d13 27 # Install mbed-cli
markrad 0:cdf462088d13 28 - cd ../ && git clone https://github.com/ARMmbed/mbed-cli.git
markrad 0:cdf462088d13 29 - cd ../mbed-cli && sudo -H pip install -e .
markrad 0:cdf462088d13 30 # Get the sample application
markrad 0:cdf462088d13 31 - cd ../ && git clone git@github.com:ARMmbed/mbed-os-example-tls.git
markrad 0:cdf462088d13 32 # Get mbed-os
markrad 0:cdf462088d13 33 - cd ../mbed-os-example-tls/tls-client && mbed deploy
markrad 0:cdf462088d13 34 # Update mbed-os to master only if it is a nightly build
markrad 0:cdf462088d13 35 - >
markrad 0:cdf462088d13 36 if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
markrad 0:cdf462088d13 37 cd ../mbed-os-example-tls/tls-client/mbed-os/ && mbed update master;
markrad 0:cdf462088d13 38 fi
markrad 0:cdf462088d13 39 # Import mbedtls current revision
markrad 0:cdf462088d13 40 - ln -s ../../../../../../../mbedtls/ ../mbed-os-example-tls/tls-client/mbed-os/features/mbedtls/importer/TARGET_IGNORE/mbedtls
markrad 0:cdf462088d13 41 - cd ../mbed-os-example-tls/tls-client/mbed-os/features/mbedtls/importer/ && make
markrad 0:cdf462088d13 42 override:
markrad 0:cdf462088d13 43 # Install the missing python packages
markrad 0:cdf462088d13 44 - cd ../mbed-os-example-tls/tls-client/mbed-os/ && sudo -H pip install -r requirements.txt