| 
 | ||||||
include .depend
include .config
include arch/i386/Makefile
vmlinux: linux/vmlinux üretir
        /* "stext" giriş noktası arch/i386/kernel/head.S dosyasında tanımlı*/
        $(LD) -T $(TOPDIR)/arch/i386/vmlinux.lds -e stext
        /* $(HEAD) */
        + from arch/i386/Makefile
                arch/i386/kernel/head.o
                arch/i386/kernel/init_task.o
        init/main.o
        init/version.o
        init/do_mounts.o
        --start-group
        /* $(CORE_FILES) */
        + from arch/i386/Makefile
                arch/i386/kernel/kernel.o
                arch/i386/mm/mm.o
        kernel/kernel.o
        mm/mm.o
        fs/fs.o
        ipc/ipc.o
        /* $(DRIVERS) */
        drivers/...
                char/char.o
                block/block.o
                misc/misc.o
                net/net.o
                media/media.o
                cdrom/driver.o
                and other static linked drivers
                + from arch/i386/Makefile
                        arch/i386/math-emu/math.o (ifdef CONFIG_MATH_EMULATION)
        /* $(NETWORKS) */
        net/network.o
        /* $(LIBS) */
        + from arch/i386/Makefile
                arch/i386/lib/lib.a
        lib/lib.a
        --end-group
        -o vmlinux
        $(NM) vmlinux | grep ... | sort > System.map
