Kernel Porting - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Kernel Porting

Description:

Kernel Porting Lecture #7 * Kernel Porting Overview ARM Patch Xscale Patch PXA255-PRO3 Board Patch Kernel Configuration ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 25
Provided by: bhji
Category:
Tags: kernel | linux | porting

less

Transcript and Presenter's Notes

Title: Kernel Porting


1
Kernel Porting
  • Lecture 7

2
? ?
  • ??????? ?? ??
  • Kernel Porting Overview
  • ARM Patch
  • Xscale Patch
  • PXA255-PRO3 Board Patch
  • Kernel Configuration Compiling
  • Kernel fusing Testing

3
???? ??? ?? ?? ?? 1 ????
4
???? ??? ?? ?? ?? 2 ??(Google)
5
???? ??? ?? ?? ?? 3 Paradigm Shift
Linux
Win CE
Ports
Tool-chain
Networks
GUI
Mobile
Network
GUI
Networks
ex) ???, ??? ????
ex) ? ?????, ??
6
Kernel Porting Overview (1)
  • Kernel Porting
  • ??? ??? ?? ?? ??? ???? ?? ? ?? ??? ?? ???? ??
  • ?? ??
  • H/W-dependent
  • CPU porting
  • Board porting
  • H/W-independent
  • Linux kernel? ?? ??
  • ?? ? ??
  • ?? ?? ??? ????
  • ?? ??

Application
H/W-indep.
Linux Kernel
H/W-dep.
Hardware
7
Kernel Porting Overview (2)
  • Kernel Porting ??

8
ARM Core Patch (1)
  • Linux kernel ??
  • http//www.kernel.org/
  • ??? ??? ??? ??? ??? ????? ?????? ????
  • ? linux-2.6.21.tar.gz
  • linux-2.4.19.tar.gz
  • ARM Core Patch ??
  • ARM core patch? ARM??? ???? ??? ?? 2.6? ?? ? ??
    ???? ??
  • ??? ?? 2.4(e.g, linux-2.4.19)? ?? ??
  • http//www.arm.uk.linux.org/
  • ??? ????? ??? ??? ARM core patch ??? ?????? (e.g,
    patch-2.4.19-rmk4.gz)

9
ARM Core Patch (2)
  • ARM Core Patch ??
  • pwd
  • /home/pxa255-pro3/kernel
  • ls
  • linux-2.4.19.tar.gz patch-2.4.19-rmk4.gz
  • tar xvfz linux-2.4.19.tar.gz
  • cd /home/pxa255-pro3/kernel/linux-2.4.19
  • zcat ../patch-2.4.19-rmk4.gz patch p1
  • (or
  • gunzip d ../patch-2.4.19-rmk4.gz
  • patch p1 lt patch-2.4.19-rmk4 )

10
Xscale Patch (1)
  • Xscale Patch ???
  • ?? ???? ???? CPU Xscale PXA255 processor
  • ??? processor? SoC processor? ARM core ??? ??
    ???? ????? ??, ??? ???? I/O ??? ??
  • ???? ???? ?? kernel patch? ??
  • Xscale Patch ??
  • ?? processor? ?? patch? ?? ?????? ?? ??
  • Xscale patch? nico?? ????? ??
  • ftp//ftp.arm.uk.linux.org/pub/linux/arm/people/ni
    co/v.2.4
  • ??? ????? ??? ??? Xscale patch ??? ?????? (e.g,
    diff-2.4.19-rmk4-pxa2.gz)

11
Xscale Patch (2)
  • Xscale Patch ??
  • pwd
  • /home/pxa255-pro3/kernel
  • ls
  • diff-2.4.19-rmk4-pxa2.gz linux-2.4.19
  • linux-2.4.19.tar.gz patch-2.4.19-rmk4.gz
  • cd /home/pxa255-pro3/kernel/linux-2.4.19
  • zcat ../diff-2.4.19-rmk4-pxa2.gz patch p1
  • (or
  • gunzip d ../diff-2.4.19-rmk4-pxa2.gz
  • patch p1 lt diff-2.4.19-rmk4-pxa2 )

12
PXA255-PRO3 Board Patch (1)
  • Board Patch ??
  • ?? ???? ???? ?? I/O ?? ? ?????? ?? kernel patch
  • ?
  • Board description
  • Ethernet I/F
  • LCD display
  • USB
  • PCMCIA, CF, SD I/F etc.
  • ?? ?? ?????? ??

13
PXA255-PRO3 Board Patch (2)
  • Board Patch ??
  • ??? ???? ??? CD-ROM?? ?? board patch ??? ???? ??
  • ? diff-2.4.19-rmk4-pro3.gz
  • Board Patch ??
  • pwd
  • /home/pxa255-pro3/kernel
  • cd /home/pxa255-pro3/kernel/linux-2.4.19
  • zcat ../diff-2.4.19-rmk4-pro3.gz patch p1
  • (or
  • gunzip d ../diff-2.4.19-rmk4-pro3.gz
  • patch p1 lt diff-2.4.19-rmk4-pro3 )

14
Kenel Compiling (1)
  • Kernel image making
  • Kenel Configuration ? Kernel Compiling
  • Kernel Configuration
  • ?? ??? ??? linux kernel? ??, ?? ?? ? ???? ??
  • ? ?? ??? ???? linux kernel ??? ??
  • ?? ??? ?? ???, ???? ??, module? ????? ??
  • ?? ?? make menuconfig
  • Kernel Compiling
  • ?? ??? ?? ?? ??? ????? ?? ???? ??
  • ?? ?? make dep
  • make zImage

