From f517fabc7726b9126cd67f6c0cd78c173e8e4c05 Mon Sep 17 00:00:00 2001 From: Tim Cameron Ryan Date: Sun, 8 Nov 2015 22:46:56 -0800 Subject: [PATCH] Adds VM building. --- .travis.yml | 30 ++++++++++++++++++++++++------ target/vm/config.mk | 1 + 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9211940..1d9f92d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ before_install: install: - yes | gcloud compute instances delete travis-instance --zone us-central1-b || true -- gcloud compute instances create travis-instance --zone us-central1-b --image ubuntu-14-04 --machine-type n1-highcpu-32 --boot-disk-size 64 --scopes compute-rw +- gcloud compute instances create travis-instance --zone us-central1-b --image ubuntu-14-04 --machine-type n1-highcpu-32 --boot-disk-size 200 --scopes compute-rw - | while [ 1 ]; do gcloud compute ssh travis-instance --zone us-central1-b --command 'exit 0' -- -o ConnectTimeout=10 > /dev/null 2>&1 && break @@ -39,11 +39,14 @@ install: script: - | rsync -avz -e "$(gcloud compute ssh --zone us-central1-b travis-instance --dry-run | sed s/'[^ ]*$'//)" . "$(gcloud compute ssh --zone us-central1-b travis-instance --dry-run | awk 'END {print $NF}'):~/openwrt-tessel" +- gcloud compute ssh travis-instance --zone us-central1-b --command "echo 'export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID' >> ~/.bashrc; echo 'export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY' >> ~/.bashrc; " - | gcloud compute ssh travis-instance --zone us-central1-b --command ' set -e set -x + source ~/.bashrc + sudo mkdir /tmp/ramdisk sudo chmod 777 /tmp/ramdisk sudo mount -t tmpfs -o size=14G tmpfs /tmp/ramdisk/ @@ -52,12 +55,27 @@ script: sudo apt-get install -y software-properties-common sudo apt-add-repository -y ppa:terry.guo/gcc-arm-embedded sudo apt-get update -qq - sudo apt-get install -y build-essential git-core g++ subversion libncurses-dev libssl-dev unzip gettext gcc-arm-none-eabi - cp -rf ~/openwrt-tessel /tmp/ramdisk/openwrt-tessel - cd /tmp/ramdisk/openwrt-tessel + sudo apt-get install -y build-essential python-pip git-core g++ subversion libncurses-dev libssl-dev unzip gettext gcc-arm-none-eabi + + mkdir ~/upload + cd ~/openwrt-tessel git submodule update --init --recursive + + cp -rf ~/openwrt-tessel /tmp/ramdisk/v2 + pushd /tmp/ramdisk/v2 make -j64 || make -j64 || make -j64 || make -j64 || make -j64 V=s + cp /tmp/ramdisk/v2/openwrt/bin/ramips/*sysupgrade.bin ~/upload + tar -czf ~/upload/toolchain-mipsel.tar.gz -C /tmp/ramdisk/v2/openwrt/staging_dir $(find /tmp/ramdisk/v2/openwrt/staging_dir -iname '*-mipsel_*' -exec basename {} \;) + + make clean + make -j64 TARGET=vm || make -j64 TARGET=vm || make -j64 TARGET=vm || make -j64 TARGET=vm || make -j64 TARGET=vm V=s + cp /tmp/ramdisk/vm/openwrt/bin/x86/*.vdi ~/upload + tar -czf ~/upload/toolchain-x86.tar.gz -C /tmp/ramdisk/vm/openwrt/staging_dir $(find /tmp/ramdisk/vm/openwrt/staging_dir -iname '*-i386_*' -exec basename {} \;) + popd + + sudo -H python -m pip install awscli + aws s3 sync ~/upload/. s3://tessel-builds/firmware/ ' -#after_script: -#- yes | gcloud compute instances delete travis-instance --zone us-central1-b || true +# after_script: +# - yes | gcloud compute instances delete travis-instance --zone us-central1-b || true diff --git a/target/vm/config.mk b/target/vm/config.mk index 1fcb168..59e3182 100644 --- a/target/vm/config.mk +++ b/target/vm/config.mk @@ -3,5 +3,6 @@ CONFIG_TARGET_x86_generic=y CONFIG_TARGET_x86_generic_Generic=y CONFIG_TARGET_ROOTFS_EXT4FS=y CONFIG_VDI_IMAGES=y +CONFIG_TARGET_ROOTFS_PARTSIZE=96 PACKAGES += kmod-usb-ohci-pci