📄 makefile
字号:
## arch/alpha/boot/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## Creating a compressed kernel image (arch/alpha/boot/vmlinux.gz)# is done via:## make boot## Creating a BOOTP image (arch/alpha/boot/bootpfile or bootpzfile)# is done via:## make bootpfile # using an uncompressed kernel# make bootpzfile # using a compressed kernel## Adding an INITRD image to a BOOTP file (arch/alpha/boot/bootpzfile)# can be done, e.g, via:## INITRD=`pwd`/initrd.img make bootpzfileLINKFLAGS = -static -T bootloader.lds #-N -relax.S.s: $(CPP) $(AFLAGS) -traditional -o $*.o $<.S.o: $(CC) $(AFLAGS) -traditional -c -o $*.o $<OBJECTS = head.o main.oBPOBJECTS = head.o bootp.oBPZOBJECTS = head.o bootpz.o misc.oTARGETS = vmlinux.gz tools/objstrip # also needed by aboot & miloVMLINUX = $(TOPDIR)/vmlinuxOBJSTRIP = tools/objstripall: $(TARGETS) @echo Ready to install kernel in $(shell pwd)/vmlinux.gz# normally no need to build these:rawboot: vmlinux.nh tools/lxboot tools/bootlxmsb: tools/lxboot tools/bootlx vmlinux.nh ( cat tools/lxboot tools/bootlx vmlinux.nh ) > /dev/rz0a disklabel -rw rz0 'linux' tools/lxboot tools/bootlxbootimage: tools/mkbb tools/lxboot tools/bootlx vmlinux.nh ( cat tools/lxboot tools/bootlx vmlinux.nh ) > bootimage tools/mkbb bootimage tools/lxbootbootpfile: tools/bootph vmlinux.nh cat tools/bootph vmlinux.nh > bootpfileifdef INITRD cat $(INITRD) >> bootpfileendifbootpzfile: tools/bootpzh vmlinux.nh.gz cat tools/bootpzh vmlinux.nh.gz > bootpzfileifdef INITRD cat $(INITRD) >> bootpzfileendifsrmboot: bootdevice bootimage dd if=bootimage of=$(BOOTDEV) bs=512 seek=1 skip=1 tools/mkbb $(BOOTDEV) tools/lxbootbootdevice: @test "$(BOOTDEV)" != "" || (echo You must specify BOOTDEV ; exit -1)vmlinux.gz: $(TOPDIR)/vmlinux gzip -fv9c $(TOPDIR)/vmlinux > vmlinux.gzvmlinux.nh.gz: vmlinux.nh gzip -fv9c vmlinux.nh > vmlinux.nh.gzmain.o: ksize.hbootp.o: ksize.hbootpz.o: kzsize.hksize.h: vmlinux.nh dummy echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@Tifdef INITRD [ ! \( -f $(INITRD) \) ] || exit 1 echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@Tendif cmp -s $@T $@ || mv -f $@T $@ rm -f $@Tkzsize.h: vmlinux.nh.gz dummy echo "#define KERNEL_SIZE `ls -l vmlinux.nh | awk '{print $$5}'`" > $@T echo "#define KERNEL_Z_SIZE `ls -l vmlinux.nh.gz | awk '{print $$5}'`" >> $@Tifdef INITRD [ -f $(INITRD) ] || exit 1 echo "#define INITRD_IMAGE_SIZE `ls -l $(INITRD) | awk '{print $$5}'`" >> $@Tendif cmp -s $@T $@ || mv -f $@T $@ rm -f $@Tvmlinux.nh: $(VMLINUX) $(OBJSTRIP) $(OBJSTRIP) -v $(VMLINUX) vmlinux.nhvmlinux: $(VMLINUX) $(STRIP) -o vmlinux $(VMLINUX)tools/lxboot: $(OBJSTRIP) bootloader $(OBJSTRIP) -p bootloader tools/lxboottools/bootlx: bootloader $(OBJSTRIP) $(OBJSTRIP) -vb bootloader tools/bootlxtools/bootph: bootpheader $(OBJSTRIP) $(OBJSTRIP) -vb bootpheader tools/bootphtools/bootpzh: bootpzheader $(OBJSTRIP) $(OBJSTRIP) -vb bootpzheader tools/bootpzh$(OBJSTRIP): $(OBJSTRIP).c $(HOSTCC) $(HOSTCFLAGS) -I$(HPATH) $(OBJSTRIP).c -o $(OBJSTRIP)tools/mkbb: tools/mkbb.c $(HOSTCC) tools/mkbb.c -o tools/mkbbbootloader: $(OBJECTS) $(LD) $(LINKFLAGS) $(OBJECTS) $(LIBS) -o bootloaderbootpheader: $(BPOBJECTS) $(LD) $(LINKFLAGS) $(BPOBJECTS) $(LIBS) -o bootpheaderbootpzheader: $(BPZOBJECTS) $(LD) $(LINKFLAGS) $(BPZOBJECTS) $(LIBS) -o bootpzheadermisc.o: misc.c $(TOPDIR)/lib/inflate.cclean: rm -f $(TARGETS) bootloader bootimage bootpfile bootpheader rm -f tools/mkbb tools/bootlx tools/lxboot tools/bootph rm -f vmlinux.nh ksize.hdep:dummy:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -