1 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Linux development.

Slides:



Advertisements
Similar presentations
Intel Do-It-Yourself Challenge Networking
Advertisements

Intel Do-It-Yourself Challenge node.js
Computer Software 3 Section A Software Basics CHAPTER PARSONS/OJA
ESE Einführung in Software Engineering N. XXX Prof. O. Nierstrasz Fall Semester 2009.
© Oscar Nierstrasz ST — Smalltalk Basics 2.1 Change sets  Make sure your changes are logged to a new change set.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Metamodeling Seminar X. CHAPTER Prof. O. Nierstrasz Spring Semester 2008.
GNU/Linux Filesystem 1 st AUT GNU/Linux Festival Computer Engineering & IT Department Bahador Bakhshi.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
N. XXX Prof. O. Nierstrasz Thanks to Jens Palsberg and Tony Hosking for their kind permission to reuse and adapt the CS132 and CS502 lecture notes.
OORPT Object-Oriented Reengineering Patterns and Techniques X. CHAPTER Prof. O. Nierstrasz.
CP — Concurrent Programming X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
12. eToys. © O. Nierstrasz PS — eToys 12.2 Denotational Semantics Overview:  … References:  …
Application Software: Essentials for knowledge workers
Intel Do-It-Yourself Challenge Lab 1: Intel Galileo’s Arduino side Nicolas Vailliet
Linux Operations and Administration
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.
Win8 on Intel Programming Course The challenge Paul Guermonprez Intel Software
Tutorial 11 Installing, Updating, and Configuring Software
Cheap Off-the-Shelf Tiny Linux By Dzuy Nguyen
Hands-On Virtual Computing
© 2011 Delmar, Cengage Learning Chapter 7 Managing a Web Server and Files.
Chapter 2 – Software Part A. Definition Computer is made up of two components Hardware Physical components Software Instructions for the computer Two.
What is system software and what are its parts? Programs that control operation of computer Two parts are operating systems utility programs.
Internet of Things with Intel Edison Compiling and running Pierre Collet Intel Software.
Linux in a Virtual Environment Nagarajan Prabakar School of Computing and Information Sciences Florida International University.
Design of Everyday Things Part 2: Useful Designs? Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Images from:
Implementation of Embedded OS
This courseware is copyrighted © 2016 gtslearning. No part of this courseware or any training material supplied by gtslearning International Limited to.
Embedded Software Design Week II Linux Intro Linux Kernel.
C Copyright © 2006, Oracle. All rights reserved. Oracle Secure Backup Additional Installation Topics.
Classroom Wiki Tutorial EDIC 763 Instructional Design Fall 2011 Aysha Bajabaa Dr. Gary Whitt 1 NextBack.
Intro To Virtualization Mohammed Morsi
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The GRUB bootloader Michael.
Course : PGClass : MCA Subject: Operating SystemSub.Code : 3CT11 Staff Name : S.SomasundaramYear & Sem : II nd & III rd.
1 Linux on TI OMAP TM processors © Copyright , Free Electrons Creative Commons Attribution-ShareAlike 2.5 license
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Scratchbox The Scratchbox.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com SSH Thomas Petazzoni Free.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com Embedded Linux Training System.
Virtualization With:. Virtualization With: What Kind of Virtualization? Full virtualization Platform Resource.
GNU and Linux.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
Virtual Machine and VirtualBox
bitcurator-access-webtools Quick Start Guide
Containers as a Service with Docker to Extend an Open Platform
CSC227: Operating Systems
Seamless Guest OS's and more!
Operating System Review
Using USB gadget drivers
Porting U-boot Michael Opdenacker Free Electrons
Chapter 2: System Structures
Methodology Overview 2 basics in user studies Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Notice: some material in this.
The blob bootloader Thomas Petazzoni Free Electrons
Contents Todays Topic: Introduction to Computer Software We will learn
Embedded Linux Conference - April 2009
What is an Operating System?
Keeping yourself right with copyright
Operating System Review
FOTW Worksheet Slides Christopher Penn, Financial Aid Podcast Student Loan Network.
HC Hyper-V Module GUI Portal VPS Templates Web Console
Chapter 2: The Linux System Part 1
Managing a Web Server and Files
Virtual Machine and VirtualBox
Linux Architecture Overview.
bitcurator-access-webtools Quick Start Guide
Lecture9: Embedded Network Operating System: cisco IOS
Virtual Machine and VirtualBox
Virtual Machine and VirtualBox
Lecture9: Embedded Network Operating System: cisco IOS
Presentation transcript:

1 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Linux development Kernel Development with VirtualBox Marco Stornelli Created with OpenOffice.org 3.1.1OpenOffice.org

2 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Rights to copy Attribution – ShareAlike 3.0 You are free to copy, distribute, display, and perform the work to make derivative works to make commercial use of the work Under the following conditions Attribution. You must give the original author credit. Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: sa/3.0/legalcodehttp://creativecommons.org/licenses/by- sa/3.0/legalcode Marco Stornelli © Copyright

3 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Best viewed with... This document is best viewed with a recent PDF reader or with OpenOffice.org itself!OpenOffice.org Take advantage of internal or external hyper links So, don’t hesitate to click on them! See next page. Find pages quickly thanks to automatic search Use thumbnails to navigate in the document in a quick way

4 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 VirtualBox VirtualBox is a virtualization tool. There is a free version called OSE. With VirtualBox we can work with virtualized environments. We must work with the same arch of our host. Add your Linux user to the group vboxusers to be able to use it without be root. Load vboxdrv kernel module to be able to run it.

5 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Compile the kernel Compile the kernel and build an isoimage make FDARGS= FDINITRD= isoimage We can use a simple initrd as rootfs or we can use a flexible NFS root filesystem. To either build a simple initrd or use NFS, see my presentation “ Embedded Linux kernel and Drivers ”.

6 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Build rootfs We can copy or link all the executable of our host system in the new target filesystem. Coping is more secure than linking because with this one we could break down our system! Instead of using our host bins we could use busybox. If we use busybox we have to copy several libraries from our host lib folder: ld libcrypt libm libnss_files libnss_nis libwrap ld-linux libcrypt libnsl libnss_files libresolv libanl libc libnss_compat libnss_hesiod librt libBrokenLocale libdl libnss_nis libgcc_s libutil libnss_dns libnss_nisplus

7 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Create a new virtual machine Open VirtualBox and click on “New”. Select name of your virtual machine and select as OS Linux 2.6 (or 2.4). Select the memory for your system, for very basic environment 32MB are enough. Don't select any virtual hard disk for now. Click finish. Click on “Settings” and under CD/DVD menu select “mount CD/DVD” and then ISO image file. Select your kernel image.

8 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Network setup with VirtualBox 2.x Under “Net” menu, enable a network device and select in the menu “Attached To” “Host Interface”. In the text field now enabled “Interface name” edit tap1. Leave blank the fields “Setup Application” and “Terminate Application”. Now your virtual machine is ready but we need to enable the virtual interface in our host system.

9 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Network setup with VirtualBox 3.x Under “Net” menu, enable a network device and select in the menu “Interface with bridge”. In the combo box select br0 (See in the next slides how to create a bridge). Now your virtual machine is ready but we need to enable the virtual interface in our host system.

10 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Virtual interfaces: Tips and Tricks Software packages you need to perform this step: brctl – Bridge utilities tunctl – Tun/Tap utilities All the commands will must be executed as root. Unless the first and second step, all the changes will be transient, so if you want a permanent configuration you can create a start-up script. Check out your firewall configuration, it could happen that it doesn't allow the communication between the virtual and the host machine. In this case a simple solution is shut down it (example for OpenSuse): rcSuSEfirewall2 stop

11 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Create a virtual interface (1) Load module for tun/tap modprobe tun (*) Setup tap and bring up the interface tunctl -t tap1 -u root (*) ifconfig tap1 up (*) Create a bridge brctl addbr br0 Setup our interfaces ifconfig eth promisc ifconfig tap1 promisc

12 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Create a virtual interface (2) Add our real interface to the bridge brctl addif br0 eth0 Add the interface to VirtualBox VBoxAddIF tap1 br0 (*) Setup the bridge with an IP address ifconfig br up Now the configuration is ready! You can use the bridge address as NFS address to pass it to the linux kernel of our virtual machine. (*) Step needed only for VirtualBox 2.x

13 Kernel development with VirtualBox © Copyright 2009, Marco Stornelli Creative Commons Attribution-ShareAlike 3.0 license 9/30/2016 Legal statements Linux is a registered trademark of Linus Torvalds Linux logo by Larry Ewing VirtualBox is a trademark of Sun Microsystems, Inc. Other company, product, and service names may be trademarks or service marks of others