1 # 1 # 2 # arch/sh/boot/Makefile !! 2 # arch/i386/boot/Makefile 3 # 3 # 4 # This file is subject to the terms and condit 4 # This file is subject to the terms and conditions of the GNU General Public 5 # License. See the file "COPYING" in the main 5 # License. See the file "COPYING" in the main directory of this archive 6 # for more details. 6 # for more details. 7 # 7 # 8 # Copyright (C) 1999 Stuart Menefy !! 8 # Copyright (C) 1994 by Linus Torvalds 9 # 9 # 10 10 11 # !! 11 BOOT_INCL = $(TOPDIR)/include/linux/config.h \ 12 # Assign safe dummy values if these variables !! 12 $(TOPDIR)/include/linux/autoconf.h \ 13 # in order to suppress error message. !! 13 $(TOPDIR)/include/asm/boot.h 14 # << 15 CONFIG_PAGE_OFFSET ?= 0x80000000 << 16 CONFIG_MEMORY_START ?= 0x0c000000 << 17 CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 << 18 CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 << 19 CONFIG_ENTRY_OFFSET ?= 0x00001000 << 20 CONFIG_PHYSICAL_START ?= $(CONFIG_MEMORY_STA << 21 << 22 suffix_y := bin << 23 suffix_$(CONFIG_KERNEL_GZIP) := gz << 24 suffix_$(CONFIG_KERNEL_BZIP2) := bz2 << 25 suffix_$(CONFIG_KERNEL_LZMA) := lzma << 26 suffix_$(CONFIG_KERNEL_XZ) := xz << 27 suffix_$(CONFIG_KERNEL_LZO) := lzo << 28 << 29 targets := zImage vmlinux.srec romImage uImage << 30 uImage.bz2 uImage.lzma uImage.xz uI << 31 vmlinux.bin vmlinux.bin.gz vmlinux. << 32 vmlinux.bin.xz vmlinux.bin.lzo << 33 subdir- := compressed romimage << 34 << 35 $(obj)/zImage: $(obj)/compressed/vmlinux FORCE << 36 $(call if_changed,objcopy) << 37 @echo ' Kernel: $@ is ready' << 38 << 39 $(obj)/compressed/vmlinux: FORCE << 40 $(Q)$(MAKE) $(build)=$(obj)/compressed << 41 14 42 $(obj)/romImage: $(obj)/romimage/vmlinux FORCE !! 15 zImage: $(CONFIGURE) bootsect setup compressed/vmlinux tools/build 43 $(call if_changed,objcopy) !! 16 $(OBJCOPY) compressed/vmlinux compressed/vmlinux.out 44 @echo ' Kernel: $@ is ready' !! 17 tools/build bootsect setup compressed/vmlinux.out $(ROOT_DEV) > zImage 45 18 46 $(obj)/romimage/vmlinux: $(obj)/zImage FORCE !! 19 bzImage: $(CONFIGURE) bbootsect bsetup compressed/bvmlinux tools/build 47 $(Q)$(MAKE) $(build)=$(obj)/romimage $ !! 20 $(OBJCOPY) compressed/bvmlinux compressed/bvmlinux.out >> 21 tools/build -b bbootsect bsetup compressed/bvmlinux.out $(ROOT_DEV) > bzImage 48 22 49 KERNEL_MEMORY := $(shell /bin/bash -c 'print !! 23 compressed/vmlinux: $(TOPDIR)/vmlinux 50 $$[$(CONFIG_PHYSICAL_STAR !! 24 @$(MAKE) -C compressed vmlinux 51 25 52 KERNEL_LOAD := $(shell /bin/bash -c 'print !! 26 compressed/bvmlinux: $(TOPDIR)/vmlinux 53 $$[$(CONFIG_PAGE_OFFSET) !! 27 @$(MAKE) -C compressed bvmlinux 54 $(KERNEL_MEMORY) + \ << 55 $(CONFIG_ZERO_PAGE_OFF << 56 28 57 KERNEL_ENTRY := $(shell /bin/bash -c 'print !! 29 zdisk: $(BOOTIMAGE) 58 $$[$(CONFIG_PAGE_OFFSET) !! 30 dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0 59 $(KERNEL_MEMORY) + \ << 60 $(CONFIG_ZERO_PAGE_OFF << 61 31 62 UIMAGE_LOADADDR = $(KERNEL_LOAD) !! 32 zlilo: $(CONFIGURE) $(BOOTIMAGE) 63 UIMAGE_ENTRYADDR = $(KERNEL_ENTRY) !! 33 if [ -f $(INSTALL_PATH)/vmlinuz ]; then mv $(INSTALL_PATH)/vmlinuz $(INSTALL_PATH)/vmlinuz.old; fi >> 34 if [ -f $(INSTALL_PATH)/System.map ]; then mv $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi >> 35 cat $(BOOTIMAGE) > $(INSTALL_PATH)/vmlinuz >> 36 cp $(TOPDIR)/System.map $(INSTALL_PATH)/ >> 37 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 64 38 65 $(obj)/vmlinux.bin: vmlinux FORCE !! 39 install: $(CONFIGURE) $(BOOTIMAGE) 66 $(call if_changed,objcopy) !! 40 sh -x ./install.sh $(KERNELRELEASE) $(BOOTIMAGE) $(TOPDIR)/System.map "$(INSTALL_PATH)" 67 41 68 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORC !! 42 tools/build: tools/build.c 69 $(call if_changed,gzip) !! 43 $(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include 70 44 71 $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FOR !! 45 bootsect: bootsect.o 72 $(call if_changed,bzip2) !! 46 $(LD) -Ttext 0x0 -s --oformat binary -o $@ $< 73 47 74 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FO !! 48 bootsect.o: bootsect.s 75 $(call if_changed,lzma) !! 49 $(AS) -o $@ $< 76 50 77 $(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORC !! 51 bootsect.s: bootsect.S Makefile $(BOOT_INCL) 78 $(call if_changed,xzkern) !! 52 $(CPP) $(CPPFLAGS) -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ 79 53 80 $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FOR !! 54 bbootsect: bbootsect.o 81 $(call if_changed,lzo) !! 55 $(LD) -Ttext 0x0 -s --oformat binary $< -o $@ 82 56 83 $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORC !! 57 bbootsect.o: bbootsect.s 84 $(call if_changed,uimage,bzip2) !! 58 $(AS) -o $@ $< 85 59 86 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE !! 60 bbootsect.s: bootsect.S Makefile $(BOOT_INCL) 87 $(call if_changed,uimage,gzip) !! 61 $(CPP) $(CPPFLAGS) -D__BIG_KERNEL__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ 88 62 89 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FO !! 63 setup: setup.o 90 $(call if_changed,uimage,lzma) !! 64 $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $< 91 65 92 $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE !! 66 setup.o: setup.s 93 $(call if_changed,uimage,xz) !! 67 $(AS) -o $@ $< 94 68 95 $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORC !! 69 setup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h 96 $(call if_changed,uimage,lzo) !! 70 $(CPP) $(CPPFLAGS) -D__ASSEMBLY__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ 97 71 98 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE !! 72 bsetup: bsetup.o 99 $(call if_changed,uimage,none) !! 73 $(LD) -Ttext 0x0 -s --oformat binary -e begtext -o $@ $< 100 74 101 OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec !! 75 bsetup.o: bsetup.s 102 $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux !! 76 $(AS) -o $@ $< 103 $(call if_changed,objcopy) << 104 77 105 OBJCOPYFLAGS_uImage.srec := -I binary -O srec !! 78 bsetup.s: setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h 106 $(obj)/uImage.srec: $(obj)/uImage FORCE !! 79 $(CPP) $(CPPFLAGS) -D__BIG_KERNEL__ -D__ASSEMBLY__ -traditional $(SVGA_MODE) $(RAMDISK) $< -o $@ 107 $(call if_changed,objcopy) << 108 80 109 $(obj)/uImage: $(obj)/uImage.$(suffix_y) !! 81 dep: 110 @ln -sf $(notdir $<) $@ << 111 @echo ' Image $@ is ready' << 112 82 113 export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START !! 83 clean: 114 CONFIG_PHYSICAL_START CONFIG_ZERO_PAGE_ !! 84 rm -f tools/build 115 KERNEL_MEMORY suffix_y !! 85 rm -f setup bootsect zImage compressed/vmlinux.out >> 86 rm -f bsetup bbootsect bzImage compressed/bvmlinux.out >> 87 @$(MAKE) -C compressed clean
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.