[PATCH] [DOCS] How to Build on ARM #2

Mikael Lyngvig mikael at lyngvig.org
Fri Nov 15 00:36:22 PST 2013

Here's an updated version.  A bit of cleanup and rephrasing.  I dropped the
new section heading and simply added to the already existing list of items.

As for a document on how to do a build properly, I have long longed for
more detailed instructions on setting up a build slave - especially the
phase about testing it and linking it into Zorg and where to find Zorg and
stuff.  I know Zorg is at http://llvm.org/git/zorg.git, but every time I
need this information I seem to have forgotten where to find it.  That
willbe the next
LLVM project I take on my shoulders; right now I am swamped with LLVM tasks.

-- Mikael

2013/11/15 Renato Golin <renato.golin at linaro.org>

> Hi Mikael, Sean,
> First, I think we have two different documents there. One, how to prepare
> stable, good quality buildbots. The other, how to build on ARM,
> specifically ARM buildbots. We shouldn't bundle all that into
> HowToBuildOnARM.
> Second, the notes on the dev boards was my mere opinion based on very
> little experimentation, I'd never put that on an official (long lasting)
> documentation, especially naming names and all that. Having this on the
> mailing list's history is one thing, having that bundled with LLVM on every
> release from now on is a different thing. If you want to say "ARM dev
> boards are notoriously unstable", that's fine, they all are, but please
> don't name them. Plus, they will be less unstable as time passes, since
> they're becoming less and less "dev" and more and more "rack boxes", which
> means testing will increase, price will decrease, etc. That comment will be
> almost irrelevant in a few years from now.
> thanks!
> --renato
> On 15 November 2013 04:49, Sean Silva <silvas at purdue.edu> wrote:
>> LGTM. Renato, can you check off on this and commit it?
>> -- Sean Silva
>> On Thu, Nov 14, 2013 at 6:12 PM, Mikael Lyngvig <mikael at lyngvig.org>wrote:
>>> The patch adds Renatos very valuable tips and tricks for using ARM
>>> development boards to the ARM build documentation.
>>> Cheers,
>>> Mikael
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131115/fb123aa1/attachment.html>
-------------- next part --------------
Index: HowToBuildOnARM.rst
--- HowToBuildOnARM.rst	(revision 194711)
+++ HowToBuildOnARM.rst	(working copy)
@@ -25,15 +25,15 @@
    process will very likely fail due to insufficient memory. In any
    case it is probably a good idea to set up a swap partition.
-#. If you want to run ``make
-   check-all`` after building LLVM/Clang, to avoid false alarms (eg, ARCMT
-   failure) please use at least the following configuration:
+#. If you want to run ``make check-all`` after building LLVM/Clang, to avoid
+   false alarms (e.g., ARCMT failure) please use at least the following
+   configuration:
    .. code-block:: bash
      $ ../$LLVM_SRC_DIR/configure --with-abi=aapcs-vfp
-#. The most popular linaro/ubuntu OS's for ARM boards, eg, the
+#. The most popular Linaro/Ubuntu OS's for ARM boards, e.g., the
    Pandaboard, have become hard-float platforms. The following set
    of configuration options appears to be a good choice for this
@@ -45,3 +45,26 @@
      --target=armv7l-unknown-linux-gnueabihf --with-cpu=cortex-a9 \
      --with-float=hard --with-abi=aapcs-vfp --with-fpu=neon \
      --enable-targets=arm --enable-optimized --enable-assertions
+#. ARM development boards can be unstable and you may experience that cores
+   are disappearing, caches being flushed on every big.LITTLE switch, and
+   other similar issues.  To help ease the effect of this, set the Linux
+   scheduler to "performance" on **all** cores using this little script:
+   .. code-block:: bash
+      # The code below requires the package 'cpufrequtils' to be installed.
+      for ((cpu=0; cpu<`grep -c proc /proc/cpuinfo`; cpu++)); do
+          sudo cpufreq-set -c $cpu -g performance
+      done
+#. Running the build on SD cards is ok, but they are more prone to failures
+   than good quality USB sticks, and those are more prone to failures than
+   external hard-drives (those are also a lot faster). So, at least, you
+   should consider to buy a fast USB stick.  On systems with a fast eMMC,
+   that's a good option too.
+#. Make sure you have a decent power supply (dozens of dollars worth) that can
+   provide *at least* 4 amperes, this is especially important if you use USB
+   devices with your board.

More information about the llvm-commits mailing list