Alligator OS Embedded Operating System
Total Page:16
File Type:pdf, Size:1020Kb
Instituto Politécnico Nacional Centro de Investigación en Computación Alligator_OS embedded operating system T E S I S QUE PARA OBTERNER EL GRADO DE MAESTRO EN CIENCIAS EN INGENIERÍA EN CÓMPUTO PRESENTA Adrian Alonso Lazcano DIRECTOR DE TESIS: DR. MARCO ANTONIO RAMIREZ SALINAS México DF, 2010 2 3 Resumen Este trabajo de tesis presenta una metodología para el desarrollo de hardware/software para arquitecturas reconfigurables, basado en la plataforma de Xilinx ML507 la cual integra un procesador PowerPC 440, más un área de lógica reconfigurable en donde periféricos personalizados pueden ser diseñados e integrados a la plataforma hardware, la cual puede ejecutar el sistema operativo Linux y este puede ser empleado como un marco de prueba para los módulos periféricos diseñados. Como ejemplo de este trabajo de tesis se ha diseñado un dispositivo que interfasa una perilla, comúnmente empleada como controladores del nivel de volumen en un estero, en HDL, se muestra como se integra al sistema y un controlador Linux del dispositivo se desarrollo para probar su funcionamiento. Los objetivos de este proyecto se dividen en dos tareas principales, la primera es la adaptación de una distribución Linux para poder tener un conjunto de software el cual permita tener un sistema usuable y un entorno flexible de desarrollo de software, teniendo especial consideración de la naturaleza de las plataformas reconfigurables. El segundo es diseñar un conjunto de periféricos en HDL e integrarlos al bus del procesador local, teniendo en cuenta que estos módulos deben ser reutilizables e independientes de la arquitectura del bus local del sistema. Los módulos de hardware personalizados siguen la especificación Wishbone versión B.3 para estandarizar la forma de interconectar los módulos personalizados al bus del sistema y estos se puedan reutilizarse reimplementando la parte que interactua con el bus del sistema, así la lógica del periférico puede ser integrada en otra arquitectura de una forma sencilla. La solución para la generación de una distribución Linux utiliza la infraestructura de Openembedded en el cual podemos seleccionar el conjunto de software que conformara al sistema de archivos y los detalles de la plataforma destino, permitiéndonos un alto grado de personalización, a la necesidad de la aplicación final. Se propone también una metodología para el desarrollo de software utilizando OE como un SDK para poder integrar el software en el dispositivo destino, como ejemplo en la sección [ 4.3.4.] detalla el método de desarrollo de controladores de dispositivos en Linux empleando OE. 4 Abstract This thesis work presents a methodology for hardware/software development for reconfigurable architectures based on Xilinx ML507 embedded platform that integrates an PowerPC 440 CPU plus a large reconfigurable area where custom peripherals can be designed and integrated to the system, on top we can run Linux that can be employed as a framework for testing the custom peripherals modules. As example in this thesis work a wheel encoder device is designed in HDL, integrated to the system and a Linux device driver is provided to test it. The goals for this project are divided in two main tasks, the first one is to adapt a custom Linux distribution to be able to have a complete software stack and a flexible environment for software development, taking special consideration of the nature of reconfigurable platforms. The second one is to design, implement a set of peripherals in HDL and integrate them to the processor local bus, taking into account that this hardware modules to be reusable and architecture independent. Custom hardware modules follows the Wishbone interconnection standard revision B.3 for module re- usability and the methodology followed is documented in this work, so newcomers can start right away designing and implementing new peripherals and integrated to the base system following an portable interconnection standard. The solution for embedded Linux distribution generation utilizes the Openembedded build framework where we can select the software stack and provide target board details to customize the roof file systems to the final application need. We also propose an methodology for software development using OE as an SDK to be able to integrate the custom software into the target device, as example section [ 4.3.4.] details the Linux device driver development method. 5 Acknowledgments I want to thank my Dad for the great effort off getting my first computer an i486 where I start learning programming, my aunt Matilde who indirectly lend me my first programming book, my sister Miriam for never hesitate on getting for me cutting edge hardware and text books and my brothers how are always trying to keep me away from computers To all my friends that despite the location always had time for talk, email, chat To all professors who teach me at CIC-IPN Luis Villa, Jose Luis Oropeza, Hugo Coyote, Amadeo Argueyes, Osvaldo Espinosa, Jesus Olivares, Sandra Dionora,Pablo Mariquez, Luis Pastor, Sergio Suarez, Marco Antonio Ramirez For all the companies and institutions that provide directly or indirectly me some funds to complete this thesis work many thanks Dextra Tech, for a wonderful summer job Xilinx Inc. for provide me hardware to hack Google Inc for a great summer of code Secret Lab Ltd for tips and tricks for trade ConaCyt and IPN for the scholarships 6 7 Table of Contents 1.Introduction................................................................................................................................................ 12 1.1.Background........................................................................................................................................ 12 1.2.Problem definition............................................................................................................................. 14 1.3.Justification......................................................................................................................................... 15 1.4.General objective............................................................................................................................... 16 1.4.1.Particular objectives................................................................................................................... 16 1.5.Approach to the problem................................................................................................................... 16 1.6.Thesis work contributions.................................................................................................................. 17 1.7.Thesis organization............................................................................................................................ 18 1.8.Summary............................................................................................................................................ 18 2.State of the art............................................................................................................................................ 19 2.1.PowerPc Linux support...................................................................................................................... 19 2.2.Embedded Linux distributions........................................................................................................... 20 2.3.Summary............................................................................................................................................ 22 3.Theoretical framework .............................................................................................................................. 23 3.1.Xilinx ML507 target platform............................................................................................................. 23 3.1.1.Xilinx ML507 Linux initialization.................................................................................................26 3.1.2.Xilinx hardware/software development model.........................................................................26 3.1.3.Hardware/software proposed design flow................................................................................28 3.2.SoC bus interconnection: Wishbone specification.............................................................................30 3.3.Embedded Linux basics...................................................................................................................... 31 3.3.1.Boot loaders............................................................................................................................... 31 3.3.2.Root file system.......................................................................................................................... 32 3.4.The Linux device model..................................................................................................................... 33 3.5.OpenEmbedded framework............................................................................................................... 37 3.6.Summary............................................................................................................................................ 39 4.Methodology and design............................................................................................................................ 40 4.1.Design methodology.......................................................................................................................... 40 4.1.1.Open source