diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /arch/ppc/boot/Makefile | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'arch/ppc/boot/Makefile')
-rw-r--r-- | arch/ppc/boot/Makefile | 56 |
1 files changed, 33 insertions, 23 deletions
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index f0843e17c..fde1ad4c6 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile @@ -20,20 +20,25 @@ .S.o: $(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $< - ZOFF = 0 ZSZ = 0 IOFF = 0 ISZ = 0 + +ifeq ($(CONFIG_ALL_PPC),y) +# yes, we want to build prep stuff +CONFIG_PREP = y +endif + ifeq ($(CONFIG_MBX),y) ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00100000 else -#ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00800000 ZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00600000 endif + GZIP_FLAGS = -v9 -OBJECTS := head.o misc.o ../coffboot/zlib.o # inflate.o unzip.o +OBJECTS := head.o misc.o ../coffboot/zlib.o CFLAGS = -O2 -DSTDC_HEADERS -fno-builtin -I$(TOPDIR)/include OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY_ARGS = -O elf32-powerpc @@ -47,10 +52,6 @@ endif all: zImage -ifeq ($(CONFIG_ALL_PPC),y) -CONFIG_PREP = y -endif - ifeq ($(CONFIG_PREP),y) zvmlinux.initrd: zvmlinux $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS) @@ -58,10 +59,10 @@ zvmlinux.initrd: zvmlinux --add-section=initrd=ramdisk.image.gz \ --add-section=image=../coffboot/vmlinux.gz \ zvmlinux.initrd.tmp zvmlinux.initrd - $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset zvmlinux.initrd initrd` \ - -DINITRD_SIZE=`sh size zvmlinux.initrd initrd` \ - -DZIMAGE_OFFSET=`sh offset zvmlinux.initrd image` \ - -DZIMAGE_SIZE=`sh size zvmlinux.initrd image` \ + $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \ + -DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \ + -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \ + -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \ -DKERNELBASE=$(KERNELBASE) -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ @@ -77,10 +78,10 @@ zvmlinux.initrd: zvmlinux --add-section=initrd=ramdisk.image.gz \ --add-section=image=../coffboot/vmlinux.gz \ zvmlinux.initrd.tmp zvmlinux.initrd - $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset zvmlinux.initrd initrd` \ - -DINITRD_SIZE=`sh size zvmlinux.initrd initrd` \ - -DZIMAGE_OFFSET=`sh offset zvmlinux.initrd image` \ - -DZIMAGE_SIZE=`sh size zvmlinux.initrd image` \ + $(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \ + -DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \ + -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \ + -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \ -DKERNELBASE=$(KERNELBASE) -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ @@ -90,19 +91,24 @@ zvmlinux.initrd: zvmlinux rm zvmlinux.initrd.tmp endif -zImage: zvmlinux mkprep ifeq ($(CONFIG_PREP),y) +zImage: zvmlinux mkprep ./mkprep -pbp zvmlinux zImage -endif +else ifeq ($(CONFIG_MBX),y) +zImage: zvmlinux ln -sf zvmlinux zImage +else +zImage: +endif endif -zImage.initrd: zvmlinux.initrd mkprep ifeq ($(CONFIG_PREP),y) +zImage.initrd: zvmlinux.initrd mkprep ./mkprep -pbp zvmlinux.initrd zImage.initrd endif ifeq ($(CONFIG_MBX),y) +zImage.initrd: zvmlinux.initrd ln -sf zvmlinux.initrd zImage.initrd endif @@ -118,8 +124,8 @@ zvmlinux: $(OBJECTS) ../coffboot/vmlinux.gz # 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 zvmlinux image` \ - -DZIMAGE_SIZE=`sh size zvmlinux image` -DKERNELBASE=$(KERNELBASE) \ + -DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux image` \ + -DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux image` -DKERNELBASE=$(KERNELBASE) \ -c -o misc.o misc.c $(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS) $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \ @@ -131,17 +137,21 @@ ifeq ($(CONFIG_PREP),y) dd if=zImage of=/dev/fd0H1440 bs=64b endif -mkprep : mkprep.c ifeq ($(CONFIG_PREP),y) +mkprep : mkprep.c $(HOSTCC) -DKERNELBASE=$(KERNELBASE) -o mkprep mkprep.c endif -znetboot : zImage ifeq ($(CONFIG_PREP),y) +znetboot : zImage cp zImage /tftpboot/zImage.prep -endif +else ifeq ($(CONFIG_MBX),y) +znetboot : zImage cp zImage /tftpboot/zImage.mbx +else +znetboot : +endif endif znetboot.initrd : zImage.initrd |