📄 makefile
字号:
# BK Id: SCCS/s.Makefile 1.9 10/15/01 10:53:29 trini### arch/ppc/mbxboot/Makefile## This file is subject to the terms and conditions of the GNU General Public# License. See the file "COPYING" in the main directory of this archive# for more details.## Copyright (C) 1994 by Linus Torvalds# Adapted for PowerPC by Gary Thomas# modified by Cort (cort@cs.nmt.edu)#.c.s: $(CC) $(CFLAGS) -S -o $*.s $<.s.o: $(AS) -o $*.o $<.c.o: $(CC) $(CFLAGS) -c -o $*.o $<.S.s: $(CPP) $(AFLAGS) -traditional -o $*.o $<.S.o: $(CC) $(AFLAGS) -traditional -c -o $*.o $<TFTPIMAGE := /tftpboot/zImage.embeddedOFFSET := ../utils/offsetSIZE := ../utils/sizeLIBS := ../lib/zlib.aOBJCOPY_ARGS := -O elf32-powerpcifdef CONFIG_8xxZLINKFLAGS := -T $(TOPDIR)/arch/$(ARCH)/vmlinux.lds -Ttext 0x00180000OBJECTS := head.o m8xx_tty.oCFLAGS += -DCONFIG_8xxendififdef CONFIG_8260ZLINKFLAGS := -T $(TOPDIR)/arch/$(ARCH)/vmlinux.lds -Ttext 0x00400000OBJECTS := head_8260.o m8260_tty.o embed_config.oCFLAGS += -DCONFIG_8260endifOBJECTS += ../common/misc-common.o misc.o ../common/string.oOBJCOPY_ARGS = -O elf32-powerpcifeq ($(CONFIG_MBX),y)OBJECTS += iic.o embed_config.o pci.o qspan_pci.oCFLAGS += -DCONFIG_MBXendififeq ($(CONFIG_RPXLITE),y)CFLAGS += -DCONFIG_RPXLITEOBJECTS += iic.o embed_config.oendififeq ($(CONFIG_RPXCLASSIC),y)CFLAGS += -DCONFIG_RPXCLASSICOBJECTS += iic.o embed_config.o pci.o qspan_pci.oendififeq ($(CONFIG_BSEIP),y)CFLAGS += -DCONFIG_BSEIPOBJECTS += iic.o embed_config.oendififeq ($(CONFIG_FADS),y)CFLAGS += -DCONFIG_FADSOBJECTS += embed_config.oendifall: zImagemisc.o: misc.c $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 -DZIMAGE_OFFSET=0 \ -DZIMAGE_SIZE=0 -c -o $@ $*.czvmlinux.initrd: $(OBJECTS) $(LIBS) ../images/vmlinux.gz## Recompile misc.o again with more 'correct' bogus offsets# $(CC) $(CFLAGS) -DINITRD_OFFSET=0x0008c8e3 -DINITRD_SIZE=0x0000111a \ -DZIMAGE_OFFSET=0x00018000 -DZIMAGE_SIZE=0x000748e2 \ -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ --add-section=initrd=../images/ramdisk.image.gz \ --add-section=image=../images/vmlinux.gz \ $@.tmp $@ $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh $(OFFSET) $(OBJDUMP) $@ initrd` \ -DINITRD_SIZE=`sh $(SIZE) $(OBJDUMP) $@ initrd` \ -DZIMAGE_OFFSET=`sh $(OFFSET) $(OBJDUMP) $@ image` \ -DZIMAGE_SIZE=`sh $(SIZE) $(OBJDUMP) $@ image` \ -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ --add-section=initrd=../images/ramdisk.image.gz \ --add-section=image=../images/vmlinux.gz \ $@.tmp ../images/$@.embedded# Remove zvmlinux and zvmlinux.temp, we have ../images/zvmlinux.embedded rm -f $@.tmp $@zImage: zvmlinuxifeq ($(CONFIG_RPXCLASSIC),y) dd if=../images/zvmlinux.embedded of=../images/zImage.embedded bs=65536 skip=1else ln -sf ../images/zvmlinux.embedded ../images/zImage.embeddedendifzImage.initrd: zvmlinux.initrdifeq ($(CONFIG_RPXCLASSIC),y) dd if=../images/zvmlinux.initrd.embedded of=../images/zImage.initrd.embedded bs=65536 skip=1else ln -sf ../images/zvmlinux.initrd.embedded ../images/zImage.initrd.embeddedendifzvmlinux: $(OBJECTS) $(LIBS) ../images/vmlinux.gz## Recompile misc.o again with more 'correct' bogus offsets# $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \ -DZIMAGE_OFFSET=0x00018000 -DZIMAGE_SIZE=0x000748e2 \ -c -o misc.o misc.c## build the boot loader image and then compute the offset into it# for the kernel image# $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ --add-section=image=../images/vmlinux.gz \ $@.tmp $@## then with the offset rebuild the bootloader so we know where the kernel is# $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \ -DZIMAGE_OFFSET=`sh $(OFFSET) $(OBJDUMP) $@ image` \ -DZIMAGE_SIZE=`sh $(SIZE) $(OBJDUMP) $@ image` \ -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ --add-section=image=../images/vmlinux.gz \ $@.tmp ../images/$@.embedded# Remove zvmlinux and zvmlinux.temp, we have ../images/zvmlinux.embedded rm -f $@.tmp $@znetboot : zImage cp ../images/zImage.embedded $(TFTPIMAGE)znetboot.initrd : zImage.initrd cp ../images/zImage.initrd.embedded $(TFTPIMAGE)include $(TOPDIR)/Rules.make
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -