Prashant Somashekar. What will we discuss? -Brief overview of a kernel -How a kernel fits into the hierarchy -Android versus Linux kernel -Building an.

Slides:



Advertisements
Similar presentations
Drivers and the kernel1-1 Drivers and the kernel UNIX system has three layers: m The hardware m The operating system kernel m The user-level programs Kernel.
Advertisements

Operating Systems Manage system resources –CPU scheduling –Process management –Memory management –Input/Output device management –Storage device management.
Computer Software 3 Section A Software Basics CHAPTER PARSONS/OJA
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
DCM Embedded Software Infrastructure, Build Environment and Kernel Modules A.Norman (U.Virginia) 1 July '09 NOvA Collaboration Mtg.
Hands-on with the Sitara Linux SDK This presentation provides a hands-on overview of the Sitara Linux SDK. It focuses on the software and tools found in.
Professor Michael J. Losacco CIS 1110 – Using Computers Operating Systems & Utility Programs Chapter 7.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access memory.
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
Operating Systems Lab. (#2) University of Tehran – ECE Dept. Fall 2005 Reza Shokri
Chapter 3.1:Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random access.
1 uClinux course. 2 Author: D L Johnson Overview u Day 1 +Survey of embedded operating systems - why uclinux? +The uclinux environment - the directory.
Chapter Three OPERATING SYSTEMS.
Embedded Linux Systems Presented By: Kitrek Riese.
CIS 191 – Lesson 2 System Administration. CIS 191 – Lesson 2 System Architecture Component Architecture –The OS provides the simple components from which.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Porting Android to Beagleboard
From UEFI Shell to Linux - UEFI Linux BootLoader Zhang Rui Software Engineer Sep 28 th 2011.
Operating Systems TexPREP Summer Camp Computer Science.
Chapter 8: Operating Systems and Utility Programs Catherine Gifford Dan Falgares.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
09/21/081 Ho Chi Minh city University of Technology Linux kernel R.M. Introduction of building Linux kernel from source.
1 What is a Kernel The kernel of any operating system is the core of all the system’s software. The only thing more fundamental than the kernel is the.
Lab 10 Department of Computer Science and Information Engineering National Taiwan University Lab10 – Debugging II 2014/12/2 1 /16.
COMPUTER SYSTEM LABORATORY Lab6 - Root Filesystem.
Unit - VI. Linux and Real Time: Real Time Tasks Hard and Soft Real Time Tasks Linux Scheduling Latency Kernel Preemption Challenges in Kernel Preemption.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
Building Your Own Android Systems from Source Adam C. Champion CSE 5236: Mobile App Development 1.
CSC190 Introduction to Computing Operating Systems and Utility Programs.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
The Linux Operating System R.Bigelow. What is an Operating System An operating system is a collection of programs that manage a computer's resources.
Linux Development Lecture 7. Schedule Linux Root Filesystem.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Overview of Windows Driver Development Reference: us/gstart/hh/gstart/gs_intro_031j.asp.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
졸업 프로젝트 발표 1/74 Trinity Snapshot Boot 날 짜: 팀 명: Trinity
By Adam Reimel. Outline Introduction Platform Architecture Future Conclusion.
Embedded Software Design Week II Linux Intro Linux Kernel.
Thousands of Linux Installations (and only one administrator) A Linux cluster client for the University of Manchester A V Le Blanc I T Services University.
Ubuntu in the Factory Steve Magoun Engineering Manager, Mainstream Systems OEM Services, Canonical.
Coreboot: the open source BIOS. Lennart Benschop Presentation at T-DOSE 2011 Sunday :00.
Software.
Computer System Structures
Mobile Device Development
Operating System Kernel Compilation
Computer System Laboratory
#FOSDEM Februari 4, 2017 brabo
Implementation of Embedded OS
Advanced Computer Systems Lab
Computer System Laboratory
Current Generation Hypervisor Type 1 Type 2.
Implementation of Embedded OS
UBUNTU INSTALLATION
IM-pack: Software Installation Using Disk Images
Computer System Laboratory
Drivers and the kernel UNIX system has three layers: Kernel
Structure of Unix OS.
TexPREP Summer Camp Computer Science
Building Android OS Topics: Building Android and Kernel
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Outline Chapter 2 (cont) OS Design OS structure
Computer System Laboratory
Building Your Own Android Systems from Source
Presentation transcript:

Prashant Somashekar

What will we discuss? -Brief overview of a kernel -How a kernel fits into the hierarchy -Android versus Linux kernel -Building an Android kernel from source -Flashing a kernel to bare metal (mobile) -Practical experience; pitfalls; methodology

What is a kernel? -Heart of the system -Hardware initialization Hierarchy of a mobile system -Bootloader -> Kernel -> OS -Kernel provides low level abstraction layer

What is a kernel’s function? -Provide a layer for OS/App to speak with hardware -CPU/Memory management -Resource allocation -Input/Output from/to device’s components

Difference between Android and Linux kernel? -Based off Linux -Wakelock/Power management implementation -No paging to disk for virtual memory -Lightweight libc standard library (Bionic) -Video framebuffer instead of X11 -Low memory killer

How can I acquire kernel source code? -Use of github as a source code repository -Provides timeline of changes -Eases kernel development -Facilitates code sharing and dissemination

Will be using ubuntu (linux) -Install git: apt-get install git-core Pulling source code from a github repo:

Use Codesourcery’s toolchain -ARM-EABI (GCC4.5) Use and setup Codesourcery’s toolchain: -Unpack to a folder (ex: toolchain in home) -export CCOMPILER=~/toolchain/arm /bin/arm-none-eabi- -export PATH=$PATH:~/toolchain/arm /bin

Go to kernel directory and generate a defconfig -cd mykernel -make –j2 ARCH=arm CROSS_COMPILE=$CCOMPILER pershoot_mahimahi_defconfig -sample configurations in arch/arm/configs Compile a kernel: -make –j2 ARCH=arm CROSS_COMPILE=$CCOMPILER

Put device in bootloader; fastboot mode Boot device with new kernel -fastboot boot zImage -kernel image will be in arch/arm/boot -zImage is a compressed kernel image Copy wireless driver to device -adb remount -adb push drivers/net/wireless/bcm4329.ko /system/lib/modules Make more configuration changes -make –j2 ARCH=arm CROSS_COMPILE=$CCOMPILER menuconfig (must have lib-ncurses installed) Clean and rebuild: -make –j2 ARCH=arm CROSS_COMPILE=$CCOMPILER clean && make –j2 ARCH=arm CROSS_COMPILE=$CCOMPILER

Not all devices will have fastboot -Pull existing boot.img from device -Use split_bootimg.pl to separate ramdisk and kernel -Use mkbootimg to merge your new kernel with existing ramdisk -mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel zImage --ramdisk ramdisk.gz --base 0x o boot.img -Base listed is specific to Nexus One (Passion) Ramdisk (initrd) is a temporary root file system -Bare minimum needed for boot until the real system’s filesystem is available -May contain utilities, drivers, folder layout, etc. Flash boot.img to device via updater-script -write_raw_image("/tmp/boot.img", "boot") Alternative method -use AnyKernel (koush) -Only need to supply a zImage and modules (optional) -Resign update.zip (with a test key) or toggle signature checking off (Clockwork Mod), prior to flashing

Feel free to play with the source! -Adjust frequency clocks (overclock) -Under volt some frequency ranges to save some power -Implement GCC optimizations -Enable further functionality via loadable kernel modules

Not all devices are created equal -Hardware variances makes a ‘one size fits all’ mantra difficult to maintain at times -Different ROM bases may interact poorly -Remote troubleshooting can make resolution times lengthy It is important to adhere to the GPL -Keeping things open -Engineering for the sake of making things faster and more fine-tuned -Contribute to Social Coding -Fit to a specific environment’s form -Fix bugs -Add and enhance functionality

CyanogenMod -Distribution based off AOSP/CodeAurora/Nvidia/Omapzoom -Aims to provide a unified experience across multiple devices -Custom ROM and Kernel development -Open Platform which encourages social coding and development

Q&A