Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ARM builds for ArduinoBot #4517

Merged
merged 7 commits into from
Apr 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ContributionsIndexer(File preferencesFolder, Platform platform, Signature

public void parseIndex() throws Exception {
File defaultIndexFile = getIndexFile(Constants.DEFAULT_INDEX_FILE_NAME);
if (!signatureVerifier.isSigned(defaultIndexFile)) {
if (!PreferencesData.getBoolean("allow_insecure_packages") && !signatureVerifier.isSigned(defaultIndexFile)) {
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
}
index = parseIndex(defaultIndexFile);
Expand Down
1 change: 1 addition & 0 deletions build/arduino-builder-arm-1.3.15.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e83845803bbaad5c4489e0c4d3cdf84d93637a5d
100 changes: 90 additions & 10 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,34 @@
<condition property="platform" value="windows"><os family="windows" /></condition>
<condition property="platform" value="linux32"><os family="unix" arch="i386" /></condition>
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
<condition property="platform" value="linuxarm"><os family="unix" arch="arm" /></condition>

<condition property="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="linux32"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux64"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>

<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>

<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux32" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxarm" /></condition>

<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linux32"/>
</condition>
<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linuxarm"/>
</condition>
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linux64"/>
</condition>
Expand All @@ -58,10 +65,12 @@
<property name="WINDOWS_BUNDLED_JVM" value="${java.home}"/>
<property name="LINUX32_BUNDLED_JVM" value="none"/>
<property name="LINUX64_BUNDLED_JVM" value="none"/>
<property name="LINUXARM_BUNDLED_JVM" value="none"/>
<condition property="linux-bundle-jvm-task" value="noop">
<and>
<equals arg1="${LINUX32_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUX64_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXARM_BUNDLED_JVM}" arg2="none"/>
</and>
</condition>
<condition property="linux-bundle-jvm-task" value="bundle">
Expand All @@ -72,6 +81,9 @@
<not>
<equals arg1="${LINUX64_BUNDLED_JVM}" arg2="none"/>
</not>
<not>
<equals arg1="${LINUXARM_BUNDLED_JVM}" arg2="none"/>
</not>
</or>
</condition>

Expand Down Expand Up @@ -426,8 +438,8 @@
</antcall>

<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" />
<param name="archive_file" value="./libastylej-2.05.1-3.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-3.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
Expand Down Expand Up @@ -625,10 +637,12 @@
<fileset dir="linux/work" includes="arduino" />
<fileset dir="linux/work" includes="**/*.sh" />
</chmod>
</target>

<target name="linux-libastyle-x86" depends="linux-build" description="Download libastyle.so for x86/x64 arch">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" />
<param name="archive_file" value="./libastylej-2.05.1-3.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-3.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
Expand All @@ -650,7 +664,64 @@

</target>

<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
<target name="linux-libastyle-arm" depends="linux-build" description="Download libastyle.so for ARM">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-3.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-3.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/libastylej-2.05.1/libastylej_arm.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />

<antcall target="portable-${portable}">
<param name="parentdir" value="linux/work" />
</antcall>

<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-${LIBLISTSERIAL-VERSION}/arm/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />

</target>

<target name="linuxarm-build" depends="linux-libastyle-arm" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUXARM_BUNDLED_JVM}"/>
</antcall>

<delete dir="${staging_folder}/arduino-builder-arm" includeemptydirs="true"/>
<mkdir dir="${staging_folder}/arduino-builder-arm"/>
<antcall target="untar">
<param name="archive_file" value="./arduino-builder-arm-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
<param name="archive_url" value="http://downloads.arduino.cc/tools/arduino-builder-arm-${ARDUINO-BUILDER-VERSION}.tar.bz2" />
<param name="final_folder" value="${staging_folder}/arduino-builder-arm/arduino-builder" />
<param name="dest_folder" value="${staging_folder}/arduino-builder-arm" />
</antcall>
<copy file="${staging_folder}/arduino-builder-arm/arduino-builder" tofile="linux/work/arduino-builder" />
<chmod perm="755" file="linux/work/arduino-builder" />
<move file="${staging_folder}/arduino-builder-arm/tools" tofile="linux/work/tools-builder"/>
<copy todir="linux/work/hardware" overwrite="true">
<fileset dir="${staging_folder}/arduino-builder-arm/hardware" includes="*.txt"/>
</copy>
<delete dir="${staging_folder}/arduino-builder-arm" includeemptydirs="true"/>

<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar"/>
<param name="gcc_archive_file" value="avr-gcc-4.8.1-arduino5-armhf-pc-linux-gnu-glibc2.13.tar.bz2"/>
<param name="gcc_version" value="4.8.1-arduino5"/>
<param name="avrdude_archive_file" value="avrdude-6.0.1-arduino5-armhf-pc-linux-gnu-glibc2.13.tar.bz2"/>
<param name="avrdude_version" value="6.0.1-arduino5"/>
</antcall>

<antcall target="package-library-index-json-bundle"/>
</target>

<target name="linux32-build" depends="linux-libastyle-x86" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/>
</antcall>
Expand Down Expand Up @@ -682,7 +753,7 @@
<antcall target="package-library-index-json-bundle"/>
</target>

<target name="linux64-build" depends="linux-build" description="Build linux (64-bit) version">
<target name="linux64-build" depends="linux-libastyle-x86" description="Build linux (64-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX64_BUNDLED_JVM}"/>
</antcall>
Expand Down Expand Up @@ -730,6 +801,8 @@

<target name="linux64-run" depends="build,start"/>

<target name="linuxarm-run" depends="build,start"/>

<target name="linux32-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
Expand All @@ -738,6 +811,10 @@
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>

<target name="linuxarm-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>

<!-- Set '${dist_file}_available' property if toolchain dist_file is downloaded -->
<!-- Set '${dist_file}_installed' property if toolchain is installed in working directory -->
<!-- hardware/tools/${dist_check_file} is checked for existence -->
Expand Down Expand Up @@ -817,10 +894,13 @@
</target>

<target name="linux32-dist" depends="linux-dist"
description="Build .tar.xz of linux version" />
description="Build .tar.xz of linux x86_32 version" />

<target name="linux64-dist" depends="linux-dist"
description="Build .tar.xz of linux version" />
description="Build .tar.xz of linux x86_64 version" />

<target name="linuxarm-dist" depends="linux-dist"
description="Build .tar.xz of linux armhf version" />

<!-- - - - - - - - -->
<!-- Windows -->
Expand Down Expand Up @@ -899,8 +979,8 @@
<antcall target="windows-build-avr-toolchain" />

<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1.zip" />
<param name="archive_file" value="./libastylej-2.05.1-3.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-3.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
Expand Down
3 changes: 3 additions & 0 deletions build/build_all_dist.bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ mv linux/arduino-*-linux32.tar.xz ../
ant -Djava.net.preferIPv4Stack=true -Dplatform=linux64 $@ clean dist
mv linux/arduino-*-linux64.tar.xz ../

ant -Djava.net.preferIPv4Stack=true -Dplatform=linuxarm $@ clean dist
mv linux/arduino-*-linuxarm.tar.xz ../

ant -Djava.net.preferIPv4Stack=true -Dplatform=windows $@ clean dist
mv windows/arduino-*-windows.zip ../

Expand Down
2 changes: 1 addition & 1 deletion build/build_pull_request.bash
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ fi

VERSION="PR-${ghprbPullId}-BUILD-${BUILD_NUMBER}"

./build_all_dist.bash -Dversion="${VERSION}" -DMACOSX_BUNDLED_JVM=$MACOSX_BUNDLED_JVM -DWINDOWS_BUNDLED_JVM=$WINDOWS_BUNDLED_JVM -DLINUX32_BUNDLED_JVM=$LINUX32_BUNDLED_JVM -DLINUX64_BUNDLED_JVM=$LINUX64_BUNDLED_JVM
./build_all_dist.bash -Dversion="${VERSION}" -DMACOSX_BUNDLED_JVM=$MACOSX_BUNDLED_JVM -DWINDOWS_BUNDLED_JVM=$WINDOWS_BUNDLED_JVM -DLINUX32_BUNDLED_JVM=$LINUX32_BUNDLED_JVM -DLINUX64_BUNDLED_JVM=$LINUX64_BUNDLED_JVM -DLINUXARM_BUNDLED_JVM=$LINUXARM_BUNDLED_JVM

1 change: 1 addition & 0 deletions build/libastylej-2.05.1-3.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
948f14cd445429e252d2a9cd3451c79e0d9c468a
1 change: 0 additions & 1 deletion build/libastylej-2.05.1.zip.sha

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
220662c5411e34dd1e16c181f883b6b77824a942
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b5968416647e79f5c395bf2a9ba000127dacc9da
7 changes: 7 additions & 0 deletions build/shared/lib/preferences.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,10 @@ serial.debug_rate=9600

# default chosen language (none for none)
editor.languages.current =

# Debugging/Development Preferences
# ---------------------------------

# Disable signature check on packages_index.json, use only for
# development/debugging purposes. Do not enable in production.
#allow_insecure_packages=true