Linux Kernel Compilation

Similar documents
There are three separate utilities for configuring Linux kernel and they are listed below: Command-line interface # make config. Figure 1.


Building Customized Linux Kernels A live demonstration. Mark Post August 17, 2004 Session # 9280

Ex.no:2 Date: Kernel Configuration, Compilation and Installation

I experiment on the kernel of linux environment.

RTLinux Installation Instructions

Building, Running and Monitoring the Linux kernel

APPLICATION. NOTE Date:

I experiment on the kernel of linux environment.

Project 0: Linux Dabbling

Building a Linux Kernel from Source

Operating System. Hanyang University. Hyunmin Yoon Operating System Hanyang University

Linux Kernel Update - from scratch (almost) Platform: Archlinux, UEFI, GRUB2, and initramfs. Prof. Rossano Pablo Pinto

Hardening The Linux Kernel With Grsecurity (Debian)

CREATION OF A MINIMAL STAND ALONE RTAI SYSTEM ================================================

LINUX KERNEL AND DEVICE DRIVER PROGRAMMING A SIMPLER APPROACH TO LINUX KERNEL

Running Network Services under User-Mode

How To Compile A Kernel - The Mandriva Way

K101: Embedded Linux Basics

DSP/BIOS Link. Installation Guide Published on 20 th OCT Copyright 2009 Texas Instruments Incorporated.

Firewalling for Free: An Enterprise Firewall Without the Enterprise Price. Name: Shawn Grimes Date: November 25, 2001 Course: CT-401

If you don't care about how it works but you just would like that it works read here. Other wise jump to the next chapter.

Project 0: Linux & Virtual Machine Dabbling

HOW TO CLONE A LARGE NUMBER OF PCs

System Administration for Beginners

ECE 598 Advanced Operating Systems Lecture 2

Introduction p. 1 Why Linux? p. 2 Embedded Linux Today p. 3 Open Source and the GPL p. 3 Free Versus Freedom p. 4 Standards and Relevant Bodies p.

UC20 Linux USB Driver User Guide

QEMU and the Linux Kernel

HOW LINUX BOOTS. As it turns out, there isn t much to the boot process:

Bash exercices. Write 6 random numbers between 0 and 9 in a file named randoms then display them in a sorted way on the screen.

A Kernel Compiling Adventure By Grant Nelson

Lab 7 Unit testing and debugging

FEATURES Journaling File Systems Advanced Linux file systems are bigger, faster, and more reliable by Steve Best

RTAI 3.8 ON Ubuntu(9.10)-Linux-kernel :

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

QLogic QLA4010/QLA4010C/QLA4050/QLA4050C/ QLA4052C/QMC4052/QLE4060C/QLE4062C iscsi Driver for Linux Kernel 2.6.x.

LINUX KERNEL PRABHAT RANJAN. (

CS 153 Design of Operating Systems

Chapter 2: Operating-System Structures

Linux kernel. Josep Jorba Esteve PID_

Installing Ubuntu Server

Project 1: Syscalls for synchronization 1

Operating systems fundamentals - B02

Partitioning a disk prior to Linux Installation

Linux on the PowerPC 4xx

Installation Tools for Clusters. Rajesh K., Computer Division, BARC

Kernel Korner IBM's Journaled Filesystem

Creating WinSystems ELS 2.0

A Tutorial on using Code::Blocks with Catalina 3.0.3

Boot. How OS boots

CIS 191A Final Exam. Fall CIS 191 Final Exam

Certification. System Initialization and Services

Manage Directories and Files in Linux. Objectives. Understand the Filesystem Hierarchy Standard (FHS)

CS354 gdb Tutorial Written by Chris Feilbach

Experiment #0. PC Hardware and Operating Systems

minit Felix von Leitner September 2004 minit

How To Resize ext3 Partitions Without Losing Data

Eclipse Environment Setup

ENCM 339 Fall 2017: Cygwin Setup Help

Getting to know GRUB

CST8177 Linux II. Linux Boot Process

GigaRAID (IT8212) ATA RAID Controller USER S MANUAL

Instructions: Step 1: Respond to the following: IT131 Linux+

Part A: Setup your kernel development environment

28 The TTCN to C Compiler

The Debian Kernel and its Team http// kernel/

Recovering GRUB: Dual Boot Problems and Solutions

ETERNUS Disk storage systems Server Connection Guide (FCoE) for Linux

CSE 265: System and Network Administration

CSE 265: System and Network Administration

Please choose the best answer. More than one answer might be true, but choose the one that is best.

Womp Howto. William Daniau 1st January 2004

Question No: 1 In capacity planning exercises, which tools assist in listing and identifying processes of interest? (Choose TWO correct answers.

MODULE 02. Installation

Often, more information is required when designing system call Information varies according to OS and types of system call

V Workstation Imaging

LiLo Crash Recovery. 1.0 Preparation Tips. 2.0 Quick Steps to recovery

How to Dual-Boot OS X and Ubuntu

How to install EPSON Scanner on LINUX?

Installation of Fedora 12 with CD

Galaxy Note Root Guide. by Max Lee

APPLICATION NOTE Using DiskOnChip Under Linux With M-Systems Driver

LINUXBUILD User's Manual

Better variadic functions in C

Server Consolidation with Xen Farming

Introduction. A Brief Description of Our Journey

User s Manual for the Boundary Devices Nitrogen R board

CREATING CUSTOM KERNELS WITH DEBIAN'S

XP: Backup Your Important Files for Safety

Access Control. Steven M. Bellovin September 13,

SAP GUI 7.30 for Windows Computer

Process Time. Steven M. Bellovin January 25,

RHCE BOOT CAMP. The Boot Process. Wednesday, November 28, 12

The LILO Configuration Handbook. Virgil J. Nisly

CS197U: A Hands on Introduction to Unix

COPYRIGHTED MATERIAL. Installing Xcode. The Xcode Installer

Project Management with RStudio

2

CST Algonquin College 2

Transcription:

Linux Kernel Compilation from source to running Muli Ben-Yehuda mulix@mulix.org IBM Haifa Research Labs Linux Kernel Development, TAU Linux Workshop, July 2003 p.1/9

introduction In this talk, I will talk about and demonstrate compiling the Linux kernel. Topics inlcude: overview of kernel compilation configuring the kernel dep, clean and mrproper make bzimage - build the kernel image make modules - build the modules make modules_install and final installation problem solving Linux Kernel Development, TAU Linux Workshop, July 2003 p.2/9

overview compiling the kernel is composed of three stages: configuration, building (compiling) and installing it s really quite simpler than it appears, and it s very hard to cause damage and end with a non booting system we will go over the steps together, configuring, building and installing the latest 2.4 kernel (2.4.22-pre5 as I write this) Linux Kernel Development, TAU Linux Workshop, July 2003 p.3/9

configuration configuring the kernel can be non trivial, since you have to include support for your hardware for things to work if you ve done it before and saved the.config, just do make oldconfig. make oldconfig will only asked about new configuration choices and use your old choices for everything else otherwise, run make menuconfig or make xconfig, and start going through the options, based on your computer s hardware alternatives include make defconfig, for a default configuration, and copying a distribution s.config for a configuration that should fit almost everything Linux Kernel Development, TAU Linux Workshop, July 2003 p.4/9

dep, clean, and mrproper after configuring the kernel, you need to do make dep, in order to generate dependency information and cause various build magic to occur. occasionally, you might want or need to clean up the sources before beginning from scratch. make clean will delete object files, make mrproper will delete everything except the sources, including your.config! be sure to save it elsewhere, not in the kernel source directory, as make mrproper will delete all files matching.config* neither make clean nor make mrproper are needed if this is the first time compiling the kernel from pristine sources, only make dep. Linux Kernel Development, TAU Linux Workshop, July 2003 p.5/9

make bzimage Not much to say here, really... make bzimage will build a compressed, ready to be installed kernel image. Alternatives include make vmlinux, which will create a debuggable (but not runnable) kernel image. Linux Kernel Development, TAU Linux Workshop, July 2003 p.6/9

make modules make modules will built the various components which we chose to build as modules. Why would we want to build something as a module? to save space in the kernel image (for embedded systems) for easier debugging of drivers and kernel code to support new peripherals without requiring a kernel reboot. Linux Kernel Development, TAU Linux Workshop, July 2003 p.7/9

install and make modules_install make modules_install, which must be run as root, ivileges) will create /lib/modules/ uname -r and copy the modules there. the bzimage file, found at arch/i386/boot/bzimage, needs to be copied somewhere the boot loader will find it. The System.map file should be copied along with it, for debugging later, if necessary. The boot loader (lilo, grub, else) should be updated to reflect the old kernel. Never replace a working kernel with a newly compiled one without verifying that it works first! Linux Kernel Development, TAU Linux Workshop, July 2003 p.8/9

problem solving So you compiled your first kernel, and it doesn t work. Congratulations! you aren t the first one, and certainly won t be the last one. did you install the bzimage and modules properly? did you update the boot loader? if hardware that used to work no longer works, check the.config for appropriate support if you compiled your disk drivers as modules, you need to create an initrd (initial ram disk). Read the documentation for more information. enjoy your new kernel! Linux Kernel Development, TAU Linux Workshop, July 2003 p.9/9