Ubuntu 14.04 Trusty Tahr Is Here • Peek Inside Android Source Code

Year One Issue #3 Mar 2014

ODROIDMagazine Gaming on the ODROID

Making Money with ODROID Web Development Set up Keep your Boot a Linux an HPC kernels up Distro from a Head Node to date USB Drive

EDITORIAL

e’ve had an exciting first two months here at ODROID Magazine, and it’s been a pleasure to read the many awesome submissions from our diverse W team of international authors. The articles have been well received by the community, with nearly 10,000 downloads in our first month. Now that we’ve introduced you to the $59 U3 powerhouse board, and shown you how to be the first on your block with a Giant Android tablet, we’re going to explore the fun side of Linux: its amazing GAMES. Remember those early 8- and 16-bit computer games with amazing gameplay, unique stories, and really catchy music? Arcade and console classics such as Donkey Kong, Pac- Man, Super Mario Brothers, Maniac Mansion, Mortal Kombat, and Star Wars all run great on the ODROID in stereo sound and HD graphics. Hold on to your joystick! Premiering in ODROID Magazine this month is Nanik, who is our new Android Developer columnist. He brings with him a deep understanding of software develop- ment, and presents us this month with an in-depth look into the Android source code. Ronaldo is another recent addition as our Android Gaming expert, with reviews, tips, and guides to the thousands of Android games available from the Play Store and other sources. Also joining the regular contributor circle is Manuel, our new Multilingual Editor, providing a full Spanish translation of each month’s issue for the ben- efit of our international community. We are also very proud to introduce our Proofreaders Venkat and Fabien, who review and test the magazine articles before publication from a reader’s perspective. Look for an announcement on the ODROID Magazine forum at http://forum. odroid.com for more details on the upcoming Spanish version. Welcome aboard, Nanik, Ronaldo, Manuel, Venkat and Fabien!

ODROIDMagazine

Rob Roy, Chief Editor Bo Lechnowsky, Editor Bruno Doiche, Art Editor

I am a computer programmer living I am President of Respectech, Inc., a Fetched a Lapdock Altrix to play with and working in Silicon Valley, CA, technology consultancy in Ukiah, CA, his ODROIDS so now his fiancée can USA, designing and building websites USA that I founded in 2001. From my stop sending him away from the living such as Vevo, Hi5, Dolby Laboratories background in electronics and com- room TV to watch Netflix. and Hyundai. My primary languages puter programming, I manage a team are jQuery, Angular JS and HTML5/ of technologists, plus develop custom CSS3. I also develop pre-built operat- solutions for companies ranging from ing systems, custom kernels and opti- small businesses to worldwide corpora- mized applications for the ODROID tions. ODROIDs are one of the weap- platform based on Hardkernel’s official ons in my arsenal for tackling these releases, for which I have won several projects. My favorite development Monthly Forum Awards. I own a lot of languages are Rebol and Red, both of ODROIDs, which I use for a variety of which run fabulously on ARM-based purposes, including media center, web systems like the ODROID-U2. I have server, application development work- deep experience with many unique op- station, and gaming console. erating systems.

ODROID Magazine, published monthly at http://magazine.odroid.com, is your source for all things ODROIDian. • Hard Kernel, Ltd. • 704 Anyang K-Center, Gwanyang, Dongan, Anyang, Gyeonggi, South Korea, 431-815 • Makers of the ODROID family of quad-core development boards and the world’s first ARM big.LITTLE architecture based single board computer. Join the ODROID community with members from over 135 countries, at http://forum.odroid.com, and explore the new technologies offered by Hardkernel at http://www.hardkernel.com.

ODROID MAGAZINE 3 ODROID MAGAZINE 3 TECHNICAL ARTICLE Booting a Linux Distribution from an External USB Drive The most popular article request from our user forums by Suriyan Ramasami

frequent contributor to the Getting the image get an understanding of where the boot ODROID community, Suri- The popular Xubuntu image for the and the root file system partitions reside. A yan is well known for his up- ODROID U3, which is available for dated ODROID bootloader, which free download at http://odroid. permits booting into a Linux root file in/ubuntu-u2-u3/, will be used system located on a USB or network in this article to demonstrate how to /dev/mmcblk0p1 is the first VFAT partition. He graciously shares his move the root file system to an exter- partition which hosts the boot related expertise in response to a highly re- nal USB drive. The same methods ap- files quested forum topic: how to set up ply to any similar ODROID distribu- /dev/mmcblk0p2 is the EXT parti- an ODROID, particularly the U2 and tion, including Debian, OpenSUSE, tion which is the root file system U3, with a minimal boot and root ALARM, and Ubuntu. file system partitions, so that all other Although some flavors of Linux may The boot partition and the root file operating system files can be accessed contain simpler tools to keep the root system both reside on the SD card, as from an external USB hard drive. file system on a separate drive, the ap- indicated by the letters “mmc” in the de- proach shown here uses common tools vice name. The Need for an that are present in most (if not all) dis- eMMC or SD card tributions. Exploring the boot Although the root file system can partition be stored on a network or USB drive, Gathering an eMMC or SD card is required to the Equipment store the boot loader related files. The Choose any ODROID from the X, U ODROID hardware always looks for or XU series along with a pre-flashed SD the boot loader, known as u-boot, on card containing the official Hardkernel the local eMMC module or SD card. Xubuntu image linked above. Any type boot.scr: The boot loader (u- The ODROID XU has a DIP of USB drive, such as a flash or external boot) uses this file for its input variables switch which lets the user choose be- USB, can be attached to the ODROID boot-*.scr: Sample files which tween eMMC and SD card for the for storing the external file system. To can be used as replacements for boot.scr boot media. The U2 and U3 models, begin, boot up the default image in or- zImage: Linux kernel on the other hand, always tries to boot der to access the files involved in the uInitrd: initial ramdisk used by the from eMMC first, if a disk is present, boot process. Linux kernel and falls back to booting from the SD card if not. System Partitions The boot loader’s job is to load zIm- Let’s look at the system partitions to age and uInitrd, then pass control to

ODROID MAGAZINE 4 TECNHICAL ARTICLE zImage along with some boot param- A better approach is to use file system the corresponding Linux image would eters that are set in boot.scr. labels instead. To read the label of an ex- boot to its desktop or command prompt. isting EXT file system, use the e2label The following guide details the steps Looking at the boot. command. involved in customizing an ODROID in scr file order to implement this ideal scenario. root@odroid:~# e2label /dev/ First, the boot loader must be modified mmcblk0p2 to support USB drives. rootfs Modifying boot.scr To change the label of an existing file The newer boot loaders, such as The root= variable is passed as sytem, the tune2fs command should be the one included with the XU and the a parameter to the Linux kernel by the used. modified U2/U3, are able to read vari- boot loader, instructing it to use the file ables from a boot.ini file as a plain text system matching the given ID. root@odroid:~# tune2fs -L file. However, the previous version of root assignments can take three “RootFS” /dev/mmcblk0p2 the Hardkernel boot loader read from forms: tune2fs 1.42.8 (20-Jun-2013) a boot.scr file instead, which is a pro- cessed text file. Therefore, the boot.scr root=UUID=... root@odroid:~# e2label /dev/ file needs an additional conversion step root=LABEL=... mmcblk0p2 when modifying it. root=/dev/ RootFS The utility mkimage is used for this purpose. The first two variations can only be The formroot=LABEL=RootFS used if an init ramdisk is used along with will work as well, and is the most flexible root@odroid:~# cp /media/ the Linux kernel. The ArchLinuxArm method of identification, since the label boot/boot.scr /media/boot/ distribution does not use an init ramdisk can be easily changed using tune2fs. boot.scr.org for booting, and so the third form should root@odroid:~# strings /me- be used to ensure a that the boot loader Using the dia/boot/boot.scr > /media/ remains compatible with ALARM. root=LABEL=... boot/boot.txt In order to determine the UUID of parameter root@odroid:~# vi /media/ the EXT partition, use the dumpe2fs Consider the case where the ability to boot/boot.txt command. boot to different distributions is needed (Debian, Ubuntu, etc.) while using the Modify boot.txt with to match the root@odroid:~# dumpe2fs / same kernel for each of them. file shown below. Note that the first two dev/mmcblk0p2 |grep UUID dumpe2fs 1.42.8 (20-Jun- When setting up the partitions, the lines are deleted, and that the root= pa- 2013) first VFAT partition would remain un- rameter has been changed. Filesystem UUID: changed, since it simply stores the boot e139ce78-9841-40fe-8823- 96a304a09859 loader files, along with a modified boot. scr containing the entry root=RootFS. In a triple-boot system, the second EXT As shown above, the UUID listed partition could be used as the root file Convert the boot.txt to a boot.scr us- should match the root=UUID=... system for Ubuntu, and the third EXT ing the utility mkimage. parameter in boot.scr. If they don’t partition as the root file system for Debi- match, Linux will not be able to iden- an. tify the root file system, and will be When using this ideal setup, switch- unable to mount it. ing between distributions involves sim- The problem with the UUID ap- ply changing the label of the intended proach is that, if a new file system is partition to RootFS, and updating the It would seem that if the root file created and the root file system is cop- other EXT partition labels to anything system is copied over to a partition in ied over to it, it will fail to boot up, so except RootFS. After rebooting, the the USB drive and its file system label the UUIDs need to remain manually partition with the RootFS label would changed to RootFS, then a reboot would synchronized. be recognized as the root file system, and subsequently select that USB partition

ODROID MAGAZINE 5 TECHNICAL ARTICLE

as the root file system. However, there storage, sd_mod, scsi_mod. They In these screenshots, the USB drive are two small obstacles: are located in the current root file system has been assigned to /dev/sda1. To in /lib/modules: verify the applicable device name on 1. The Linux kernel does not have USB /lib/modules/3.8.13.14/ker- your local system, run the dmesg com- storage access built into the kernel nel/drivers/usb/storage/usb- storage.ko 2. The modules which enable USB stor- /lib/modules/3.8.13.14/ker- age access are not yet present in initrd. nel/drivers/scsi/sd_mod.ko mand and inspect the output. /lib/modules/3.8.13.14/ker- Next, create an EXT file system on If, in the future, Hardkernel distri- nel/drivers/scsi/scsi_mod.ko the USB drive. bution images default to having USB_ STORAGE enabled in the kernel, or the root@odroid:~# mkfs.ext4 / init ramdisks already contain the USB dev/sda1 storage modules, the following step can mke2fs 1.42.8 (20-Jun-2013) be skipped. Copy these over to the initrd tree and Filesystem label= update the module information by run- OS type: Linux Exploring ning depmod. It is essential to run dep- ( … ) the uInitrd file mod in the initrd tree as it updates many Writing superblocks and file- initrd is a gzip image, and uIni- files related to loading modules. system accounting informa- trd is a format recognized by the boot tion: done loader, called u-boot. U-boot presently Regenerating root@odroid:~# has a 64 byte header, though this size can uInitrd vary. Use the mkimage -l uInitrd Change the label of the USB drive command to determine the exact length. partition to RootFS, then mount the Extract the gzip image from uInitrd and gunzip it. It is a cpio archive.

The init ramdisk now contains the partition as /dst, as shown below. required USB storage-related modules. Preparing the source Once it’s uncompressed, you can Select the USB root file system view and modify the files. The next drive as the root The image file xubuntu-13.10-desk- step should be performed using an EXT filesystem top-armhf_odroidu_20140107.img will partition, instead of the VFAT partition The USB drive requires some prepa- be used to extract the root file system. where it will eventually reside. ration before storing the root file sys- Because of space considerations, it was tem. First, changing its label to RootFS, as mentioned above. The label of the current root file system should also be changed from RootFS to RootFS.org, so first copied over to the USB partition that two EXT file systems do not end up created in the previous step. with the same label. To write the image file to the parti- The goal here is to update the initrd tion, use the utility kpartx, which may ramdisk image to include the modules Prepare need to be installed with the command needed for the Linux kernel to mount the USB drive apt-get install kpartx. For ArchLinux- the root file system from the USB stor- To avoid losing data, it is recom- Arm users, it should be built from age. mended to work with a blank USB A rebuild of kernel or modules isn’t drive. Plug it into the ODROID in required, since all the modules, with the order to create a new partition. In this source, located at http://chris- correct versions, are already present in example, a 12 GB partition was created tophe.varoqui.free.fr/. the current root file system. using fdisk as the first partition on the For this Xubuntu example, loop0p1 The modules required are: usb_ drive. is the VFAT boot partition, and loop0p2

