[[PageOutline]] [[TitleIndex(Dev/KernelHack,format=group)]] * http://www.coins.tsukuba.ac.jp/~yas/coins/slab-kernel-2011/ = setup VM = * windellはVistaとのデュアルブートなため、UTCではなくlocal timeでRTCが設定されている * Ubuntu インストール時に、UTCにすると時計が9時間進む == x86 == * http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/netboot/mini.iso * Create a new VM * Ubuntu (not x64) * ubuntu-lucid * 1/1 cpu/core * 512MB * NAT * Buslogic == x64 == * viola0![1-6]でビルドする場合、そのままではx86_64のカーネルが作られるので注意 * http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/mini.iso * Create a new VM * Ubuntu 64-bit * ubuntu-lucid64 * 1/1 cpu/core * 512MB * NAT * LSI Logic * BusLogicはx64ゲストでは使用出来ないとのこと * [http://blog.zhangsen.org/2008/12/how-to-add-syscall-on-x8664.html Jesse's Blog: how to add syscall on x86_64] * [http://forum.soft32.com/linux/system-call-implementation-x86_64-ftopict344646.html system call implementation for x86_64] = links = * https://help.ubuntu.com/community/Kernel/Compile * This page does NOT describe how to build upstream kernels from kernel.org. This is how to rebuild the actual Ubuntu kernel starting from source. * [http://d.hatena.ne.jp/haradats/20070819 VMware上のUbuntuで最新カーネルをビルドする - よそ行き顔で] > * パッケージの導入 > * build-essential(これがなくては/usr/includeすらない) > * kernel-package > * libncurses5-dev(make menuconfigを行うために必要。本来kernel-packageに入っていると良いような気がする) > * subversion, subversion-tools(TOMOYOのレポジトリの参照用) > * quilt(もともとはAndrew Mortonが作成したパッチ管理用ツール。自分で使うことはないだろうけれども一応。依存関係でgawkとdiffstatが導入された) > もし、rootでコンパイルしたくなければfakerootもあると良い。 * [http://d.hatena.ne.jp/adsaria/20081104/1225766991 Ubuntuのカーネル再構築 - adsaria mood] * http://wiki.osdev.org/VMWare > * Guest debugging > * These options are valid in Workstation 6.0+, and should be set in the virtual machine's .vmx file. > {{{ > debugStub.listen.guest32 = "TRUE" > debugStub.listen.guest64 = "TRUE" > }}} > * If using these options, Workstation prints a message "VMware Workstation is listening for debug connection on port 8832." into the vmware.log file. Start a GDB session (using a copy of your kernel that includes debug information), then: > {{{ > target remote localhost:8832 > }}} > * Standard gdb commands work in this mode (e.g. printing memory, backtrace). Note that this is a debug stub attached to the KERNEL, not a userspace program. > * Other useful options: > {{{ > debugStub.listen.guest32.remote = "TRUE" # Allows debugging from a different computer / VM instead of localhost. # The IP for remote debugging will be that of the host. > debugStub.listen.guest64.remote = "TRUE" # Same, but for 64-bit code > monitor.debugOnStartGuest32 = "TRUE" # Breaks into debug stub on first instruction (warning: in BIOS!) # This will halt the VM at the very first instruction at 0xFFFF0, you could set the next breakpoint to break *0x7c00 to break when the bootloader is loaded by the BIOS > debugStub.hideBreakpoints = "TRUE" # Allows gdb breakpoints to work > bios.bootDelay = "3000" # Delay booting the BIOS code. > }}} * [http://d.hatena.ne.jp/m-bird/20110805/1312507198 Linuxカーネルの再構築方法@Debian Squeeze - m-birdとFreeBSDの同棲日記] * [http://www.ibm.com/developerworks/jp/linux/library/l-system-calls/ Linux システム・コールを使用したカーネル・コマンド] * [http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/SystemTap_Beginners_Guide/topsyssect.html 4.3.5. Tracking Most Frequently Used System Calls] * [http://hekimian-williams.com/?p=20 Adding A System Call To Linux (Fedora 9) - Cory’s Place] Fedora 9 kernel 2.6.26 (i686)