tags: vim için linux/tags üretir
modules: modülleri üretir
modules_install: modülleri kurar
clean mrproper distclean: derlemenin yapıldığı dizini temizler
psdocs pdfdocs htmldocs mandocs: çekirdek belgelerini üretir
include Rules.make
rpm: bir rpm üretir
/* i386 Linux çekirdeği oluşturmak için ld betiği * Martin Mares <[email protected]> tarafından yazılmıştır; */ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) /* "ENTRY" linux/Makefile içinde "-e stext" komut satırı seçeneği ile değiştirilir */ ENTRY(_start) /* Çıktı dosyası (linux/vmlinux) yerleşimi. * Bakınız Using LD, the GNU linker: Specifying Output Sections */ SECTIONS { /* Çıktı bölümü .text 3G+1M adresinden başlar. * Bakınız Using LD, the GNU linker: The Location Counter */ . = 0xC0000000 + 0x100000; _text = .; /* Metin ve salt okunur veri */ .text : { *(.text) *(.fixup) *(.gnu.warning) } = 0x9090 /* Tahsis edilmemiş oyuklar 0x9090 ile doldurulur, örn. "NOP NOP" için opcode. * Bakınız Using LD, the GNU linker: Optional Section Attributes */ _etext = .; /* text bölümünün sonu */ .rodata : { *(.rodata) *(.rodata.*) } .kstrtab : { *(.kstrtab) } /* Sonraki 16 baytlık sınıra hizalandı. * Bakınız Using LD, the GNU linker: Arithmetic Functions */ . = ALIGN(16); /* Olağandışılık tablosu */ __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; __start___ksymtab = .; /* Çekirdek sembol tablosu */ __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; .data : { /* Veri */ *(.data) CONSTRUCTORS } /* "CONSTRUCTORS" için bakınız: * Using LD, the GNU linker: Option Commands */ _edata = .; /* data bölümünün sonu */ . = ALIGN(8192); /* init_task */ .data.init_task : { *(.data.init_task) } . = ALIGN(4096); /* Init kodu ve veri */ __init_begin = .; .text.init : { *(.text.init) } .data.init : { *(.data.init) } . = ALIGN(16); __setup_start = .; .setup.init : { *(.setup.init) } __setup_end = .; __initcall_start = .; .initcall.init : { *(.initcall.init) } __initcall_end = .; . = ALIGN(4096); __init_end = .; . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } . = ALIGN(32); .data.cacheline_aligned : { *(.data.cacheline_aligned) } __bss_start = .; /* BSS */ .bss : { *(.bss) } _end = . ; /* Çıktı bölümü /DISCARD/ son ilintileme çıktısına dahil edilmeyecektir. * Bakınız Using LD, the GNU linker: Section Definitions */ /* Çıkarılacak bölümler */ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) } /* Aşağıdaki çıktı bölümleri 0. bellek konumuna adreslenmiştir. * Bakınız Using LD, the GNU linker: Optional Section Attributes */ /* Stab hata ayıklama bölümleri. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } .stab.excl 0 : { *(.stab.excl) } .stab.exclstr 0 : { *(.stab.exclstr) } .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } }
| Hedef | Komut | 
|---|---|
| zImage[a] | @$(MAKE) -C arch/i386/boot zImage[b] | 
| bzImage | @$(MAKE) -C arch/i386/boot bzImage | 
| zlilo | @$(MAKE) -C arch/i386/boot BOOTIMAGE=zImage zlilo | 
| bzlilo | @$(MAKE) -C arch/i386/boot BOOTIMAGE=bzImage zlilo | 
| zdisk | @$(MAKE) -C arch/i386/boot BOOTIMAGE=zImage zdisk | 
| bzdisk | @$(MAKE) -C arch/i386/boot BOOTIMAGE=bzImage zdisk | 
| install | @$(MAKE) -C arch/i386/boot BOOTIMAGE=bzImage install | 
| [a] zImage mahlası: sıkıştırılmış; [b] 
-C makefile'ları okumadan önce dizin değiştirmek için kullanılan bir make komut satırı seçeneğidir.
   | |
OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
LIBS := $(TOPDIR)/arch/i386/lib/lib.a $(LIBS) $(TOPDIR)/arch/i386/lib/lib.a
| Hedef | Komut | 
|---|---|
| zImage | $(OBJCOPY) compressed/vmlinux compressed/vmlinux.out tools/build bootsect setup compressed/vmlinux.out $(ROOT_DEV) > zImage | 
| bzImage | 
$(OBJCOPY) compressed/bvmlinux compressed/bvmlinux.out
tools/build -b bbootsect bsetup compressed/bvmlinux.out $(ROOT_DEV) \
        > bzImage
 | 
| zdisk | dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0 | 
| zlilo | 
if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz
        $(INSTALL_PATH)/vmlinuz.old; fi
if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map
        $(INSTALL_PATH)/System.old; fi
cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz
cp $(TOPDIR)/System.map $(INSTALL_PATH)/
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
 | 
| install | 
sh -x ./install.sh $(KERNELRELEASE) $(BOOTIMAGE) $(TOPDIR)/System.map
        "$(INSTALL_PATH)"
 | 
| Hedef: Öngereksinimler | Komut | 
|---|---|
| compressed/vmlinux: linux/vmlinux | @$(MAKE) -C compressed vmlinux | 
| compressed/bvmlinux: linux/vmlinux | @$(MAKE) -C compressed bvmlinux | 
| tools/build: tools/build.c | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include[a] | 
| bootsect: bootsect.o | $(LD) -Ttext 0x0 -s --oformat binary bootsect.o[b] | 
| bootsect.o: bootsect.s | $(AS) -o $@ $< | 
| bootsect.s: bootsect.S ... | $(CPP) $(CPPFLAGS) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ | 
| bbootsect: bbootsect.o | $(LD) -Ttext 0x0 -s --oformat binary $< -o $@ | 
| bbootsect.o: bbootsect.s | $(AS) -o $@ $< | 
| bbootsect.s: bootsect.S ... | $(CPP) $(CPPFLAGS) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ | 
| setup: setup.o | $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $< | 
| setup.o: setup.s | $(AS) -o $@ $< | 
| setup.s: setup.S video.S ... | $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ | 
| bsetup: bsetup.o | $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $< | 
| bsetup.o: bsetup.s | $(AS) -o $@ $< | 
| bsetup.s: setup.S video.S ... | $(CPP) $(CPPFLAGS) -D__BIG_KERNEL__ -D__ASSEMBLY__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ | 
| [a] "$@" hedef anlamındadır, "$<" ilk öngereksinim anlamındadır; Bakınız GNU make: Automatic Variables; [b] 
--oformat binary çalıştırılabilirin bellek dökümüne eşdeğer bir ham ikilik çıktı arar; Bakınız Using LD, the GNU linker: Command Line Options. | |
| Hedef | Komut | 
|---|---|
| vmlinux[a] | $(LD) -Ttext 0x1000 -e startup_32 -o vmlinux head.o misc.o piggy.o | 
| bvmlinux | $(LD) -Ttext 0x100000 -e startup_32 -o bvmlinux head.o misc.o piggy.o | 
| head.o | $(CC) $(AFLAGS) -traditional -c head.S | 
| misc.o | $(CC) $(CFLAGS) ¬ -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) ¬ -c misc.c[b] | 
| piggy.o | 
tmppiggy=_tmp_$$$$piggy; \
rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk; \
$(OBJCOPY) $(SYSTEM) $$tmppiggy; \
gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
echo "SECTIONS { .data : { input_len = .; \
        LONG(input_data_end - input_data) input_data = .; \
        *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
$(LD) -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-i386 \
        -T $$tmppiggy.lnk; \
rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk
 | 
| [a] Hedef vmlinux burada linux/Makefile içinde tanımlanana göre değişiktir; [b] "subst" bir MAKE işlevidir; Bakınız GNU make: Functions for String Substitution and Analysis. | |
tools/build bootsect setup compressed/vmlinux.out $(ROOT_DEV) > zImage tools/build -b bbootsect bsetup compressed/bvmlinux.out $(ROOT_DEV) > bzImage
| Offset | Byte | Değişken | Komut | 
|---|---|---|---|
| 1F1 (497) | 1 | setup_sectors | kurulum sektörleri sayısı, >=4 | 
| 1F4 (500) | 2 | sys_size | system size in 16-bytes cinsinden sistem boyutu, küçük-biten | 
| 1FC (508) | 1 | minor_root | root dev minor | 
| 1FD (509) | 1 | major_root | root dev major | 
| 
 | |||||||||