ODROID MAGAZINE 6 TECHNICAL ARTICLE is the root file system that needs to be Reboot root file system on an external USB drive copied over to the USB partition. After a power cycle, the ODROID should use this quick checklist: will boot into the root file system locat- ed on the USB drive. If it does not, go back and check to see if any of the steps Mounting and copying the source were overlooked. It may take a few at- root file system to the USB partition tempts before getting everything to work together perfectly. Changing the label of Use root=LABEL= in the boot.scr the current root file Verifying script. system the changes The current file system needs to be Once the ODROID has finished boot- Build a kernel with USB storage called something other than RootFS, ing, there are two things to be verified: support built in. since that label will be reserved for the Did the boot.scr pass the correct root= If the kernel does not include parameter to the Linux kernel? built in USB storage support, bun- Is the USB drive really being used as dle the init ramdisk with the USB the root filesystem? storage related modules. bootable partition. RootFS.org is a Now enjoy using your Linux in good alternative label. Guidelines whichever external USB disk you need. Any ODROID distribution develop- er who wishes to facilitate storage of the

Would you like to write a column for ODROID Magazine to share your knowledge and experience? The following positions are currently open, and offer an opportunity to participate in the emerging field of ARM technology with a worldwide audience of nearly 10,000 ODROID enthusiasts, and that was just in our first month! Kali/Backtrack: A column covering the basics of Kali and similar penetration testing suites. Linux Developer: Guides for setting up the development environment, basic compilation with kernel examples, and how to use the command line interface effectively.

To apply, please send an email to odroidmagazine(at)gmail.com with a description of your qualifications.

ODROID MAGAZINE 7 PLAYSTATION Use your Odroid as a Playstation 3 media server CHILL OUT IN STYLE BETWEEN GAMING SESSIONS by Bruno Doiche

this point, many ODROIDians have already put two or more Aof these amazing computers to Don’t be fooled by their misleading project good use, probably with one ODROID name! The Playstation media server will allow at the home office and at least one more your ODROID to support lots of devices. plugged into a TV set. But what if you are a single ODROID server, overcoming the insurmountable By keeping these rules in mind, I al- owner, happily using it on your home of- distance from your home office to your ways experience great movies and video fice, but also hoping to access your mul- living room. By following my guide, I’ll playback on my ODROID. timedia content from your living room? show you how to do exactly that! The ODROID’s portability is a great advantage, so you could just pack it up The right tool for the and get your setup running on your right job TV. It’s just a matter to get it plugged into the HDMI port, turning it on, and Although the setup and implementa- launching XBMC, right? tion of a PS3 Media Server is far from But what do you do if you are too rocket science, transcoding and sending lazy or busy to disconnect your USB the files over your network can some- drives, disassemble your robotics project times be problematic. So to keep things and take them all the way to the TV set working smoothly, I suggest the follow- (mine is a daunting 5 yards away)? ing rules of thumb: Go to www.ps3mediaserver.org/ Additionally, you may already have For any quad-core ODROID (X2, your TV connected to a Playstation 3 or U2, U3), you can transcode videos up to another device such as: 720p using cabled ethernet, but you may experience video stuttering if Microsoft Asus O!Play you try to use wireless ether- Sony Bravia Xtreamer Google Android AC Ryan PlayOn!HD net, or upgrade the resolution Freebox HD Brite-view CinemaTube to 1080p; For any octa-core Freecom MusicPal Samsung TVs ODROID (XU, XULite) you Pioneer Kuro Philips Streamium can set the resolution up to Philips Aurea Western Digital WD TV Live 1080p using the gigabit ether- Philips Net TV XBMC Media Center The download and saving process is pretty Popcorn Hour Boxee net adapter, or use a wireless setup as described in the “XU straightforward but beware, if you download from your windows PC or your Mac, check that The answer is that you can make your Wireless Router” article in the you are really getting the Linux version! ODROID work as an incredible media Feb 2014 issue of ODROID magazine.

ODROID MAGAZINE 8 PLAYSTATION MEDIA SERVER

The default configurations on the ODROID Linux- based builds is the lxcbr interface. Set the default network to the cabled network interface (in this case, eth0) instead.

The IP whitelist can be used in case you need to Extract your .tar.gz file by right-clicking and limit the number of ma- selecting a folder for uncompression. chines connected to your media server. This guaran- tees that no one will be pig- gybacking on your server while you are using it.

The server defaults video sharing to use the root directory. To avoid this, change your shared folder to the location of your vid- eos and songs to save your- self from having to navigate to deep directories. Locate the PMS.sh file, and right-click it to run the script.

Whenever you change the And that’s it! Now that you have configuration options, re- your Playstation Media Server running, member to save your settings, then press the Never hide the #TRANSCODE folder, since it still needs to connect to the network. “Restart Server” button. It seems obvious, but this step is easily overlooked. this may hinder your ability to choose from Doing so is a simple matter of match- different transcoding engines on the PS3 in ing the configuration options shown in order to select specific subtitles or audio. these screenshots. The 3 possible Getting another status transcoding engine It never hurts to have options, and Scanning: the server is sometimes a specific transcoding engine probing the network to is more effective at handling a certain find a device for you, video or audio file than another. To may take a while if your Don’t forget to edit your hostname to avoid the guarantee that everything goes smooth- odroid is firewalled. sight of seeing your beloved media server go- ly, do yourself (and your ODROID) a ing by the drab name of “localhost. favor, and use your package manager to install the most recent version of Men- No deal: check your net- coder, VLC and . To play a me- work, firewall rules, and dia file using a different encoding engine specially if your client on the PS3, go to the #TRANSCODE device is on! folder, and select another option.

Media decoder engines galore! Although Success: hurry, get the Mencoder does the job, FFMPEG and VLC tend popcorn and the soda! to save the day.

ODROID MAGAZINE 9 ANDROID DEVELOPMENT Android Development Inspecting the Android Source Code Under a Microscope by Nanik Tolaram

hen discussing Android de- velopment, the first thing W usually mentioned is the sheer size of the code base, and how dif- ficult it can be to navigate through the different parts of the Android source. To give you an idea of how big Android is, the current size on my local drive for the ODROID-specific version of Android 4.1.2 (excluding Linux kernel) is 8.6GB. When confronted with a massive code base like Android, the easiest approach is to break it down into smaller main Android directories, Under the hood pieces for ease of understand- however, this number chang- Let’s start putting the source code ing. Android is like a gigan- es from version to version. under the microscope by looking at what tic jigsaw puzzle that can be each directory contains. packed and unpacked again as Architecture abi/ (Libraries) needed. Details This article presents an In order to understand This directory stores Gabi++, a new overview of the different direc- what role the different source minimalistic C++ runtime that provides tories located inside the source code pieces play in the over- the same headers as the system one, with code, describes what projects all Android architecture, we the addition of RunTime Type Informa- each directory contains, and will map each role shown to tion (RTTI) support. The content of this what kind of useful things you below to a directory. directory is useful if you are planning to you will find in each area. It The source code will be write applications using the C++ lan- is surprising how much can be associated with this diagram guage. learned and extracted simply by using the labels by browsing the source code. that differentiate each layer, such as A Bird’s Eye Applications, Ap- View plication Frame- Here is the top level direc- work, Libraries, tory structure of the Android and Android Run- source code. time. Altogether, there are 23

High Level Directory structure Android of Android source code Architecture

ODROID MAGAZINE 10 ANDROID DEVELOPMENT bionic/ (Libraries) and a single .iso (for Inside If you have done any C x86). Figure 3 shows /dalvik programming in Linux, then the different relevant you are familiar with the sub-directories inside the BSD C library. However, be- recovery area. cause the BSD library is big in terms of size, Android uses cts/ (Test) a port of that library called This directory contains Bionic. Bionic is a stripped the compatibility test suites down version of the original (CTS) that allow device man- BSD C library, and supports ufacturers to test whether a x86 and ARM architecture particular device is Android instruction sets. This is the compatible. Test cases are core library upon which all written in a language called Android code depends. Junit, which provides direct access to the Android test- bootable/ (Booting) ing APIs. To learn more Most Linux users are fa- about the CTS, please refer miliar with the GRUB boot- to the Android CTS website loader that runs at http://source.an- Inside on an x86 PC, /recovery droid.com/compatibil- and in the ity/cts-intro.html. ARM embedded world, a similar boot- contains files for different hardware. For loader, with a smaller footprint, is used. dalvik/ (Android Runtime) example, below look at the differences This directory normally stores the boot- This directory contains the complete between the files required for Nexus 7 loader code for use with your embedded source code for the Dalvik virtual ma- devices (left) and the files required for device, such as u-boot or one of its de- chine. Besides Dalvik, it also contains Hardkernel devices (right). rivatives. Android devices contain a spe- several useful tools that are related to cial partition called “recovery”, which is profiling, tracedump and many more. technically a self-contained application The Dalvik core itself lives inside the that includes a Linux kernel with which vm/ subdirectory. a user can performance maintenance, troubleshooting or upgrades to Android. development/ This “recovery” app is inside the subdi- This directory is of interest to An- rectory called recovery/ . droid application developers, since it contains a number of sample applica- build/ (Build) tions that can be re-used or extended. The complex nature of Android war- There are also several useful tools inside Inside the /device directory rants its own build system. This direc- this directory such as the Android APK tory contains all of the scripts (Shell, checker, an HTTP server for testing, and If you look inside Python and Makefile) that are needed many others. App developers will want the proprietary/ to build the source code from its various to take a look at apps/ and samples/ folder, you will find directories and package them together directory for example projects. a number of binary into a single set of image files. On com- drivers that are used pletion of the build process, Android is device/ (Build) specifically for the reduced to several .img files (for ARM) Android runs on hundreds of de- ODROID platform. vices, and each device has a unique configuration in terms of hardware and peripherals. Device configurations and scripts that are specific to a particular de- Inside hardkernel /build vice are stored inside this directory, and proprietary/

ODROID MAGAZINE 11 ANDROID DEVELOPMENT

Docs/ (Document) tings are found here. This directory is a This directory contains documen- goldmine for application developers who tation for the Android framework and wants to understand how applications API. The files are in raw format that are interacting with the system services are converted to HTML during the such as the network, phone, sms, and build process. accelerometer. Theapps/ subdirectory contains most of the applications, while external/ (Libraries) the experimental/ directory contains After the kernel, this directory is experimental applications which do not the most complex in terms of its source get included in the final image file. code. It contains all the different open The inputmethods/ subdirectory source projects that Android relies on for HAL layer source code directory contains input applications such as key- its existence. All applications running in board, mouse, touch, etc. As expected, Android, either directly or indirectly, use libcore/ (Android Runtime) the wallpapers/ subdirectory contains some of the libraries inside the “external” The main focus of this directory is wallpaper applications and resources. directory. to house the core library used by the framework, as well as header files that frameworks/ (Application Framework) are used by native code when using the The “frameworks” directory is the the Java Native Interface (JNI). Other sub- heart of Android system, and contains directories contain libraries such as json, a combination of applications, SDK, luni (“lang util net io”) and dalvik APIs, utilities and much more. The level system utilities (dexfile and vmruntime). Inside packages/ of code complexity is similar to the ex- ternal/ directory. If you ever need libnativehelper/ (Libraries) prebuilt/ (Build) to customize Android, or want to learn Android provide the flexibility of The content of this directory is how the whole application stack works, writing apps in Java and interfacing slightly different thanprebuilts/ , this is the place to look. Most of the user with native code with the help of the but does not exist after version 4.1.2. space applications reside here. Java Native Interface (JNI). This library However, it does contain the GCC 4.4.3 contains the module called libnativehe- toolchain and some jar files that are used gdk/ lper that is used internally by Android during the build process. This is an experimental directory that to interface between Java and the native was introduced in Android 4.1.2, but world. The integration layer is a simple prebuilts/ (Build) does not exist after version 4.1.2. It JNI abstraction tool to make integration This directory contains the binaries contains llvm and CLANG code, which easier. for the toolchain suite that is used to is not currently being used inside the compile Android source code to an im- Android framework. Due to the experi- ndk/ (Libraries) age file. Due to licensing issues, the JDK mental nature of this directory, it can be The Native Development Kit is nor- is not part of this directory, but instead safely ignored. mally used to develop Android applica- contains the toolchain that is included tions using native code, and this direc- with the GNU compiler. The compiler hardware/ (Build) tory contains the NDK source code. It supports both ARM and x86 architec- This directory contains the Hard- includes tools needed for building NDK ture, and the main toolchain resides ware Abstraction Layer (HAL). The applications, including template make- in the gcc/linux-x86/toolchain HAL permits vendors that do not file for building the native code on dif- directory for Linux and gcc/darwin- provide open source drivers to supply ferent platform such as ARM, MIPS, x86/toolchain for Mac. Addition- their own pre-compiled binary drivers. and x86. A few additional tools such as ally, the directory contains the prebuilt The two main directories that provide make, sed and toolbox can be also found kernel for the qemu emulators inside the the Android HAL are shown in Figure inside this directory. qemu-kernel directory. 8. The rest of the directories contain source code for the user space HAL packages/ (Applications) sdk/ (Tools/Build) that is made available in the Android All of Android’s prebuilt applications The Android development kit not repository. such as Calculator, Launcher and Set- only consist of libraries and API that a

ODROID MAGAZINE 12 ANDROID DEVELOPMENT developer can use, but also includes a vendor/ (Build) Further Reading number of tools, apps and scripts. This Vendor-related hardware drivers that Regardless what you are trying to directory contains many auxiliary pro- are provided as binary files are stored achieve with Android, there many educa- grams such as the SDK launcher, Tracev- here. Normally, the directory contains a tional benefits from studying the source iew, and more. subdirectory indicating which hardware code (both native and Java) and under- is supported. All the necessary binary standing how the whole stack works to- system/ (Application Framework) objects, including configuration files, are gether. To explore more in depth about This directory contains the librar- available in the “vendor” directory. the Android source code components, ies and applications that form part of As an Android developer, you will please visit my eLinux wiki page, which the core Android framework. Different most likely need to learn about more details the different subdirectories in- global services that are made available than one aspect of Android develop- side the Android source code: http:// to all applications, such as , ment, and thus you will be looking into elinux.org/Android_Source_ volume mounting, security and vold are the various directories for support, ex- Code_Description. located here. amples and documentation. If you like to design applications, you will mostly be interested in the packages directory to understand how the internal built-in application uses the API, or to discover if there are any hidden APIs that you can leverage. However, if you are a platform developer who would like to customize Android for a particular vertical market, Inside system/ then the framework and system direc- tory will be of interest.

Keeping your ODROIDs Up to Date don’t miss the chance to be running the latest and greatest kernel release by Rob Roy, Chief Editor

id you know that Hardkernel $ wget builder.mdrjr.net/\ In addition to updating the kernel, publishes nightly builds of its tools/kernel-update.sh it’s also important to update the packag- Dcustom ODROID kernels, so $ sudo sh kernel-update.sh es included on your Ubuntu or Debian that you can easily keep your personal distro. system updated with the latest software Once the script has completed, re- To do so, connect to the official soft- improvements? The kernel packages are boot the ODROID so that the new ker- ware repository and download the lat- built on an ODROID-XU directly from nel may take effect. The main supported est package updates using the following the GitHub source code, and then up- operating systems include Ubuntu, Fe- command: loaded to the Hardkernel website for dora, OpenSUSE, Debian, and Ubuntu your convenience. Server, but the script can be easily modi- $ sudo apt-get update \ In order to update your image with fied for any distribution. && sudo apt-get dist-upgrade\ the latest Linux kernel, directly from The script also automatically detects && sudo apt-get autoremove the desks of the Hardkernel developers, the ODROID platform (U, X, or XU) download the kernel installation script and installs the appropriate kernel ver- Ubuntu updates are released daily, from http://builder.mdrjr. sion. Should you experience any issues and it’s a good idea to update your ker- net/tools/kernel-update.sh, with the upgrade, a backup of the kernel nel and software as often as possible. and initiate the update from any Termi- files is stored as a .tgz file in the/root/ nal window by typing: directory for quick recovery. ODROID MAGAZINE 13 HPC AT HOME High Performance Computing AT Home Setting up an HPC Head Node by Cooper Filby and Anthony Skjellum - Runtime Computing Solutions LLC

Looks like a simple thing to do right? n the February 2014 issue of Cluster Overview Well, after reading this article, it will be ODROID Magazine, we started Up above, we illustrate a sample even simpler for you. I our series on efficient and inex- network connection for our ODROID pensive High Performance Comput- cluster in order to diagram how the ing achievable from the comfort of listed components will be used. In our should be configured to allow communi- your own home. We began by describ- finished set up, all of our compute cation with both the compute nodes and ing the process of setting up a head- nodes will be connected to our dedi- the outside world. less cluster for running MPI-based cated cluster switch, either using on- Editing /etc/network/inter- parallel programs. In this article, we board or USB ethernet. faces, we need to set up eth0 to use the detail the networking configuration The head node will use its USB home network’s DHCP, and eth2, the required to set up a dedicated head ethernet to connect to the cluster USB Ethernet Adapter, to communicate node for our cluster using iptables switch, and use its onboard ethernet to with the rest of the cluster. For eth0, to configure NAT, and DNSMasq to connect to the home network switch. your entry should look as follows: configure DHCP and DNS services Compute nodes will be able to com- for our cluster. municate with the home network and auto eth0 What you’ll need for this article: outside world through the head node. iface eth0 inet dhcp hwaddress ether • 2x ODROIDs - in our examples, we Connecting 1a:e7:ed:f2:ff:73 will be using XU+Es running Ubuntu the Head Node 13.09 server. More ODROIDs can eas- As outlined above, we need to wire Where the MAC address (in this ily be included as well, to create a big- our head node to be multihomed, that case 1a:e7:ed:f2:ff:73) can be of ger cluster. is, connected to two networks, the home your choosing. For eth2, we will want network and our cluster network. On to designate its static networking in- • 1x Ethernet Switch (preferably Giga- the node you wish to use as your head formation, since it will be hosting a bit Ethernet, also called 1000-BaseT) node (in this case the ODROID XU+E our DHCP and DNS service for the we have named odroid-server0 as in part rest of our cluster. The exact infor- • 3x Ethernet Cables (plus 1 cable for 1 of our series), connect the onboard eth- mation we use may vary by user, but each additional ODROID) ernet device to your home network, and for the purposes of this article we’re then connect the USB ethernet dongle going to assume that our cluster net- • 1x USB Gigabit Ethernet Adapter to the switch for your cluster. Both of work is 192.168.128.0 through (ideally 1 for each ODROID) our network interfaces on our head node 192.168.128.24.

ODROID MAGAZINE 14 HPC AT HOME

Thus, we will configure eth2 as follows: be directly used to send traffic to other ing enabled, we now just need to install hosts on the private network on which iptables with sudo apt-get install auto eth2 they’re defined. Furthermore, hosts on iptables and run three commands to iface eth2 inet static a private network are hidden from the setup NAT on the head node: address 192.168.128.254 rest of the world, as external hosts have netmask 255.255.255.0 no direct way to send traffic to a host $ sudo iptables -t nat -A without a public IP. So, the question be- POSTROUTING -o eth0 \ Once we run sudo service network- comes this: if private network IP’s are for -j MASQUERADE ing restart, eth0 and eth2 will be config- internal traffic only, how can home net- ured to connect and communicate with works communicate with the rest of the $ sudo iptables -A FORWARD our two separate networks; eth0 will be world? The answer is Network Address -i eth0 -o eth2 -m state assigned an IP address from your home Translation (NAT). WIth NAT, your --state RELATED,ESTABLISHED router, while eth2 will get the IP speci- home router will “virtualize” the Source -j ACCEPT fied in /etc/network/interfaces IP address on your outgoing packet with (which is 192.168.128.254 in this that of your Public IP (like the one as- $ sudo iptables -A FORWARD example). Next, we will configure/ signed by your ISP), allowing remote -i eth2 -o eth0 -j ACCEPT etc/hosts with our static IP as fol- hosts to respond to the request of an lows: internal machine. In the context of our These commands may look a bit cluster, we will create a new private net- confusing, but fortunately we can 127.0.0.1 localhost work that will allow us to further isolate describe what they’re doing without 192.168.128.254 odroid-serv- cluster traffic from our home network, much difficulty. In essence, we’re en- er0.ocluster odroid-server0 and use the head node to gain access to abling NAT and telling the head node our compute nodes. to forward all traffic coming to eth2 Where ocluster is the chosen The translation that happens in (the internal network) through eth0, name of our cluster domain and your router on the way out (private and to allow external traffic to pass to odroid-server0 is the chosen name to public) and on the way in (pub- internal network if it’s part of an es- of our head node. You can pick a lic to private) is the main feature of tablished connection. As of now, these different hostname for your head NAT. One public IP address belong- settings are temporary, and will be node as long as you update /etc/ ing to your router can practically man- cleared upon reboot of the head node hosts accordingly. age thousands of private IPs using the unless we explicitly save them and set standard protocol. them to load on boot. Configuring NAT With NAT in mind, we will need to Unfortunately, testing these settings A good next networking question set up our head node for NAT by en- without a DNSMasq service setup re- to ask is this: What is Network Address abling IP forwarding and configuring the quires a bit more work, such as using Translation (NAT), and why is it im- firewall with iptables. In this instance, a machine with a GUI and manually portant to our cluster? When it comes we are going to use eth0 for our external assigning an IP address and routing understanding NAT, it’s essential to network, and eth2 (implemented using rules to test external communication. know how communication occurs be- the USB dongle) to communicate with Instead, we’re going to push forward tween networks and hosts, and the two the internal network to allow fast com- bravely and configure these settings to main types of IP addresses: public and munication between nodes. First, we save and load on reboot, then go about private. Public IP addresses are assigned will need to edit /etc/sysctl.conf, configuring DNSMasq so we can test by a central authority and delegated to and remove the # from the line contain- everything at once. you, such as by your Internet Service ing net.ipv4.ip_forward = 1 (and To save the current firewall rules, Provider (ISP). They can be used to send make sure it equals 1 and not 0). we can run sudo iptables-save traffic externally between networks or To enable this setting, we can then > iptables.up.rules ; sudo mv hosts with a public IP on the Internet. run sudo sysctl -p /etc/sys- iptables.up.rules /etc/. Alter- On the other hand, private IP addresses ctl.conf to apply our changes. Al- natively, if you’re running as root, or are for internal usage within a local area ternatively, if you just want to test this have invoked sudo -i, you can simply network (such as your home network). setting without applying it permanently, run sudo iptables-save > /etc/ Private IP addresses don’t make sense you can run sudo sysctl -w net. iptables.up.rules. Finally, we’ll on the public Internet; they can only ipv4.ip_forward=1. With IP Forward- need to create a startup script to load

ODROID MAGAZINE 15 HPC AT HOME

our iptables rules on boot by editing / lines throughout the file that we need, addressess and modify the /etc/hosts etc/network/if-pre-up.d/ipt- as this should make it easier for us to file on each node to include the IP ad- ables, and writing the following lines make changes later on since all our set- dresses and hostnames of all the nodes to it: tings will be in one place. For our clus- on the cluster. While this approach ter, we added the following lines: can be simpler in some regards, it is #!/bin/bash much less suitable for a larger cluster, /sbin/iptables-restore < / interface=eth2 and thus will not be discussed here. etc/iptables.up.rules domain=ocluster dhcp-range=eth2,192.168.128 Connecting Finally, run sudo chmod +x / .1,192.168.128.254,255.255. Compute Nodes etc/network/if-pre-up.d/ipt- 255.0 If you have your compute nodes ables, so the script can be executed dhcp-host=00:13:3b:99:92:b1, configured correctly so there are no on start. 192.168.128.254 MAC address or hostname conflicts, then connecting the compute nodes Configuring So what do all these configuration is as simple as hooking them up and DNSMasq lines mean? Interface specifies which powering them on (assuming the Our next question: What’s DNS- interface the DHCP and DNS server ethernet devices are configured to Masq, and why do we need it for our should listen for requests on, while use dhcp). From the head node you cluster? DNSMasq provides us with a domain specifies the domain of our should be able to use ssh to connect to lightweight DHCP server and a DNS cluster. your compute nodes, e.g. ssh odroid- server, both of which make our cluster DHCP-range specifies the range server1. Once connected, verify DNS more flexible for a variable number of of IPs that can be allocated to hosts and NAT are working by pinging your nodes. DHCP is the Dynamic Host on the specified interface, in this head node by hostname and an exter- Configuration Protocol, and in essence case IP’s between 192.168.128.1- nal website such as google.com. it assigns IP addresses and networking 192.168.128.254 on our internal net- On the off chance you run into information to hosts that request it. work, eth2. The final line is a static configuration issues, there are a few On the other hand, DNS is the IP lease for our head node, where steps you can take to determine Domain Name System, and it allows 00:13:3b:99:92:b1 is the MAC ad- whether DHCP/DNS or NAT is caus- us to refer to individual machines by dress of our head node on eth2, and ing issues. You can use the tool nmap a hostname, rather than by it’s IP ad- 192.168.128.254 is the static IP. With to scan and see if your compute nodes dress. However, before we install and these changes made, we need to con- are being assigned an IP with nmap -sP configure dnsmasq it’s worth noting figure odroid-server0 to use itself as it’s 192.168.128.0/24. that misconfiguring your DNS server primary DNS server so it can resolve If you can connect to your com- or DHCP server could cause all sorts the names of internal hosts. pute nodes but get a message about of chaos on your home network. For- To do this, we can modify /etc/ an unknown host when pinging other tunately, should this happen, unplug- dhcp/dhclient.conf and remove the # hosts by hostname, then there is likely ging the head node should rectify these from the line containing #prepend do- a problem with DNS. If you have is- issues should that happen. main-name-servers 127.0.0.1; and run sues connecting to external hosts from To get started, we’re going to run sudo dhclient so the changes take effect. your compute node try running ping sudo apt-get install dnsmasq to install Finally, we found that dnsmasq would 8.8.8.8 to see if NAT is working cor- the server, and then stop it with sudo not work correctly for internal nodes rectly and allowing traffic through the /etc/init.d/dnsmasq stop. To when invoked by its startup script un- head node. configure DNSmasq, use a text editor less we modified /etc/default/dnsmasq to modify /etc/dnsmasq.conf (as and removed the # from the line, #IG- A Simple MPI sudo). You may notice that there are a NORE_RESOLVECONF=yes, al- Example large number of commented out lines though your mileage may vary. Now that we’ve done all the set showing various configuration options Once this is all configured, we can up, here’s an example of parallel pro- for DNS and DHCP. In this case, we’re run sudo /etc/init.d/dnsmasq restart gramming using MPI. You can run going to specify a few options for our to start the service. Alternatively, we a “canned MPI application,” ours is head node at the end of the file, in- could go ahead and just configure all simple, with more complex programs stead of uncommenting the individual of the nodes of cluster with static IP coming in future installments. This

