Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1.

Slides:



Advertisements
Similar presentations
Computer System Laboratory
Advertisements

CCNA2 MODULE 5.
LINUX-WINDOWS INTERACTION. One software allowing interaction between Linux and Windows is WINE. Wine allows Linux users to load Windows programs while.
Managing Your Network Environment © 2004 Cisco Systems, Inc. All rights reserved. Managing Cisco IOS Devices INTRO v2.0—9-1.
Lab 4 Department of Computer Science and Information Engineering National Taiwan University Lab4 - Bootloader 2014/10/14/ 13 1.
Institute of Technology Sligo - Dept of Computing Cisco IOS & Router Config Semester 2V2 Chapter 7 Chapter 8.
Computer System Laboratory
COMPUTER SYSTEM LABORATORY Lab8 - Debugging II. Lab 8 Experimental Goal Learn how to debug Linux in source-level by Domingo and diagnose target boards.
COMPUTER SYSTEM LABORATORY Lab4 - Bootloader. Lab 4 Experimental Goal Learn how to build U-Boot bootloader for PXA /10/8/ 142.
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.
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.
Cisco IOS & Router Config Semester 2V2 Chapter 6.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 - Cross Tools 2014/10/7/ 20 1.
Computer System Laboratory
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Copyright© 2003 Avaya Inc. All rights reserved Upgrade to Communication Manager 2.0 with Migration to Linux 8.0 Purpose: This presentation was prepared.
Tutorial 11 Installing, Updating, and Configuring Software
COMPUTER SYSTEM LABORATORY Lab10 - Sensor II. Lab 10 Experimental Goal Learn how to write programs on the PTK development board (STM32F207). 2013/11/19/
Hands-On Virtual Computing
Embedded Linux porting Kernel
Computer System Laboratory
Lab 11 Department of Computer Science and Information Engineering National Taiwan University Lab11 - Porting 2014/12/9/ 26 1.
Lab 1 Department of Computer Science and Information Engineering National Taiwan University Lab1 - Sensor 2014/9/23/ 13 1.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
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.
Conventions Department of Computer Science and Information Engineering National Taiwan University Conventions 2014/9/16/ 3 1.
Page 110/19/2015 Chapter 5 CCNA2 Chapter 5 Managing Cisco IOS Software.
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.
INFSO-RI Enabling Grids for E-sciencE Installation of an APT+kickstart server Giuseppe Platania INFN Catania EMBRACE Tutorial Clermont-Ferrand,
Implementation of Embedded OS Lab3 Linux Kernel Modules.
Lab 14 Department of Computer Science and Information Engineering National Taiwan University Lab14 – Camera 2014/12/30 1 /14.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/16 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
7200 Samsung Confidential & Proprietary Information Copyright 2006, All Rights Reserved. 1/7 OfficeServ 7200 Enterprise IP Solutions Data Server S/W Upgrade.
2007 TAX YEARERO TRAINING - MODULE 61 ERO (Transmitter) Training Module 6 Federal and State Installation and Updates.
Implementation of Embedded OS Lab4 Cortex-M3 Programming.
Lab 12 Department of Computer Science and Information Engineering National Taiwan University Lab12 – Driver 2014/12/16 1 /21.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
Linux Kernel Programming (LKP). LKP New sub-course New sub-course We will learn together We will learn together Evaluation of this part of course will.
Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 – Bootloader + OS Kernel 2015/10/27/ 25 1.
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.
Lab 8 Department of Computer Science and Information Engineering National Taiwan University Lab8 - Root Filesystem 2015/11/10/ 22 1.
Lab 9 Department of Computer Science and Information Engineering National Taiwan University Lab9 - Debugging I 2014/11/4/ 28 1.
Lab 3 Department of Computer Science and Information Engineering National Taiwan University Lab3 – μC/OS 2015/10/13/ 13 1.
Implementation of Embedded OS
IOS Boot Procedure Can be set in Global Config –Router(config)#boot system flash If not in NVRAM as to where to get IOS, default is Flash If not in Flash,
Lab 7 Department of Computer Science and Information Engineering National Taiwan University Lab7 – uCOS Application 2015/11/10/ 10 1.
Embedded Software Design Week II Linux Intro Linux Kernel.
CACI Proprietary Information | Date 1 PD² SR13 Client Upgrade Name: Semarria Rosemond Title: Systems Analyst, Lead Date: December 8, 2011.
WP1- Documentation Booting Petalinux from TFTP and using Network file system Section for developers Zynq 7020 R. Assiro.
Rebuilding Linux Kernel Dedicated to penguin lovers everywhere 26 September 20161Rebuilding kernel by Visakh M R.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The U-boot bootloader Michael.
BY: SALMAN 1.
Andrea Chierici Virtualization tutorial Catania 1-3 dicember 2010
Operating System Kernel Compilation
Computer System Laboratory
Implementation of Embedded OS
© 2002, Cisco Systems, Inc. All rights reserved.
BY: SALMAN.
Computer System Laboratory
Data Server S/W Upgrade Samsung Electronics Co., Ltd.
Hands-On Virtualization in the Classroom
Operating System Kernel Compilation
IS3440 Linux Security Unit 7 Securing the Linux Kernel
Cisco IOS & Router Config
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Computer System Laboratory
Presentation transcript:

Lab 5 Department of Computer Science and Information Engineering National Taiwan University Lab5 - OS Kernel 2014/10/21/ 16 1

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Learn how to build Linux kernel image for PXA /10/21/ 16 2

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Host System  Windows XP  Build System  VirtualBox + Ubuntu 8.04  Target System  Creator XScale PXA270  Software  Linux for PXA270  linux creator-pxa270.patch  mkimage utility  Root filesystem image (15M)  You can find all software on RSWiki CSL Course Software.RSWiki CSL Course Software 2014/10/21/ 16 3

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  After the 1.0 release and prior to version 2.6, the number was composed as “A.B.C”, where the number A denoted the kernel version, the number B denoted the major revision of the kernel and the number C indicated the minor revision of the kernel.  In 2004, after version was released, the kernel developers no longer uses this system, instead now simply incrementing the third number, using a fourth number as necessary.  In 2011, the kernel version was bumped to 3.0 for the release following , to commemorate the 20th anniversary of Linux. 2014/10/21/ 16 4 Reference: wikipedia – Linux kernel

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Step 1: download Linux source codes (mt-linux tar.gz) for PXA270.mt-linux tar.gz  Step 2: extract the source codes.  Step 3: apply the patch.  % cd pxa270/create-pxa270  % wget creator-pxa270.patch creator-pxa270.patch  % patch -p0 < linux creator-pxa270.patch 2014/10/21/ 16 5

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Step 4: configure the Linux kernel (check Lab3’s arm-unknown-linux-gnu- * toolchain path in PATH).  % cd../linux  % make mrproper  % make creator_pxa270_defconfig  The “ make _defconfig ” command will create.config by the default symbol values from arch/ /configs/ _defconfig.  Step 5: compile Linux kernel.  % make  The resulting zImage in arch/arm/boot is the compressed kernel image we want. 2014/10/21/ 16 6

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  The Linux kernel build system (Kbuild) includes support for a variety of configuration methods, the most commonly used method is:  % make menuconfig  Please install libncurses5-dev package in Ubuntu.  Make sure your screen is large enough to display the configuration. 2014/10/21/ 16 7

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Many features and drivers are available as modules, and they are possible to choose whether to build features into the kernel.  Please always build into the kernel, i.e.,, in our Labs.  Once the kernel has been configured, you can quit the kernel configuration menu via Esc key or the Exit menu item.  Choose “Yes” to save the new configuration into a new.config file.  You can use “ ls -a ” to check the file. 2014/10/21/ 16 8 built-in module

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  The Creator XScale PXA270 board has 32MB flash and 64MB SDRAM.  Flash memory address range: 0x to 0x  SDRAM address range: 0xA to 0xA  Recall that U-Boot has determined the location of kernel image. CONFIG_BOOTCOMMAND "run linux" CONFIG_LINUX bootm  The locations and sizes of kernel image and root filesystem are also determined by Linux kernel (in arch/arm/mach-pxa/mach-creator- pxa270.c ). 2014/10/21/ 16 9

Lab 5 Department of Computer Science and Information Engineering National Taiwan University 2014/10/21/ xA xA RAM U-Boot Flash 0x x x diag 0x x Linux kernel 1 Root Filesystem 0x U-Boot parameters 0x x01C00000 Linux kernel 2U-Boot 0xA3F80000

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Based on the memory layout, we can configure our Linux kernel. static struct mtd_partition creator_pxa270_partitions[] = {... },{ name: "Kernel", offset: 0x , size: 0x , // 4M mask_flags: MTD_WRITEABLE },{ name: "Filesystem", offset: 0x , size: 0x00F00000, // 15M } /10/21/ 16 11

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  We use U-Boot as the bootloader on PXA270, we need to convert the OS kernel image vmlinux (which zImage is compressed by) to U-Boot bootable image ( uImage ).  Step 1: get raw binary file.  % arm-unknown-linux-gnu-objcopy -O binary -R.note -R.comment -S arch/arm/boot/compressed/vmlinux linux.bin  Step 2: compress kernel image (optional).  % gzip -9 linux.bin 2014/10/21/ 16 12

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Step 3: download mkimage.mkimage  Step 4: add header.  % chmod +x mkimage  %./mkimage -A arm -O linux -T kernel -C gzip -a 0xa e 0xa n "CSL Lab5 Kernel" -d linux.bin.gz uImage  If you skip step2, please use -C none and -d linux.bin.  mkimage is in the tools folder of U-Boot source codes.  You can see the mkimage usage by executing without arguments.  The resulting uImage is the U-Boot image we want. 2014/10/21/ 16 13

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Please refer to Lab2 to copy new Linux kernel and root filesystem to flash.  Step 1: download new 15M rootfs (root filesystem).rootfs  Step 2: copy your uImage to flash.  Step 3: copy new rootfs to flash. (take about 7 minutes)  Step 4: reset PXA270, now you can see your own Linux kernel is booted (the message “CSL Lab5 Kernel”).  Please use “ df -h ” to check the size of filesystem. 2014/10/21/ 16 14

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  However, the driver of the network card on PXA270 does not be configured in default Linux configuration.  Please try to configure the driver and build it into your kernel.  Please use “ ifconfig eth0 ” to check that your network card works. 2014/10/21/ 16 15

Lab 5 Department of Computer Science and Information Engineering National Taiwan University  Show that you can use “ tftp ” on your Linux kernel which has a 15M filesystem.  Please hand in your lab report to the FTP.  Server:  Username: csl2014  Password: csl2014HomeWork  Directory: lab5  Please use this format for filename: “G# Ver#”, where G# is your group id and Ver# is revision version number.  E.g., G1 Ver2 2014/10/21/ 16 16