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

Similar documents
Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Introduction to Linux

Introduction to Linux

Introduction: What is Unix?

Introduction to Linux

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

CISC 220 fall 2011, set 1: Linux basics

Linux Operating System Environment Computadors Grau en Ciència i Enginyeria de Dades Q2

Introduction to Cygwin Operating Environment

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Mauro Ceccanti e Alberto Paoluzzi

Perl and R Scripting for Biologists

Introduction to Linux. Fundamentals of Computer Science

Lezione 8. Shell command language Introduction. Sommario. Bioinformatica. Esercitazione Introduzione al linguaggio di shell

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Exercise 1: Basic Tools

CSE 391 Lecture 1. introduction to Linux/Unix environment

CSE 391 Lecture 1. introduction to Linux/Unix environment

CSE 390a Lecture 1. introduction to Linux/Unix environment

Lab 1 Introduction to UNIX and C

EECS2301. Lab 1 Winter 2016

Introduction of Linux

Welcome to getting started with Ubuntu Server. This System Administrator Manual. guide to be simple to follow, with step by step instructions

UNIX. The Very 10 Short Howto for beginners. Soon-Hyung Yook. March 27, Soon-Hyung Yook UNIX March 27, / 29

CS 307: UNIX PROGRAMMING ENVIRONMENT KATAS FOR EXAM 1

Operating Systems. Copyleft 2005, Binnur Kurt

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Operating Systems 3. Operating Systems. Content. What is an Operating System? What is an Operating System? Resource Abstraction and Sharing

Unix Handouts. Shantanu N Kulkarni

Introduction to the Linux Command Line

Chapter-3. Introduction to Unix: Fundamental Commands

Introduction to Linux Basics

Parallel Programming Pre-Assignment. Setting up the Software Environment

Linux at the Command Line Don Johnson of BU IS&T

Unix Introduction to UNIX

3/8/2017. Unix/Linux Introduction. In this part, we introduce. What does an OS do? Examples

Linux Shell Script. J. K. Mandal

CS Fundamentals of Programming II Fall Very Basic UNIX

Using Linux as a Virtual Machine

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Lecture 1. A. Sahu and S. V. Rao. Indian Institute of Technology Guwahati

The Unix Shell & Shell Scripts

Introduction to the UNIX command line

EECS 2031E. Software Tools Prof. Mokhtar Aboelaze

Practical Computing-II. Programming in the Linux Environment. 0. An Introduction. B.W.Gore. March 20, 2015

Linux/Cygwin Practice Computer Architecture

Introduction of Linux. Huang Cheng-Chao Dept. of Comput. Sci. & Tech. East China Normal University

Linux & Shell Programming 2014

Introduction to Unix: Fundamental Commands

CS 215 Fundamentals of Programming II Spring 2019 Very Basic UNIX

Introduction to Supercomputing

Introduction to UNIX I: Command Line 1 / 21

CENG393 Computer Networks Labwork 1

CS CS Tutorial 2 2 Winter 2018

INF322 Operating Systems

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

Overview of Unix / Linux operating systems

Lab 1: Introduction to Linux Networking

Introduction to Linux Environment. Yun-Wen Chen

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Development Environment Embedded Linux Primer Ch 1&2

Introduction to Unix and Linux. Workshop 1: Directories and Files

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

UNIX COMMANDS AND SHELLS. UNIX Programming 2015 Fall by Euiseong Seo

CMSC 201 Spring 2017 Lab 01 Hello World

Linux Systems Administration Getting Started with Linux

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Basic Unix Commands. CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang

Projects and Environment Introduction

CMSC 201 Spring 2018 Lab 01 Hello World

User Guide Version 2.0

Virtual Machine. Linux flavor : Debian. Everything (except slides) preinstalled for you.

Introduction to Unix The Windows User perspective. Wes Frisby Kyle Horne Todd Johansen

Linux Training. for New Users of Cluster. Georgia Advanced Computing Resource Center University of Georgia Suchitra Pakala

Introduction to UNIX command-line

INTRODUCTION TO LINUX

CS 300. Data Structures

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Lab 1 Introduction to UNIX and C

Intermediate Programming, Spring Misha Kazhdan

Lecture 3. Unix. Question? b. The world s best restaurant. c. Being in the top three happiest countries in the world.

Introduction to remote command line Linux. Research Computing Team University of Birmingham