15
Kenel Compiling (2)
  • Kernel image making ??
  • pwd
  • /home/pxa255-pro3/kernel
  • cd /home/pxa255-pro3/kernel/linux-2.4.19
  • make pro3_config // default configuration ??
  • // ?? ??? ?? ???? ?? ? ??
  • make oldconfig
  • (or make menuconfig // default config.? ????? ?
    ?.)
  • make clean // make distclean
  • make dep
  • make zImage

16
Kenel Fusing
  • Kernel Fusing
  • ??? ??? ?? ???? u-boot bootloader ????? ?? ?? ???
    ??? ???? ????
  • ?? ??? ??-5 ??? ??

17
PXA255-PRO3 Board ?? (1)
  • PXA255-PRO3 Board Patch ??
  • ?? ???? ?? ??? linux-2.4.21??, ?? ?? kernel patch
    compiling? ????.
  • Step 1 ?? ?? ??
  • http//www.kernel.org/ ????? ?? ??
    linux-2.6.21.tar.gz? ??????
  • ?? ?? ??? ????
  • tar xvfz linux-2.6.21.tar.gz
  • Step 2 PXA255-PRO3 board patch ??
  • PXA255-PRO3 board patch ?? diff-2.6.21-pxa255-pro3
    .gz? ????

18
PXA255-PRO3 Board ?? (2)
  • PXA255-PRO3 Board Patch ?? (contn)
  • Step 3 Board patch ??
  • cd /pxa255-pro3/kernel/linux-2.6.21
  • ls ../diff-2.6.21-pxa255-pro3.gz
  • diff-2.6.21-pxa255-pro3.gz
  • zcat ../ diff-2.6.21-pxa255-pro3.gz patch
    p1
  • Step 4 Kernel compiling
  • pwd
  • /home/pxa255-pro3/kernel/linux-2.6.21
  • make pro3_defconfig
  • make oldconfig
  • make uImage

19
PXA255-PRO3 Board ?? (3)
  • PXA255-PRO3 Board Patch ?? (contn)
  • Step 5 Kernel image ?? ?? ??
  • ?? board patch??? ?? ??? ?? ?? ????
    /tftpboot/pxa255_pro3/uImage-2.6.21-pro3? ????
  • ls ???? ?? ??? ?? ???? ????
  • ls al /tftpboot/pxa255_pro3
  • Step 6 Kernel fusing
  • ?? ??? ???? u-boot? command mode? ????
  • ?? ??? ???? ?? ??? ?? ? ????
  • PRO3gt printenv
  • ??? ????
  • PRO3gt run linuxf

20
?? Menuconfig flow
make pro3_defconfig
make menuconfig
cd include ln -sf asm-arm asm
lxdialog compile
script/Menuconfig
arch/arm/config.in
.config ?
no
arch/arm/defconfig
yes
lxdialog
Configuration
.tmpconfig , .tmpconfig.h
mv .tmpconfig.h include/linux/autoconf.h
exit
mv .tmpconfig .config
21
?? Patch file ???
  • Patch file
  • Patch file? ? ???? ?????? ???? ????? ????? diff?
    ?? ???? ??? ??.
  • ????? ?????? ???? ???? ??.
  • ??? ??, Version up ?? ??

22
?? Patch file ???(cont)
  • diff ???

hello.c
hello2.c
include ltstdio.hgt int main(void)
printf("hello world!!!\n") return 0
include ltstdio.hgt int main(void)
printf("hello world!!!\n") printf("hello
bedguy!!!\n") return 0
root_at_bedguy /root diff -uNr hello.c hello2.c gt
hello.patch root_at_bedguy /root cat
hello.patch --- hello.c Thu Aug 30 140805
2001 hello2.c Thu Aug 30 140654 2001 _at__at_
-2,6 2,7 _at__at_ int main(void)
printf("hello world!!!\n") printf("hello
bedguy!!!\n") return 0
root_at_bedguy /root
Org file
New file
Patch file
23
?? Patch file ???(cont)
  • Patch ??
  • -p option
  • p1 - ??? ???? ? ??? Patch ??(?? ???? ??)
  • p0 ? ?? ???????? ??(?? ?? ??)

root_at_bedguy /root cat hello.patch patch
-p0 root_at_bedguy /root cat hello.c include
ltstdio.hgt int main(void)
printf("hello world!!!\n")
printf("hello bedguy!!!\n") return 0
root_at_bedguy /root
24
?? Link
  • http//www.arm.linux.org.uk/ The ARM Linux
    Project
  • http//www.netwinder.org/ netwinder
  • http//handhelds.org/ IPAQ ??
  • http//www.cs.cmu.edu/wearable/software/ The
    Wearable Group
  • http//www.lart.tudelft.nl The LART Pages
  • http//www.kelp.or.kr/ Korea Embedded Linux
    Project
  • http//www.kesl.org/ Korea Embedded System og
    Linux
  • http//www.huins.com/ Huins, Co.
  • http//linux.flyduck.com/ Kernel site
  • http//kernelkorea.org/ Linux kernel
  • http//www.linuxro.com/ ecos porting
  • http//pcmcia-cs.sourceforge.net/ Linux PCMCIA
    Information Page
  • http//ftp.arm.linux.org.uk/ The ARM Linux
    Project FTP
  • http//www.kr.ibm.com/developerworks/ ?? ??
  • http//www.freechal.com/embedded/ ???? ??? ???
    ??
  • http//www.fsf.org/ gnu homepage
  • http//www.phystech.com/download/ server demon
    program
Write a Comment
User Comments (0)
About PowerShow.com