Skip to content

Commit

Permalink
Added ARM architecture to build.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoHood authored and cmaglie committed Feb 1, 2016
1 parent 180ca94 commit d3396e2
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 2 deletions.
1 change: 1 addition & 0 deletions build/arduino-builder-arm-1.3.10.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
afadb12e74f62bb5506e27a97ed34009ed55486d
79 changes: 77 additions & 2 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,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="arm"><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="arm" /></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="arm" /></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="arm" /></condition>

<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linux32"/>
</condition>
<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="arm"/>
</condition>
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linux64"/>
</condition>
Expand Down Expand Up @@ -582,7 +589,9 @@
<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-2.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-2.zip" />
Expand All @@ -607,7 +616,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-2.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/libastylej-2.05.1-2.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-1.0.5.zip" />
<param name="archive_url" value="http://downloads.arduino.cc/liblistSerials/liblistSerials-1.0.5.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-1.0.5" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-1.0.5/arm/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />

</target>

<target name="arm-build" depends="linux-libastyle-arm" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX32_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.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.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 @@ -639,7 +705,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 @@ -687,6 +753,8 @@

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

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

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

<target name="arm-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 @@ -779,6 +851,9 @@
<target name="linux64-dist" depends="linux-dist"
description="Build .tar.xz of linux version" />

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

<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0c8070d4dbec5fc9f2d794672402acc3b3c21edd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
78fd8aa9a98b05c6a8590c43b579322d795fc421

0 comments on commit d3396e2

Please sign in to comment.