カーネルをmakeしよう! - 第4回つくらぐ勉強会

Embed Size (px)

DESCRIPTION

筑波大学 Linux User Group (つくらぐ) http://www.tsukuba-linux.org/

Citation preview

  • 1. make ! (opentaka) http://www.opentaka.org/ opentaka [at] tsukuba-linux.org

2. make ! = ! 3. Agenda

  • GNU/LinuxLinux

4. 5. Vanilla patched 6. 7. make ! 8. 9. 10. GNU/LinuxLinux 11. GNU/LinuxLinux

  • Linux

12. GNU OS 13. Linux( ) (GNU) OS GNU+Linux GNU/Linux 14.

  • OS

15. OS 16. 17. vanilla patched Linux 18. vanilla patched $ uname -a 19.

  • Linux laksa2.6.26-2-686#1 SMP Sun Jul 26 21:25:33 UTC 2009 i686 GNU/Linux

20. Linux SC4402.6.25 -hardened-r7#16 SMP Mon Jun 8 19:54:40 JST 2009 i686 Intel(R) Pentium(R) Dual CPU E2180 @ 2.00GHz GenuineIntel GNU/Linux 21. Linux debian2.6.26-2-686#1 SMP Sun Jul 26 21:25:33 UTC 2009 i686 GNU/Linux 22. Linux netbook2.6.30-1-686#1 SMP Sun Jul 26 21:25:33 UTC 2009 i686 GNU/Linux 23. Linux localhost.localdomain2.6.29.6 -213.fc11.x86_64#1 SMP Tue Jul 7 21:02:57 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux 24. vanilla patched

  • vanilla kernel.org (Linux )

25. patched vanilla # git mm UML xen 26. 27.

  • Linux

28. 29. # (load/unload) 30. : $ lsmod : # rmmod < > : # modprobe < > 31. ModuleSizeUsed by nls_utf817601isofs281641zlib_inflate141441 isofs udf676840crc_itu_t20801 udf binfmt_misc75281ppdev65000lp81640ipv623536414cpufreq_conservative59600cpufreq_powersave18560cpufreq_stats37760cpufreq_userspace31720cpufreq_ondemand64760freq_table42242 cpufreq_stats,cpufreq_ondemand vboxvfs367680nls_base68204 nls_utf8,isofs,udf,vboxvfs loop127480parport_pc225000parport309883 ppdev,lp,parport_pc psmouse323360pcspkr24320snd_intel8x0262681serio_raw47400snd_ac97_codec884841 snd_intel8x0 ac97_bus17281 snd_ac97_codec snd_pcm625962 snd_intel8x0,snd_ac97_codec snd_seq414560snd_timer178002 snd_pcm,snd_seq snd_seq_device63801 snd_seq snd456048 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_seq,snd_timer,snd_seq_device i2c_piix472160i2c_core198281 i2c_piix4 soundcore63681 snd snd_page_alloc78162 snd_intel8x0,snd_pcm vboxadd608646 vboxvfs ac41960button60960evdev80003ext31055121jbd394441 ext3 mbcache71081 ext3 ide_cd_mod276521cdrom301761 ide_cd_mod ide_disk104963ata_generic46760libata1404161 ata_generic scsi_mod1293241 libata dock83041 libata ide_pci_generic39080 [permanent] floppy477480ehci_hcd283960ohci_hcd185000usbcore1182243 ehci_hcd,ohci_hcd e10001025600piix65680 [permanent] ide_core961364 ide_cd_mod,ide_disk,ide_pci_generic,piix thermal152280processor325441 thermal fan41640thermal_sys108563 thermal,processor,fan ModuleSizeUsed by bluetooth53444... sunrpc18551212... ip6t_REJECT40642nf_conntrack_ipv6146322ip6table_filter39361ip6_tables187841 ip6table_filter Ipv629033632 ... 32. make ! # vanilla make 33.

34. 35. 36. 37. 38. ... 39. make

40. config( ) 41. 42. 43.

  • kernel.org

44. ( : linux-2.6.30.5.tar.bz2 ) 45. 46. $ tar xvf linux-2.6.30.5.tar.bz2 47. config( )

  • cd

48. make config make oldconfig 49. make menuconfig make xconfig

50.

  • Config

51. - config (make config)

  • y/n config

- menuconfig (make menuconfig)

  • ncurses config

- xconfig (make xconfig)

  • Tcl/Tk X config

# oldconfig (make oldconfig) ( .config ) 52. menuconfig 53. xconfig 54.

  • $ make && make modules_install $ make -j2 && make modules_install gcc make # ./arch/boot//bzImage

55.

  • /boot

56. GRUB ... title Gentoo Linux NEW kernel root (hd0,0) kernel /boot/kernel-new root=/dev/sda3 57. ( ) config 58. genkernel config make 59.