随笔-145  评论-173  文章-70  trackbacks-0

furtherchan@furtherchan:~$ sudo apt-get install build-essential kernel-package

Reading package lists... Done

Building dependency tree      

Reading state information... Done

The following extra packages will be installed:

  cvs dpkg-dev fakeroot g++ g++-4.4 gettext intltool-debian

  libmail-sendmail-perl libstdc++6-4.4-dev libsys-hostname-long-perl patch

  po-debconf

Suggested packages:

  debian-keyring debian-maintainers g++-multilib g++-4.4-multilib gcc-4.4-doc

  libstdc++6-4.4-dbg gettext-doc linux-source kernel-source libdb3-dev

  libncurses-dev docbook-utils xmlto libstdc++6-4.4-doc diff-doc

  libmail-box-perl

The following NEW packages will be installed:

  build-essential cvs dpkg-dev fakeroot g++ g++-4.4 gettext intltool-debian

  kernel-package libmail-sendmail-perl libstdc++6-4.4-dev

  libsys-hostname-long-perl patch po-debconf

0 upgraded, 14 newly installed, 0 to remove and 22 not upgraded.

Need to get 11.2MB of archives.

After this operation, 37.7MB of additional disk space will be used.

Do you want to continue [Y/n]? y

Get:1 http://cn.archive.ubuntu.com karmic/main libstdc++6-4.4-dev 4.4.1-4ubuntu8 [1,490kB]

Get:2 http://cn.archive.ubuntu.com karmic/main g++-4.4 4.4.1-4ubuntu8 [4,701kB]

Get:3 http://cn.archive.ubuntu.com karmic/main g++ 4:4.4.1-1ubuntu2 [1,446B]  

Get:4 http://cn.archive.ubuntu.com karmic/main patch 2.5.9-5 [100kB]          

Get:5 http://cn.archive.ubuntu.com karmic/main dpkg-dev 1.15.4ubuntu2 [573kB] 

Get:6 http://cn.archive.ubuntu.com karmic/main build-essential 11.4 [7,172B]  

Get:7 http://cn.archive.ubuntu.com karmic/main cvs 1:1.12.13-12ubuntu1 [1,685kB]

Get:8 http://cn.archive.ubuntu.com karmic/main fakeroot 1.12.4ubuntu1 [126kB] 

Get:9 http://cn.archive.ubuntu.com karmic/main fakeroot 1.12.4ubuntu1 [126kB] 

Get:10 http://cn.archive.ubuntu.com karmic/main gettext 0.17-8ubuntu2 [1,732kB]

Get:11 http://cn.archive.ubuntu.com karmic/main intltool-debian 0.35.0+20060710.1 [31.6kB]

Get:12 http://cn.archive.ubuntu.com karmic/main po-debconf 1.0.16 [224kB]     

Get:13 http://cn.archive.ubuntu.com karmic/main kernel-package 11.015 [537kB] 

Get:14 http://cn.archive.ubuntu.com karmic/main libsys-hostname-long-perl 1.4-2 [11.4kB]

Get:15 http://cn.archive.ubuntu.com karmic/main libmail-sendmail-perl 0.79.16-1 [26.5kB]

Fetched 11.1MB in 9min 43s (19.1kB/s)                                         

Preconfiguring packages ...

Selecting previously deselected package libstdc++6-4.4-dev.

(Reading database ... 121779 files and directories currently installed.)

Unpacking libstdc++6-4.4-dev (from .../libstdc++6-4.4-dev_4.4.1-4ubuntu8_i386.deb) ...

Selecting previously deselected package g++-4.4.

Unpacking g++-4.4 (from .../g++-4.4_4.4.1-4ubuntu8_i386.deb) ...

Selecting previously deselected package g++.

Unpacking g++ (from .../g++_4%3a4.4.1-1ubuntu2_i386.deb) ...

Selecting previously deselected package patch.

Unpacking patch (from .../patch_2.5.9-5_i386.deb) ...

Selecting previously deselected package dpkg-dev.

Unpacking dpkg-dev (from .../dpkg-dev_1.15.4ubuntu2_all.deb) ...

Selecting previously deselected package build-essential.

Unpacking build-essential (from .../build-essential_11.4_i386.deb) ...

Selecting previously deselected package cvs.

Unpacking cvs (from .../cvs_1%3a1.12.13-12ubuntu1_i386.deb) ...

Selecting previously deselected package fakeroot.

Unpacking fakeroot (from .../fakeroot_1.12.4ubuntu1_i386.deb) ...

Selecting previously deselected package gettext.

Unpacking gettext (from .../gettext_0.17-8ubuntu2_i386.deb) ...

Selecting previously deselected package intltool-debian.

Unpacking intltool-debian (from .../intltool-debian_0.35.0+20060710.1_all.deb) ...

Selecting previously deselected package po-debconf.

Unpacking po-debconf (from .../po-debconf_1.0.16_all.deb) ...

Selecting previously deselected package kernel-package.

