User Tools

Site Tools


toh:arduino:yun

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

toh:arduino:yun [2013/10/19 04:13] (current)
Line 1: Line 1:
 +===== Arduino Yun =====
  
 +Arduino Yun pairs a commonly found wifi router chipset, the Atheros AR9331, with a classical AVR microcontroller.
 +
 +===== Vital Links for Building =====
 +
 +[[http://​download.linino.org/​dogstick/​all-in-one/​latest/​build-config.txt|Stock Buildconfig]] for the release unit and the customized [[https://​github.com/​arduino/​linino.git|Linino OpenWRT redistribution]] it is built upon.
 +
 +===== AVR/AR9331 Communication =====
 +
 +//The Yún’s Bridge library enables communication between the two processors, connecting the hardware serial port of the AR9331 to Serial1 on the 32U4 (digital pins 0 & 1). Another post will describe the library in greater depth. The serial port of the AR9331 exposes the Linux console (aka, the command line interface, or CLI) for communication with the 32U4. The console is a means for the Linux kernel and other processes to output messages to the user and receive input from the user. File and system management tools are installed by default. It’s also possible to install and run your own applications using Bridge.//
 +
 +//The ATmega32U4 can be programmed from the AR9331 by uploading a sketch through the Yún’s WiFi interface. When connected to the same WiFi network as your computer, the board will appear under the "​Port"​ menu of the Arduino IDE. The sketch will be transferred to the AR9331, and the Linux distribution will program the ATmega32U4 through the SPI bus, emulating an AVR ISP programmer.//​
 +
 +Via [[http://​blog.arduino.cc/​2013/​09/​02/​arduino-yun-hardware-review/​ Arduino Yun Hardware Review]]
 +
 +===== Linino Build Instructions =====
 +
 +Below steps from //​**[[http://​fibasile.github.io/​arduino-yun-custom-buildroot.html|Building a custom image for Arduino YUN]]**//, via Fiore Basile:
 +
 +==== Startup ====
 +As soon as I got my hands on the YUN I found the selection of packages lacks many interesting pieces of software that could help building interesting appliances. I think Arduino people selected those packages that would easily fit in the minimal 64MB flash.
 +
 +So first of all I formatted a 4GB mini-sd as ext3 and plugged it in to the mini, it was recognized as /dev/sda1, so I quickly added an /opt folder and mounted in there instead. Now I have plenty of space to add my custom packages, and some "​secure"​ disk space just in case I have to wipe my YUN loosing all flash content.
 +
 +Resetting the YUN flash is done by holding the reset button for 30 seconds. Holding it for 5 just resets the WiFi config.
 +
 +Then I spent some time to collect all the information needed to setup our own buildroot for the YUN, here you can find a few tips to do it yourself.
 +
 +==== Getting the source ====
 +First of all you should clone the Arduino YUN buildroot sources, available from github.
 +
 +<​code>​git clone https://​github.com/​arduino/​linino.git linino</​code>​
 +This will checkout the OpenWRT buildroot with specific Arduino YUN modifications
 +
 +==== Prerequisites ====
 +In order to successfully compile the builroot you'll need a few packages installed: for Debian Stable you can easily get them by running as root (or with sudo)
 +
 +<​code>​apt-get install subversion build-essential git-core libncurses5-dev zlib1g-dev gawk asciidoc \
 +bash bc binutils bzip2 fastjar flex g++ gcc util-linux zlib1g-dev libncurses5-dev \
 +libssl-dev perl-modules python2.6-dev rsync ruby sdcc unzip wget gettext xsltproc \
 +zlib1g-dev libxml-parser-perl</​code>​
 +I've included a few you might already have installed, just in case someone had removed them, it won't hurt anyway to put them on the command line.
 +
 +==== Configuring the kernel ====
 +Once you're done with prerequisites go on to configure the kernel:
 +
 +<​code>​
 +cd  linino/​trunk ​   ​
 +./​scripts/​feeds update -a
 +./​scripts/​feeds install -a
 +make menuconfig
 +</​code>​
 +If all the steps above have been done correctly you will be presented with a familiar menu, similar to the standard Linux kernel build. Go on and select the kernel modules, and packages you want to build.
 +
 +Once you exit you can compare with diff the generated config with the one available on the Arduino YUN package repository, this should be located at http://​download.linino.org/​dogstick/​all-in-one/​latest/​build-config.txt.
 +
 +EDIT: If you want to keep the same config and packages getting built by Yun developers, also do:
 +
 +<​code>​
 +./​scripts/​feeds uninstall -a
 +rm -rf feeds
 +./​scripts/​feeds update -a
 +./​scripts/​feeds install -a
 +rm -f .config
 +git checkout .config
 +make oldconfig
 +</​code>​
 +Build it
 +Now you can just run make to start the build process, get a cup of coffee, or several considering it needs to fetch many packages i.e. the Linux kernel and build lots of stuff.
 +
 +<​code>​make V=s</​code>​
 +Please note that using the V=s param switches on verbose output. If you like you can add -j4 or -j8 depending on how many cores you configured on your machine or VM to speed things up a little.
 +
 +At the end of the process you should have images ready to be uploaded via TFTP (I'm currently investigating how), and a complete cross-compiling toolchain to test out new packages, and eventually package and contribute them to the offical repository.
 +
 +===== Linino Packages =====
 +
 +[[https://​github.com/​arduino/​linino/​tree/​master/​trunk/​package/​linino]]
toh/arduino/yun.txt · Last modified: 2013/10/19 04:13 (external edit)