ODROID MAGAZINE 16 HPC AT HOME ANDROID GAMING

script, which we’ve called simple1.sh, In this case, we used 4 ODROIDs just reports networking and host in- systems to run our simple script, with Flappy Bird formation from each of the compute 1 cores each. We used MPICH2 with Installing nodes. an enumerated host list, and you can the Original Game install MPI on Ubuntu with sudo apt- simple1.sh get install mpich2 (installs MPI- by Ronaldo Andrade CH2 and dependencies). #!/bin/bash ame enthusiasts all over the A=`echo -n “Hello from: “` Next Steps world were surprised when H1=`hostname ` From here, we can now easily add G Vietnamese developer Dong H2=`hostname -i ` more nodes to our cluster once they Nguyen decided to remove his master- H3=`hostname -I ` have a basic networking configuration piece from the Google Play and Apple H4=`hostname -f ` in place. So where do we go from here? stores. But this does not mean you can’t get Flappy Bird anymore! echo $PMI_RANK $A name=$H1 Thus far, we have just been using the All you have to do to join the fun is to shortlist=$H2 longlist=$H3 ODROID user on each node, but this download the APK to your ODROID, FQHN=$H4 is not ideal if you want to have several install and play. It’s a free application users on your cluster. that doesn’t require any additional li- Type the following to run the script: Furthermore, copying files around censing, and you no longer have to be can be a hassle with the current setup. jealous of everyone who downloaded it % mpirun -np 4 -hosts Therefore, we will continue this series before it became scarce. odroid-server1,odroid- by detailing an AutoFS and LDAP server2,odroid- server setup on the head node to allow http://apkandroid.blogspot.com. br/2014/02/flappy-bird-13-apk. server3,odroid-server4 ~/ us to share files and authenticate users html scripts/simple1.sh across our cluster. Additionally, we will look into run- Enjoy, and don’t break your screen! Which gives the following output: ning more complex MPI jobs using C/ C++ programs we write as examples 0 Hello from: name=odroid- rather than the simple shell script we server1 short- showed here to better demonstrate our list=192.168.128.1 long- cluster’s capabilities. Real MPI pro- list=192.168.128.1 grams transfer data with message pass- FQHN=odroid-server1.ocluster ing and and harness parallel processing by working together, rather than our 1 Hello from: name=odroid- script, which ran independently on server2 short- each ODROID. list=192.168.128.2 long- list=192.168.128.2 Additional Reading FQHN=odroid-server2.ocluster The MPICH Programming Lan- guage is a high performance and widely 2 Hello from: name=odroid- portable implementation of the Mes- server3 short- sage Passing Interface (MPI) standard. list=192.168.128.3 long- MPICH and its derivatives form the list=192.168.128.3 most widely used implementations FQHN=odroid-server3.ocluster of MPI in the world. They are used exclusively on nine of the top ten su- 3 Hello from: name=odroid- percomputers (as of November 2013), server4 short- including the world’s fastest super- list=192.168.128.4 long- computer: Tianhe-2. Learn more by Ronaldo has the bragging rights of a list=192.168.128.4 visiting http://www.mpich.org, which monk-like patience, and the highest FQHN=odroid-server4.ocluster offers many tutorials, publications, score among the magazine’s team and other documents for developers.

ODROID MAGAZINE 17 TECHNICAL ARTICLE How to know when your cat is napping A guide for attaching sensors to the ODROID-XU by Marian Mihailescu

ne of the advantages of having an ODROID board as a com- Oputing platform is flexibility. It can be used as a computer, a research Of course this article made us feel tool, a game console, or a media center. digital temperature sensor and the HC- obliged to use as many cat memes as the In this article we will explore a new way SR501 Pyroelectric Infrared (PIR) mo- art editor would deem appropriate. in which the ODROID can be used: for tion sensor detector, each available for monitoring your home. More exactly, around US$2 on eBay. sor’s Data output directly to the board is we will discuss how to attach a couple of Both sensors connect using 3 pins: dangerous. The second problem is that sensors to the ODROID-XU which will Power, Ground, and Data. However, af- the 1-wire bus protocol is not enabled allow us to detect motion and to moni- ter inspecting the datasheets, we see two on the ODROID boards. tor the room temperature. major problems. The sensors need 3.3V Motion and temperature sensors are or 5V power, and output on the Data Connecting some of the easiest to connect, and have pin needs a similar voltage. The motion the sensors made the Arduino and the Raspberry Pi sensor outputs a logical value (0V = no In order to be able to connect the platforms very popular, as you can attach motion; 3.5V/5V = motion), while the sensors, we need to adjust their output them easily to the GPIO (General Pur- temperature sensor outputs the tempera- to the 1.8V voltage compatible with the pose Input/Output) pins exposed on the ture using the 1-wire bus protocol. The ODROID boards. This is done using board. Of the Hardkernel products, the first problem is that all the ODROID ODROID XU series is better suited to expansion headers are 1.8V (except the connecting sensors, as it includes a 30- PWRON signal), so connecting the sen- Left: HC-SR501 PIR Motion Sensor Right: DS18B20 Digital Temperature Sensor pin expansion port that can be used for several types of connections, such as SPI (Serial Peripheral Interface) , I2C (Inter- Integrated Circuit) and GPIO. For the ODROID U series, there is an IO board accessory that can be connected to the USB port, providing similar capabilities. The sensors used for the purpose of the article, shown right, are quite com- mon and inexpensive: the DS18B20

ODROID MAGAZINE 18 TECHNICAL ARTICLE

a level converter, such as the Freetron- ics Logic Level Converter Module. Al- though it is not explicitly stated that it is compatible with 1.8V, the level con- verter works by having high power and low power references that are used to provide a bidirectional interface between different devices operating at these volt- ages. The connections for the logic level converter are shown in Figure 2.

Freetronics Logic Level Converter Module Cats can sleep up to 16 hours a day, enough time with 4 IO Ports provided by ODROID, 304 is the “base” for them to dream up new ways to be cute and address of GPX1 chip, to which we add cuddly and still hold down a full-time job the desired GPX pin address (in this case, To provide the low voltage reference 0). The second line is used to configure the or 1.8V, we connect another GPIO pin for logical output, while the last line will pin of the ODROID board, which we set the output to logical 1, resulting 1.8V root@odroid:/ # cat /sys/ configure to always output the logical on pin 16. The motion sensor data output class/gpio/gpio309/value value “1”. (OUT), which will be 5V when motion 1 The entire connection schematic for is detected, is connected (using the yellow the motion sensor is depicted in Figure wire) to the logic level converter High V 3. Pin 1 (5V0) of the ODROID board I/O 1 pin, with the corresponding Low V is connected (using the red wire) to the I/O 1 pin (which is transformed to 1.8V) Connect the Motion Sensor as show in this sche- motion sensor power pin (VCC) and being connected to the board GPIO pin 13 matic, remember that this is for the ODROID-XU to the logic level converter High V IN (GPX1.5) using the blue wire. To pin uses input. Next, Pin 2 (GND) of the board the address 309 (304+5) and is enabled us- is connected (using the black wire) to ing the following command: the motion sensor ground pin (GND) and the logic converter GND pins. We root@odroid:/ # echo 309 > / are using the GPIO pin 16 (GPX1.0) sys/class/gpio/export to provide the reference 1.8V power to the level converter Low V IN input (the The default configuration for a GPIO green wire), using the following linux pin is “input”, and the state can be read commands: from “value”. A value of 1 indicates mo- tion, while a value of 0 indicates no mo- root@odroid:/ # echo 304 > / tion detected. The sys/class/gpio/export sensor also has two root@odroid:/ # echo out > / resistors which can sys/class/gpio/gpio304/di- configure the sensi- rection tivity (Sx) and the root@odroid:/ # echo 1 > / time which the out- sys/class/gpio/gpio304/value put is set to “1” when motion is detected The first line is used to select GPIO pin - from a few seconds 16 (GPX1.0). From the documentation to minutes (Tx).

ODROID MAGAZINE 19 TECHNICAL ARTICLE

Enabling the 1-wire form_data w1_gpio_pdata = { protocol .pin = EXYNOS5410_GPX1(6), The digital temperature sensor is .is_open_drain= 0, connected in a similar way as the mo- }; tion sensor (see Figure 4). The sensor power (VCC) is connected to the board’s static struct platform_de- 5V source (pin 1), the sensor ground vice ODROIDxu_w1_device = { (GND) to the board’s pin 2 (GND), .name = “w1-gpio”, and the sensor data (DQ) is connected .id = -1, The ODROID-XU sensors capture my cat to the level converter High V I/O 3 in- .dev.platform_data = put (using the magenta wire). The level roaming around the house at 5AM and &w1_gpio_pdata; 6:30AM converter Low V I/O 3 is connected to }; the board’s GPIO pin 17 (GPX1.6) us- If you’d like to get more detailed in- ing the cyan wire. The only difference is formation about the XU sensors, you the presence of a 4.7KOhm pull-up re- This will allow pin 17 (GPX1.6) can use the magic of Google Search, or sistor between the VCC and GND pins to be used for the 1-wire protocol if visit some of the recommended links of the temperature sensor, used to keep it is enabled in the kernel configu- listed below: the data transfer stable. ration. After the new kernel is com- piled, the sensor is acti- DS18B20 datasheet: http:// vated and the temperature datasheets.maximintegrat- (which needs to be divid- ed.com/en/ds/DS18B20.pdf ed by 1000 to get Celsius HC-SR501 datasheet: degrees) is read with the http://www.mpja.com/ following commands: download/31227sc.pdf ODROID XU connectors: root@odroid:/ # mod- http://odroid.com/dokuwi- probe w1-gpio ki/doku.php?id=en:odroid- root@odroid:/ # mod- xu#expansion_connectors probe w1-therm kernel patch to enable w1 root@odroid:/ # cd / protocol: https://github. sys/bus/w1/devices; com/hardkernel/linux/commi ls t/6ffdec4496b7fcb2504423ab3 Connect the Temperature Sensor lrwxrwxrwx 1 root root 0 827993ff341696d Feb 1 12:24 28-000004bc791d -> ../../../devices/w1_bus_ The DS18B20 is using the 1-wire master1/28-000004bc791d protocol for communication. The linux lrwxrwxrwx 1 root root 0 Feb kernel has a driver for the 1-wire proto- 1 12:24 w1_bus_master1 -> col (w1), and all that needs to be done ../../../devices/w1_bus_mas- on the ODROID devices is to specify ter1 what pin header we want to use for root@odroid:/ # cat 28- this protocol. For the ODROID XU, 000004bc791d/w1_slave the modifications are done in the file 28625 arch/arm/mach-exynos/board- ODROIDxu-ioboard.c and include This article provides a basis for con- the following lines: necting various sensors to your ODROID board. There is a small step from reading #if defined(CONFIG_W1_MAS- and visualising the sensor values, to mak- TER_GPIO) || defined(CONFIG_ ing active decisions based on them (e.g. That was definitely fun to do, I hope some- W1_MASTER_GPIO_MODULE) sending an email when motion is detect- time soon we do something with another static struct w1_gpio_plat- ed) and then home automation. pet, parrots maybe...

ODROID MAGAZINE 20 UBUNTU 14.04 FOR ODROID Ubuntu 14.04 Trusty Tahr now available for the ODROID platform! by Rob Roy, Chief Editor

lthough Ubuntu 14.04 is not set for official release until April A 17th, 2014, ODROID owners can perform an early upgrade to Trusty Tahr using the “update-manager” appli- cation. By synchronizing your OS ver- sion with the latest Canonical release, you can keep your favorite Ubuntu What does the Tahr say? “Dude, if you have early adopter blood, go and upgrade!” image running indefinitely, without packages will be required for the up- needing to reinstall the entire operating grade, your system will ask for a reboot. system whenever a new version is an- Before doing so, it’s important to replace After the ODROID has rebooted, nounced. the default video configuration file, so verify that your new operating system is ODROID computers that are already that the ODROID video settings in / installed by typing the following com- running an Ubuntu 13.04 or 13.10 im- etc/X11/xorg.conf take effect and mand in a Terminal window: age only need to enter a few commands produce an HDMI signal. $ lsb_release -a in order to upgrade the Ubuntu operat- If you’ve already rebooted, don’t wor- ing system to the latest 14.04 version. ry, you can perform the patch via SSH. It’s that easy! Don’t forget to get your To begin, close all open applications, Otherwise, open a second Terminal win- new Trusty Tahr 14.04 desktop wallpaper launch a Terminal window, and type: dow and enter the next two commands to from Flickr at http://www.flickr. com/groups/2484760@N20/. Please $ sudo apt-get update \ restore the ODROID video drivers: && sudo apt-get upgrade \ note that some earlier versions of Ubuntu && sudo apt-get dist-upgrade\ $ cd /etc/X11/xorg.conf.d may also require the additional step of re- && sudo apt-get autoremove \ $ sudo mv exynos.conf \ compiling the Mali drivers for use with && sudo apt-get clean exynos.conf.original Xorg Server 1.14, which is detailed in the The update-manager command If you’re running Lubuntu Whisper, May article titled “Recompiling Mali”. applies the latest updates to the current you’ll also need to move the XFCE desk- operating system, in preparation for the top service into the LXDE configuration upgrade. Confirm all questions until the file to retain desktop compatibility with bash prompt re-appears, then type: 14.04:

$ sudo update-manager –d $ cd ~/.config/autostart $ rm xfdesktop.desktop Press the “Upgrade” button, click $ cd ~/.config/lxsession/LXDE $ echo “@xfdesktop \ Enrich your desktop experience, there is as “Continue” a few times, and go make --replace” >> autostart many wallpapers as you would ever need. a sandwich! After determining which $ sync && sudo reboot ODROID MAGAZINE 21 LEARN REBOL Learn Rebol Writing More Useful Programs with Amazingly Small and Easy-to-Understand Code By Nick Antonaccio and Bohdan Lechnowsky

ebol (Relative Expression When finished, double-click on Based Object Language) is a the download icon (usually by the Rrevolutionary advancement in clock) and grant permissions to in- programming language emerging from stall. over thirty years of language research. Go to the apps list and click the It offers enormous flexibility and pow- icon for R3/Droid. R3-GUI can be loaded from the web er, with a focus on intuitive by simply using the command: load-gui the first installment of Learn Rebol Ubuntu: Here’s the code for a little note pad last month, we discussed the motivation Open a web browser and down- app that allows you to create, load, edit, behind Rebol and learned how easy it is load http://atronixengi- and save a text file. You could use it to to create a GUI-based program in Rebol neering.com/r3/downloads/ store an editable to-do list, shopping list, on Android. r3-arm-view-linux-2014- notes and reminders, or other free form In this installment, we’ll briefly re- 02-19-715e14 data. The first two lines are stock code visit how to install Rebol on Android, Perform the following com- that you’ll see at the beginning of every but we’ll also show how to install it for mands in the terminal emulator in example in this section. There’s a text ODROID’s Ubuntu environment. In the directory where you download- area widget and two buttons which load addition, we’ll show how to create a ed r3 (as sudo): and save the notes.txt file. It’s pretty easy text editor with which you can write to follow the code, even without any for- Rebol programs (or anything else for mv r3-arm-view-linux-2014- 02-19-715e14 r3 mal introduction to Rebol: that matter), calculators, bar charts, chmod +x r3 data input grids, and even a Web pho- ./r3 REBOL [title: “Tiny Note to viewer – all from scratch! Not only Editor” file: %tiny-note- editor.r] will these programs run on your An- Note: Not only does Rebol 3 work load-gui droid or Ubuntu installation, but they great on ODROID devices, but view [ will also run on your Windows, Linux Rebol 3 for Linux-ARM is being a: area button “Load” on-action and MacOS X laptop or desktop with- developed on ODROID devices. [attempt [set-face a read/ out any modifications! string %notes.txt]] Pretty simple, eh? And yes, you can run any app you button “Save” on-action [write %notes.txt get-face a create in Rebol 3 on your Android-pow- alert “Saved”] ered phone or tablet as well! Getting to work ] As mentioned in the last installment, Installation Rebol has multiple GUI toolkits. In Android: Rebol 3, the most popular is called R3- Open a web browser and navi- GUI. The GUI toolkit of choice needs gate to http://development. to be loaded if the program is going to saphirion.com/experimen- make use of it. This can be done dy- tal/builds/android/ namically from the web (for always au- Download r3-droid.apk tomatically using the latest version), or a (amazingly smaller than 2MB). copy of the GUI toolkit can be stored on your computer (for quicker access). ODROID MAGAZINE 22 LEARN REBOL

If you don’t feel like typing in the restaurant tips. Like every other app Network access and web protocols code, you can simply enter the follow- here, it can be run instantly on any An- are built into R3 natively, to provide easy ing to load it from the web where I have droid phone, tablet, or device, or on any access to all types of online data. Here’s saved a copy of the script: desktop/laptop PC, using the exact same a variation of the above program, which code: displays a chart of live data read directly do http://respectech.com/ from a web URL (http://learnre- odroid/learnrebol/tiny-note- REBOL [title: “Tip Calcula- bol.com/chartdata). Change the editor.r tor” file: %tip-calculator.r] load-gui data at the web URL, run the app, and Likewise, the following examples view [ the bar chart displays the appropriate can be accessed the same way, but just f: field “49.99” graphic adjustments: t: field “.20” change “tiny-note-editor.r” to the file- button “Calculate” on- name specified in the REBOL header on action [ REBOL [title: “Bar Chart - Live Online Data” file: %bar- each script. set-face x round/to (to-decimal get-face f) * (1 chart-live-data.r] Now, we’ll modify it so we can specify + (to-decimal get-face t)) load-gui the file to open and the filename to save: .01 d: load http://learnrebol. ] com/chartdata g: [] foreach [m v] d [ap- REBOL [title: “Tiny Text x: title “Total: “ ] pend g reduce [‘button m v * Editor” file: %tiny-text- 10]] view g editor.r] load-gui view [ a: area filename: text file 200 button “Load” on-action [ set-face filename request-file set-face a read/ Here’s an example that displays a string to-file get-face file- block of data in graphic bar chart for- name ] mat. It consists of 2 stock header lines, 1 button “Save” on-action line of data to display, and 1 short line of [ actual code. Like every other R3 exam- write file: request- file/file to-file get-face file- ple in this text, all you need to create and name get-face a run this application on any platform is a set-face filename text editor and the tiny R3 interpreter. form probe file alert “Saved” This app, along with the R3 interpreters ] for every popular OS platform, could be ] quickly emailed to friends or co-work- Here’s a grid display, typical of any ers, and opened instantly on any device app that involves managing tables of each user happens to have available: text, numbers, or other data. Rows can be added or removed, cells can be edited REBOL [title: “Bar Chart” manually by the user, and the values are file: %bar-chart.r] load-gui sortable and filterable by clicking col- d: [“March” 13 “April” 9 umn headers (months are automatically “May” 21 “June” 29 “July” arranged chronologically, text alphabeti- 10] g: [] foreach [m v] d [ap- cally, numbers ordinally, etc.). Most of pend g reduce [‘button m v * this example is just the data to be dis- As you can see, Rebol’s code structure 10]] view g played. You don’t really even need to un- is pretty free-form. The Tiny Text Editor derstand anything about programming is laid out differently than the Tiny Note to follow this code: Editor, but mostly because the buttons’ on-action blocks are split into lines based REBOL [title: “List-View/ Grid display” file: %grid- on the actions being specified. display.r] Here’s a short program to calculate load-gui

ODROID MAGAZINE 23 LEARN REBOL

Conclusion “[“ mold random view [ “abcd” “ “ random now/date “ As you might conclude from the pre- text-table [“Text” 100 “ random 100 “]” ceding examples, creating powerful and “Dates” 200 “Numbers”] [ ] useful apps in Rebol 3 is about as simple [“abcd” 1-jan-2013 ] 44] print data as it can get. But, it can get even easi- [“bdac” 27-may-2013 er! In a future article in this series, we’ll 4 ] [“dcab” 13-aug-2014 discuss using Rebol 3 to create DSLs 5 ] Here’s another simple web app. It (Domain-specific Languages) to make ] centers and displays all photos found programming applications as simple as ] in a given folder on a web server, along you can imagine. with the total count of all displayed im- If you want to get in on the discus- ages. A demo of this script is available at sion with the Rebol/Red community, http://learnrebol.com/photos. there are two main forums where you cgi. Web apps like this can run on any can interact with other programmers computing device that has an Internet and developers in real-time: The [Rebol R3 can be used to create full featured connection, even if R3 isn’t installed on and Red] chat room on StackOverflow. web applications. Here’s a variation of the device. All you need is a web brows- com, and the Rebol-powered darknet the above program, which reads data er (the code runs on the web server, and “AltME Rebol4 World”. To join the created by an R3 web app running at pushes out results for the browser to see): AltME world, send an email to user bo http://learnrebol.com/grid- at the domain respectech.com and/or data.cgi. Run it several times to see #!./rebol3 -cs henrikmk at the domain gmail.com ask- the updated data generated each time by REBOL [title: “Web Photo Viewer”] ing to be invited. We are a closed com- the web app: print {content-type: text/ munity to avoid spam. Don’t be shy, the html^/} Rebol/Red community is known as the REBOL [title: “List-View/ folder: read %./ friendliest software development com- Grid display” file: %grid- count: 0 display-live-data.r] foreach file folder [ munity on the planet! load-gui foreach ext [“.jpg” webdata: load to-string read “.gif” “.png” “.bmp”] [ http://learnrebol.com/grid- if find file ext [ data.cgi print rejoin view [text-table [“Text” 100 [{

}] data)] count: count + 1 ] ] ] print join {
Total Im- ages: } count

Here’s the code for the app running on the web server that creates the ran- dom data displayed in the GUI grid above:

#!./rebol3 -cs REBOL [] random/seed now/time print {content-type: text/ html^/} data: copy {} loop 100 [ append data rejoin [

ODROID MAGAZINE 24 LEARN RED Learn RED The next evolution of rebol: part 1 By Gregory Pecheret

Red’s logo depicts a full stack language able to cover the full development spectrum from low-level to high- level programming. Red is a full-stack language!

uestion: Which programming language similar to a C-level language no installation is required, except chmod language has ALL of the follow- suitable for device driver development, +x red-041 on systems that require this. Q ing advantages? native library usage, and more. Red is The Red executable is both a Red com- a flexible mid to high level scripting piler and a Red interpreter, all rolled into cross-platform language similar to Rebol, suitable for one file. If you run it without any com- cross-compiling complete applications, user interfaces, mand line options, it will launch as a open source data modeling, domain-specific lan- Red interpreter (Read Eval Print Loop). embeddable guage creation and scripting. The first time it is launched, it will com- Unicode-compliant Red’s runtime uses a hybrid approach pile the interpreter automatically. Since Lua/Scala/Rebol-inspired by compiling what can be solved statically, Red compiles its own REPL, we’ll need paradigm neutral (functional, imperative, using a just-in-time compiler for other to download the Red source code from symbolic, prototype-based objects) cases, and finally interpreting when none github.com/red/red to perform full stack (machine level to Meta Domain- of those approaches satisfies. this compilation. If you’re not familiar Specific Language, and everything in-be- with GitHub, go to https://github. tween) Getting Started com/red/red/tags and click the .zip simple/compact/fast/ubiquitous/portable/ We will first use the Red executable (Windows) or .tar.gz (Linux) file under flexible/green (available since version 0.4.0) to compile the most recent version (v0.4.1 as of this the Red console (available since version writing). Now, let’s compile the REPL The answer is Red! 0.3.2), and then we’ll use this console to console for ODROID: Red is a modern programming lan- learn some Red language basics. The console executable for Linux- guage that re-uses most of Rebol’s syntax Red is built on the earlier Rebol 2, ARMhf (“Linux-ARMhf” for hard-float and semantics. While Rebol is an inter- which was never ported to Linux ARM vs “Linux-ARMsf” for soft-float operat- preted language, Red can run either as (like Ubuntu on ODROID). The current ing systems) is now available in the red- an interpreted language, or be statically version of Rebol 3 has been ported to Linux master folder. Ubuntu on ODROID is compiled to native code. The Red in- ARM, but is not compatible with Red at a hard-float operating system. terpreter and compiler is written in Re- this time. Therefore, we will need to cross- The following example illustrates both bol 2, so at most a Rebol 2 interpreter compile our Linux ARM programs on a capabilities by calling a Red library embed- is required to compile a Red program Linux, Windows or Mac OS X desktop ded in Java to build a basic user interface through Red. Red also has a standalone machine until Red becomes self-hosted. through the Java AWT. This is based on the executable that can be used to interpret From the download section of code available in your Red root directory at or compile programs. Beginning with http://red-lang.org, download red/bridges/java/hello.red. version 2, the Red engine will be ported the Red executable for your favorite from Rebol 2 to Red. This will make Red desktop platform. Create a directory on a self-hosted language, with two stacks your system called “Red”, and place the Compiling Red Console on MS Windows called Red and Red/System. Red executable Red/System is the low-level com- in that directory. ponent of the Red programming lan- This will be your guage and provides Red’s runtime li- Red root directo- brary, a linker to produce executables ry. Run it straight and a low-level system programming from the file since

ODROID MAGAZINE 25 LEARN RED

Since version 0.3.3, it is possible to both compile a view [ Red program as a native library and to embed a Red set “AWT/Red” 4 1 library in Java thru JNI. 200x200 button1: button [] label1: label “Demo AWT/ main: function [][ Red” center frame: java-new [java. checkbox1: check “Option awt.Frame “AWT/Red”] 1” layout: java-new [ textfield: field “Hello !” java.awt.GridLayout ] 4 1 Here you have to build hello.red as a ] Just imagine how much more produc- library and bridge.java with a JDK. button1: java-new [ tive software developers could be by using To build hello.red, use the Rebol 2 ex- java.awt.Button the power of DSLs like this. The view ecutable you downloaded earlier on one of “Button” dialect example above uses less than ¼ the the supported platforms and run this Re- ] amount of code than the Java example it bol command from the Rebol console: label: java-new [ replaces, and is much more readable and java.awt.Label easy to debug and change. cd %path/to/your/red/root/ “Demo AWT/Red” directory label.CENTER Red’s Past do/args %red.r “-dlib -o ] and Future %red/bridges/java/hello checkbox1: java-new [ The author of Red, Nenad Rakocevic, %red/bridges/java/hello.red” java.awt.Checkbox first announced his intent to build the Red “Option 1” language on February 26th, 2011 at the Re- Then compile bridge.java using Java’s ] bol/Boron conference in the Netherlands. compiler (which you must already have textfield: java-new [ He has since been working full-time on his installed, and which is beyond the scope java.awt.TextField endeavor. Red is still a work in progress, of this tutorial): “Hello !” but Red foundations have been set and it ] is already possible to cross-compile and/or javac bridge.java java-do [frame/setLayout embed Red in Java, for example. layout] Android is clearly a focus, and Red is And run it with Java (again, which java-do [frame/add la- able to produce APK binaries as the proof must already be installed): bel] of concept “eval” progam demonstrates java-do [frame/add but- (download it from http://static. Java –Djava.library.path=. ton1] red-lang.org/eval.apk). Red is bridge java-do [frame/add becoming an alternative to allow develop- checkbox1] ment of Android applications that remain To avoid potential issues, make sure java-do [frame/add tex- independent of complicated IDEs and de- your Java runtime and compiler matches tfield] velopment environments and is extremely (javac –version, java –version). java-do [frame/setSize lightweight. Upcoming releases will in- Since Red v0.4.1, Red features a pars- 200 200] clude simple I/O support of files, full ob- ing engine, a well-known method in Re- java-do [frame/setVis- ject support, Visual Interface Dialect for bol to write dialects (sometimes referred ible yes] GUI creation, and more. to as DSLs – Domain-Specific Languag- es). A typical case of parse usage would To view Nenad’s recent talk on “What events: java-new be rewrite the code shown next column is Red” at the ReCode Conference [events] in a more elegant way to wrap the AWT 2013, visit http://www.youtube. java-do [frame/addWin- calls. This is part of the Red roadmap. com/watch?v=H4kMlOkN894. The dowListener events] Using a dialect, then it could be com- talk was recorded with a camera pro- ] pressed to something simple with the flex- grammed and developed using Red and ibility of the following AWT examples: Rebol 3.

ODROID MAGAZINE 26 Making Money with ODROIDs Web Development WITH Code Monkey and Quiet Giant: Using ODROIDs To Build a Successful Business by Rob Roy, Chief Editor

DROID computers are ex- tremely versatile, and can be O used for nearly every type of computing application, including gam- ing, robotics, desktop publishing, web browsing, audio production, media serv- er and playback, and much more. Many ODROID owners use them exclusively for fun, learning and home entertain- ment. However, because of their power- ful quad-core processors, generous 2GB of RAM, and low cost, you can also run The Code Monkey desktop’s default wallpaper a successful web development business my ODROID-X2 and ODROID-U2, reminds you that you can do more with less. with an ARM-based ODROID cluster using them exclusively to produce and from your home! maintain modern HTML5 websites that The high cost of a typical software are viewed by hundreds of thousands Environments (IDEs) including Blue- development computer can be prohibi- of visitors each month. Almost any fish Web Editor, which will be used in tive for home enthusiasts who wish to web software that can be written using this article to illustrate how to get a basic offer professional web development ser- an expensive Windows- or OSX-based Wordpress site running in an inexpen- vices, especially considering the cost of system can also be developed using an sive sandbox environment. Both images installing a typical Windows or OSX ODROID, including HTML5, re- used in this article are available for free operating system, purchasing expensive sponsive layouts, content management, download from the ODROID forums at laptops, hard drives, memory, processors cross-browser compatible code, and web http://forum.odroid.com. and cooling systems, licensing a devel- applications written in popular modern opment studio package such as Visual languages such as jQuery, AngularJS, Choosing Studio, and renting a dedicated develop- PHP, Java, and JavaScript. the Development ment server from a data center. For those aspiring to augment their Environment In contrast, the startup cost of build- income with web development, the The development stack used on ing an ODROID-based development community images Code Monkey and many internet servers is known as studio is approximately 90% less expen- Quiet Giant provide a virtual 8-core sys- LAMP, which stands for Linux, Apache, sive than a home-built x86 machine, tem that operates in parallel to provide a MySql, and PHP. Code Monkey runs while leveraging the latest free, open- sandbox web environment. A sandbox a version of Linux called Ubuntu, and source operating systems and commu- environment is where a website is pro- Quiet Giant runs a server-specific ver- nity-supported software to provide a ro- totyped on a local network server before sion of Ubuntu, published by Linaro, bust platform for web developers. being published to an expensive public which is optimized for high traffic server I have been running a successful web internet server. Code Monkey includes usage. Nginx is a popular alternative to development business since 2012 with several great Interactive Development Apache, and other Linux distributions

ODROID MAGAZINE 27 MAKING MONEY WITH ODROIDS

such as Debian are also viable for use as Setting up er on the client machine, a request the server OS. MySql is the standard the Network for port 80 is sent to that server, database package for storing persistent Three protocols are used to share which then notifies the web soft- user data, layout and other web infor- resources between the two machines, ware, such as Apache, that a visitor mation relevant to the appearance and creating a robust development envi- is requesting a copy of the site. data storage of the site. ronment paired with powerful server Before installing WordPress, a Quiet Giant comes with MySql capabilities: static IP address for the server needs and Apache pre-installed, along with Samba file-sharing protocol en- to be established so that the client several other services that can be used ables a remote server’s shared direc- and server machines can find each to mirror a production environment, tory to be mounted as if it were a lo- other. To establish the static IP, boot such as DNS, Tomcat and Mail. It is cal hard drive. Quiet Giant includes up the Quiet Giant image, plug in not recommended to expose the sand- a pre-configured Samba server that the ethernet cable, and log into the box website to the internet for security automatically permits sharing of the router admin panel from any other reasons, so it is very important to use a Apache web directory (www), mak- computer on the network. The router with a firewall in order to pro- ing it visible as a mountable drive to ODROID running Quiet Giant can tect the local system from intrusion, any client machine located on the lo- be identified in the router’s client list injection or spying. As a general rule, cal network. by its host name of “odroid-server”. never keep sensitive data on a public- SSH allows remote commands After configuring the DHCP res- facing internet server unless proper se- to be sent to the Quiet Giant server ervation, it may be necessary to re- curity and firewall software is in place from the Code Monkey development boot the Quiet Giant server in order to prevent hacking. ODROID over an encrypted, pass- for the new address to be assigned. The advantages to LAMP develop- word-protected connection. It mim- For more details on creating a static ment are the wide availability of qual- ics the use of the Terminal window on IP, please refer the specific router’s in- ity low- and no-cost software, a stable the server by creating a remote BASH struction manual. OS environment that requires minimal shell that can be used to start and stop Although it may be tempting to use maintenance, and an ability to host the services. In this example, SSH will be a wireless dongle as part of the server’s website on any machine, regardless of used to configure the MySql server be- hardware configuration, a wired eth- the server’s performance profile. For fore Wordpress is installed. ernet connection will give the best the purposes of demonstrating sand- HTTP is the standard web pro- performance, and reduce the amount box development, the Quiet Giant tocol that runs on port 80, and al- of waiting required when updating image will run the same software that lows Apache to listen for incoming files, due to the higher throughput of would be installed on a high-end inter- web traffic. Whenever the web the LAN connection which is up to net server (Apache, PHP and MySql) server’s URL is typed into a brows- 30% faster than wireless. so that, when it comes time to push the site to the data center, there will be no compatibility issues, since the code or XU series can be used, with the XU serve space in the database for Wordpress was developed using the same tools being the best option for the Quiet Gi- content and configuration files. To con- and software packages that are running ant server due to its USB 3.0 ports and figure the MySql installation, log into in the production environment. high-performance A15 cores, and the the Quiet Giant server using the SSH X or U machine serving as the ideal de- protocol by booting up Code Monkey Gathering velopment computer due to their low on the client ODROID and launching a the Equipment cost and portability. If an XU is not Terminal session. The default SSH user- To illustrate the concepts of available, another X or U computer name and password of “odroid”, and a ODROID web development, I chose can be substituted for the server, since server address of 192.168.1.100, will be Wordpress 3.8 as an example Content Quiet Giant has already been ported used in the following examples. Management System (CMS) platform, to every ODROID hardware platform. which will be installed onto the Quiet ssh [email protected] Giant server, and then customized us- Configuring ing Bluefish Web Editor from the sec- the Database Server Start the MySql admin panel after ond ODROID running Code Monkey. For the Wordpress installation to the command prompt appears with the Any two ODROIDs from the X, U function properly, MySql needs to re- following command. The default MySql

ODROID MAGAZINE 28 Making Money with ODROIDs

configuration and installation will be performed using the development ma- chine, and the SSH session to the Quiet Giant server is no longer needed.

Copying the Client’s Website Wordpress, one of the world’s most popular and well-supported Content Establishing an SSH connection to our server Management Systems (CMS), is open- Validating the Samba credentials source and available for free at https:// wordpress.org/download/. It lets The Samba file-sharing protocol -fa developers build professional websites cilitates the installation of Wordpress quickly, while also providing an interface files on the server by mounting the for non-technical people to update web- Apache “www” directory as if it were a site content. Wordpress is very simple local hard drive on the client ODROID. Checking the MySql root user privileges to install, use, and customize, while also After the website is installed, the same offering hundreds of useful add-ons that Samba share allows customization of the easily perform complex tasks such ad ro- layout, styles and other Wordpress code tation, social media integration, image via Bluefish Web Editor. slideshows, video carousels, responsive Using Thunar, copy the files from layouts and much more. inside the newly extracted wordpress Download the Wordpress .tar.gz directory, and paste them into the www package and save it to the ~/Down- shared directory (smb://odroid- loads/ directory on the Code Monkey server/www/). client machine. Decompress the pack- Configuring the MySql server age by right-clicking it in the Thunar File for use by Wordpress Manager and selecting “Extract Here”. To copy Wordpress to the Quiet Gi- username is “root” and the password is ant server, first connect to the server’s “odroid”: shared Samba “www” directory by se- lecting the “Browse Network” option mysql -u root -p’odroid’ on the left side of the Thunar window. Navigate to the “Windows Network” Once the MySql admin panel is -> “WORKGROUP” -> “ODROID- launched, the Wordpress database can SERVER” directory, and click on the be configured: “www” share. The Samba share may also be accessed directly by typing “smb:// mysql> create database word- odroid-server/www” into the Thu- press; nar address bar. Use the default user- mysql> grant all privi- name and password of “odroid” to com- leges on wordpress.* to plete the connection. Copying the Wordpress files to the server “odroid”@”localhost” identi- fied by “odroid”; mysql> flush privileges; Configuring mysql> exit the Wordpress Site Once the files have been copied, launch Now that the MySql database is ready any web browser from the Code Monkey to accept the Wordpress content, start desktop, and type the static IP address of the File Manager program by double- the Quiet Giant machine as the URL (for clicking its shortcut on the Code Mon- Locating the Samba share example, http://192.168.1.100/). key desktop. The rest of the Wordpress The Wordpress welcome screen will ap- ODROID MAGAZINE 29 MAKING MONEY WITH ODROIDS

pear, with a notification that one of the Switch back to the browser and click web server. Making local changes, push- configuration file needs to be created. So on “Run the Install” to access the Da- ing them to the internet server, then con- far, so good! tabase Setup screen. Replace both the stantly hitting Refresh in the browser, username and password with “odroid”, wastes valuable time that is better spent and click “Submit”. customizing the site. By setting up a multi-boxed sandbox environment, the Quiet Giant machine resides behind the local network, and all development can be done directly on its hard drive using the Samba file shar- ing protocol to edit the files from the Initial setup of Wordpress Code Monkey development machine. Since Apache and MySql are used in the To create the necessary wp-config. ODROID sandbox environment, com- php configuration file, open the pre- patibility with any production environ- built example from the Wordpress web ment that offers LAMP is nearly guaran- page by clicking on the “We Got It” teed. File are copied to the server using link, and copying the file contents using the File Manager instead of FTP, result- Ctrl-C. Launch the Gedit Text Editor ing in enormous time savings because of from the Code Monkey desktop, and instantaneous file access. Final setup screen of Wordpress paste the file into a new document using Additionally, the low cost of the all- Ctrl-V. Save the file as “wp-config.php” ODROID development studio means by pressing Ctrl-S, clicking on the “www Customizing that a beginning website business can on odroid-server” link in the left side of the Wordpress Site make money on its first project, with- the Save File dialog, and pressing “Save”. At this point, the Wordpress sand- out having to first recover high startup box development environment is ready equipment costs. ODROIDs also make for use. Many administrative and it very easy to test websites on both configuration tasks, such as adding Desktop and Mobile without the need themes and plugins, can be performed to purchase additional QA tablets, since via the wp-admin interface located at the ODROID is capable of running http://192.168.1.100/wp-admin. both Linux and Android, and support- Advanced developers may want to ing a wide selection of browsers on both customize the site PHP files, located in operating systems. smb://odroid-server/www/, by us- ing the Bluefish Web Editor application to Migrating open the shared Samba directory. Exten- the Website sive tutorials on customizing Wordpress, to a Public Server Once the content of the Wordpress Copying the example wp-config.php Word- downloading themes and plugins, and press configuration file modifying the source code are available website is ready for publication, the at the official Wordpress sitehttps:// site files can be uploaded to the public codex.wordpress.org/Getting_ server either via FTP, or through a stan- Started_with_WordPress. dard cPanel application, depending on the hosting service. Filezilla is available The Sandbox on the Code Monkey image for host- Advantage ing companies that provide access to The ODROID web development the website’s FTP server. If using the multi-boxing setup solves the produc- cPanel interface to transfer the website tivity issue of constantly using FTP to files instead, they may be uploaded di- publish incremental changes to a remote rectly from the Samba share at smb:// odroid-server/www/. Database setup of Wordpress Once the web files have been cop-

ODROID MAGAZINE 30 Making Money with ODROIDs ODROID LINUX TIPS

ied to the public internet server, it’s also shared on the local network at smb:// reboot your necessary to migrate the Wordpress da- odroid-server/spigot/, and can ubuntu after tabase, which contains the site’s content also be modified from Code Monkey us- and custom settings. Connect to the ing any available IDE in the same way installing cpufreq Quiet Giant image via SSH and type the that the Wordpress site was edited. fter installing your CPU gover- nor from Issue 2, have you no- following command: To run Spigot, establish an SSH ses- ticed that your Ubuntu distro sion to Quiet Giant, then type the fol- A hangs when issuing a restart? If so, check mysqldump -u odroid lowing command: your current cpufreq policy by typing: -p’odroid’ wordpress > ~/ Public/www/wordpress-data- cd ~/Public/spigot sudo cpufreq-info base.sql sh ./spigot.sh If your policy is set to anything other This exports a copy of the database to Anyone on the local network may than “performance”, you may have to the file “wordpress-database.sql” on the then play Minecraft on the Spigot server, power cycle your ODROID to reboot. server’s local hard drive. This file may and test out the server’s world by using But don’t worry, you can also just issue then be imported to the public MySql Quiet Giant’s static IP address as the serv- the following command prior to a re- start in order to get the job done: server directly from Apache’s “www” er name. Complete support for custom- directory, which is already available izing and administering Spigot is avail- sudo cpufreq-set -g performance as a shared drive to the Code Monkey able at http://www.spigotmc.org. machine. After the database import is Once the Minecraft server has and bam! Your ODROID is able to completed, the new Wordpress website been customized for public use, fol- restart now. will be identical to the one created in the low the same procedure for upload- sandbox environment. ing as with the Wordpress site, using either Filezilla or cPanel to send the files from the sandbox server to the resize your public site. Using addons, Mine- partition craft players can submit donations id you install a new image on and purchases directly to a PayPal ac- your eMMC card or SD card count, which can cover the cost of the Dand forget to allocate the free public server, and perhaps bring in space on your main partition? You some extra money on the side. don’t need to go through the hassle of disconnecting the card or module and ODROIDs taking it all the way back to GParted for Profit on another copy of Linux. Mauro, one of the Hardkernel developers, created Who knew that a $59 computer a handy script for our convenience: could be a core part of your home web development business? Replacing http://forum.odroid.com/ expensive laptop and desktop com- download/file.php?id=502&sid Working Wordpress Site puters with ODROIDs can save you =842ba747c84c171245591847c5 thousands of dollars in equipment 53b7af costs. Clients who wish to maintain Other Sandbox security while developing their web- Make it executable: Applications: sites can be assured that their product chmod +x resize.sh Hosting will not be available on the Internet a Minecraft Server until it’s ready, thanks to the privacy run it as sudo Quiet Giant is a powerful OS that of the sandbox environment. The also comes with an optimized Minecraft portability of ODROIDs make it easy sudo ./resize.sh server build called Spigot. Spigot is writ- to write software on the go, making it ten in Java, and allows complete custom- an ideal solution for a lucrative mo- Then, reboot your ODROID. Once ization of any aspect of the Minecraft bile software development business. the boot is completed, run the com- server. The Spigot files are automatically mand again to allocate the free space, and you are all set! ODROID MAGAZINE 31 MEET AN ODROIDIAN meet an odroidian Rob roy: chief editor of odroid magazine by Robert Hall

Rob Roy, a frequent contributor to the ODROID forums, was recently selected by Hardkernel to publish ODROID Magazine due to his passion for ARM technology. Currently living in San Francisco, California, Rob has worked in the software engineering industry for over 20 years, with many stories to tell about the early days of computing. He’s been recognized for his innovative con- tributions by many high-profile clients such as PNC Bank, Cleveland Indians, BP, Chevron, PPG, Hyundai, Dolby Technologies, Hi5, and VEVO.

How did you get started with computers? When I was about 10 years old, my parents let me visit with my uncle Jack Heavenly ski trip in South Lake Tahoe 2014 and aunt Eydie in Pittsburgh, Pennsyl- was built into the Apple hardware. vania for a few weeks, as a summer va- When I got home from my vacation, meeting with my uncle, where people cation. Jack was a mechanical engineer, I told my parents exactly what I wanted from all walks of life and backgrounds and used an Apple ][+ and an Apple ][e for Christmas: an Apple //c. My brother got together to speak the same language. in his job to perform stress calculations. and I played games on it, did our home- ODROIDs provide an opportunity for I was very interested in math, and so he work, and even wrote little programs to everyone to learn and experiment with gave me a couple lessons in how to use do simple things like bouncing a pixel ARM technology in a supportive environ- the computer, along with a typing pro- around the screen, or keeping track of ment. The depth of knowledge available gram called Letter Invaders. the shopping list for the week. We later in the forums, and the worldwide appeal That weekend, he took me to a lo- got an Amiga 2000, which was a very ad- of ODROIDs, bring back that feeling of cal Apple Bytes enthusiast club, where I vanced computer for its time. I attended something exciting about to happen. I got to meet a lot of really smart and fun Carnegie Mellon University, where I think that ODROIDs herald a new revo- people who shared a common interest of had access to a Cray YMP through my lution of affordable home computing, exploring the possibilities of these revo- on-campus job, and got to explore the which is a long-awaited breath of fresh air lutionary new home computers. It was early internet, when it was only used by for the technology world. absolutely amazing what could be done a handful of universities, before HTTP with 64KB of RAM and 113KB 5-¼” was invented. What other interests and hobbies do floppy disks back then. After the meet- you enjoy? ing, I played the game Ultima 3 non-stop What do you like most about the I have been a vegetarian for almost for a few days, then started learning BA- ODROID community? 20 years, and follow a living foods diet. SIC from my uncle, since the language It reminds me of that first Apple Bytes For those who are curious about what a

ODROID MAGAZINE 32 MEET AN ODROIDIAN

ner to customize. The forums were sup- portive of experimentation, and other ODROID contributors inspired me to want to learn more. For my web business, I decided to use the official Linaro 12.04 image which came with the standard Unity desktop. I started hacking away on the command line until I got rid of all of the warnings and errors in the kernel log. Then, I installed Synaptic and configured every desktop environment that I could find, and downloaded all of the equivalent Linux programs to those that I had used in Windows. Throughout the process, there were many software obstacles that living foods diet consists of, I have many RISC-based machines in college. That required research, questions, and perse- free and original gourmet recipes available led me to research and buy the most verance in order to achieve a completely at http://icaneatraw.blogspot. powerful ARM board that I could find, stable environment. I really learned a com. I also enjoy almost any type of ex- which happened to be the ODROID- lot about Linux from that experience. ercise, including running, skiing, swim- X2. After seeing what it could do, I set After learning that I could copy an ming, biking and martial arts. I earned a a goal for myself to completely replace image using the “dd” command, I pub- second-degree black belt in Hapkido after my Windows XP machine with my new lished my first pre-built OS called Fully college, and just recently came back from ODROID, while still doing everything Loaded, which included several desk- a ski trip with my girlfriend at Heavenly that I used to do in Windows, by in- top environments such as Unity, KDE in South Lake Tahoe. I do a hot springs stead using Ubuntu and Android on my Plasma, LXDE, Gnome and Xubuntu. retreat at least once a month, to relax and X2. After that, I was encouraged to create a enjoy the beautiful California Redwoods. When I got my first ODROID, I few more images for my own personal knew next to nothing about Linux, use such as Pocket Rocket and Whisper, What motivated you to produce the OS coming from a Microsoft and Apple and realized how easy it was to share images available on the forums? background, so I kept reading and ask- what I had done with others. I run a web development company ing questions on the ODROID forums. I currently offer more than a dozen from my home office, and I was looking I wanted to tweak the Linux OS to be images to the ODROID community, to replace my trusty 2008 HP laptop more like my old Windows XP envi- and receive PayPal donations from with something more modern and por- ronment. I tried an ODROID port many community members who ap- table. I read an article on Wired about of Slackware, which was graphically preciate the time and effort that I put the Raspberry Pi, and remembered using fast, but very challenging for a begin- into making them. I very much enjoy interacting with people from around the world, and by learning more about Linux, I’ve been able to help others find new ways to use ODROIDs to fit their needs.

Rob Roy’s ODROID software contribu- tions may be downloaded for free from http://oph.mdrjr.net/robroy- hall/.

The Ultimate ODROID Setup: U3, XU, Q2 and a Smart Power module, along with a cute miniature robot

ODROID MAGAZINE 33 THANK YOU FOR READING!!! Thank you This magazine issue ended you can now stop reading....

Okay...

Wait a minute... where is the cover article?

Okay, okay so, by popular demand and because you probably skipped ahead to read about how to play all the cool games on the front cover…

ODROID MAGAZINE 34 lINUX GAMING Linux Gaming on ODROID The right system for your games (part Two) by Tobias Schaaf

ast month, I presented and well on the ODROID. discussed many of the differ- It runs the famous ent emulators available for the Monkey Island L ScummVM, a testment to the ODROID platform. I compared some series: classic age of point and click of them and showed what the differences And other adventure games with compel- are, and how the emulators have evolved classics such ling stories great 16bit art and over the years. If you are unsure where as Day of the an ambience that even the most to find the games you want to play, or Tentacle, The die hard indie developers are choosing what system to pick for your Dig, Beneath still struggling to recapture for gamers worldwide games, this article will help you find a Steel Sky, and some answers. Broken Sword: More Choosing the right informa- system for your tion about favorite game genre There are plenty of genres to choose from, but which system is best for which genre, and what Amiga games. So, there is no games for your genre exists for need to consider the console which system? If you read my Adventure ports, since the same last article, you know that, for games are most likely available for example, you won’t find ad- ScummVM, which also supports venture games for the MAME different versions of the same or NeoGeo emulators, but where game. This means that you do you find them? What system of- can even play the original fers the best racing games, and which Amiga version of Monkey has the best strategic games? Island or the Mac OS ver- Since there are many genres and ScummVM sion of Day of the Tentacle many systems to play on, this will be can be found directly on ScummVM. once again reflect my personal prefer- here: http:// ences, is based on my own experiences. scummvm.org. Action There are many There are many Action subgenres Adventure awesome Adventure games available for such as shooter, fighting games, beat ‘em If you want to play adventures, you the ODROID, and you can play them up, side and top down scrollers. If you should definitely go for ScummVM! with either mouse, keyboard, joystick or look into the gigantic MAME library ScummVM is an awesome piece of gamepad. There were some adventures and my personal favorite, the NeoGeo, work. There are tons of Adventure games available for console systems, but they you will find hundreds of Action games. and ScummVM just plays them very are mostly ports of the original PC or Some notable examples include the Met-

ODROID MAGAZINE 35 LINUX GAMING

Jump ‘n Run Need to make your blood boil, or Platformer sharpen your reflexes and wish Although it’s easier to to complete your DIY arcade associate Adventure and controls? So, look no further than MAME games, with the Action games with spe- added benefit of not having to cific emulators and sys- spend bags and bags of quarters tems, it’s more difficult to deter- to end those darned difficult mine which platform to use when games. looking for Platformer games to play, as they are available for every system. ported to other Platformers, also known as Jump ‘n platforms. They Run, is an extremely popular and time- are generally some- less genre. Classics such as Earthworm what easier than the Jim, Turrican, Aladdin and Asterix are arcade originals, so if rewritten for each new console as either you want the original modernized versions or faithful remakes gaming experience, of the originals. I strongly recom- But how can you find a specific Plat- mend MAME former game that you’re looking for? emulation. Nearly every big Disney production al Slug Other con- has its own Platformer or Jump ‘n Run, Series, 1944 - The Loop sole systems of- along with many other cartoons from Master, Blazing Star, Gun fered quality action the 90s, such as Aladdin, Lion King, As- Force 2, King of Fighters Series, games too, such as the and Last Blade 2: Jungle Strike and Desert If you really like fast action Strike series which were available for sev- games, beat ‘em up, action scrollers and eral systems such as Amiga and SNES. shooters, these games are what you’re Another well known series is the infa- looking for, and ODROID does a really mous Mortal Kom- good job with this genre. The best part bat games, which is that most of these games are made for is a brutal fight- two or more players, so that you can play ing emulator with a friend on your ODROID and en- not suit- joy these kind of games together. able for There are many action games avail- children able for all of the major consoles, due to its and most of the games that exists for extreme vio- MAME and NeoGeo lence and re- were subsequently alistic blood ef- fects. One of the games that made the ESRB rating exist, but was loved by kids everywhere: Mortal Kombat

A little reminder of 90’s-era terix, Tiny Toons, BatMan, Spi- American endeavors to keep a derMan, X-Men, Mickey, Kirby, changing world at peace: Donkey Kong, and so on. the “Strike” series. Up until the GameBoy Advance (GBA) these types of games were very common, but on newer generations of consoles, such as the PlayStation 1 or the

ODROID MAGAZINE 36 LINUX GAMING

The 16-bit console era will always be remembered by its egy genre include Free He- many mascots that shaped the roes 2, Battle for Wesnoth, gamer’s imagination, and kept us in love with those heroes in Zod Engine, Advanced Strate- updated forms gic Command, Crimson Fields, OpenXCom, Jagget Alliance 2, Unknown Horizons and Widelands. with a mouse If you’re looking for strategy games, and keyboard. it’s rather easy to find good games that For these types run directly on Linux, and with an of games, a native ODROID, you have plenty to choose Linux program in- from. You can experience your old fa- stead of an emu- vorites with games such as Zod Engine, lator provides OpenXCom, Jagget Alliance 2, or you the most can try new original games such as Battle interactive for Wesnoth. There are a lot of games in experience. the Debian and Ubuntu software reposi- PlayStation Portable, there are I re- tories, as well as some that I the andcre- fewer versions of the classic Plat- ally love those ated and posted online in my repository formers. So, the best experience for very early strat- the jump ‘n run genre will be found egy games. I spent with the NES, SMS, Genesis, SNES, weeks finishing all and GBA emulators. the levels of Dune 2 when it first came There are some great Action games out, and today there are some really nice on the Amiga as well. Back in the day, remakes such as Dune I really enjoyed a game called FlashBack Legacy. which was interesting because it offered There is an abun- Careful strategy, resource lots of different sceneries and tasks. dance of Strategy control, learning to adapt quickly FlashBack is considered a more “mature” games that run to changing situations, platformer, and also exists for other sys- natively on and thinking about the con- tems such as the SNES. It was even re- Linux. Some sequences of your actions. If cently remastered for PCs again with a are remakes you have ever played a strategy game, you know what we are modernized look. from old classics, talking about and some are new Strategy games that exist Strategy games are not very common for Linux and around consoles, but there are a few other systems. games such as Final Fantasy Tactics Examples of or Advanced Wars. the Strat- However, those games are nothing compared to the real strategy games found for PC (or some for Amiga as well), and as their name suggests, they are more about tactics than real strategy. Games such as Dune 2 (the original RTS), Command and Conquer, and round based strate- gy games such as Battle Isle and His- toryline 1914-1918 are hard to find on consoles, since they are played best

ODROID MAGAZINE 37 LINUX GAMING mentioned at the beginning of this ar- ticle. So, if you like strategic games like I do, you will love playing them on an ODROID in high definition.

Racing Although it’s not my fa- vorite genre, I used to play some of the racing games, and it really is a matter of personal preference. If you like the old 2D clas- sics, such as the OutRun se- ries, or the Lotus series, or the all famous Mario Kart, then the SNES, Amiga and Sega Genesis emulators will offer the most From the technically focused choices. There are also sev- games like Gran Turismo to just eral bird perspective racing plain fun ones like Mario Kart, games like the old Micro racing games put our com- Machines racing games. petitive instincts in motion, and make us want to become good You can also play more enough to finish in 1st place. titude of add-ons modern racing games on the available for the PS1 or the PSP, such as the 3D game. You even can racing games Gran Turismo and have old trains from the Asphalt: Urban GT 2. 19th century. clones of the Civilization and the Colo- The Genesis also has some racing What other simulation games exist nization series. I also enjoy playing the games with good looking graphics and for the ODROID? Some of them run original Colonization on the Amiga be- catchy music, and the PS1 and PSP offer on emulators, such as Theme Park for cause of its awesome music and enter- several famous series such as Need For the Amiga and SNES. taining graphics. Speed and Gran Turismo. Many simulation games exist as na- There are some exceptionally well- tive Linux ports. Examples include done 3D space simulators available on Simulation Widelands, a clone from the old Settlers the ODROID. The FreeSpace series, Simulations such as CrosixTH series, and Unknown which I loved to play on the PC, runs or OpenTTD can run directly on Horizons, which is great on the ODROID. It has stunning Linux for the ODROID with- similar to the Anno graphics, engaging gameplay, and is a re- out an emulator. Just five more minutes! How series. FreeCiv ally big game! There are huge destroyers I love Corsix TH! It’s many times have you told and FreeCol are in the game that are literally a thousand very fun to see many crazy yourself that when playing an times bigger then your space fighter. engrossing board or computer The best place to look for your favor- illnesses you can discover game, only to be surprised when and cure, and the game the sun comes up? ite simulation games is the Software has some lovely animation. Center included with your Linux I also really like OpenTTD. I distribution. played the original Transport Ty- coon on my first DOS-based PC. It was awesome to see all that money flowing in, and I re- ally wished it was that easy in real life. OpenTTD is unique because of the online feature, and the mul-

ODROID MAGAZINE 38 LINUX GAMING

Role Playing Games I also enjoy paying “Riviera – The (RPG) Promised Land”, which has a very deep Role Playing Games is actually one of story and a great fighting style as well. my favorite genres, and there are quite a I recently found out that Riviera was lot of RPGs available, with way too many remade for the PSP, which has pretty to mention them all. Some highlights much the same graphics with improved include the now famous Final Fantasy effects and voice acting as an improve- saga, the Tales series and Chrono Trigger. ment over the GBA version. I also rec- Although NES, Sega and SNES offer a ommend some of the well-done Dragon few great RPGs, such as Link of Zelda, Ball Saga games for Secret of Mana and Earthbound, but the GBA. RPGs have evolved over the years. I mainly rec- ommend the As I mentioned in my previ- The Jedi Knight games are not ous article, GBA, PS1 pure FPS but as we all know, it’s and PSP just more fun to slice the enemy emulators up with your light saber! on GST if you enjoy RPG games.

Conclusion As you can see, the ODROID offers Irrefutably bounded to Japanese many options when it comes to games. anime, RPG will take you to There are quite a few more sub-genres wonderous journeys that will kept you wanting than those detailed here, such as sport one more gaming sequel! First games like soccer and tennis, puzzle Person games, and other games such as Harvest Shooter Moon which are hard to fit into any of (FPS) the main genres. You won’t find With the ability to emulate many dif- many, if at all, FPS games on the first gener- ferent systems on the ODROID, you have ation of video consoles such as the NES and the world of gaming at your fingertips, so SNES. However, titles such as Battlefield 3, grab your controller, mouse and keyboard, Battlefield 4 and Call of Duty, all of which and see how well you can do on that big TV newer emulators equals bigger ROM are available for current Xbox and PlaySta- of yours! sizes which equals more content, result- tion consoles, are proof that people like to ing in better looking games. play FPS games on console systems. Ultimately, I prefer the GBA for RPG As a side note, I never understood the Tobias, a long-time contributor to the games, especially the Summon Night se- attraction of playing an FPS game on a ODROID forums and Linux Gaming ries. I really love its fighting style, which console. It’s called “point and shoot”, columnist, produces a popular Gam- is rather rare for a Role Playing Game. not “swirl around and shoot”, and the ing OS called ODROID GameSta- tion Turbo with XBMC, available You actually have to fight your enemies mouse is a natural pointing device for free download at http://oph. in real time with different weapons, and whereas a gamepad is not. Apparently mdrjr.net/meveric/images/. GST you jump, block and force them back a lot of console gamers do not share my offers many gaming console and sys- while using a set of spells. It’s all very opinion, but that’s fine. tem emulators for the X and U series, fun to play, especially since the game Anyway, the ODROID offers some along with a custom build of XBMC permits forging special weapons of dif- nice FPS titles as well, such as Quake 3 designed specifically for gamers. He ferent types with unique attributes, de- Arena (Open Arena) or World of Padman maintains a repository of many of his pending upon the Materials used. All of which offer fast multiplayer action on the favorite classic games at http://oph. this adds up to great gameplay, especially ODROID. We even have some very nice mdrjr.net/meveric/repository/. for a game from that era. exotics such as the Jedi Knight series.

ODROID MAGAZINE 39