Unpacking kernel-package (from .../kernel-package_11.015_all.deb) ...

Selecting previously deselected package libsys-hostname-long-perl.

Unpacking libsys-hostname-long-perl (from .../libsys-hostname-long-perl_1.4-2_all.deb) ...

Selecting previously deselected package libmail-sendmail-perl.

Unpacking libmail-sendmail-perl (from .../libmail-sendmail-perl_0.79.16-1_all.deb) ...

Processing triggers for man-db ...

Processing triggers for install-info ...

Processing triggers for doc-base ...

Processing 3 added doc-base file(s)...

Registering documents with scrollkeeper...

Setting up patch (2.5.9-5) ...

Setting up dpkg-dev (1.15.4ubuntu2) ...

Setting up cvs (1:1.12.13-12ubuntu1) ...

Ignoring install-info called from maintainer script

The package cvs should be rebuild with new debhelper to get trigger support

Ignoring install-info called from maintainer script

The package cvs should be rebuild with new debhelper to get trigger support

Setting up fakeroot (1.12.4ubuntu1) ...

update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.

Setting up gettext (0.17-8ubuntu2) ...

Setting up intltool-debian (0.35.0+20060710.1) ...

Setting up po-debconf (1.0.16) ...

Setting up kernel-package (11.015) ...

Setting up libsys-hostname-long-perl (1.4-2) ...

Setting up libmail-sendmail-perl (0.79.16-1) ...

Setting up libstdc++6-4.4-dev (4.4.1-4ubuntu8) ...

Setting up g++-4.4 (4.4.1-4ubuntu8) ...

Setting up g++ (4:4.4.1-1ubuntu2) ...

update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode.

Setting up build-essential (11.4) ...

Processing triggers for libc-bin ...

ldconfig deferred processing now taking place

 

 

furtherchan@furtherchan:~$ sudo apt-get install libncurses-dev

Reading package lists... Done

Building dependency tree      

Reading state information... Done

Note, selecting libncurses5-dev instead of libncurses-dev

The following NEW packages will be installed:

  libncurses5-dev

0 upgraded, 1 newly installed, 0 to remove and 22 not upgraded.

Need to get 1,564kB of archives.

After this operation, 6,627kB of additional disk space will be used.

Get:1 http://cn.archive.ubuntu.com karmic/main libncurses5-dev 5.7+20090803-2ubuntu2 [1,564kB]

Fetched 1,564kB in 2min 2s (12.8kB/s)                                         

Selecting previously deselected package libncurses5-dev.

(Reading database ... 123402 files and directories currently installed.)

Unpacking libncurses5-dev (from .../libncurses5-dev_5.7+20090803-2ubuntu2_i386.deb) ...

Processing triggers for man-db ...

Setting up libncurses5-dev (5.7+20090803-2ubuntu2) ...

 

 

furtherchan@furtherchan:~$ sudo apt-get install make

Reading package lists... Done

Building dependency tree      

Reading state information... Done

make is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

 

 

furtherchan@furtherchan:~$ sudo apt-get install gcc

Reading package lists... Done

Building dependency tree      

Reading state information... Done

gcc is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.

 

 

furtherchan@furtherchan:~$ which mkinitramfs

/usr/sbin/mkinitramfs

furtherchan@furtherchan:~$ which mkisofs

/usr/bin/mkisofs

 

 

furtherchan@furtherchan:~$ uname -a

Linux furtherchan 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux

 

 

furtherchan@furtherchan:~$ man wget

furtherchan@furtherchan:~$ wget -c http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.tar.bz2

--2010-03-05 09:28:47--  http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.tar.bz2

Resolving www.kernel.org... 199.6.1.164, 204.152.191.37, 130.239.17.4, ...

Connecting to www.kernel.org|199.6.1.164|:80... connected.

HTTP request sent, awaiting response... 200 OK

Length: 66266488 (63M) [application/x-bzip2]

Saving to: `linux-2.6.33.tar.bz2'

 

100%[======================================>] 66,266,488   113K/s   in 28m 42s

2010-03-05 09:57:31 (37.6 KB/s) - `linux-2.6.33.tar.bz2' saved [66266488/66266488]

/usr/src: Unsupported scheme.

FINISHED --2010-03-05 09:57:31--

Downloaded: 1 files, 63M in 28m 42s (37.6 KB/s)

 

 

furtherchan@furtherchan:~$ sudo bzip2 -d linux-2.6.33.tar.bz2

 

furtherchan@furtherchan:~$ sudo tar xvf linux-2.6.33.tar

 

furtherchan@furtherchan:~$ sudo mv ~/linux-2.6.33 /usr/src

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ cd /usr/src/linux-2.6.33/

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ pwd

/usr/src/linux-2.6.33

 

 

furtherchan@furtherchan:/$ cd boot

furtherchan@furtherchan:/boot$ ls

abi-2.6.31-14-generic     grub                          memtest86+.bin                vmcoreinfo-2.6.31-14-generic