Organization of a computer

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

Operating Systems and Using Linux. Topics What is an Operating System? Linux Overview Frequently Used Linux Commands

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

Introduction to Linux

Unit 10. Linux Operating System

CHE3935. Lecture 1. Introduction to Linux

Development Environment & Linux Guide

CS246 Spring14 Programming Paradigm Notes on Linux

CSCI2467: Systems Programming Concepts

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Unix Workshop Aug 2014

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Session 1: Accessing MUGrid and Command Line Basics

CMSC 104 Lecture 2 by S Lupoli adapted by C Grasso

Bioinformatics? Reads, assembly, annotation, comparative genomics and a bit of phylogeny.

Chap2: Operating-System Structures

Introduction to Unix. University of Massachusetts Medical School. October, 2014

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Transcription:

EE516: Embedded Software Project 1. Setting Up Environment for Projects By Dong Jae Shin 2015. 09. 01.

Contents Introduction to Projects of EE516 Tasks Setting Up Environment Virtual Machine Environment Ubuntu Linux OS Installation Environment for Development Tasks 1. Shell Script 2. Simple C Programming 3. Makefile Report Problems Source code submission & Screenshot General Grading Policy

Introduction to Projects Project 1: Setting up Environment for Project Development Project Project 2: Linux Fundamental Project 3: System Call and Synchronization Project 4: File System Project 5: Device Driver for Embedded H/W Especially, including BeagleBoard Development 3

Environment Overview Through this course,,, We will use Ubuntu LINUX as the base OS for the projects. Do we need new machine for Ubuntu LINUX? We usually use Windows OS for our own machine The answer is NO! We have Virtual Machine Environment! Such as VMware Player 4

Environment Overview What is Virtual Machine Environment? Software Stack of Virtual Machine Environment Ubuntu (Guest OS) Others (Guest OS) VMware Player (Virtualization Layer from VMware) Host OS (e.g. Windows) (Your host OS installed on the machine) Physical Resources of Your own machine (CPU, MEM, STORAGE, NETWORK..) 5

Install Virtual Machine Monitor Virtual Machine Environment Download VMware Player (https://my.vmware.com/web/vmware/free#desktop_end_user_computing /vmware_workstation_player/12_0) or (http://core.kaist.ac.kr/~djshin/vmware-player-12.0.0-2985596.exe) Depends on your OS Windows-64bit Linux-64bit You need 64-bit Operating System. If you don t have, please contact TA. 6

Install Virtual Machine Monitor Install VMM Install the product following the instructions of the installer Installation Path Enter your e-mail Run VMware Player 7

Install Guest OS We ll use Linux OS for Guest Linux made by Linus Torvalds in 1991 Free software for replacing Unix Many usages - servers, desktops, mobile devices(android) Linux Distributions Operating Systems based on Linux Kernel Linux Kernel : Core of Linux Scheduling, File System, Device Drivers System Software : Compilers, Libraries, User Interface User Program : Office, DB, Web Server, Web Browser, Mail 8

Download Ubuntu Linux Install Guest OS http://www.ubuntu.com/download/desktop ubuntu-14.04.3-desktop-amd64.iso or http://core.kaist.ac.kr/~djshin/ubuntu-14.04.3-desktopamd64.iso 9

Install Guest OS Create your own Virtual Machine Select New Virtual Machine Downloaded File Path Login Password 10

Install Guest OS Virtual Machine Properties Disk Size : 20GB is enough Need free space in HDD Main Memory Size for VM more than 1GB Number of processor for VM 11

Initialize Ubuntu Desktop Install Guest OS it takes several minutes. log-in with your password open terminal (ctrl + alt + T) 12

Install Guest OS Get root account & password root account : the highest level account for administrator It is needed when change system configuration install programs execute system-level program cannot reboot create root password you are the root now 13

Shell Script Shell A command line interpreter Accepts input from the user Executes the command that is given Types of Shell Command Line Interface (CLI) shell Based on text Graphic User Interface (GUI) shell Based on graphic e.g. x-window system in linux CLI GUI 14

Shell Script Various CLI Shells Bourne Shell (1977) == sh Developed by Steve Bourne @ AT&T Bell lab. First shell of UNIX system bourne shell (sh) Bourne-again shell (1989) == bash Developed by Brain Fox Basis of shells on UNIX/LINUX type system Recent systems also use bash bash shell : Ubuntu default 15

CSH (C shell) Shell Script Developed by Bill Joy C-language-like shell interpretation TCSH (Tenex C shell) Tenex: OS from Carnegie Mellon Univ. Enhanced version of CSH for Tenex system 16

Shell Script Command execution on Shell ls : List information about file(s) cat : Display the contents of a file echo : Print string mkdir : Create new folder(s) rmdir : Remove folder(s) pwd : Display current directory cd : Change current directory cp : Copy one or more files to another location mv : Move or rename files or directories rm : Remove files 17

Writing a Shell Script Text Editor gedit : GUI based text editor vi, vim : CLI based text editor apt-get install vim you can use any text editor install vim ubuntu:~$ gedit ubuntu:~$ vim test.sh 18

Writing a Shell Script Writing a Simple Script $ vim test.sh or $ gedit test.sh save file $ chmod 755 test.sh $./test.sh $./test.sh something simple source code execution Shell Script Guide http://linuxconfig.org/bash-scripting-tutorial 19

tree -d 20

Writing a C Program Writing a C Program $ vim hello or $ gedit hello.c save file $ gcc hello.c -o hello $./hello simple source code compile & execution C Program Guide http://www.gnu.org/software/gnu-c-manual/gnu-cmanual.pdf https://classes.soe.ucsc.edu/cmpe013/spring10/notes/c%20 Programming%20Guide.pdf 21

Make Utility Utility for automatically building executable programs and libraries from source code Help build programs from numbers of source code files Manage dependency among source code files and compiling method Prevent mistake $ gcc o hello hello.c Correct $ gcc o hello.c hello.c source code will be gone! 22

Syntax Make Syntax <Target>: <dependency> <Compile command> $ make program Will compile program After all compilation of others because of dependency This empty space should be tab not space 23

Makefile Example 24

Macro of Makefile Similar as #define of C programming Useful for repeated expression Below will do same compilation as previous slide $ make all : compile every BINs $ make clean : delete every BINs 25

Task1. Tree Script Write a bash shell script that shows tree structure of the directories and files included in you own home directory. 26 Example of Task1

Benchmark Task2. Simple C Program Computer program in order to assess the relative performance of an object, normally by running a number of standard tests and trials against it We can make File System Benchmark! with Sequential Access and Random Access Access Order Sequential Access Random Access 1 2 3 4 5 6 7 2 5 3 1 4 7 6 Logical Block 1 2 3 4 5 6 7 1 2 3 4 5 6 7 27 Example of Task1

Task2. Simple C Program Sample code is here http://core.kaist.ac.kr/~djshin/fsbench_sample.c File create Sequential Write Sequential Read Random Write Random Read File Delete End You should Implement 3 functions You can refer file_write_sequential() function void file_read_sequential() : about 20 lines void file_write_random() : about 25 lines void file_read_random() : about 25 lines 28 Example of Task1

Task2. Simple C Program Compile & Execute Sample Code Implement 3 operations : Sequential Read, Random Write, Random Read 29

Task2. Simple C Program Example of Task2 30

Task3. Makefile Write a Makefile for the source code of Task2 Test cases make all make clean Example Result of Task3 31

Problem 1 Problems Describe two types of VMM(hypervisor) Explain which type of VMM we used Problem 2 Advantages about makefile when we develop a software which has hugh amount of files. 32

Submission Contents Source Code Report Answer to the questions Key point of your Source Code Screenshots (Task 1, 2, 3) Page Limit : about 5 page (except figures) Submission Due Date : 2015/09/18 (Fri.) PM 23:59 E-mail : djshin@core.kaist.ac.kr [EE516] student_number.zip (various compression format is allowed)

General Grading Policy Ratio of Grading Tasks : 70% Code operation(exception handling), Code readability No errors and warnings Report : 30% Free-form Problems, Key point of your Source Code, Screenshots of Results Page Limit : about 5 page (except figures) Delay Penalty 10%/day (AM 00:00) Source Code Copying will deduct all of your points should mention if you referenced it

How to Transfer your files Compression and Extraction tar.gz $ tar -czvf compressed_file_name.tar.gz dir_name $ tar -xzvf compressed_file_name.tar.gz zip $ zip compressed_file_name.zip dir_name $ unzip compressed_file_name.zip File Transfer between Host Window and VM Just Copy and Paste Ctrl + C Ctrl + V