1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
# BK Id: SCCS/s.Makefile 1.7 06/15/01 13:16:10 paulus
#
#
# Module name: Makefile
#
# Description:
# Makefile for the IBM "tree" evaluation board Linux kernel
# boot loaders.
#
#
# Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu>
#
# PPC-405 modification
# Copyright 2000-2001 MontaVista Software Inc.
# Author: MontaVista Software, Inc.
# frank_rowand@mvista.com or source@mvista.com
# debbie_chu@mvista.com
#
HOSTCFLAGS = -O -I$(TOPDIR)/include
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
GZIP = gzip -vf9
RM = rm -f
MKEVIMG = ../utils/mkevimg -l -c
MKIRIMG = ../utils/mkirimg
CFLAGS += -I$(TOPDIR)/drivers/net
LD_ARGS = -e _start -T ld.script -Ttext 0x00200000 -Bstatic
OBJS = ../common/crt0.o main.o misc.o irSect.o ../common/string.o \
../common/misc-common.o ../common/ns16550.o
LIBS = ../lib/zlib.a
treeboot: $(OBJS) $(LIBS) ld.script
$(LD) -o $@ $(LD_ARGS) $(OBJS) $(LIBS)
zImage: vmlinux.img
zImage.initrd: vmlinux.initrd.img
treeboot.image: treeboot
$(OBJCOPY) --add-section=image=../images/vmlinux.gz treeboot $@
treeboot.initrd: treeboot.image ramdisk.image.gz
$(OBJCOPY) --add-section=initrd=ramdisk.image.gz treeboot.image $@
vmlinux.img: treeboot.image
$(OBJDUMP) --syms treeboot.image | grep irSectStart > irSectStart.txt
$(MKIRIMG) treeboot.image treeboot.image.out irSectStart.txt
$(MKEVIMG) treeboot.image.out ../images/vmlinux.tree.img
$(RM) treeboot.image treeboot.image.out irSectStart.txt
vmlinux.initrd.img: treeboot.initrd
$(OBJDUMP) --all-headers treeboot.initrd | grep irSectStart > irSectStart.txt
$(MKIRIMG) treeboot.initrd treeboot.initrd.out irSectStart.txt
$(MKEVIMG) treeboot.initrd.out ../images/vmlinux.tree.initrd.img
$(RM) treeboot.initrd treeboot.initrd.out irSectStart.txt
clean:
rm -f treeboot treeboot.image treeboot.initrd irSectStart.txt vmlinux.*
include $(TOPDIR)/Rules.make
|