config-2.6.31-14-generic  initrd.img-2.6.31-14-generic  System.map-2.6.31-14-generic  vmlinuz-2.6.31-14-generic

furtherchan@furtherchan:/boot$ sudo cp config-2.6.31-14-generic  /usr/src/linux-2.6.33/

furtherchan@furtherchan:/boot$ cd /usr/src/linux-2.6.33/

furtherchan@furtherchan: /usr/src/linux-2.6.33/$ sudo mv ./ config-2.6.31-14-generic  ./.config

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make menuconfig

scripts/kconfig/mconf arch/x86/Kconfig

#

# using defaults found in /boot/config-2.6.31-14-generic

#

/boot/config-2.6.31-14-generic:3394:warning: symbol value 'm' invalid for FB_VESA

#

# configuration written to .config

#

 

 

*** End of Linux kernel configuration.

*** Execute 'make' to build the kernel or try 'make help'.

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make clean

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make -j5

scripts/kconfig/conf -s arch/x86/Kconfig

  CHK     include/linux/version.h

  UPD     include/linux/version.h

  .........

  .........

  IHEX    firmware/yam/1200.bin

  IHEX    firmware/yam/9600.bin

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make bzImage

[sudo] password for furtherchan:

  CHK     include/linux/version.h

  CHK     include/generated/utsrelease.h

  CALL    scripts/checksyscalls.sh

  CHK     include/generated/compile.h

  VDSOSYM arch/x86/vdso/vdso32-int80-syms.lds

  VDSOSYM arch/x86/vdso/vdso32-sysenter-syms.lds

  VDSOSYM arch/x86/vdso/vdso32-syms.lds

  LD      arch/x86/vdso/built-in.o

  LD      arch/x86/built-in.o

  LD      vmlinux.o

  MODPOST vmlinux.o

WARNING: modpost: Found 3 section mismatch(es).

To see full details build your kernel with:

'make CONFIG_DEBUG_SECTION_MISMATCH=y'

  GEN     .version

  CHK     include/generated/compile.h

   ……

  ……

  Building modules, stage 2.

  MODPOST 2638 modules

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make modules

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make modules_install

  ......

  MKDIR   /lib/firmware/yam

  INSTALL /lib/firmware/yam/1200.bin

  INSTALL /lib/firmware/yam/9600.bin

  DEPMOD  2.6.33

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ ls /boot

abi-2.6.31-14-generic         memtest86+.bin

config-2.6.31-14-generic      System.map-2.6.31-14-generic

grub                          vmcoreinfo-2.6.31-14-generic

initrd.img-2.6.31-14-generic  vmlinuz-2.6.31-14-generic

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo mkinitramfs -o /boot/initrd.img-2.6.33

furtherchan@furtherchan:/usr/src/linux-2.6.33$ ls /boot

abi-2.6.31-14-generic         memtest86+.bin

config-2.6.31-14-generic      System.map-2.6.31-14-generic

grub                          vmcoreinfo-2.6.31-14-generic

initrd.img-2.6.31-14-generic  vmlinuz-2.6.31-14-generic

initrd.img-2.6.33

 

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ sudo make install

sh /usr/src/linux-2.6.33/arch/x86/boot/install.sh 2.6.33 arch/x86/boot/bzImage \

              System.map "/boot"

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$ ls -lh /boot

total 27M

-rw-r--r-- 1 root root 615K 2009-10-17 02:03 abi-2.6.31-14-generic

-rw-r--r-- 1 root root 109K 2009-10-17 02:03 config-2.6.31-14-generic

-rw-r--r-- 1 root root 116K 2010-03-05 13:37 config-2.6.33

drwxr-xr-x 2 root root 4.0K 2009-11-18 21:35 grub

-rw-r--r-- 1 root root 7.4M 2010-03-05 08:58 initrd.img-2.6.31-14-generic

-rw-r--r-- 1 root root 7.4M 2010-03-05 13:35 initrd.img-2.6.33

-rw-r--r-- 1 root root 126K 2009-10-24 00:11 memtest86+.bin

-rw-r--r-- 1 root root 1.6M 2009-10-17 02:03 System.map-2.6.31-14-generic

-rw-r--r-- 1 root root 1.7M 2010-03-05 13:37 System.map-2.6.33

-rw-r--r-- 1 root root 1.2K 2009-10-17 02:06 vmcoreinfo-2.6.31-14-generic

-rw-r--r-- 1 root root 3.8M 2009-10-17 02:03 vmlinuz-2.6.31-14-generic

-rw-r--r-- 1 root root 3.9M 2010-03-05 13:37 vmlinuz-2.6.33

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$  vi /boot/grub/grub.cfg

 

 

furtherchan@furtherchan:/usr/src/linux-2.6.33$  reboot

posted on 2010-03-05 20:36 deercoder 阅读(2557) 评论(0)  编辑 收藏 引用 所属分类: Unix/Linux

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理