Project 1 Setup. Some relevant details are the output of: 1. uname -a 2. cat /etc/*release 3. whereis java 4. java -version 5.

Similar documents
WES 237A Project Part 1 Guide

User Guide Yocto Linux. Board Support Package For Intel Quark

P6: Trial Build of a ROM Nikhil George. 1. Introduction. Overview of the build task. Cite the build/ wiki articles you read.

Ingenic. Newton Android Development Guide

DEVELOPMENT GUIDE VAB-820. Android BSP v

DEVELOPMENT GUIDE VAB-630. Android BSP v

DEVELOPMENT GUIDE VAB-630. Linux BSP v

DEVELOPMENT GUIDE AMOS-825. Android BSP v

Mars ZX3 Android manual. Antmicro

DEVELOPMENT GUIDE VIA VAB-820. Android BSP v

CSE 237A. Prof. Tajana Simunic Rosing HW #1. Due: January 20th, 2011

Android ROM Porting: A Review

Building a ROM for Android on Ubuntu in Virtualbox

QUICK START GUIDE VAB-600. Android BSP v

Initial setting up of VPN Java version.

ALTA DS 2 ARTiGO A900 VAB-1000

Complex Text Rendering

Zephyr Kernel Installation & Setup Manual

Welcome to Kmax Installing Kmax

Installation of the PLCnext Technology SDK and Eclipse

Lab 5: Android Development Environment

Lab 6: OS Security for the Internet of Things

Lab 6: OS Security for the Internet of Things

Tizen TCT User Guide

QUICK START GUIDE AMOS-820. Android BSP v

Cubieboard4 Linux Sdk Guide TF BOOT & TF WRITE EMMC. Website: Support:

Installing Ubuntu 8.04 for use with ESP-r 8 May 2009 Jon W. Hand, ESRU, Glasgow, Scotland

Android SDK under Linux

Manual Java Update Mac Developer Package

Android Studio Setup Procedure

Lab2 - Bootloader. Conventions. Department of Computer Science and Information Engineering National Taiwan University

Parallel Programming

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

Installation Instructions

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on fresh installations of. ubuntu desktop-amd64.

Multicore Programming Handout 1: Installing GCC Cilk Plus

Introduction to Pintos. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

MAGPIE Installation Guide (version 1.0)

Installation of Apache OpenMeetings on Ubuntu LTS. This tutorial is made based on a fresh installations of

Installation Instructions

Manual Java For Mac Developer Package

This tutorial will guide you how to setup and run your own minecraft server on a Linux CentOS 6 in no time.

How To Install Java On Linux Ubuntu >>>CLICK HERE<<<

manifold Documentation

How To Install Java Manually Linux Ubuntu Bit

MariaDB ColumnStore C++ API Building Documentation

Aware IM Version 8.1 Installation Guide

Building Tizen Development Environment

Ubuntu Manually Mount Cdrom Drive Command Line Vmware

CROSS-PLATFORM UTILITIES (CXUTILS) LIBRARY 2.0 USER DOCUMENTATION

Zephyr 4.6 Installation on RedHat Enterprise 5/6 Linux 64-Bit

2 Installing the Software

Formatting 1. Commands starting with $ are Linux console commands on the host PC:

Tensorflow v0.10 installed from scratch on Ubuntu 16.04, CUDA 8.0RC+Patch, cudnn v5.1 with a 1080GTX

You should see something like this, called the prompt :

A Kernel Compiling Adventure By Grant Nelson

Intel Do-It-Yourself Challenge Robotics Hello World

Operating Systems Lab 1. Class topic: Installation of the operating system. Install Ubuntu on Oracle VirtualBox

Tutorial on Basic Android Setup

Android Sdk Install Documentation Eclipse. Ubuntu >>>CLICK HERE<<<

Ios Sdk Documentation For Windows 7 32 Bit Full Version

Building Tizen Development Environment

Best Practice for Tizen Platform from Code to Device. Zhang, Qiang Chen, Gui (Intel Open Source Technology Center)

HCFFT Documentation. Release. Aparna Suresh

Software Installation Guide 2.4

CROWDCOIN MASTERNODE SETUP COLD WALLET ON WINDOWS WITH LINUX VPS

Intermediate Programming, Spring Misha Kazhdan

TrinityCore Documentation

Jdk Linux Ubuntu Bit Desktop Iso >>>CLICK HERE<<<

IT-G400 Series. Android 6.0 Quick Start Guide. This document is a Development Guide Book for IT-G400 application developers. Ver 1.

Quick Start Guide for BeagleBone. Table of Contents. by Brian Fraser Last update: Sept 24, 2017

xpress Release Notes

Running Java Programs

How to install Java Virtual Machine on Debian 7 GNU / Linux

Tool installation for PMC-MC-X2/X4 with P2020 series processor

EE516: Embedded Software Project 1. Setting Up Environment for Projects

Linux Essentials Objectives Topics:

Systems Programming and Computer Architecture ( ) Exercise Session 01 Data Lab

CPW AutoGrader. CSCI 370 Field Session 2016 June 20, Client: Christopher Painter Wakefield

SAROS MasterNode Guide V1.1

Infoblox Kubernetes1.0.0 IPAM Plugin

CHAPTER III PLANNING

Android. Separated Kernel build might break the Android build process. Toolchain

JPA - INSTALLATION. Java version "1.7.0_60" Java TM SE Run Time Environment build b19

Part 1: Installing MongoDB

Installing MediaWiki using VirtualBox

Embedded Linux. A Tour inside ARM's Kernel

Lab00: Software Environment Setup

Dixicoin (DXC) Masternode Guide for VPS

Contents 2. Contents

Configuring and Building Palacios/Linux

NVIDIA CUDA GETTING STARTED GUIDE FOR LINUX

Downloading and installing Db2 Developer Community Edition on Ubuntu Linux Roger E. Sanders Yujing Ke Published on October 24, 2018

CS 170 Java Tools. Step 1: Got Java?

IOL INTACT Installation Guide

Standard Edition (SE) application development Enterprise Edition (EE) enterprise development Micro Edition (ME) Internet of Things (IoT) development

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Relarium (RLM) Masternode Guide for VPS

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Installing Eclipse (C++/Java)

Transcription:

Project 1 Setup The purpose of this document is to help you to prepare your development machine for the project by: 1. Installing any missing tools 2. Setting up required environment variables and paths If any step stops prematurely and shows an error message, do not proceed forward. Log your error message and read the error message. Some common errors can be figured out with a quick web search. If you need assistance, be sure to include your error message and the following details, when posting on the class discussion board or when emailing the TA. More specifically, when you raise a question on piazza, please upload the packages.txt along with the output of the following commands. This way we can debug your problem much faster. Some relevant details are the output of: 1. uname -a 2. cat /etc/*release 3. whereis java 4. java -version 5. echo $PATH Also, run this command $ dpkg --get-selections > packages.txt Giving the model number of your laptop would also be good. If you are new to working in a linux environment, please be sure to take the time to learn some basics on your own. This class assumes that all students are comfortable with C development on Linux. Host hardware and software requirements 1. Intel ISA, 64 bit machine (x86_64) is required. If you do not own a Intel based 64 bit m/c, you can use one in the CSE department s embedded systems lab. 2. This guide was tested on a machine running Ubuntu 64-bit 10.04. It may not work correctly for other versions of Ubuntu. Please note, the iso for this ubuntu version is referred as 64-bit PC (AMD64) desktop CD.

3. We recommend sun s java, i.e. Java(TM) SE Runtime Environment and not openjdk, i.e. OpenJDK Runtime Environment. 4. For certain commands root access through sudo command is required. 5. The repository alone (source code and binaries) will need at least 40 GB. Depending on the restrictions of the ubuntu installer you are using, it may be a wise move to allocate space for work_folder in a different partition (a disk space of at least 40 GB for this partition). So overall, 40GB for work_folder and an additional 15 GB for the root partition of Linux (ubuntu). Ubuntu 10.04 versus Ubuntu 12.04 vs Embedded Systems Lab - What should I do? 1. As specified earlier, queries with regard to cross-compiling on 10.04 ubuntu (not 12.04) is what we are going to support. 2. Please use embedded systems lab if your are not able to install 10.04 on your system. 3. You can continue to use embedded systems lab for other assignments too. 4. The cross-compiler you will build as part of first assignment may be needed throughout the quarter. In other words, cross-compiler setup is a must. Either you should have it on your personal laptops or in the embedded systems lab. 5. The requirements for being able to connect your mobile to your laptop are different, and more on that will follow in the next assignment. Requirements for future assignments TBA Ubuntu installation Refer http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows. Preferably use this installer for installing on systems with windows is pre-installed - http://www.pendrivelinux.com/ For the iso file refer - http://releases.ubuntu.com/lucid/ You will have to use - 64-bit PC (AMD64) desktop CD (which is nothing but ubuntu for 64 bit Intel ISA - x86_64)

Once you have a working Ubuntu ready, carry out the following. Install necessary packages $ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" $ sudo apt-get update $ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc Setting up java We recommend sun s java and not openjdk. Following are the steps to install sun s java and set it as your default java. $ mkdir myjava Go to oracle website and register for account - http://www.oracle.com/index.html Once registered go to this page http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archivedownloads-javase6-419409.html and download the latest of Java SDK 6 (from the oracle website) to myjava directory. Note: Change the following steps based on the name of the downloaded java bin file and the name of the generated folder. Now, here are the actual steps for installation of java /myjava $ chmod +x jdk-6u33-linux-x64.bin $ sudo./jdk-6u33-linux-x64.bin $ sudo mv jdk1.6.0_33 /usr/lib/jvm/ Now, make sun s java (or oracle s java) as your default java $sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_33/bin/java 1 $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_33/bin/javac 1 $ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_33/bin/javaws 1

$ sudo update-alternatives --config java $ sudo update-alternatives --config javac $ sudo update-alternatives --config javaws To check the java setup run $java -version Note: Among other things the output should say Java(TM) SE Runtime Environment and not OpenJDK Runtime Environment. Note: The number 1 in the end was chosen so that the priority of sun s java is higher than openjdk. The number has to be changed depending on the priority of openjdk, in case you also have open jdk on your system. Download the repository To download the source code (about 1GB, so plan accordingly), do the following: $ sudo apt-get -y install git-core $ mkdir mybin $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/mybin/repo $ cd mybin $ chmod a+x repo $ export PATH=~/mybin:$PATH Note: The repository may need up to 40GB disk space. Depending on the restrictions of the installer, it may be a wise move to allocate space for work_folder in a different partition (space of at least 40 GB). $ mkdir work_folder $ cd work_folder $ repo init -u git://codeaurora.org/platform/manifest.git -b ics_chocolate -m M8260AAABQNLZA30135.xml --repo-url=git://codeaurora.org/tools/repo.git (At this point a.repo directory should be present in the work_folder) Next,

$ repo sync -j4 ( or j8 depending on the number of cores on your Linux machine) If this download is interrupted, you may continue where you left off by running the last command again. FAQ for repo download: 1. Error of the type xyz does not exist. Stop Disk space issue 2. Downloaded the repository to a wrong location? Can continue by substituting work_folder name in subsequent steps with the name of the download location/directory. However, please no not try to move the repository from one directory to another. That will most likely not work. 3. Plan to start from scratch? If you plan to start the download from scratch, just delete the work_folder. Any other repo related folders or files can be deleted (including.repo ), other than the actual repo utility. Additionally, please check the make clean related note I have put, in the compilation section of this document. 4. Errors saying xyz killed Turn off the 'idle sleep' OR allocate more memory space in VM. Wrt. a real machine if your RAM size is small then hard luck. 5. Repo utility update Sometimes the repo init command may suggest for an update to repo. Follow the instructions as suggested, to replace the older repo version with the new one. Apply a patch and place a required library file $ mkdir patches $ cd patches Download the patch file 0001-patch-for-CAF-and-device-build.patch from the class website. Download libtime_genoff.so file from TED (for cse237a). /work_folder/device/qcom/msm8660_surf $ patch -p1 < ~/patches/0001-patch-for-caf-and-device-build.patch $ cd work_folder

$ mkdir out/ $ mkdir out/target/ $ mkdir out/target/product/ $ mkdir out/target/product/msm8660_surf/ $ mkdir out/target/product/msm8660_surf/obj/ $ mkdir out/target/product/msm8660_surf/obj/lib $ cp ~/patches/libtime_genoff.so out/target/product/msm8660_surf/obj/lib/ Compile the tool chain To configure and compile the source code, do the following: /work_folder $ source build/envsetup.sh $ choosecombo 1 msm8660_surf eng $ make -j4 ( or j8 depending on the number of cores on your Linux machine) (This command takes multiple hours to finish, so make sure your host machine is ready to do this before executing.) It is important that you should not get any errors in this step. Note: If you perform a make clean make sure you recreate the out/* directories and place the.so file again, as specified before. FAQ for compilation IMPORTANT NOTICE: Following commands are not essential. In fact they can complicate the setup. So fire them only if you face issues during compilation (i.e. in the make step), and do not see any other way to proceed further. 1. For errors of the type - unknown architecture `armv7-a' $ sudo apt-get upgrade 2. For errors of the type - /bin/bash: jar: command not found $ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_33/bin/jar 1 3. For errors wrt. javadoc, $ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_33/ bin/javadoc 1 Cross compile the test C file $ mkdir cross_compile

$ cd cross_compile copy test.c and agcc.v2 from the class website into this directory $ chmod a+x agcc.v2 $ export PATH=~/work_folder/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin:$PATH $./agcc.v2 -o test.out test.c To check whether cross-compiling has worked: $file test.out Output should be something like test.out: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped About submission Submit test.out through TED. &&&&&&&& Please follow piazza for more details. &&&&&&&&&&&&