Embedded Software Design Week II Linux Intro Linux Kernel.

Slides:



Advertisements
Similar presentations
A Guide to Unix Using Linux Fourth Edition
Advertisements

5 Basic utilities When a user logs in to the Linux operating system the directory that they will start in is their home directory. Most users will have.
Exploring the UNIX File System and File Security
Lesson 15 – INSTALL AND SET UP NETWARE 5.1. Understanding NetWare 5.1 Preparing for installation Installing NetWare 5.1 Configuring NetWare 5.1 client.
Linux+ Guide to Linux Certification, Second Edition
CIS 240 Introduction to UNIX Instructor: Sue Sampson.
Linux Linux File System.
Guide To UNIX Using Linux Third Edition
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Embedded Programming and Robotics Lesson 13 Basic Linux 1.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
Linux Commands LINUX COMMANDS.
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
GETTING STARTED USING LINUX UBUNTU FOR A MULTI-USER SYSTEM Team 4 Lab Coordinator Manager Presentation Prep Webmaster Document Prep Faculty Facilitator.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 10 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
Guide To UNIX Using Linux Fourth Edition
Overview of Linux CS3530 Spring 2014 Dr. José M. Garrido Department of Computer Science.
The file structure and related utilities CS240 Computer Science II.
Linux Directory Navigation. File & Directory Commands This is a minimal list of Unix commands that you must know for file management: ls (list) mkdir.
V Avon High School Tech Crew Agenda Old Business –Delete Files New Business –Week 9 Topics: Coming up: –Yearbook Picture: Feb 7 12:20PM.
Tutorial 11 Installing, Updating, and Configuring Software
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
2INC0 Operating Systems Introduction to Linux
LING 408/508: Programming for Linguists Lecture 3 August 31 st.
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
Working with Ubuntu Linux Track 2 Workshop June 2010 Pago Pago, American Samoa.
Linux+ Guide to Linux Certification, Second Edition
Chapter Two Exploring the UNIX File System and File Security.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
INTRODUCTION TO LINUX Jacob Chan. GNU/Linux Consists of Linux kernel, GNU utilities, and open source and commercial applications Works like Unix –Multi-user.
Chapter Two Exploring the UNIX File System and File Security.
ITR3 lecture 6: intoduction to UNIX Thomas Krichel
Linux+ Guide to Linux Certification, Third Edition
Linux+ Guide to Linux Certification, Third Edition
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
Linux Commands C151 Multi-User Operating Systems.
UNIX filesystem CS 2204 Class meeting 2 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Introduction to Unix. 2 What is UNIX?  UNIX is an Operating System (OS).  An operating system is a control program that helps the user communicate.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
1 CS3695 – Network Vulnerability Assessment & Risk Mitigation – Introduction to Unix & Linux.
Learning basic Unix command It 325 operating system.
LINUX Zhengli Zhu, School of Life Sciences. Outline 1. ABC of Linux 2. Basic orers of Linux 3. Bash Programming.
2Operating Systems  Program that runs on a computer  Manages hardware resources  Allows for execution of programs  Acts as an intermediary between.
Bash Scripting CIRC Summer School 2016 Baowei Liu CIRC Summer School 2016 Baowei Liu.
Getting Started with Linux
Linux 101: Introduction To Linux Purdue Linux Users Group Speaker: Thor Smith.
By Jonathan Rinfret UNIX/LINUX By Jonathan Rinfret
Overview of Linux Fall 2016 Dr. Donghyun Kim
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
EE516: Embedded Software Project 1
File permissions Operating systems I800
CIRC Winter Boot Camp 2017 Baowei Liu
Computer System Laboratory
Chapter 11 Command-Line Master Class
Chapter 2: System Structures
The Linux Operating System
Lab 1 introduction, debrief
UNIX Basics Internet Technology.
Introduction to UNIX.
Exploring the UNIX File System and File Security
Internet-of-Things (IoT)
College of Engineering
Operating Systems and Using Linux
Working with Mac OS and Linux
Lab 2: Terminal Basics.
1.3 Given a scenario, apply appropriate Microsoft command line tools
January 26th, 2004 Class Meeting 2
Presentation transcript:

Embedded Software Design Week II Linux Intro Linux Kernel

How an embedded system is booted? HDD? BIOS? RAM? OS? CPU/GPU?

Embedded System

Embedded Linux development setup

Booting kernel Bootloader loads and executes OS image Device tree is loaded - memory size, clock speeds, onboard devices, buses, and Flash layout Transfer control to kernel

Bootloader Initializes critical hardware components, such as the SDRAM controller, I/O controllers, and graphics controllers. Initializes system memory in preparation for passing control to the operating system. Allocates system resources such as memory and interrupt circuits to peripheral controllers, as necessary. Provides a mechanism for locating and loading your operating system image. Loads and passes control to the operating system, passing any required startup information.

Boot Overview Kernel Initialization - Mounting a file system First User Space Process: init Kernel context vs User space context Virtual memory space Storage Considerations Storage limit Flash memories ( block sizes, 100K write life time) Wear level algorithms (increase lifetime)

Boot Overview Memory space Memory Management Unit (MMU) Hardware engine Works with OS Access rights & memory translation

Boot Overview Execution Contexts Kernel symbols addresses : 0xC0XX… Context switch Kernel context User space context Async hw call & blocking user call Two kernel context modes Process context Interrupt context

Boot Overview Process Virtual Memory See sample code Handicaps of swapping pages Overhead Shortens life time of flash drive Cross-Development gcc -Wall -o hello hello.c Including headers (where is stdio.h) Linking libraries (external symbol printf()! which libc-*?) Find correct version?

Linux Commands Check commands at this site; examples/ examples/ Plus this site

Raspberry Pi – OS Survey Moving Files Around Graphically Use File Manager

Raspberry Pi – OS Survey Starting a Terminal Session

Raspberry Pi – OS Survey Navigating the Filesystem Using a Terminal $ cd $ pwd $ cd.. $ cd ~ $ cd / $ ls $ ls f* $ ls –a

File commands Copying a File or Folder Use the cp command to copy files and directories. echo "hello" > myfile.txt cp myfile.txt myfile2.txt cp -r mydirectory mydirectory2 Renaming a File or Folder mv my_file.txt my_file.rtf

File operations Use the editor nano included with most Raspberry Pi distributions. If you are a Linux fan, try “vi” or “emacs” Use the cat or more commands to view the file. Creating a File Without Using an Editor echo "file contents here" > test.txt touch

Directory operations To create a directory, use the mkdir command The rm (remove) command will delete a file or directory and its contents. $ rm my_file.txt $ rm my_file.* $ rm * $ rm -r mydir

Privileges, Access Rights The sudo (superuser do) command allows you to perform actions with superuser privileges. Just prefix the command with sudo. $ sudo apt-get update To see the permissions and ownership information relating to files and directories, use the ls command with the option -l. “d” for directory

Permissions The command chmod is used to modify file permissions. chmod …. +, -, = for add, remove, or set, respectively permission for currnet user(u), group (g), other users(o) chmod u+x file2.txt The command chown (change owner) is used to modify the ownership of a file or directory. sudo chown root:root file2.txt

Making a Screen Capture Install and use the delightfully named scrot screen capture software. sudo apt-get install scrot $ scrot $ scrot –d 5 $ man scrot

Installing / Removing Software with apt- get The most used tool for installing software from a Terminal session is apt-get. $ sudo apt-get update $ sudo apt-cache search $ sudo apt-get install The apt-get utility has an option (remove) that will remove a package, but only packagesthat have been installed with apt-get install. $ sudo apt-get remove $ sudo apt-get autoremove $ sudo apt-get clean

Running a Program or Script Automatically on Startup 1. Create an init script 2. Make the init script executable. 3. Tell the system about the new init script $ sudo nano /etc/init.d/my_server $ sudo chmod +x /etc/init.d/my_server $ /etc/init.d/my_server start $ sudo update-rc.d my_server defaults

Running a Program or Script Automatically at Regular Intervals Use the Linux crontab command. Raspberry Pi needs to know the time and date, and therefore needs a network connection or a real-time clock. $ crontab –e If there is a * in the digit position, that means every; if there is a number there instead, the script will only be run at that minute/hour/day of the month

Finding Things Use the Linux find command.