Porting Android to Beagleboard

Slides:



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

Booting the TS-7300 boards VHDL and C. Overview After looking at the general approach to booting machines (generally PCs) we will now look at the TS-7300.
PIKA Technologies Inc. PADS for the PIKA WARP Appliance March 2009.
TI Information – Selective Disclosure Boot TI Keystone II Linux Kernel (UBI File-system) Vincent Han Mar,
Giving Linux the Boot This session covers all facets of the Linux boot process from power up to running a user application beginning with ROM boot loader.
U-Boot and Linux Kernel Debug using CCSv5
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.
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
Operating System Structure. Announcements Make sure you are registered for CS 415 First CS 415 project is up –Initial design documents due next Friday,
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
Working with OSK5912 By T Siva Viswanathan Naresh Krishnaswamy Harshvardhan V.
1 Booting Linux with U-boot Jason Kridner June 7, 2010 Archived at:
Case study 2 Android – Mobile OS.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
Introduction to The Linaro Toolchain Embedded Processors Training Multicore Software Applications Literature Number: SPRPXXX 1.
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
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Beagleboard and Friends Nathan Gough. Hardware – OMAP3  Based around Texas Instruments OMAP3530 “Applications Processor”  OMAP3 Platform:  Arm Cortex-A8.
Embedded Linux porting Kernel
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Mar. 9, 2010.
Alex Layton, Purdue University
Beagle Board Fast Boot Hui Chen Keji Ren Dec 10 th, 2009 EE382N-4 Project.
Porting Operating Systems Phan Duy Hùng (PhD) ES Lecturer – Hanoi FPT University.
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.
Challenges in KeyStone Workshop Getting Ready for Hawking, Moonshot and Edison.
Manage Directories and Files in Linux. 2 Objectives Understand the Filesystem Hierarchy Standard (FHS) Identify File Types in the Linux System Change.
Porting Linux Linux onto the Puppeteer SA1110. The Puppeteer board –SA1110 CPU –SMSC LAN91C96I ethernet –8 Mb Flash Intel 28F320C3 Boot block flash –32.
TI Information – Selective Disclosure Boot TI Keystone II Linux Kernel (RAM File-system) Vincent Han Mar,
Android. Basic Architecture Linux Kernel Libraries Applications Android Runtime Application Framework.
2006/JAN/20JapanTechnicalJamboree61 Improvement of bootup time using Power Management - Project Update - Hiroki Kaminaga Sony Corporation
Exercise #1: Exploring Open- Source Operating Systems with Virtual Machines J. H. Wang Sep. 25, 2015.
Mobile Application Development with ANDROID Umang Patel(6537) LDCE.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
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.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 2.
ARM 7 & ARM 9 MICROCONTROLLERS AT91 1 AT91RM9200 Software delivery.
Implementation of Embedded OS
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.
Implementation Method Linux-USB Gadget Framework –The Linux-USB Gadget Framework makes it easy for peripherals and other devices embedding GNU/Linux system.
The World Leader in High Performance Signal Processing Solutions Das U-Boot: Blackfin Guts.
Chap. 4 ARM Boot Loader Internals. 2 S3C2500 ARM940T Core module ARM9TDMI CoreIC.
U-Boot CS-423 Dick Steflik. U-Boot Actual Name: Das U-Boot Universal Bootstrap Loader Used on PPC, ARM, AVR32, MIPS, x86, 68K, Nios and MicroBlaze architectures.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Free Electrons Introduction.
IMAGE COMPRESSION AND DECOMPRESSION USING ARM9 SYSTEM Under the guidance of Mrs. B. SATYA SRI DEVI,M.Tech, Assistant Professor By V. KUSUMA KUMARI Roll.
Linux on ARM7TDMI or Nothing is as easy as it looks Helicon technologies Ltd. How to run uClinux on NXP LPC22xx.
Embedded Linux By Gus Wirth. What makes it embedded? ● Rather nebulous, line has blurred over the years ● Limited purpose ● Small resources compared to.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux system development.
Android Greg Kroah-Hartman A case study of an Embedded Linux Project
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The U-boot bootloader Michael.
Computer System Structures
Computer System Structures
Android Mobile Application Development
Implementation of Embedded OS
Ottawa Linux Symposium 2007
Computer System Laboratory
Cross-platform Libraries Technology Presentation
Improvement of startup time using Software Suspend - Project Update -
Computer System Laboratory
Implementation of Embedded OS
Building Android OS Topics: Building Android and Kernel
Operating System Kernel Compilation
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Computer System Laboratory
Computer System Laboratory
Presentation transcript:

Porting Android to Beagleboard Anish Dhanekula Karl Arndt

Porting Android to Beagleboard What is Android? Linux-based Operating System for Mobile Devices Developed by Android, Inc. Acquired by Google Open-Source, under Apache License Proprietary extensions developed by vendors don’t have to be submitted back to open-source commnunity Porting Android to Beagleboard

Porting Android to Beagleboard What is Android? Modified Linux Kernel Éclair (Android v2.0/2.1) based on 2.6.29 Filesystem Uses the Bionic C Library instead of glibc Dalvik Java Virtual Machine Is it really Linux? Sort of… Definitely Linux kernel, but not a traditional userspace Porting Android to Beagleboard

Porting Android to Beagleboard What is Android? Porting Android to Beagleboard

Porting Android to Beagleboard What’s a Beagleboard? Porting Android to Beagleboard

Porting Android to Beagleboard What’s a Beagleboard? OMAP 3530 TI SoC with ARM Cortex A8 and 64x DSP SDRAM and Flash on-package with Package-on-Package (PoP) Porting Android to Beagleboard

Porting Android to Beagleboard What’s a Beagleboard? Peripherals SD/MMC Socket for Storage DVI-D and S-Video Stereo In and Out USB Serial Bootloader U-Boot comes loaded on the PoP Flash Porting Android to Beagleboard

Porting Android to Beagleboard Porting Process Get Android Source Kernel and Filesystem Prove it can work Modify Kernel files as necessary to work with Beagleboard Compile Write to SD Card Try to Boot Doesn’t work – pray that your Beagleboard gets stolen while you grab dinner Fix Kernel Boot Errors Repeat Porting Android to Beagleboard

‘Git’ing Android Source Kernel – android.git.kernel.org OMAP tree Filesystem – source.android.com We used a prebuilt filesystem known to work on Beagleboard in order to focus on the kernel Git Source management tool Porting Android to Beagleboard

Porting Android to Beagleboard Storage Format Kernel and Filesystem need to be stored in a particular way on the SD Flash Two Partitions FAT32 Boot Partition Holds U-Boot update and compressed Kernel Image (uImage) EXT3 Filesystem Partition Holds the complete root filesystem Porting Android to Beagleboard

Porting Android to Beagleboard Early Boot Process OMAP PoP Flash comes with U-Boot, but needs to be replaced on boot The PoP Flash U-Boot knows to attempt to boot from the SD Flash first, and when it does it finds the updated U-Boot Environment variables must be set to boot properly setenv bootcmd ‘mmc init; fatload mmc 0 84000000 uImage; bootm 84000000’ setenv bootargs 'mem=128M androidboot.console=ttyS2 console=tty0 console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw init=/init Porting Android to Beagleboard

Porting Android to Beagleboard Prove it can Work Rowboat Someone has already ported Android to Beagleboard Confirmed that this distribution works on our board Porting Android to Beagleboard

Porting Android to Beagleboard Compiling the Kernel Since the kernel is being compiled on an x86 host for an ARM target, cross-compiling is necessary The arm-eabi toolchain is used for this Included in the Android Filesystem Source make ARCH=arm CROSS_COMPILE=/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi uImage –j4 uImage is the compressed Kernel Image -j4 tells Make it can use 4 threads (two per CPU on a dual-core machine Porting Android to Beagleboard

Modifying Kernel Source Create the .config file make defconfig make ARCH=arm defconfig make ARCH=arm omap3_beagle_defconfig Edit .config to include all necessary settings and modules make ARCH=arm menuconfig Porting Android to Beagleboard

Modifying Kernel Source menuconfig Porting Android to Beagleboard

Modifying Kernel Source .config Compilation parameters are chosen Particular implementation of an architecture Drivers are chosen Must determine the correct drivers for your SoC/Board and include them here Drivers can be included as built-in or modular Porting Android to Beagleboard

Modifying Kernel Source .config – selecting the right drivers Real Time Clock Real Time Clock initialization was failing on kernel boot Found that the Beagle uses a TWL4030 I2C RTC Controller Had to enable I2C, TWL Core, and TWL4030 Drivers Porting Android to Beagleboard

Modifying Kernel Source .config – selecting the right drivers MMC/SD Filesystem is stored on SD card Found correct driver by sorting through Angstrom Linux running on the Beagleboard Porting Android to Beagleboard

Modifying Kernel Source Correct Drivers are chosen, but Kernel won’t boot… Need to dig into actual Kernel Source and Boot Process Porting Android to Beagleboard

Modifying Kernel Source Kernel Boot Process Run code from /arch/arm/mach-omap2 to initialize devices Run /init/main.c to mount the root filesystem Once the root filesystem is mounted, run /init (or whatever is specified to U-Boot) as the first process Porting Android to Beagleboard

Modifying Kernel Source RTC is initialized now, but Kernel Boot still hangs “Waiting for root device /dev/mmcblk0p2…” This message was found in /init/do_mounts.c Called in /init/main.c While loop continuously polling Device_probe_done() name_to_dev_t() Porting Android to Beagleboard

Modifying Kernel Source One of the routines is not completing Traversed name_to_dev_t() with printk Seems to work fine Difficult to traverse name_to_dev_t() Decided to look through initial device initialization code in /arch/arm/mach-omap2 and SD driver in /drivers/mmc/host/omap_hsmmc.c Porting Android to Beagleboard

Modifying Kernel Source /arch/arm/mach-omap2/board-omap3beagle Several __init statements omap3_beagle_init Calls omap3beagle_flash_init This is where the devices are initialized during bootup, but we can’t find anything wrong… Porting Android to Beagleboard

Porting Android to Beagleboard Next Steps Hard-coded device names Porting Android to Beagleboard

Things we would do differently Spend less time modifying the .config file and more time on the kernel source itself Maybe try Network File System (NFS) to store the Filesystem Porting Android to Beagleboard

Porting Android to Beagleboard References Linux Kernel in a Nutshell Greg Kroah-Hartman Linux from Scratch Gerard Beekmans code.google.com/p/beagleboard/wiki code.google.com/p/rowboat/wiki source.android.com android.git.kernel.org www.beagleboard.com Porting Android to Beagleboard

Porting Android to Beagleboard Questions? Porting Android to Beagleboard