Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
4269475f
Commit
4269475f
authored
Jun 20, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Plain Diff
Hand merged
parents
24255033
516a1648
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
250 additions
and
201 deletions
+250
-201
Documentation/DocBook/Makefile
Documentation/DocBook/Makefile
+4
-0
Makefile
Makefile
+57
-7
Rules.make
Rules.make
+53
-21
arch/alpha/Makefile
arch/alpha/Makefile
+1
-1
arch/arm/Makefile
arch/arm/Makefile
+2
-1
arch/arm/boot/Makefile
arch/arm/boot/Makefile
+3
-3
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/Makefile
+1
-1
arch/cris/Makefile
arch/cris/Makefile
+3
-3
arch/cris/boot/compressed/Makefile
arch/cris/boot/compressed/Makefile
+2
-2
arch/cris/boot/rescue/Makefile
arch/cris/boot/rescue/Makefile
+4
-3
arch/i386/Makefile
arch/i386/Makefile
+3
-4
arch/i386/boot/Makefile
arch/i386/boot/Makefile
+40
-52
arch/i386/boot/compressed/Makefile
arch/i386/boot/compressed/Makefile
+14
-35
arch/i386/boot/compressed/vmlinux.scr
arch/i386/boot/compressed/vmlinux.scr
+9
-0
arch/ia64/Makefile
arch/ia64/Makefile
+3
-2
arch/m68k/Makefile
arch/m68k/Makefile
+3
-3
arch/mips/Makefile
arch/mips/Makefile
+3
-3
arch/mips/philips/nino/ramdisk/Makefile
arch/mips/philips/nino/ramdisk/Makefile
+1
-1
arch/mips64/Makefile
arch/mips64/Makefile
+6
-6
arch/parisc/Makefile
arch/parisc/Makefile
+2
-3
arch/ppc/Makefile
arch/ppc/Makefile
+1
-1
arch/ppc64/Makefile
arch/ppc64/Makefile
+1
-1
arch/ppc64/boot/Makefile
arch/ppc64/boot/Makefile
+2
-2
arch/s390/Makefile
arch/s390/Makefile
+3
-4
arch/s390/boot/Makefile
arch/s390/boot/Makefile
+3
-5
arch/s390x/Makefile
arch/s390x/Makefile
+3
-4
arch/s390x/boot/Makefile
arch/s390x/boot/Makefile
+2
-4
arch/sh/Makefile
arch/sh/Makefile
+5
-6
arch/sh/boot/Makefile
arch/sh/boot/Makefile
+2
-2
arch/sh/boot/compressed/Makefile
arch/sh/boot/compressed/Makefile
+3
-3
arch/sparc/Makefile
arch/sparc/Makefile
+3
-3
arch/sparc/boot/Makefile
arch/sparc/boot/Makefile
+1
-1
arch/sparc64/Makefile
arch/sparc64/Makefile
+2
-2
arch/x86_64/Makefile
arch/x86_64/Makefile
+2
-3
arch/x86_64/boot/Makefile
arch/x86_64/boot/Makefile
+2
-2
arch/x86_64/boot/compressed/Makefile
arch/x86_64/boot/compressed/Makefile
+1
-1
drivers/message/fusion/Makefile
drivers/message/fusion/Makefile
+0
-6
No files found.
Documentation/DocBook/Makefile
View file @
4269475f
...
...
@@ -15,6 +15,10 @@ C-procfs-example = procfs_example.sgml
$(TOPDIR)/scripts/docgen
$(TOPDIR)/scripts/gen-all-syms
\
$(TOPDIR)/scripts/kernel-doc $(TOPDIR)/scripts/docproc
:
doc-progs ;
dochelp
:
@
echo
' Linux kernel internal documentation in different formats:'
@
echo
' sgmldocs (SGML), psdocs (Postscript), pdfdocs (PDF), htmldocs (HTML)'
.PHONY
:
doc-progs
doc-progs
:
@
$(MAKE)
-C
$(TOPDIR)
/scripts doc-progs
...
...
Makefile
View file @
4269475f
...
...
@@ -3,6 +3,12 @@ PATCHLEVEL = 5
SUBLEVEL
=
23
EXTRAVERSION
=
# *DOCUMENTATION*
# Too see a list of typical targets execute "make help"
# More info can be located in ./Documentation/kbuild
# Comments in this file is targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
# We are using a recursive build, so we need to do a little thinking
# to get the ordering right.
#
...
...
@@ -140,16 +146,23 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL
TOPDIR
HPATH
HOSTCC
HOSTCFLAGS
CROSS_COMPILE
AS
LD
CC
\
CPP
AR
NM
STRIP
OBJCOPY
OBJDUMP
MAKE
MAKEFILES
GENKSYMS
PERL
export
CPPFLAGS
EXPORT_FLAGS
NOSTDINC_FLAGS
export
CPPFLAGS
EXPORT_FLAGS
NOSTDINC_FLAGS
OBJCOPYFLAGS
export
CFLAGS
CFLAGS_KERNEL
CFLAGS_MODULE
export
AFLAGS
AFLAGS_KERNEL
AFLAGS_MODULE
src
:=
.
obj
:=
.
srctree
:=
$(TOPDIR)
objtree
:=
$(TOPDIR)
export
srctree
objtree
SUBDIRS
:=
init kernel mm fs ipc lib drivers sound net
noconfig_targets
:=
xconfig menuconfig config oldconfig randconfig
\
defconfig allyesconfig allnoconfig allmodconfig
\
clean mrproper distclean
\
tags TAGS sgmldocs psdocs pdfdocs htmldocs
\
help
tags TAGS sgmldocs psdocs pdfdocs htmldocs
\
checkconfig checkhelp checkincludes
ifeq
($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
...
...
@@ -217,7 +230,7 @@ NETWORKS := net/network.o
include
arch/$(ARCH)/Makefile
export
NETWORKS
DRIVERS
LIBS
HEAD
LDFLAGS
LINKFLAGS
MAKEBOOT
ASFLAGS
export
NETWORKS
DRIVERS
LIBS
HEAD
LDFLAGS
MAKEBOOT
ASFLAGS
# boot target
# ---------------------------------------------------------------------------
...
...
@@ -238,7 +251,7 @@ boot: vmlinux
vmlinux-objs
:=
$(HEAD)
$(INIT)
$(CORE_FILES)
$(LIBS)
$(DRIVERS)
$(NETWORKS)
quiet_cmd_link_vmlinux
=
LD
$@
cmd_link_vmlinux
=
$(LD)
$(L
INKFLAGS
)
$(HEAD)
$(INIT)
\
cmd_link_vmlinux
=
$(LD)
$(L
DFLAGS)
$
(
LDFLAGS_
$
(
@F
)
)
$(HEAD)
$(INIT)
\
--start-group
\
$(CORE_FILES)
\
$(LIBS)
\
...
...
@@ -255,7 +268,7 @@ define rule_link_vmlinux
.
scripts/mkversion
>
.tmpversion
mv
-f
.tmpversion
.version
+$(MAKE)
-C
init
$(call
cmd,
cmd_
link_vmlinux)
$(call
cmd,link_vmlinux)
$(cmd_link_vmlinux)
echo 'cmd_$@
:
= $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd
$(NM)
vmlinux |
grep
-v
'\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)'
|
sort
>
System.map
...
...
@@ -679,6 +692,43 @@ tags: FORCE
find
$(SUBDIRS)
init
-name
SCCS
-prune
-o
-name
BitKeeper
-prune
-o
\
-name
'*.[ch]'
-print
| xargs ctags
$$
CTAGSF
-a
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
help
:
@
echo
'Cleaning targets:'
@
echo
' clean - remove most generated files but keep the config'
@
echo
' mrproper - remove all generated files including the config'
@
echo
' distclean - mrproper + remove files generated by editors and patch'
@
echo
''
@
echo
'Configuration targets:'
@
echo
' oldconfig - Update current config utilising a line-oriented program'
@
echo
' menuconfig - Update current config utilising a menu based program'
@
echo
' xconfig - Update current config utilising a X-based program'
@
echo
' defconfig - New config with default answer to all options'
@
echo
' allmodconfig - New config selecting modules when possible'
@
echo
' allyesconfig - New config where all options are accepted with yes'
@
echo
' allnoconfig - New minimal config'
@
echo
''
@
echo
'Other generic targets:'
@
echo
' all - Build all targets marked with [*]'
@
echo
' dep - Create module version information'
@
echo
'* vmlinux - Build the bare kernel'
@
echo
'* modules - Build all modules'
@
echo
' dir/file.[ois]- Build specified target only'
@
echo
' rpm - Build a kernel as an RPM package'
@
echo
' tags/TAGS - Generate tags file for editors'
@
echo
''
@
echo
'Documentation targets:'
@
$(MAKE)
--no-print-directory
-f
Documentation/DocBook/Makefile dochelp
@
echo
''
@
echo
'Architecture specific targets (
$(ARCH)
):'
@
$(MAKE)
--no-print-directory
-f
arch
/
$(ARCH)
/boot/Makefile archhelp
@
echo
''
@
echo
'Execute "make" or "make all" to build all targets marked with [*] '
@
echo
'For further info browse Documentation/kbuild/*'
# Documentation targets
# ---------------------------------------------------------------------------
...
...
@@ -735,9 +785,9 @@ if_changed_rule = $(if $(strip $? \
$(
filter-out
$
(
cmd_
$
(
@F
))
,
$
(
cmd_
$(1)
)))
,
\
@
$
(
rule_
$(1)
))
# If quiet is set, only print short version of
rule
# If quiet is set, only print short version of
command
cmd
=
@
$(
if
$
(
$(quiet)
$(1)
)
,echo
' $(
$(quiet)$(1)
)
'
&&
)
$
(
$(1)
)
cmd
=
@
$(
if
$
(
$(quiet)
cmd_
$(1)
)
,echo
' $(
$(quiet)
cmd_
$(1)
)
'
&&
)
$
(
cmd_
$(1)
)
define
update-if-changed
if
[
-r
$@
]
&&
cmp
-s
$@
$@.tmp;
then
\
...
...
Rules.make
View file @
4269475f
...
...
@@ -34,7 +34,7 @@ endif
# $(srctree)/include/linux/module.h : Some file relative to the source
# dir root
#
#
Those
can only be used in the section after
#
$(obj) and $(src)
can only be used in the section after
# include $(TOPDIR)/Rules.make, i.e for generated files and the like.
# Intentionally.
#
...
...
@@ -43,8 +43,10 @@ endif
obj
:=
.
src
:=
.
objtree
:=
$(TOPDIR)
srctree
:=
$(TOPDIR)
# For use in the quiet output
echo_target
=
$(RELDIR)
/
$@
# Figure out what we need to build from the various variables
# ===========================================================================
...
...
@@ -269,25 +271,25 @@ c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
\
$(export_flags)
quiet_cmd_cc_s_c
=
CC
$(
RELDIR)
/
$@
quiet_cmd_cc_s_c
=
CC
$(
echo_target)
cmd_cc_s_c
=
$(CC)
$(c_flags)
-S
-o
$@
$<
%.s
:
%.c FORCE
$(
call
if_changed_dep,cc_s_c
)
quiet_cmd_cc_i_c
=
CPP
$(
RELDIR)
/
$@
quiet_cmd_cc_i_c
=
CPP
$(
echo_target)
cmd_cc_i_c
=
$(CPP)
$(c_flags)
-o
$@
$<
%.i
:
%.c FORCE
$(
call
if_changed_dep,cc_i_c
)
quiet_cmd_cc_o_c
=
CC
$(
RELDIR)
/
$@
quiet_cmd_cc_o_c
=
CC
$(
echo_target)
cmd_cc_o_c
=
$(CC)
$(c_flags)
-c
-o
$@
$<
%.o
:
%.c FORCE
$(
call
if_changed_dep,cc_o_c
)
quiet_cmd_cc_lst_c
=
' Generating
$(
RELDIR)
/$@
'
quiet_cmd_cc_lst_c
=
' Generating
$(
echo_target)
'
cmd_cc_lst_c
=
$(CC)
$(c_flags)
-g
-c
-o
$*
.o
$<
&&
$(TOPDIR)
/scripts/makelst
$*
.o
$(TOPDIR)
/System.map
$(OBJDUMP)
>
$@
%.lst
:
%.c FORCE
...
...
@@ -304,13 +306,13 @@ $(real-objs-m:.o=.s): modkern_aflags := $(AFLAGS_MODULE)
a_flags
=
-Wp
,-MD,
$(depfile)
$(AFLAGS)
$(NOSTDINC_FLAGS)
\
$(modkern_aflags)
$(EXTRA_AFLAGS)
$
(
AFLAGS_
$
(
*
F
)
.o
)
quiet_cmd_as_s_S
=
CPP
$(
RELDIR)
/
$@
quiet_cmd_as_s_S
=
CPP
$(
echo_target)
cmd_as_s_S
=
$(CPP)
$(a_flags)
-o
$@
$<
%.s
:
%.S FORCE
$(
call
if_changed_dep,as_s_S
)
quiet_cmd_as_o_S
=
AS
$(
RELDIR)
/
$@
quiet_cmd_as_o_S
=
AS
$(
echo_target)
cmd_as_o_S
=
$(CC)
$(a_flags)
-c
-o
$@
$<
%.o
:
%.S FORCE
...
...
@@ -328,10 +330,10 @@ $(sort $(subdir-obj-y)): sub_dirs ;
# Rule to compile a set of .o files into one .o file
#
ifdef
O_TARGET
quiet_cmd_link_o_target
=
LD
$(
RELDIR)
/
$@
quiet_cmd_link_o_target
=
LD
$(
echo_target)
# If the list of objects to link is empty, just create an empty O_TARGET
cmd_link_o_target
=
$(
if
$(
strip
$
(
obj-y
))
,
\
$(LD)
$(EXTRA_LDFLAGS)
-r
-o
$@
$(
filter
$
(
obj-y
)
,
$^
)
,
\
$(LD)
$(
LDFLAGS)
$(
EXTRA_LDFLAGS)
-r
-o
$@
$(
filter
$
(
obj-y
)
,
$^
)
,
\
rm
-f
$@
;
$(AR)
rcs
$@
)
$(O_TARGET)
:
$(obj-y) FORCE
...
...
@@ -344,7 +346,7 @@ endif # O_TARGET
# Rule to compile a set of .o files into one .a file
#
ifdef
L_TARGET
quiet_cmd_link_l_target
=
AR
$(
RELDIR)
/
$@
quiet_cmd_link_l_target
=
AR
$(
echo_target)
cmd_link_l_target
=
rm
-f
$@
;
$(AR)
$(EXTRA_ARFLAGS)
rcs
$@
$
(
obj-y
)
$(L_TARGET)
:
$(obj-y) FORCE
...
...
@@ -357,8 +359,8 @@ endif
# Rule to link composite objects
#
quiet_cmd_link_multi
=
LD
$(
RELDIR)
/
$@
cmd_link_multi
=
$(LD)
$(EXTRA_LDFLAGS)
-r
-o
$@
$(
filter
$
(
$(
basename
$@
)
-objs
)
,
$^
)
quiet_cmd_link_multi
=
LD
$(
echo_target)
cmd_link_multi
=
$(LD)
$(
LDFLAGS)
$(
EXTRA_LDFLAGS)
-r
-o
$@
$(
filter
$
(
$(
basename
$@
)
-objs
)
,
$^
)
# We would rather have a list of rules like
# foo.o: $(foo-objs)
...
...
@@ -379,22 +381,22 @@ host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
host-progs-multi
:=
$(
foreach
m,
$
(
host-progs
)
,
$(
if
$
(
$(m)
-objs
)
,
$(m)
))
host-progs-multi-objs
:=
$(
foreach
m,
$
(
host-progs-multi
)
,
$
(
$(m)
-objs
))
quiet_cmd_host_cc__c
=
HOSTCC
$(
RELDIR)
/
$@
cmd_host_cc__c
=
$(HOSTCC)
-Wp
,-MD,
.
$(
subst
/,_,
$@
)
.d
\
quiet_cmd_host_cc__c
=
HOSTCC
$(
echo_target)
cmd_host_cc__c
=
$(HOSTCC)
-Wp
,-MD,
$(depfile)
\
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
\
$(HOST_LOADLIBES)
-o
$@
$<
$(host-progs-single)
:
%: %.c FORCE
$(
call
if_changed_dep,host_cc__c
)
quiet_cmd_host_cc_o_c
=
HOSTCC
$(
RELDIR)
/
$@
cmd_host_cc_o_c
=
$(HOSTCC)
-Wp
,-MD,
.
$(
subst
/,_,
$@
)
.d
\
quiet_cmd_host_cc_o_c
=
HOSTCC
$(
echo_target)
cmd_host_cc_o_c
=
$(HOSTCC)
-Wp
,-MD,
$(depfile)
\
$(HOSTCFLAGS)
$(HOST_EXTRACFLAGS)
-c
-o
$@
$<
$(host-progs-multi-objs)
:
%.o: %.c FORCE
$(
call
if_changed_dep,host_cc_o_c
)
quiet_cmd_host_cc__o
=
HOSTLD
$(
RELDIR)
/
$@
quiet_cmd_host_cc__o
=
HOSTLD
$(
echo_target)
cmd_host_cc__o
=
$(HOSTCC)
$(HOSTLDFLAGS)
-o
$@
$
(
$@
-objs
)
\
$(HOST_LOADLIBES)
...
...
@@ -410,9 +412,39 @@ endif # ! fastdep
# ===========================================================================
%
::
%_shipped
@
echo
' CP
$(
RELDIR)
/$@
'
@
echo
' CP
$(
echo_target)
'
@
cp
$<
$@
# Commands useful for building a boot image
# ===========================================================================
#
# Use as following:
#
# target: source(s) FORCE
# $(if_changed,ld/objcopy)
#
# and add target to EXTRA_TARGETS so that we know we have to
# read in the saved command line
# Linking
# ---------------------------------------------------------------------------
quiet_cmd_ld
=
LD
$(echo_target)
cmd_ld
=
$(LD)
$(LDFLAGS)
$(EXTRA_LDFLAGS)
$
(
LDFLAGS_
$@
)
\
$(
filter-out
FORCE,
$^
)
-o
$@
# Objcopy
# ---------------------------------------------------------------------------
quiet_cmd_objcopy
=
OBJCPY
$(echo_target)
cmd_objcopy
=
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
# Gzip
# ---------------------------------------------------------------------------
quiet_cmd_gzip
=
GZIP
$(echo_target)
cmd_gzip
=
gzip
-f
-9
<
$<
>
$@
# ===========================================================================
# Generic stuff
# ===========================================================================
...
...
@@ -520,4 +552,4 @@ if_changed_rule = $(if $(strip $? \
# If quiet is set, only print short version of command
cmd
=
@
$(
if
$
(
$(quiet)
$(1)
)
,echo
' $(
$(quiet)$(1)
)
'
&&
)
$
(
$(1)
)
cmd
=
@
$(
if
$
(
$(quiet)
cmd_
$(1)
)
,echo
' $(
$(quiet)
cmd_
$(1)
)
'
&&
)
$
(
cmd_
$(1)
)
arch/alpha/Makefile
View file @
4269475f
...
...
@@ -10,7 +10,7 @@
NM
:=
$(NM)
-B
L
INKFLAGS
=
-static
-T
arch
/alpha/vmlinux.lds
-N
#-relax
L
DFLAGS_vmlinux
=
-static
-T
arch
/alpha/vmlinux.lds
-N
#-relax
CFLAGS
:=
$(CFLAGS)
-pipe
-mno-fp-regs
-ffixed-8
# Determine if we can use the BWX instructions with GAS.
...
...
arch/arm/Makefile
View file @
4269475f
...
...
@@ -7,7 +7,8 @@
#
# Copyright (C) 1995-2001 by Russell King
LINKFLAGS
:=
-p
-X
-T
arch
/arm/vmlinux.lds
LDFLAGS_vmlinux
:=
-p
-X
-T
arch
/arm/vmlinux.lds
OBJCOPYFLAGS
:=
-O
binary
-R
.note
-R
.comment
-S
GZFLAGS
:=
-9
CFLAGS
+=
-pipe
...
...
arch/arm/boot/Makefile
View file @
4269475f
...
...
@@ -115,15 +115,15 @@ endif
export
SYSTEM
ZTEXTADDR
ZBSSADDR
ZRELADDR
INITRD_PHYS
PARAMS_PHYS
Image
:
$(SYSTEM)
$(OBJCOPY)
-O
binary
-R
.note
-R
.comment
-S
$(SYSTEM)
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
bzImage
:
zImage
zImage
:
compressed/vmlinux
$(OBJCOPY)
-O
binary
-R
.note
-R
.comment
-S
compressed/vmlinux
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
bootpImage
:
bootp/bootp
$(OBJCOPY)
-O
binary
-R
.note
-R
.comment
-S
bootp/bootp
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
compressed/vmlinux
:
$(TOPDIR)/vmlinux
@
$(MAKE)
-C
compressed vmlinux
...
...
arch/arm/boot/compressed/Makefile
View file @
4269475f
...
...
@@ -78,7 +78,7 @@ $(HEAD): $(HEAD:.o=.S)
$(CC)
$(AFLAGS)
-traditional
-c
$(HEAD:.o=.S)
piggy.o
:
$(SYSTEM)
$(OBJCOPY)
-O
binary
-R
.note
-R
.comment
-S
$(SYSTEM)
piggy
$(OBJCOPY)
$(OBJCOPYFLAGS)
$(SYSTEM)
piggy
gzip
$(GZFLAGS)
< piggy
>
piggy.gz
$(LD)
-r
-o
$@
-b
binary piggy.gz
rm
-f
piggy piggy.gz
...
...
arch/cris/Makefile
View file @
4269475f
...
...
@@ -31,11 +31,11 @@ LD = if [ ! -e $(LD_SCRIPT).tmp -o $(LD_SCRIPT) -nt $(LD_SCRIPT).tmp ]; then \
else
true
;
\
fi
&&
$(CROSS_COMPILE)
ld
-mcrislinux
L
INKFLAGS
=
-T
$(LD_SCRIPT)
.tmp
L
DFLAGS_vmlinux
=
-T
$(LD_SCRIPT)
.tmp
# objcopy is used to make binary images from the resulting linked file
OBJCOPY
:=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
OBJCOPY
FLAGS
:=
-O
binary
-R
.note
-R
.comment
-S
# -mlinux enables -march=v10, -fno-underscores, -D__linux__ among others
...
...
@@ -64,7 +64,7 @@ LIBS := $(TOPDIR)/arch/cris/lib/lib.a $(LIBS) $(TOPDIR)/arch/cris/lib/lib.a $(LI
MAKEBOOT
=
$(MAKE)
-C
arch
/
$(ARCH)
/boot
vmlinux.bin
:
vmlinux
$(OBJCOPY)
vmlinux vmlinux.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux vmlinux.bin
timage
:
vmlinux.bin
cat
vmlinux.bin cramfs.img
>
timage
...
...
arch/cris/boot/compressed/Makefile
View file @
4269475f
...
...
@@ -8,7 +8,7 @@ CC = gcc-cris -melf -I $(TOPDIR)/include
CFLAGS
=
-O2
LD
=
ld-cris
OBJCOPY
=
objcopy-cris
OBJCOPYFLAGS
=
-O
binary
--remove-section
=
.bss
OBJECTS
=
head.o misc.o
# files to compress
...
...
@@ -18,7 +18,7 @@ all: vmlinuz
decompress.bin
:
$(OBJECTS)
$(LD)
-T
decompress.ld
-o
decompress.o
$(OBJECTS)
$(OBJCOPY)
-O
binary
--remove-section
=
.bss
decompress.o decompress.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
decompress.o decompress.bin
# save it for mkprod in the topdir.
cp
decompress.bin
$(TOPDIR)
...
...
arch/cris/boot/rescue/Makefile
View file @
4269475f
...
...
@@ -8,6 +8,7 @@ CC = gcc-cris -mlinux -I $(TOPDIR)/include
CFLAGS
=
-O2
LD
=
gcc-cris
-mlinux
-nostdlib
OBJCOPY
=
objcopy-cris
OBJCOPYFLAGS
=
-O
binary
--remove-section
=
.bss
all
:
rescue.bin testrescue.bin kimagerescue.bin
...
...
@@ -16,11 +17,11 @@ rescue: rescue.bin
rescue.bin
:
head.o
$(LD)
-T
rescue.ld
-o
rescue.o head.o
$(OBJCOPY)
-O
binary
--remove-section
=
.bss
rescue.o rescue.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
rescue.o rescue.bin
cp
rescue.bin
$(TOPDIR)
testrescue.bin
:
testrescue.o
$(OBJCOPY)
-O
binary
--remove-section
=
.bss
testrescue.o tr.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
testrescue.o tr.bin
# Pad it to 784 bytes
dd
if
=
/dev/zero
of
=
tmp2423
bs
=
1
count
=
784
cat
tr.bin
tmp2423
>testrescue_tmp.bin
...
...
@@ -28,7 +29,7 @@ testrescue.bin: testrescue.o
rm
tr.bin
tmp2423
testrescue_tmp.bin
kimagerescue.bin
:
kimagerescue.o
$(OBJCOPY)
-O
binary
--remove-section
=
.bss
kimagerescue.o ktr.bin
$(OBJCOPY)
$(OBJCOPYFLAGS)
kimagerescue.o ktr.bin
# Pad it to 784 bytes, that's what the rescue loader expects
dd
if
=
/dev/zero
of
=
tmp2423
bs
=
1
count
=
784
cat
ktr.bin
tmp2423
>kimagerescue_tmp.bin
...
...
arch/i386/Makefile
View file @
4269475f
...
...
@@ -16,10 +16,9 @@
# Added '-march' and '-mpreferred-stack-boundary' support
#
LD
=
$(CROSS_COMPILE)
ld
-m
elf_i386
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS
=
-e
stext
LINKFLAGS
=
-T
$(TOPDIR)
/arch/i386/vmlinux.lds
$(LDFLAGS)
LDFLAGS
:=
-m
elf_i386
OBJCOPYFLAGS
:=
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS_vmlinux
:=
-T
arch
/i386/vmlinux.lds
-e
stext
CFLAGS
+=
-pipe
...
...
arch/i386/boot/Makefile
View file @
4269475f
...
...
@@ -25,25 +25,44 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
#RAMDISK := -DRAMDISK=512
EXTRA_TARGETS
:=
vmlinux.bin bvmlinux.bin bootsect bootsect.o
\
setup setup.o zImage bzImage
host-progs
:=
tools/build
# Default
boot
:
bzImage
include
$(TOPDIR)/Rules.make
# ---------------------------------------------------------------------------
BOOT_INCL
=
$(TOPDIR)
/include/linux/config.h
\
$(TOPDIR)
/include/linux/autoconf.h
\
$(TOPDIR)
/include/asm/boot.h
zImage
:
IMAGE_OFFSET := 0x1000
zImage
:
EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK)
bzImage
:
IMAGE_OFFSET := 0x100000
bzImage
:
EXTRA_AFLAGS := -traditional $(SVGA_MODE) $(RAMDISK) -D__BIG_KERNEL__
bzImage
:
BUILDFLAGS := -b
quiet_cmd_image
=
BUILD
$(RELDIR)
/
$@
cmd_image
=
tools/build
$(BUILDFLAGS)
bootsect setup vmlinux.bin
\
$(ROOT_DEV)
>
$@
zImage
:
bootsect setup compressed/vmlinux tools/build
$(OBJCOPY)
compressed/vmlinux compressed/vmlinux.out
tools/build bootsect setup compressed/vmlinux.out
$(ROOT_DEV)
>
zImage
zImage bzImage
:
bootsect setup vmlinux.bin tools/build FORCE
$(
call
if_changed,image
)
bzImage
:
bbootsect bsetup compressed/bvmlinux tools/build
$(OBJCOPY)
compressed/bvmlinux compressed/bvmlinux.out
tools/build
-b
bbootsect bsetup compressed/bvmlinux.out
$(ROOT_DEV)
>
bzImage
vmlinux.bin
:
compressed/vmlinux FORCE
$(
call
if_changed,objcopy
)
compressed/vmlinux
:
$(TOPDIR)/vmlinux
@
$(MAKE)
-C
compressed vmlinux
LDFLAGS_bootsect
:=
-Ttext
0x0
-s
--oformat
binary
LDFLAGS_setup
:=
-Ttext
0x0
-s
--oformat
binary
-e
begtext
setup bootsect
:
%: %.o FORCE
$(
call
if_changed,ld
)
compressed/vmlinux
:
FORCE
@
$(MAKE)
IMAGE_OFFSET
=
$(IMAGE_OFFSET)
-C
compressed vmlinux
compressed/bvmlinux
:
$(TOPDIR)/vmlinux
@
$(MAKE)
-C
compressed bvmlinux
zdisk
:
$(BOOTIMAGE)
dd
bs
=
8192
if
=
$(BOOTIMAGE)
of
=
/dev/fd0
...
...
@@ -58,48 +77,17 @@ zlilo: $(BOOTIMAGE)
install
:
$(BOOTIMAGE)
sh
-x
./install.sh
$(KERNELRELEASE)
$(BOOTIMAGE)
$(TOPDIR)
/System.map
"
$(INSTALL_PATH)
"
tools/build
:
tools/build.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
-I
$(TOPDIR)
/include
bootsect
:
bootsect.o
$(LD)
-Ttext
0x0
-s
--oformat
binary
-o
$@
$<
bootsect.o
:
bootsect.s
$(AS)
-o
$@
$<
bootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
$(CPP)
$(CPPFLAGS)
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
bbootsect
:
bbootsect.o
$(LD)
-Ttext
0x0
-s
--oformat
binary
$<
-o
$@
bbootsect.o
:
bbootsect.s
$(AS)
-o
$@
$<
bbootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
$(CPP)
$(CPPFLAGS)
-D__BIG_KERNEL__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
setup
:
setup.o
$(LD)
-Ttext
0x0
-s
--oformat
binary
-e
begtext
-o
$@
$<
setup.o
:
setup.s
$(AS)
-o
$@
$<
setup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP)
$(CPPFLAGS)
-D__ASSEMBLY__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
bsetup
:
bsetup.o
$(LD)
-Ttext
0x0
-s
--oformat
binary
-e
begtext
-o
$@
$<
bsetup.o
:
bsetup.s
$(AS)
-o
$@
$<
bsetup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP)
$(CPPFLAGS)
-D__BIG_KERNEL__
-D__ASSEMBLY__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
clean
:
@
echo
'Cleaning up (boot)'
@
rm
-f
tools/build
@
rm
-f
setup bootsect zImage compressed/vmlinux.out
@
rm
-f
bsetup bbootsect bzImage compressed/bvmlinux.out
@
$(MAKE)
-C
compressed clean
archhelp
:
@
echo
'* bzImage - Compressed kernel image (arch/
$(ARCH)
/boot/bzImage)'
@
echo
' install - Install kernel using'
@
echo
' (your) ~/bin/installkernel or'
@
echo
' (distribution) /sbin/installkernel or'
@
echo
' install to $
$(INSTALL_PATH)
and run lilo'
arch/i386/boot/compressed/Makefile
View file @
4269475f
...
...
@@ -4,47 +4,26 @@
# create a compressed vmlinux image from the original vmlinux
#
HEAD
=
head
.o
SYSTEM
=
$(TOPDIR)
/vmlinux
EXTRA_TARGETS
:=
vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy
.o
EXTRA_AFLAGS
:=
-traditional
OBJECTS
=
$(HEAD)
misc.o
include
$(TOPDIR)/Rules.make
ZLDFLAGS
=
-e
startup_32
LDFLAGS_vmlinux
:=
-Ttext
$(IMAGE_OFFSET)
-e
startup_32
#
# ZIMAGE_OFFSET is the load offset of the compression loader
# BZIMAGE_OFFSET is the load offset of the high loaded compression loader
#
ZIMAGE_OFFSET
=
0x1000
BZIMAGE_OFFSET
=
0x100000
ZLINKFLAGS
=
-Ttext
$(ZIMAGE_OFFSET)
$(ZLDFLAGS)
BZLINKFLAGS
=
-Ttext
$(BZIMAGE_OFFSET)
$(ZLDFLAGS)
all
:
vmlinux
vmlinux
:
piggy.o $(OBJECTS)
$(LD)
$(ZLINKFLAGS)
-o
vmlinux
$(OBJECTS)
piggy.o
bvmlinux
:
piggy.o $(OBJECTS)
$(LD)
$(BZLINKFLAGS)
-o
bvmlinux
$(OBJECTS)
piggy.o
vmlinux
:
head.o misc.o piggy.o FORCE
$(
call
if_changed,ld
)
head.o
:
head.S
$(
CC)
$(AFLAGS)
-traditional
-c
head.S
vmlinux.bin
:
$(TOPDIR)/vmlinux FORCE
$(
call
if_changed,objcopy
)
comma
:=
,
vmlinux.bin.gz
:
vmlinux.bin FORCE
$(
call
if_changed,gzip
)
misc.o
:
misc.c
$(CC)
$(CFLAGS)
-DKBUILD_BASENAME
=
$(
subst
$(comma)
,_,
$(
subst
-,_,
$
(
*
F
)))
-c
misc.c
LDFLAGS_piggy.o
:=
-r
--format
binary
--oformat
elf32-i386
-T
piggy.o
:
$(SYSTEM)
tmppiggy
=
_tmp_
$$$$
piggy
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
;
\
$(OBJCOPY)
$(SYSTEM)
$$
tmppiggy
;
\
gzip
-f
-9
<
$$
tmppiggy
>
$$
tmppiggy.gz
;
\
echo
"SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}"
>
$$
tmppiggy.lnk
;
\
$(LD)
-r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-i386
-T
$$
tmppiggy.lnk
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
piggy.o
:
vmlinux.scr vmlinux.bin.gz FORCE
$(
call
if_changed,ld
)
clean
:
@
rm
-f
vmlinux
bvmlinux _tmp_
*
@
rm
-f
vmlinux
vmlinux.bin vmlinux.bin.gz
arch/i386/boot/compressed/vmlinux.scr
0 → 100644
View file @
4269475f
SECTIONS
{
.data : {
input_len = .;
LONG(input_data_end - input_data) input_data = .;
*(.data)
input_data_end = .;
}
}
arch/ia64/Makefile
View file @
4269475f
...
...
@@ -13,7 +13,8 @@ AWK := awk
export
AWK
LINKFLAGS
=
-static
-T
arch
/
$(ARCH)
/vmlinux.lds
OBJCOPYFLAGS
:=
--strip-all
LDFLAGS_vmlinux
:=
-static
-T
arch
/
$(ARCH)
/vmlinux.lds
AFLAGS_KERNEL
:=
-mconstant-gp
EXTRA
=
...
...
@@ -100,7 +101,7 @@ arch/$(ARCH)/vmlinux.lds: arch/$(ARCH)/vmlinux.lds.S FORCE
-traditional
arch
/
$(ARCH)
/vmlinux.lds.S
>
$@
compressed
:
vmlinux
$(OBJCOPY)
--strip-all
vmlinux vmlinux-tmp
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux vmlinux-tmp
gzip
vmlinux-tmp
mv
vmlinux-tmp.gz vmlinux.gz
...
...
arch/m68k/Makefile
View file @
4269475f
...
...
@@ -18,16 +18,16 @@ COMPILE_ARCH = $(shell uname -m)
# override top level makefile
AS
+=
-m68020
LD
+
=
-m
m68kelf
LD
FLAGS
:
=
-m
m68kelf
ifneq
($(COMPILE_ARCH),$(ARCH))
# prefix for cross-compiling binaries
CROSS_COMPILE
=
m68k-linux-
endif
ifndef
CONFIG_SUN3
L
INKFLAGS
=
-T
$(TOPDIR)
/arch/m68k/vmlinux.lds
L
DFLAGS_vmlinux
=
-T
$(TOPDIR)
/arch/m68k/vmlinux.lds
else
L
INKFLAGS
=
-T
$(TOPDIR)
/arch/m68k/vmlinux-sun3.lds
-N
L
DFLAGS_vmlinux
=
-T
$(TOPDIR)
/arch/m68k/vmlinux-sun3.lds
-N
endif
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
...
...
arch/mips/Makefile
View file @
4269475f
...
...
@@ -36,9 +36,9 @@ endif
# crossformat linking we rely on the elf2ecoff tool for format conversion.
#
GCCFLAGS
:=
-G
0
-mno-abicalls
-fno-pic
L
INKFLAGS
+=
-static
L
DFLAGS_vmlinux
+=
-static
MODFLAGS
+=
-mlong-calls
LD
:=
$(LD)
-G
0
LD
FLAGS
:=
-G
0
ifdef
CONFIG_REMOTE_DEBUG
CFLAGS
:=
$(CFLAGS)
-g
...
...
@@ -270,7 +270,7 @@ vmlinux: arch/$(ARCH)/ld.script
arch/$(ARCH)/ld.script
:
arch/$(ARCH)/ld.script.in arch/$(ARCH)/Makefile
sed
-e
's/@@LOADADDR@@/
$(LOADADDR)
/'
<
$<
>
$@
L
INKFLAGS
+=
-T
arch
/
$(ARCH)
/ld.script
L
DFLAGS_vmlinux
+=
-T
arch
/
$(ARCH)
/ld.script
HEAD
:=
arch
/mips/kernel/head.o
arch
/mips/kernel/init_task.o
...
...
arch/mips/philips/nino/ramdisk/Makefile
View file @
4269475f
...
...
@@ -7,6 +7,6 @@
#
ramdisk.o
:
ramdisk.gz ld.script
$(LD)
-T
ld.script
-b
binary
-o
$@
ramdisk.gz
$(LD)
$(LDFLAGS)
-T
ld.script
-b
binary
-o
$@
ramdisk.gz
include
$(TOPDIR)/Rules.make
arch/mips64/Makefile
View file @
4269475f
...
...
@@ -35,7 +35,7 @@ endif
#
CFLAGS
+=
-I
$(TOPDIR)
/include/asm/gcc
$(CFLAGS)
CFLAGS
+=
-mabi
=
64
-G
0
-mno-abicalls
-fno-pic
-Wa
,--trap
-pipe
L
INKFLAGS
+=
-G
0
-static
# -N
L
DFLAGS_vmlinux
+=
-G
0
-static
# -N
MODFLAGS
+=
-mlong-calls
ifdef
CONFIG_REMOTE_DEBUG
...
...
@@ -118,7 +118,7 @@ endif
#
ifdef
CONFIG_BOOT_ELF32
CFLAGS
+=
-Wa
,-32
L
INKFLAGS
+=
-T
arch
/mips64/ld.script.elf32
L
DFLAGS_vmlinux
+=
-T
arch
/mips64/ld.script.elf32
endif
#
# The 64-bit ELF tools are pretty broken so at this time we generate 64-bit
...
...
@@ -126,13 +126,13 @@ endif
#
ifdef
CONFIG_BOOT_ELF64
CFLAGS
+=
-Wa
,-32
L
INKFLAGS
+=
-T
arch
/mips64/ld.script.elf32
L
DFLAGS_vmlinux
+=
-T
arch
/mips64/ld.script.elf32
#AS += -64
#LD += -m elf64bmip
#L
INKFLAGS
+= -T arch/mips64/ld.script.elf64
#LD
FLAGS
+= -m elf64bmip
#L
DFLAGS_vmlinux
+= -T arch/mips64/ld.script.elf64
endif
L
INKFLAGS
+=
-Ttext
$(LOADADDR)
L
DFLAGS_vmlinux
+=
-Ttext
$(LOADADDR)
HEAD
:=
arch
/mips64/kernel/head.o
arch
/mips64/kernel/init_task.o
...
...
arch/parisc/Makefile
View file @
4269475f
...
...
@@ -20,9 +20,8 @@
FINAL_LD
=
$(CROSS_COMPILE)
ld
--warn-common
--warn-section-align
CPP
=
$(CC)
-E
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS
=
LINKFLAGS
=
-T
$(TOPDIR)
/arch/parisc/vmlinux.lds
$(LDFLAGS)
OBJCOPY_FLAGS
=
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS_vmlinux
=
-T
arch
/parisc/vmlinux.lds
CFLAGS_PIPE
:=
-pipe
CFLAGS_NSR
:=
-fno-strength-reduce
...
...
arch/ppc/Makefile
View file @
4269475f
...
...
@@ -21,7 +21,7 @@ else
KERNELLOAD
=
0xc0000000
endif
L
INKFLAGS
=
-T
arch
/ppc/vmlinux.lds
-Ttext
$(KERNELLOAD)
-Bstatic
L
DFLAGS_vmlinux
=
-T
arch
/ppc/vmlinux.lds
-Ttext
$(KERNELLOAD)
-Bstatic
CPPFLAGS
:=
$(CPPFLAGS)
-I
$(TOPDIR)
/arch/
$(ARCH)
AFLAGS
:=
$(AFLAGS)
-I
$(TOPDIR)
/arch/
$(ARCH)
CFLAGS
:=
$(CFLAGS)
-I
$(TOPDIR)
/arch/
$(ARCH)
-fsigned-char
\
...
...
arch/ppc64/Makefile
View file @
4269475f
...
...
@@ -15,7 +15,7 @@
KERNELLOAD
=
0xc000000000000000
L
INKFLAGS
=
-T
arch
/ppc64/vmlinux.lds
-Bstatic
\
L
DFLAGS_vmlinux
=
-T
arch
/ppc64/vmlinux.lds
-Bstatic
\
-e
$(KERNELLOAD)
-Ttext
$(KERNELLOAD)
CFLAGS
:=
$(CFLAGS)
-fsigned-char
-msoft-float
-pipe
\
-Wno-uninitialized
-mminimal-toc
-mtraceback
=
full
\
...
...
arch/ppc64/boot/Makefile
View file @
4269475f
...
...
@@ -36,6 +36,7 @@ BOOTAFLAGS = -D__ASSEMBLY__ $(HOSTCFLAGS)
CFLAGS
=
$(CPPFLAGS)
-O
-fno-builtin
-DSTDC_HEADERS
LD_ARGS
=
-Ttext
0x00400000
-e
_start
OBJCOPYFLAGS
:=
-S
-O
binary
OBJS
=
crt0.o start.o main.o zlib.o image.o imagesize.o
#LIBS = $(TOPDIR)/lib/lib.a
...
...
@@ -109,9 +110,8 @@ zImage.initrd: $(OBJS) initrd.o addnote
$(BOOTLD)
$(LD_ARGS)
-T
zImage.lds
-o
$@
$(OBJS)
initrd.o
$(LIBS)
./addnote
$@
vmlinux.gz
:
$(TOPDIR)/vmlinux
$(OBJCOPY)
-S
-O
binary
$(TOPDIR)
/vmlinux vmlinux
$(OBJCOPY)
$(OBJCOPYFLAGS)
$(TOPDIR)
/vmlinux vmlinux
ls
-l
vmlinux |
awk
'{printf "/* generated -- do not edit! */\nint uncompressed_size = %d;\n", $$5}'
>
imagesize.c
$(CROSS_COMPILE)
nm
-n
$(TOPDIR)
/vmlinux |
tail
-1
|
awk
'{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}'
>>
imagesize.c
gzip
-vf9
vmlinux
...
...
arch/s390/Makefile
View file @
4269475f
...
...
@@ -13,15 +13,14 @@
# Copyright (C) 1994 by Linus Torvalds
#
LD
=
$(CROSS_COMPILE)
ld
-m
elf_s390
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS
=
-e
start
LDFLAGS
:=
-m
elf_s390
OBJCOPYFLAGS
:=
-O
binary
ifeq
($(CONFIG_SHARED_KERNEL),y)
LINKSCRIPT
:=
arch
/s390/vmlinux-shared.lds
else
LINKSCRIPT
:=
arch
/s390/vmlinux.lds
endif
L
INKFLAGS
=
-T
$(TOPDIR)
/
$(LINKSCRIPT)
$(LDFLAGS)
L
DFLAGS_vmlinux
:=
-T
$(LINKSCRIPT)
-e
start
CFLAGS_PIPE
:=
-pipe
CFLAGS_NSR
:=
-fno-strength-reduce
...
...
arch/s390/boot/Makefile
View file @
4269475f
...
...
@@ -2,21 +2,19 @@
# arch/s390/boot/Makefile
#
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
EXTRA_AFLAGS
:=
-traditional
include
$(TOPDIR)/Rules.make
%.lnk
:
%.o
$(LD)
-Ttext
0x0
-o
$@
$<
$(LD)
$(LDFLAGS)
-Ttext
0x0
-o
$@
$<
%.boot
:
%.lnk
$(OBJCOPY)
-O
binary
$<
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
image
:
$(TOPDIR)/vmlinux
\
iplfba.boot ipleckd.boot ipldump.boot
$(OBJCOPY)
-O
binary
$(TOPDIR)
/vmlinux image
$(OBJCOPY)
$(OBJCOPYFLAGS)
$(TOPDIR)
/vmlinux image
$(NM)
$(TOPDIR)
/vmlinux |
grep
-v
'\(compiled\)\|\( [aUw] \)\|\(\.\)\|\(LASH[RL]DI\)'
|
sort
>
$(TOPDIR)
/System.map
listing
:
../../../vmlinux
...
...
arch/s390x/Makefile
View file @
4269475f
...
...
@@ -13,16 +13,15 @@
# Copyright (C) 1994 by Linus Torvalds
#
LD
=
$(CROSS_COMPILE)
ld
-m
elf64_s390
LD
FLAGS
:=
-m
elf64_s390
CPP
=
$(CC)
-E
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS
=
-e
start
OBJCOPYFLAGS
:=
-O
binary
ifeq
($(CONFIG_SHARED_KERNEL),y)
LINKSCRIPT
:=
arch
/s390x/vmlinux-shared.lds
else
LINKSCRIPT
:=
arch
/s390x/vmlinux.lds
endif
L
INKFLAGS
=
-T
$(TOPDIR)
/
$(LINKSCRIPT)
$(LDFLAGS)
L
DFLAGS_vmlinux
:=
-T
$(LINKSCRIPT)
-e
start
MODFLAGS
+=
-fpic
CFLAGS_PIPE
:=
-pipe
...
...
arch/s390x/boot/Makefile
View file @
4269475f
...
...
@@ -2,8 +2,6 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
O_TARGET
:=
EXTRA_AFLAGS
:=
-traditional
...
...
@@ -14,11 +12,11 @@ include $(TOPDIR)/Rules.make
$(LD)
-Ttext
0x0
-o
$@
$<
%.boot
:
%.lnk
$(OBJCOPY)
-O
binary
$<
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
image
:
$(TOPDIR)/vmlinux
\
iplfba.boot ipleckd.boot ipldump.boot
$(OBJCOPY)
-O
binary
$(TOPDIR)
/vmlinux image
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
$(NM)
$(TOPDIR)
/vmlinux |
grep
-v
'\(compiled\)\|\( [aUw] \)\|\(\.\)\|\(LASH[RL]DI\)'
|
sort
>
$(TOPDIR)
/System.map
listing
:
../../../vmlinux
...
...
arch/sh/Makefile
View file @
4269475f
...
...
@@ -15,17 +15,16 @@
ifdef
CONFIG_CPU_LITTLE_ENDIAN
CFLAGS
+=
-ml
AFLAGS
+=
-ml
# L
INKFLAGS
+= -EL
# L
DFLAGS_vmlinux
+= -EL
LDFLAGS
:=
-EL
else
CFLAGS
+=
-mb
AFLAGS
+=
-mb
# L
INKFLAGS
+= -EB
# L
DFLAGS_vmlinux
+= -EB
LDFLAGS
:=
-EB
endif
LD
=
$(CROSS_COMPILE)
ld
$(LDFLAGS)
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-R
.stab
-R
.stabstr
-S
OBJCOPYFLAGS
:=
-O
binary
-R
.note
-R
.comment
-R
.stab
-R
.stabstr
-S
MODFLAGS
+=
...
...
@@ -47,10 +46,10 @@ endif
# none has been choosen above.
#
LINKSCRIPT
=
arch
/sh/vmlinux.lds
L
INKFLAGS
+=
-T
$(
word
1,
$(LINKSCRIPT)
)
-e
_stext
L
DFLAGS_vmlinux
+=
-T
$(
word
1,
$(LINKSCRIPT)
)
-e
_stext
ifdef
LOADADDR
L
INKFLAGS
+=
-Ttext
$(
word
1,
$(LOADADDR)
)
L
DFLAGS_vmlinux
+=
-Ttext
$(
word
1,
$(LOADADDR)
)
endif
#
...
...
arch/sh/boot/Makefile
View file @
4269475f
...
...
@@ -11,10 +11,10 @@
SYSTEM
=
$(TOPDIR)
/vmlinux
Image
:
$(SYSTEM)
$(OBJCOPY)
$(
SYSTEM)
Image
$(OBJCOPY)
$(
OBJCOPYFLAGS)
$<
$@
zImage
:
compressed/vmlinux
$(OBJCOPY)
compressed/vmlinux zImage
$(OBJCOPY)
$(OBJCOPYFLAGS)
$<
$@
compressed/vmlinux
:
$(TOPDIR)/vmlinux
$(MAKE)
-C
compressed vmlinux
...
...
arch/sh/boot/compressed/Makefile
View file @
4269475f
...
...
@@ -25,7 +25,7 @@ ZLINKFLAGS = -Ttext $(ZIMAGE_OFFSET) $(ZLDFLAGS)
all
:
vmlinux
vmlinux
:
piggy.o $(OBJECTS)
$(LD)
$(ZLINKFLAGS)
-o
vmlinux
$(OBJECTS)
piggy.o
$(LD)
$(
LDFLAGS)
$(
ZLINKFLAGS)
-o
vmlinux
$(OBJECTS)
piggy.o
head.o
:
head.S
$(CC)
$(AFLAGS)
-traditional
-c
head.S
...
...
@@ -33,10 +33,10 @@ head.o: head.S
piggy.o
:
$(SYSTEM)
tmppiggy
=
_tmp_
$$$$
piggy
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
;
\
$(OBJCOPY)
-R
.empty_zero_page
$(SYSTEM)
$$
tmppiggy
;
\
$(OBJCOPY)
$(OBJCOPYFLAGS)
-R
.empty_zero_page
$(SYSTEM)
$$
tmppiggy
;
\
gzip
-f
-9
<
$$
tmppiggy
>
$$
tmppiggy.gz
;
\
echo
"SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}"
>
$$
tmppiggy.lnk
;
\
$(LD)
-r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-sh-linux
-T
$$
tmppiggy.lnk
;
\
$(LD)
$(LDFLAGS)
-r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-sh-linux
-T
$$
tmppiggy.lnk
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
clean
:
...
...
arch/sparc/Makefile
View file @
4269475f
...
...
@@ -20,7 +20,7 @@ NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; the
ifeq
($(NEW_GAS),y)
AS
:=
$(AS)
-32
LD
:=
$(LD)
-m
elf32_sparc
LD
FLAGS
:=
-m
elf32_sparc
endif
#CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
...
...
@@ -30,8 +30,8 @@ else
CFLAGS
:=
$(CFLAGS)
-m32
-pipe
-mno-fpu
-fcall-used-g5
-fcall-used-g7
endif
#L
INKFLAGS
= -N -Ttext 0xf0004000
L
INKFLAGS
=
-T
arch
/sparc/vmlinux.lds
#L
DFLAGS_vmlinux
= -N -Ttext 0xf0004000
L
DFLAGS_vmlinux
=
-T
arch
/sparc/vmlinux.lds
HEAD
:=
arch
/sparc/kernel/head.o
arch
/sparc/kernel/init_task.o
...
...
arch/sparc/boot/Makefile
View file @
4269475f
...
...
@@ -31,7 +31,7 @@ BTLIBS := $(CORE_FILES_NO_BTFIX) $(FILESYSTEMS) \
# properly as it will cause head.o to be built with the implicit
# rules not the ones in kernel/Makefile. Someone please fix. --DaveM
vmlinux.o
:
FORCE
$(LD)
-r
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTOBJS)
)
\
$(LD)
$(LDFLAGS)
-r
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTOBJS)
)
\
--start-group
\
$(
patsubst
%,
$(TOPDIR)
/%,
$(BTLIBS)
)
\
$(LIBS)
\
...
...
arch/sparc64/Makefile
View file @
4269475f
...
...
@@ -28,7 +28,7 @@ AR = sparc64-linux-ar
RANLIB
=
sparc64-linux-ranlib
else
AS
:=
$(AS)
-64
LD
:=
$(LD)
-m
elf64_sparc
LD
FLAGS
:=
-m
elf64_sparc
endif
ELFTOAOUT
=
elftoaout
ifneq
($(UNDECLARED_REGS),y)
...
...
@@ -53,7 +53,7 @@ ifeq ($(CONFIG_MCOUNT),y)
CFLAGS
:=
$(CFLAGS)
-pg
endif
L
INKFLAGS
=
-T
arch
/sparc64/vmlinux.lds
L
DFLAGS_vmlinux
=
-T
arch
/sparc64/vmlinux.lds
HEAD
:=
arch
/sparc64/kernel/head.o
arch
/sparc64/kernel/init_task.o
...
...
arch/x86_64/Makefile
View file @
4269475f
...
...
@@ -34,9 +34,8 @@ export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
LD
=
$(CROSS_COMPILE)
ld
-m
elf_x86_64
OBJCOPY
=
$(CROSS_COMPILE)
objcopy
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS
=
-e
stext
LINKFLAGS
=
-T
$(TOPDIR)
/arch/x86_64/vmlinux.lds
$(LDFLAGS)
OBJCOPYFLAGS
:=
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS_vmlinux
:=
-T
arch
/x86_64/vmlinux.lds
-e
stext
CFLAGS
+=
-mno-red-zone
CFLAGS
+=
-mcmodel
=
kernel
...
...
arch/x86_64/boot/Makefile
View file @
4269475f
...
...
@@ -28,11 +28,11 @@ BOOT_INCL = $(TOPDIR)/include/linux/config.h \
$(TOPDIR)
/include/asm/boot.h
zImage
:
bootsect setup compressed/vmlinux tools/build
$(OBJCOPY)
compressed/vmlinux compressed/vmlinux.out
$(OBJCOPY)
$(OBJCOPYFLAGS)
compressed/vmlinux compressed/vmlinux.out
tools/build bootsect setup compressed/vmlinux.out
$(ROOT_DEV)
>
zImage
bzImage
:
bbootsect bsetup compressed/bvmlinux tools/build
$(OBJCOPY)
compressed/bvmlinux compressed/bvmlinux.out
$(OBJCOPY)
$(OBJCOPYFLAGS)
compressed/bvmlinux compressed/bvmlinux.out
tools/build
-b
bbootsect bsetup compressed/bvmlinux.out
$(ROOT_DEV)
>
bzImage
bzImage-padded
:
bzImage
...
...
arch/x86_64/boot/compressed/Makefile
View file @
4269475f
...
...
@@ -33,7 +33,7 @@ misc.o: misc.c
piggy.o
:
$(SYSTEM)
tmppiggy
=
_tmp_
$$$$
piggy
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
;
\
$(OBJCOPY)
$(
SYSTEM)
$$
tmppiggy
;
\
$(OBJCOPY)
$(
OBJCOPYFLAGS)
$<
$$
tmppiggy
;
\
gzip
-f
-9
<
$$
tmppiggy
>
$$
tmppiggy.gz
;
\
echo
"SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}"
>
$$
tmppiggy.lnk
;
\
$(IA32_LD)
-r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-i386
-T
$$
tmppiggy.lnk
;
\
...
...
drivers/message/fusion/Makefile
View file @
4269475f
...
...
@@ -51,9 +51,3 @@ obj-$(CONFIG_FUSION_CTL) += mptctl.o
obj-$(CONFIG_FUSION_LAN)
+=
mptlan.o
include
$(TOPDIR)/Rules.make
# EXP...
## Fusion MPT extra's...
##mptscsih.o: $(mptscsih-objs)
## $(LD) -r -o $@ $(mptscsih-objs)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment