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
Kirill Smelkov
linux
Commits
abffad5d
Commit
abffad5d
authored
Jun 17, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-isdn.bkbits.net/linux-2.5.make
into home.transmeta.com:/home/torvalds/v2.5/linux
parents
9dcbdb7e
a95ca5a9
Changes
44
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
314 additions
and
274 deletions
+314
-274
Makefile
Makefile
+40
-26
Rules.make
Rules.make
+40
-9
arch/alpha/Makefile
arch/alpha/Makefile
+16
-4
arch/alpha/boot/Makefile
arch/alpha/boot/Makefile
+0
-2
arch/alpha/kernel/Makefile
arch/alpha/kernel/Makefile
+0
-14
arch/alpha/kernel/asm-offsets.c
arch/alpha/kernel/asm-offsets.c
+29
-0
arch/alpha/kernel/check_asm.c
arch/alpha/kernel/check_asm.c
+0
-30
arch/alpha/lib/Makefile
arch/alpha/lib/Makefile
+0
-2
arch/arm/Makefile
arch/arm/Makefile
+16
-15
arch/arm/boot/Makefile
arch/arm/boot/Makefile
+1
-3
arch/arm/kernel/asm-offsets.c
arch/arm/kernel/asm-offsets.c
+82
-0
arch/arm/tools/Makefile
arch/arm/tools/Makefile
+2
-33
arch/arm/tools/constants-hdr
arch/arm/tools/constants-hdr
+0
-5
arch/cris/Makefile
arch/cris/Makefile
+0
-3
arch/cris/boot/Makefile
arch/cris/boot/Makefile
+0
-2
arch/i386/Makefile
arch/i386/Makefile
+1
-4
arch/i386/boot/Makefile
arch/i386/boot/Makefile
+0
-2
arch/ia64/Makefile
arch/ia64/Makefile
+6
-3
arch/ia64/boot/Makefile
arch/ia64/boot/Makefile
+0
-2
arch/ia64/tools/Makefile
arch/ia64/tools/Makefile
+1
-1
arch/m68k/Makefile
arch/m68k/Makefile
+0
-2
arch/mips/Makefile
arch/mips/Makefile
+0
-6
arch/mips/boot/Makefile
arch/mips/boot/Makefile
+0
-3
arch/mips64/Makefile
arch/mips64/Makefile
+0
-6
arch/mips64/boot/Makefile
arch/mips64/boot/Makefile
+0
-3
arch/parisc/Makefile
arch/parisc/Makefile
+0
-2
arch/ppc/Makefile
arch/ppc/Makefile
+0
-3
arch/ppc64/Makefile
arch/ppc64/Makefile
+2
-2
arch/ppc64/boot/Makefile
arch/ppc64/boot/Makefile
+0
-3
arch/s390/Makefile
arch/s390/Makefile
+0
-3
arch/s390/boot/Makefile
arch/s390/boot/Makefile
+0
-2
arch/s390x/Makefile
arch/s390x/Makefile
+0
-3
arch/s390x/boot/Makefile
arch/s390x/boot/Makefile
+0
-2
arch/sh/Makefile
arch/sh/Makefile
+0
-3
arch/sh/boot/Makefile
arch/sh/boot/Makefile
+0
-2
arch/sparc/Makefile
arch/sparc/Makefile
+2
-2
arch/sparc64/Makefile
arch/sparc64/Makefile
+0
-2
arch/sparc64/boot/Makefile
arch/sparc64/boot/Makefile
+0
-3
arch/x86_64/Makefile
arch/x86_64/Makefile
+22
-17
arch/x86_64/boot/Makefile
arch/x86_64/boot/Makefile
+0
-4
arch/x86_64/kernel/asm-offsets.c
arch/x86_64/kernel/asm-offsets.c
+46
-0
arch/x86_64/tools/Makefile
arch/x86_64/tools/Makefile
+0
-29
arch/x86_64/tools/offset.sed
arch/x86_64/tools/offset.sed
+0
-7
scripts/fixdep.c
scripts/fixdep.c
+8
-5
No files found.
Makefile
View file @
abffad5d
...
...
@@ -145,7 +145,8 @@ ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
.config
:
@
echo
'***'
@
echo
'*** You have not yet configured your kernel!'
@
echo
'*** Please run "make xconfig/menuconfig/config/oldconfig"'
@
echo
'*** Please run some configurator (do "make xconfig" or'
@
echo
'*** "make menuconfig" or "make oldconfig" or "make config").'
@
echo
'***'
@
exit
1
...
...
@@ -330,18 +331,16 @@ scripts:
# The targets are still named depend / dep for traditional
# reasons, but the only thing we do here is generating
# the module version checksums.
# FIXME: For now, we are also calling "archdep" from here,
# which should be replaced by a more sensible solution.
.PHONY
:
depend dep $(patsubst %
,
_sfdep_%
,
$(SUBDIRS))
depend dep
:
.hdepend
# .hdepend is our (misnomed) marker for whether we've run
# generated module versions
and made archdep
# generated module versions
.hdepend
:
$(if $(filter dep depend
,
$(MAKECMDGOALS))
,
FORCE)
@
$(MAKE)
archdep
include/linux/modversions.h
@
$(MAKE)
include/linux/modversions.h
@
touch
$@
ifdef
CONFIG_MODVERSIONS
...
...
@@ -420,8 +419,8 @@ $(patsubst %, _modinst_%, $(SUBDIRS)) :
else
# CONFIG_MODULES
# ---------------------------------------------------------------------------
# Modules not configured
# ---------------------------------------------------------------------------
modules modules_install
:
FORCE
@
echo
...
...
@@ -433,6 +432,25 @@ modules modules_install: FORCE
endif
# CONFIG_MODULES
# Generate asm-offsets.h
# ---------------------------------------------------------------------------
define
generate-asm-offsets.h
(set
-e;
\
echo
"#ifndef __ASM_OFFSETS_H__"
;
\
echo
"#define __ASM_OFFSETS_H__"
;
\
echo
"/*"
;
\
echo
" * DO NOT MODIFY."
;
\
echo
" *"
;
\
echo
" * This file was generated by arch/$(ARCH)/Makefile"
;
\
echo
" *"
;
\
echo
" */"
;
\
echo
""
;
\
sed -ne "/^->/{s
:
^->
\(
[^ ]*
\)
[
\$
$
#
]*
\(
[^ ]*
\)
\(
.*
\)
:
#
define
\1
\2
/*
\3
*/:; s:->::; p;}";
\
echo "";
\
echo "
#
endif" )
endef
# RPM target
# ---------------------------------------------------------------------------
...
...
@@ -461,6 +479,8 @@ rpm: clean spec
else
# ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
ifeq
($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# Targets which don't need .config
# ===========================================================================
#
...
...
@@ -519,23 +539,6 @@ allmodconfig:
defconfig
:
yes
''
|
$(CONFIG_SHELL)
scripts/Configure
-d
arch
/
$(ARCH)
/config.in
# How we generate .config depends on which *config the
# user chose when calling make
.config
:
$(filter oldconfig xconfig menuconfig config
,
$(MAKECMDGOALS)) ;
# If the user gave commands from both the need / need not
# .config sections, we need to call make again after
# .config is generated, now to take care of the remaining
# targets we know nothing about in this section
remaining_targets
:=
$(
filter-out
$(noconfig_targets)
,
$(MAKECMDGOALS)
)
$(remaining_targets)
:
make_with_config
make_with_config
:
.config
@
$(MAKE)
$(remaining_targets)
# Cleaning up
# ---------------------------------------------------------------------------
...
...
@@ -604,7 +607,8 @@ clean: archclean
mrproper
:
clean archmrproper
@
echo
'Making mrproper'
@
find
.
\(
-size
0
-o
-name
.depend
\)
-type
f
-print
| xargs
rm
-f
@
find
.
\(
-size
0
-o
-name
.depend
-o
-name
.
\*
.cmd
\)
\
-type
f
-print
| xargs
rm
-f
@
rm
-f
$(MRPROPER_FILES)
@
rm
-rf
$(MRPROPER_DIRS)
@
$(MAKE)
-C
Documentation/DocBook mrproper
...
...
@@ -639,8 +643,6 @@ sgmldocs psdocs pdfdocs htmldocs:
@
$(MAKE)
-C
Documentation/DocBook
$@
endif
# ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
...
...
@@ -653,6 +655,18 @@ checkhelp:
checkincludes
:
find
*
-name
'*.[hcS]'
-type
f
-print
|
sort
| xargs
$(PERL)
-w
scripts/checkincludes.pl
else
# ifneq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# We're called with both targets which do and do not need
# .config included. Handle them one after the other.
# ===========================================================================
%
::
FORCE
$(MAKE)
$@
endif
# ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
endif
# ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
# FIXME Should go into a make.lib or something
# ===========================================================================
...
...
Rules.make
View file @
abffad5d
...
...
@@ -131,9 +131,13 @@ else
genksyms_smp_prefix
:=
endif
$(MODVERDIR)/$(real-objs-y
:
.o=.ver): modkern_cflags := $(CFLAGS_KERNEL)
$(MODVERDIR)/$(real-objs-m
:
.o=.ver): modkern_cflags := $(CFLAGS_MODULE)
$(MODVERDIR)/$(export-objs
:
.o=.ver): export_flags := -D__GENKSYMS__
# Don't include modversions.h, we're just about to generate it here.
CFLAGS_MODULE
:=
$(
filter-out
-include
$(HPATH)
/linux/modversions.h,
$(CFLAGS_MODULE)
)
$(addprefix $(MODVERDIR)/,$(real-objs-y
:
.o=.ver)): modkern_cflags := $(CFLAGS_KERNEL)
$(addprefix $(MODVERDIR)/,$(real-objs-m
:
.o=.ver)): modkern_cflags := $(CFLAGS_MODULE)
$(addprefix $(MODVERDIR)/,$(export-objs
:
.o=.ver)): export_flags := -D__GENKSYMS__
c_flags
=
-Wp
,-MD,
$(depfile)
$(CFLAGS)
$(NOSTDINC_FLAGS)
\
$(modkern_cflags)
$(EXTRA_CFLAGS)
$
(
CFLAGS_
$
(
*
F
)
.o
)
\
...
...
@@ -145,18 +149,34 @@ c_flags = -Wp,-MD,$(depfile) $(CFLAGS) $(NOSTDINC_FLAGS) \
# files changes
quiet_cmd_cc_ver_c
=
MKVER include/linux/modules/
$(RELDIR)
/
$*
.ver
define
cmd_cc_ver_c
mkdir
-p
$(dir
$@);
\
$(CPP)
$(c_flags)
$<
|
$(GENKSYMS)
$(genksyms_smp_prefix)
\
-k
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)
>
$@.tmp;
\
cmd_cc_ver_c
=
$(CPP)
$(c_flags)
$<
|
$(GENKSYMS)
$(genksyms_smp_prefix)
\
-k
$(VERSION)
.
$(PATCHLEVEL)
.
$(SUBLEVEL)
>
$@
.tmp
# Okay, let's explain what's happening in rule_make_cc_ver_c:
# o echo the command
# o execute the command
# o If the $(CPP) fails, we won't notice because it's output is piped
# to $(GENKSYMS) which does not fail. We recognize this case by
# looking if the generated $(depfile) exists, though.
# o If the .ver file changed, touch modversions.h, which is our maker
# of any changed .ver files.
# o Move command line and deps into their normal .*.cmd place.
define
rule_cc_ver_c
$(if
$($(quiet)cmd_cc_ver_c),echo
' $($(quiet)cmd_cc_ver_c)'
;)
\
$(cmd_cc_ver_c);
\
if
[
!
-r
$(depfile)
];
then
exit
1;
fi;
\
$(TOPDIR)/scripts/fixdep
$(depfile)
$@
$(TOPDIR)
'$(cmd_cc_ver_c)'
>
$(@D)/.$(@F).tmp;
\
rm
-f
$(depfile);
\
if
[
!
-r
$@
]
||
cmp
-s
$@
$@.tmp;
then
\
touch
$(TOPDIR)/include/linux/modversions.h;
\
fi;
\
mv
-f
$@.tmp
$@
mv
-f
$(@D)/.$(@F).tmp
$(@D)/.$(@F).cmd
endef
$(MODVERDIR)/%.ver
:
%.c FORCE
@
$(
call
if_changed_
dep
,cc_ver_c
)
@
$(
call
if_changed_
rule
,cc_ver_c
)
targets
:=
$(
addprefix
$(MODVERDIR)
/,
$
(
export-objs:.o
=
.ver
))
...
...
@@ -446,7 +466,7 @@ if_changed = $(if $(strip $? \
# execute the command and also postprocess generated .d dependencies
# file
if_changed_dep
=
$(
if
$(
strip
$?
\
if_changed_dep
=
$(
if
$(
strip
$?
$(
filter-out
FORCE
$(
wildcard
$^
)
,
$^
)
\
$(
filter-out
$
(
cmd_
$(1)
)
,
$
(
cmd_
$@
))
\
$(
filter-out
$
(
cmd_
$@
)
,
$
(
cmd_
$(1)
)))
,
\
@set
-e
;
\
...
...
@@ -456,6 +476,17 @@ if_changed_dep = $(if $(strip $? \
rm
-f
$(depfile)
;
\
mv
-f
$
(
@D
)
/.
$
(
@F
)
.tmp
$
(
@D
)
/.
$
(
@F
)
.cmd
)
# Usage: $(call if_changed_rule,foo)
# will check if $(cmd_foo) changed, or any of the prequisites changed,
# and if so will execute $(rule_foo)
if_changed_rule
=
$(
if
$(
strip
$?
\
$(
filter-out
$
(
cmd_
$(1)
)
,
$
(
cmd_
$@
))
\
$(
filter-out
$
(
cmd_
$@
)
,
$
(
cmd_
$(1)
)))
,
\
@set
-e
;
\
mkdir
-p
$(
dir
$@
)
;
\
$
(
rule_
$(1)
))
# If quiet is set, only print short version of command
cmd
=
@
$(
if
$
(
$(quiet)$(1)
)
,echo
' $(
$(quiet)$(1)
)
'
&&
)
$
(
$(1)
)
arch/alpha/Makefile
View file @
abffad5d
...
...
@@ -127,10 +127,6 @@ archmrproper:
rm
-f
arch
/alpha/vmlinux.lds
rm
-f
include/asm-alpha/asm_offsets.h
archdep
:
$(MAKE)
-C
arch
/alpha/kernel asm_offsets
@
$(MAKEBOOT)
dep
vmlinux
:
arch/alpha/vmlinux.lds
arch/alpha/vmlinux.lds
:
arch/alpha/vmlinux.lds.in
...
...
@@ -138,3 +134,19 @@ arch/alpha/vmlinux.lds: arch/alpha/vmlinux.lds.in
bootpfile
:
@
$(MAKEBOOT)
bootpfile
prepare
:
include/asm-$(ARCH)/asm_offsets.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/asm-$(ARCH)/asm_offsets.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/asm_offsets.h
:
include/asm-$(ARCH)/asm_offsets.h.tmp
@
echo
-n
' Generating $@'
@
$
(
update-if-changed
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offset.h.tmp
\
include/asm-
$(ARCH)
/offset.h
arch/alpha/boot/Makefile
View file @
abffad5d
...
...
@@ -96,6 +96,4 @@ clean:
rm
-f
tools/mkbb tools/bootlx tools/lxboot tools/bootph
rm
-f
vmlinux.nh ksize.h
dep
:
FORCE
:
arch/alpha/kernel/Makefile
View file @
abffad5d
...
...
@@ -94,17 +94,3 @@ endif
endif
# GENERIC
include
$(TOPDIR)/Rules.make
ASM_OFFSETS_H
=
$(TOPDIR)
/include/asm-alpha/asm_offsets.h
asm_offsets
:
$(CC)
$(CFLAGS)
-S
-o
- check_asm.c |
\
sed
-e
'/xyzzy/ { s/xyzzy //; p; }; d;'
>
asm_offsets.tmp
@
if
cmp
-s
asm_offsets.tmp
$(ASM_OFFSETS_H)
;
then
\
set
-x
;
rm
asm_offsets.tmp
;
\
else
\
set
-x
;
mv
asm_offsets.tmp
$(ASM_OFFSETS_H)
;
\
fi
clean
::
rm
-f
check_asm
arch/alpha/kernel/asm-offsets.c
0 → 100644
View file @
abffad5d
/*
* Generate definitions needed by assembly language modules.
* This code generates raw asm output which is post-processed to extract
* and format the required data.
*/
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <asm/io.h>
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
#define BLANK() asm volatile("\n->" : : )
void
foo
(
void
)
{
DEFINE
(
TI_TASK
,
offsetof
(
struct
thread_info
,
task
));
DEFINE
(
TI_FLAGS
,
offsetof
(
struct
thread_info
,
flags
));
DEFINE
(
TI_CPU
,
offsetof
(
struct
thread_info
,
cpu
));
BLANK
();
DEFINE
(
PT_PTRACED
,
PT_PTRACED
);
DEFINE
(
CLONE_VM
,
CLONE_VM
);
DEFINE
(
SIGCHLD
,
SIGCHLD
);
BLANK
();
DEFINE
(
HAE_CACHE
,
offsetof
(
struct
alpha_machine_vector
,
hae_cache
));
DEFINE
(
HAE_REG
,
offsetof
(
struct
alpha_machine_vector
,
hae_register
));
}
arch/alpha/kernel/check_asm.c
deleted
100644 → 0
View file @
9dcbdb7e
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <asm/io.h>
#define OUT(x) \
asm ("\nxyzzy " x)
#define DEF(name, val) \
asm volatile ("\nxyzzy #define " name " %0" : : "i"(val))
void
foo
(
void
)
{
OUT
(
"#ifndef __ASM_OFFSETS_H__"
);
OUT
(
"#define __ASM_OFFSETS_H__"
);
OUT
(
""
);
DEF
(
"TI_TASK"
,
offsetof
(
struct
thread_info
,
task
));
DEF
(
"TI_FLAGS"
,
offsetof
(
struct
thread_info
,
flags
));
DEF
(
"TI_CPU"
,
offsetof
(
struct
thread_info
,
cpu
));
DEF
(
"PT_PTRACED"
,
PT_PTRACED
);
DEF
(
"CLONE_VM"
,
CLONE_VM
);
DEF
(
"SIGCHLD"
,
SIGCHLD
);
DEF
(
"HAE_CACHE"
,
offsetof
(
struct
alpha_machine_vector
,
hae_cache
));
DEF
(
"HAE_REG"
,
offsetof
(
struct
alpha_machine_vector
,
hae_register
));
OUT
(
""
);
OUT
(
"#endif /* __ASM_OFFSETS_H__ */"
);
}
arch/alpha/lib/Makefile
View file @
abffad5d
...
...
@@ -65,6 +65,4 @@ __divlu.o: $(ev6)divide.S
__remlu.o
:
$(ev6)divide.S
$(CC)
$(AFLAGS)
-DREM
-DINTSIZE
-c
-o
__remlu.o
$(ev6)
divide.S
dep
:
include
$(TOPDIR)/Rules.make
arch/arm/Makefile
View file @
abffad5d
...
...
@@ -195,29 +195,25 @@ endif
MAKEBOOT
=
$(MAKE)
-C
arch
/
$(ARCH)
/boot
MAKETOOLS
=
$(MAKE)
-C
arch
/
$(ARCH)
/tools
# The following is a hack to get 'constants.h' up
# to date before starting compilation
$(patsubst %,_dir_%, $(SUBDIRS))
:
maketools
$(patsubst %,_modsubdir_%,$(MOD_DIRS))
:
maketools
# Update machine arch and proc symlinks if something which affects
# them changed. We use .arch and .proc to indicate when they were
# updated last, otherwise make uses the target directory mtime.
include/asm-arm/.arch
:
$(wildcard include/config/arch/*.h)
@
echo
'Making asm-arm/arch -> asm-arm/arch-
$(INCDIR)
symlink'
@
echo
'
Making asm-arm/arch -> asm-arm/arch-
$(INCDIR)
symlink'
@
rm
-f
include/asm-arm/arch
@
ln
-sf
arch-
$(INCDIR)
include/asm-arm/arch
@
touch
$@
include/asm-arm/.proc
:
$(wildcard include/config/cpu/32.h) $(wildcard include/config/cpu/26.h)
@
echo
'Making asm-arm/proc -> asm-arm/proc-
$(PROCESSOR)
symlink'
@
echo
'
Making asm-arm/proc -> asm-arm/proc-
$(PROCESSOR)
symlink'
@
rm
-f
include/asm-arm/proc
@
ln
-sf
proc-
$(PROCESSOR)
include/asm-arm/proc
@
touch
$@
.hdepend
:
include/asm-arm/.arch include/asm-arm/.proc
prepare
:
include/asm-arm/.arch include/asm-arm/.proc
\
include/asm-arm/constants.h
@
$(MAKETOOLS)
vmlinux
:
arch/arm/vmlinux.lds
...
...
@@ -234,7 +230,6 @@ CLEAN_FILES += \
arch
/arm/vmlinux.lds
MRPROPER_FILES
+=
\
arch
/arm/tools/constants.h
*
\
include/asm-arm/arch include/asm-arm/.arch
\
include/asm-arm/proc include/asm-arm/.proc
\
include/asm-arm/constants.h
*
\
...
...
@@ -247,13 +242,9 @@ archmrproper: FORCE
archclean
:
FORCE
@
$(MAKEBOOT)
clean
archdep
:
FORCE
@
$(MAKETOOLS)
dep
@
$(MAKEBOOT)
dep
# we need version.h
maketools
:
include/linux/version.h FORCE
@
$(MAKETOOLS)
all
@
$(MAKETOOLS)
# My testing targets (that short circuit a few dependencies)
zImg
:
; @$(MAKEBOOT) zImage
...
...
@@ -277,3 +268,13 @@ bp:; @$(MAKEBOOT) bootpImage
echo
"
$$
CFG does not exist"
;
\
fi
;
\
)
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/asm-$(ARCH)/constants.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/constants.h
:
include/asm-$(ARCH)/constants.h.tmp
@
echo
-n
' Generating $@'
@
$
(
update-if-changed
)
arch/arm/boot/Makefile
View file @
abffad5d
...
...
@@ -125,7 +125,7 @@ zImage: compressed/vmlinux
bootpImage
:
bootp/bootp
$(OBJCOPY)
-O
binary
-R
.note
-R
.comment
-S
bootp/bootp
$@
compressed/vmlinux
:
$(TOPDIR)/vmlinux
dep
compressed/vmlinux
:
$(TOPDIR)/vmlinux
@
$(MAKE)
-C
compressed vmlinux
bootp/bootp
:
zImage initrd
...
...
@@ -145,5 +145,3 @@ clean:
$(RM)
Image zImage bootpImage
@
$(MAKE)
-C
compressed clean
@
$(MAKE)
-C
bootp clean
dep
:
arch/arm/
tools/getconstan
ts.c
→
arch/arm/
kernel/asm-offse
ts.c
View file @
abffad5d
/*
* linux/arch/arm/tools/getconsdata.c
*
* Copyright (C) 1995-2001 Russell King
* Copyright (C) 1995-2001 Russell King
* 2001-2002 Keith Owens
*
* Generate definitions needed by assembly language modules.
* This code generates raw asm output which is post-processed to extract
* and format the required data.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/mm.h>
...
...
@@ -31,45 +35,48 @@
#warning GCC 2.95.2 and earlier miscompiles kernels.
#endif
#define OFF_TSK(n) (unsigned long)&(((struct task_struct *)0)->n)
#define OFF_VMA(n) (unsigned long)&(((struct vm_area_struct *)0)->n)
#define DEFN(name,off) asm("\n#define "name" %0" :: "I" (off))
void
func
(
void
)
{
DEFN
(
"TSK_USED_MATH"
,
OFF_TSK
(
used_math
));
DEFN
(
"TSK_ACTIVE_MM"
,
OFF_TSK
(
active_mm
));
/* Use marker if you need to separate the values later */
DEFN
(
"VMA_VM_MM"
,
OFF_VMA
(
vm_mm
));
DEFN
(
"VMA_VM_FLAGS"
,
OFF_VMA
(
vm_flags
));
#define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
DEFN
(
"VM_EXEC"
,
VM_EXEC
);
#define BLANK() asm volatile("\n->" : : )
int
main
(
void
)
{
DEFINE
(
TSK_USED_MATH
,
offsetof
(
struct
task_struct
,
used_math
));
DEFINE
(
TSK_ACTIVE_MM
,
offsetof
(
struct
task_struct
,
active_mm
));
BLANK
();
DEFINE
(
VMA_VM_MM
,
offsetof
(
struct
vm_area_struct
,
vm_mm
));
DEFINE
(
VMA_VM_FLAGS
,
offsetof
(
struct
vm_area_struct
,
vm_flags
));
BLANK
();
DEFINE
(
VM_EXEC
,
VM_EXEC
);
BLANK
();
#ifdef CONFIG_CPU_32
DEFN
(
"HPTE_TYPE_SMALL"
,
PTE_TYPE_SMALL
);
DEFN
(
"HPTE_AP_READ"
,
PTE_AP_READ
);
DEFN
(
"HPTE_AP_WRITE"
,
PTE_AP_WRITE
);
DEFN
(
"LPTE_PRESENT"
,
L_PTE_PRESENT
);
DEFN
(
"LPTE_YOUNG"
,
L_PTE_YOUNG
);
DEFN
(
"LPTE_BUFFERABLE"
,
L_PTE_BUFFERABLE
);
DEFN
(
"LPTE_CACHEABLE"
,
L_PTE_CACHEABLE
);
DEFN
(
"LPTE_USER"
,
L_PTE_USER
);
DEFN
(
"LPTE_WRITE"
,
L_PTE_WRITE
);
DEFN
(
"LPTE_EXEC"
,
L_PTE_EXEC
);
DEFN
(
"LPTE_DIRTY"
,
L_PTE_DIRTY
);
DEFINE
(
HPTE_TYPE_SMALL
,
PTE_TYPE_SMALL
);
DEFINE
(
HPTE_AP_READ
,
PTE_AP_READ
);
DEFINE
(
HPTE_AP_WRITE
,
PTE_AP_WRITE
);
BLANK
();
DEFINE
(
LPTE_PRESENT
,
L_PTE_PRESENT
);
DEFINE
(
LPTE_YOUNG
,
L_PTE_YOUNG
);
DEFINE
(
LPTE_BUFFERABLE
,
L_PTE_BUFFERABLE
);
DEFINE
(
LPTE_CACHEABLE
,
L_PTE_CACHEABLE
);
DEFINE
(
LPTE_USER
,
L_PTE_USER
);
DEFINE
(
LPTE_WRITE
,
L_PTE_WRITE
);
DEFINE
(
LPTE_EXEC
,
L_PTE_EXEC
);
DEFINE
(
LPTE_DIRTY
,
L_PTE_DIRTY
);
#endif
BLANK
();
#ifdef CONFIG_CPU_26
DEFN
(
"PAGE_PRESENT"
,
_PAGE_PRESENT
);
DEFN
(
"PAGE_READONLY"
,
_PAGE_READONLY
);
DEFN
(
"PAGE_NOT_USER"
,
_PAGE_NOT_USER
);
DEFN
(
"PAGE_OLD"
,
_PAGE_OLD
);
DEFN
(
"PAGE_CLEAN"
,
_PAGE_CLEAN
);
DEFINE
(
PAGE_PRESENT
,
_PAGE_PRESENT
);
DEFINE
(
PAGE_READONLY
,
_PAGE_READONLY
);
DEFINE
(
PAGE_NOT_USER
,
_PAGE_NOT_USER
);
DEFINE
(
PAGE_OLD
,
_PAGE_OLD
);
DEFINE
(
PAGE_CLEAN
,
_PAGE_CLEAN
);
#endif
DEFN
(
"PAGE_SZ"
,
PAGE_SIZE
);
DEFN
(
"SYS_ERROR0"
,
0x9f0000
);
BLANK
();
DEFINE
(
PAGE_SZ
,
PAGE_SIZE
);
BLANK
();
DEFINE
(
SYS_ERROR0
,
0x9f0000
);
return
0
;
}
arch/arm/tools/Makefile
View file @
abffad5d
...
...
@@ -4,40 +4,9 @@
# Copyright (C) 2001 Russell King
#
all
:
$(TOPDIR)/include/asm-arm/mach-types.h
\
$(TOPDIR)/include/asm-arm/constants.h
all
:
$(TOPDIR)/include/asm-arm/mach-types.h
$(TOPDIR)/include/asm-arm/mach-types.h
:
mach-types gen-mach-types
awk
-f
gen-mach-types mach-types
>
$@
# Generate the constants.h header file using the compiler. We get
# the compiler to spit out assembly code, and then mundge it into
# what we want. We do this in several stages so make picks up on
# any errors that occur along the way.
constants.h
:
constants-hdr getconstants.c
$(CC)
$(CFLAGS)
-S
-o
$@
.tmp.1 getconstants.c
sed
's/^\(#define .* \)[#$$]\(.*\)/\1\2/;/^#define/!d'
$@
.tmp.1
>
$@
.tmp.2
cat
constants-hdr
$@
.tmp.2
>
$@
$(RM)
$@
.tmp
*
# Only update include/asm-arm/constants.h when it has actually changed.
$(TOPDIR)/include/asm-arm/constants.h
:
constants.h
cmp constants.h
$@
>
/dev/null 2>&1
||
cp
-p
constants.h
$@
# Build our dependencies, and then generate the constants and
# mach-types header files. If we do it now, mkdep will pick
# the dependencies up later on when it runs through the other
# directories
dep
:
$(TOPDIR)
/scripts/mkdep
$(CFLAGS)
$(EXTRA_CFLAGS)
--
getconstants.c |
\
sed
s,getconstants.o,constants.h,
>
.depend
$(MAKE)
all
.PHONY
:
all dep
ifneq
($(wildcard .depend),)
include
.depend
endif
.PHONY
:
all
arch/arm/tools/constants-hdr
deleted
100644 → 0
View file @
9dcbdb7e
/*
* This file is automatically generated from arch/arm/tools/getconstants.c.
* Do not edit! Only include this file in assembly (.S) files!
*/
arch/cris/Makefile
View file @
abffad5d
...
...
@@ -100,6 +100,3 @@ archclean:
rm
-rf
$(LD_SCRIPT)
.tmp
archmrproper
:
archdep
:
@
$(MAKEBOOT)
dep
arch/cris/boot/Makefile
View file @
abffad5d
...
...
@@ -7,8 +7,6 @@ zImage: compressed/vmlinuz
compressed/vmlinuz
:
$(TOPDIR)/vmlinux
@
$(MAKE)
-C
compressed vmlinuz
dep
:
clean
:
rm
-f
zImage tools/build compressed/vmlinux.out
@
$(MAKE)
-C
compressed clean
arch/i386/Makefile
View file @
abffad5d
...
...
@@ -108,7 +108,7 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux
:
arch/i386/vmlinux.lds
.PHONY
:
zImage bzImage compressed zlilo bzlilo zdisk bzdisk install
\
clean archclean archmrproper
archdep
clean archclean archmrproper
zImage
:
vmlinux
@
$(MAKEBOOT)
zImage
...
...
@@ -140,6 +140,3 @@ archclean:
@
$(MAKEBOOT)
clean
archmrproper
:
archdep
:
@
$(MAKEBOOT)
dep
arch/i386/boot/Makefile
View file @
abffad5d
...
...
@@ -97,8 +97,6 @@ bsetup.o: bsetup.s
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
$@
dep
:
clean
:
@
echo
'Cleaning up (boot)'
@
rm
-f
tools/build
...
...
arch/ia64/Makefile
View file @
abffad5d
...
...
@@ -127,8 +127,11 @@ archmrproper:
rm
-f
arch
/
$(ARCH)
/vmlinux.lds
@
$(MAKE)
-C
arch
/
$(ARCH)
/tools mrproper
archdep
:
@
$(MAKEBOOT)
dep
bootpfile
:
@
$(MAKEBOOT)
bootpfile
prepare
:
$(TOPDIR)/include/asm-ia64/offsets.h
$(TOPDIR)/include/asm-ia64/offsets.h
:
include/asm include/linux/version.h
\
include/config/MARKER
@
$(MAKE)
-C
arch
/
$(ARCH)
/tools
$@
\ No newline at end of file
arch/ia64/boot/Makefile
View file @
abffad5d
...
...
@@ -23,5 +23,3 @@ bootloader: $(OBJECTS)
clean
:
rm
-f
$(TARGETS)
dep
:
arch/ia64/tools/Makefile
View file @
abffad5d
...
...
@@ -9,7 +9,7 @@ mrproper:
clean
:
rm
-f
print_offsets.s print_offsets offsets.h
fastdep
:
offsets.h
$(TARGET)
:
offsets.h
@
if
!
cmp
-s
offsets.h
${TARGET}
;
then
\
echo
-e
"*** Updating
${TARGET}
..."
;
\
cp
offsets.h
${TARGET}
;
\
...
...
arch/m68k/Makefile
View file @
abffad5d
...
...
@@ -172,5 +172,3 @@ archclean:
rm
-f
arch
/m68k/kernel/m68k_defs.h
arch
/m68k/kernel/m68k_defs.d
archmrproper
:
archdep
:
arch/mips/Makefile
View file @
abffad5d
...
...
@@ -308,9 +308,3 @@ archclean:
archmrproper
:
@
$(MAKEBOOT)
mrproper
$(MAKE)
-C
arch
/
$(ARCH)
/tools mrproper
archdep
:
if
[
!
-f
$(TOPDIR)
/include/asm-
$(ARCH)
/offset.h
]
;
then
\
touch
$(TOPDIR)
/include/asm-
$(ARCH)
/offset.h
;
\
fi
;
@
$(MAKEBOOT)
dep
arch/mips/boot/Makefile
View file @
abffad5d
...
...
@@ -35,9 +35,6 @@ elf2ecoff: elf2ecoff.c
addinitrd
:
addinitrd.c
$(HOSTCC)
-o
$@
$^
# Don't build dependencies, this may die if $(CC) isn't gcc
dep
:
clean
:
rm
-f
vmlinux.ecoff
rm
-f
zImage zImage.tmp
...
...
arch/mips64/Makefile
View file @
abffad5d
...
...
@@ -176,9 +176,3 @@ archclean:
archmrproper
:
@
$(MAKEBOOT)
mrproper
$(MAKE)
-C
arch
/
$(ARCH)
/tools mrproper
archdep
:
if
[
!
-f
$(TOPDIR)
/include/asm-
$(ARCH)
/offset.h
]
;
then
\
touch
$(TOPDIR)
/include/asm-
$(ARCH)
/offset.h
;
\
fi
;
@
$(MAKEBOOT)
dep
arch/mips64/boot/Makefile
View file @
abffad5d
...
...
@@ -26,9 +26,6 @@ elf2ecoff: elf2ecoff.c
addinitrd
:
addinitrd.c
$(HOSTCC)
-o
$@
$^
# Don't build dependencies, this may die if $(CC) isn't gcc
dep
:
clean
:
rm
-f
vmlinux.ecoff
...
...
arch/parisc/Makefile
View file @
abffad5d
...
...
@@ -78,5 +78,3 @@ install:
archclean
:
archmrproper
:
archdep
:
arch/ppc/Makefile
View file @
abffad5d
...
...
@@ -116,6 +116,3 @@ archclean:
@
$(MAKEBOOT)
clean
archmrproper
:
archdep
:
scripts/mkdep
$(MAKEBOOT)
fastdep
arch/ppc64/Makefile
View file @
abffad5d
...
...
@@ -66,5 +66,5 @@ archclean:
archmrproper
:
archdep
:
$(MAKEBOOT)
fast
dep
prepare
:
$(MAKEBOOT)
dep
arch/ppc64/boot/Makefile
View file @
abffad5d
...
...
@@ -121,9 +121,6 @@ imagesize.c: vmlinux.gz
clean
:
rm
-f
piggyback note addnote
$(OBJS)
zImage zImage.initrd vmlinux.gz no_initrd.o imagesize.c addSystemMap vmlinux.sm addRamDisk vmlinux.initrd vmlinux.sminitrd
fastdep
:
$(TOPDIR)
/scripts/mkdep
*
.[Sch]
>
.depend
dep
:
$(CPP)
$(CPPFLAGS)
-M
*
.S
*
.c
>
.depend
arch/s390/Makefile
View file @
abffad5d
...
...
@@ -58,8 +58,5 @@ archclean:
archmrproper
:
archdep
:
@
$(MAKEBOOT)
dep
install
:
vmlinux
@
$(MAKEBOOT)
BOOTIMAGE
=
image
install
arch/s390/boot/Makefile
View file @
abffad5d
...
...
@@ -22,8 +22,6 @@ image: $(TOPDIR)/vmlinux \
listing
:
../../../vmlinux
$(OBJDUMP)
--disassemble
--disassemble-all
--disassemble-zeroes
--reloc
$(TOPDIR)
/vmlinux
>
listing
dep
:
clean
:
rm
-f
image listing iplfba.boot ipleckd.boot ipldump.boot
...
...
arch/s390x/Makefile
View file @
abffad5d
...
...
@@ -56,6 +56,3 @@ archclean:
$(MAKE)
-C
arch
/
$(ARCH)
/kernel clean
archmrproper
:
archdep
:
@
$(MAKEBOOT)
dep
arch/s390x/boot/Makefile
View file @
abffad5d
...
...
@@ -24,8 +24,6 @@ image: $(TOPDIR)/vmlinux \
listing
:
../../../vmlinux
$(OBJDUMP)
--disassemble
--disassemble-all
--disassemble-zeroes
--reloc
$(TOPDIR)
/vmlinux
>
listing
dep
:
clean
:
rm
-f
image listing iplfba.boot ipleckd.boot ipldump.boot
...
...
arch/sh/Makefile
View file @
abffad5d
...
...
@@ -94,6 +94,3 @@ archclean:
archmrproper
:
rm
-f
arch
/sh/vmlinux.lds
archdep
:
@
$(MAKEBOOT)
dep
arch/sh/boot/Makefile
View file @
abffad5d
...
...
@@ -25,8 +25,6 @@ install: Image
zinstall
:
zImage
sh
-x
./install.sh
$(KERNELRELEASE)
zImage
$(TOPDIR)
/System.map
"
$(INSTALL_PATH)
"
dep
:
clean
:
rm
-f
tools/build
rm
-f
setup bootsect zImage compressed/vmlinux.out
...
...
arch/sparc/Makefile
View file @
abffad5d
...
...
@@ -58,9 +58,9 @@ archclean:
archmrproper
:
rm
-f
$(TOPDIR)
/include/asm-sparc/asm_offsets.h
archdep
:
check_asm
prepare
:
check_asm
check_asm
:
include/linux/version.h
check_asm
:
include/linux/version.h
include/linux/asm include/config/MARKER
$(MAKE)
-C
arch
/sparc/kernel check_asm
tftpboot.img
:
...
...
arch/sparc64/Makefile
View file @
abffad5d
...
...
@@ -85,7 +85,5 @@ archclean:
archmrproper
:
archdep
:
tftpboot.img
:
$(MAKE)
-C
arch
/sparc64/boot tftpboot.img
arch/sparc64/boot/Makefile
View file @
abffad5d
...
...
@@ -18,6 +18,3 @@ tftpboot.img: piggyback $(TOPDIR)/vmlinux $(ROOT_IMG)
piggyback
:
piggyback.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
piggyback piggyback.c
dep
:
arch/x86_64/Makefile
View file @
abffad5d
...
...
@@ -48,7 +48,7 @@ CFLAGS += -finline-limit=2000
HEAD
:=
arch
/x86_64/kernel/head.o
arch
/x86_64/kernel/head64.o
arch
/x86_64/kernel/init_task.o
SUBDIRS
:=
arch
/x86_64/tools
$(SUBDIRS)
arch
/x86_64/kernel
arch
/x86_64/mm
arch
/x86_64/lib
SUBDIRS
+=
arch
/x86_64/kernel
arch
/x86_64/mm
arch
/x86_64/lib
CORE_FILES
:=
arch
/x86_64/kernel/kernel.o
$(CORE_FILES)
CORE_FILES
+=
arch
/x86_64/mm/mm.o
LIBS
:=
$(TOPDIR)
/arch/x86_64/lib/lib.a
$(LIBS)
...
...
@@ -70,38 +70,43 @@ MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux
:
arch/x86_64/vmlinux.lds
.PHONY
:
zImage bzImage compressed zlilo bzlilo zdisk bzdisk install
\
clean archclean archmrproper
archdep checkoffset
clean archclean archmrproper
checkoffset
:
FORCE include/asm
make
-C
arch
/
$(ARCH)
/tools
$(TOPDIR)
/include/asm-x86_64/offset.h
bzImage
:
checkoffset vmlinux
bzImage
:
vmlinux
@
$(MAKEBOOT)
bzImage
bzImage-padded
:
checkoffset
vmlinux
bzImage-padded
:
vmlinux
@
$(MAKEBOOT)
bzImage-padded
tmp
:
@
$(MAKEBOOT)
BOOTIMAGE
=
bzImage zlilo
bzlilo
:
checkoffset
vmlinux
bzlilo
:
vmlinux
@
$(MAKEBOOT)
BOOTIMAGE
=
bzImage zlilo
bzdisk
:
checkoffset
vmlinux
bzdisk
:
vmlinux
@
$(MAKEBOOT)
BOOTIMAGE
=
bzImage zdisk
install
:
checkoffset
vmlinux
install
:
vmlinux
@
$(MAKEBOOT)
BOOTIMAGE
=
bzImage
install
archclean
:
@
$(MAKEBOOT)
clean
@
$(MAKE)
-C
$(TOPDIR)
/arch/x86_64/tools clean
archmrproper
:
rm
-f
$(TOPDIR)
/arch/x86_64/tools/offset.h
rm
-f
$(TOPDIR)
/arch/x86_64/tools/offset.tmp
rm
-f
$(TOPDIR)
/include/asm-x86_64/offset.h
archdep
:
@
$(MAKE)
-C
$(TOPDIR)
/arch/x86_64/tools all
@
$(MAKEBOOT)
dep
prepare
:
include/asm-$(ARCH)/offset.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/asm-$(ARCH)/offset.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/offset.h
:
include/asm-$(ARCH)/offset.h.tmp
@
echo
-n
' Generating $@'
@
$
(
update-if-changed
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offset.h.tmp
\
include/asm-
$(ARCH)
/offset.h
\ No newline at end of file
arch/x86_64/boot/Makefile
View file @
abffad5d
...
...
@@ -96,12 +96,8 @@ bsetup.o: bsetup.s
bsetup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(IA32_CPP)
$(CPPFLAGS)
-D__BIG_KERNEL__
-D__ASSEMBLY__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
dep
:
clean
:
rm
-f
tools/build
rm
-f
setup bootsect zImage compressed/vmlinux.out
rm
-f
bsetup bbootsect bzImage compressed/bvmlinux.out
@
$(MAKE)
-C
compressed clean
arch/x86_64/
tools/offset
.c
→
arch/x86_64/
kernel/asm-offsets
.c
View file @
abffad5d
/* Written 2000 by Andi Kleen */
/* This program is never executed, just its assembly is examined for offsets
(this trick is needed to get cross compiling right) */
/* $Id: offset.c,v 1.13 2002/01/08 15:19:57 ak Exp $ */
#define ASM_OFFSET_H 1
#ifndef __KERNEL__
#define __KERNEL__
#endif
/*
* Generate definitions needed by assembly language modules.
* This code generates raw asm output which is post-processed to extract
* and format the required data.
*/
#include <linux/sched.h>
#include <linux/stddef.h>
#include <linux/errno.h>
...
...
@@ -15,26 +13,26 @@
#include <asm/segment.h>
#include <asm/thread_info.h>
#define
output(x) asm volatile ("--- " x)
#define outconst(x,y) asm volatile ("--- " x : : "i" (y))
#define
DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val))
int
main
(
void
)
{
output
(
"/* Auto generated by arch/../tools/offset.c at "
__DATE__
". Do not edit. */
\n
"
);
output
(
"#ifndef ASM_OFFSET_H
\n
"
);
output
(
"#define ASM_OFFSET_H 1
\n
"
);
#define BLANK() asm volatile("\n->" : : )
#define ENTRY(entry) outconst("#define tsk_" #entry " %0", offsetof(struct task_struct, entry))
int
main
(
void
)
{
#define ENTRY(entry) DEFINE(tsk_ ## entry, offsetof(struct task_struct, entry))
ENTRY
(
state
);
ENTRY
(
flags
);
ENTRY
(
thread
);
BLANK
();
#undef ENTRY
#define ENTRY(entry)
outconst("#define threadinfo_" #entry " %0"
, offsetof(struct thread_info, entry))
#define ENTRY(entry)
DEFINE(threadinfo__ ## entry
, offsetof(struct thread_info, entry))
ENTRY
(
flags
);
ENTRY
(
addr_limit
);
ENTRY
(
preempt_count
);
BLANK
();
#undef ENTRY
#define ENTRY(entry)
outconst("#define pda_" #entry " %0"
, offsetof(struct x8664_pda, entry))
#define ENTRY(entry)
DEFINE(pda__ ## entry
, offsetof(struct x8664_pda, entry))
ENTRY
(
kernelstack
);
ENTRY
(
oldrsp
);
ENTRY
(
pcurrent
);
...
...
@@ -42,8 +40,7 @@ int main(void)
ENTRY
(
irqcount
);
ENTRY
(
cpunumber
);
ENTRY
(
irqstackptr
);
BLANK
();
#undef ENTRY
output
(
"#endif
\n
"
);
return
(
0
);
}
return
0
;
}
arch/x86_64/tools/Makefile
deleted
100644 → 0
View file @
9dcbdb7e
TARGET
=
$(TOPDIR)
/include/asm-x86_64/offset.h
all
:
mrproper
:
fastdep
:
$(TARGET)
.PHONY
:
all
$(TARGET)
:
offset.h
cmp
-s
$^
$@
||
(
cp
$^
$(TARGET)
.new
&&
mv
$(TARGET)
.new
$(TARGET)
)
.PHONY
:
offset.h all modules modules_install
offset.h
:
offset.sed offset.c FORCE
$(CC)
$(CFLAGS)
-S
-o
offset.tmp offset.c
sed
-n
-f
offset.sed < offset.tmp
>
offset.h
clean
:
rm
-f
offset.[hs]
$(TARGET)
.new offset.tmp
mrproper
:
rm
-f
offset.[hs]
$(TARGET)
rm
-f
$(TARGET)
include
$(TOPDIR)/Rules.make
arch/x86_64/tools/offset.sed
deleted
100644 → 0
View file @
9dcbdb7e
/
---
/
{
s
/
---
//
s
/
\$
//
s
/
^
//
s
/
^
//
p
}
scripts/fixdep.c
View file @
abffad5d
...
...
@@ -143,7 +143,7 @@ void grow_config(int len)
size_config
=
2048
;
str_config
=
realloc
(
str_config
,
size_config
*=
2
);
if
(
str_config
==
NULL
)
{
perror
(
"malloc"
);
exit
(
1
);
}
{
perror
(
"
fixdep:
malloc"
);
exit
(
1
);
}
}
}
...
...
@@ -259,6 +259,7 @@ void do_config_file(char *filename)
fd
=
open
(
filename
,
O_RDONLY
);
if
(
fd
<
0
)
{
fprintf
(
stderr
,
"fixdep: "
);
perror
(
filename
);
exit
(
2
);
}
...
...
@@ -269,7 +270,7 @@ void do_config_file(char *filename)
}
map
=
mmap
(
NULL
,
st
.
st_size
,
PROT_READ
,
MAP_PRIVATE
,
fd
,
0
);
if
((
long
)
map
==
-
1
)
{
perror
(
"mmap"
);
perror
(
"
fixdep:
mmap"
);
close
(
fd
);
return
;
}
...
...
@@ -292,7 +293,7 @@ void parse_dep_file(void *map, size_t len)
exit
(
1
);
}
memcpy
(
s
,
m
,
p
-
m
);
s
[
p
-
m
]
=
0
;
printf
(
"
%s:
\\\n
"
,
target
);
printf
(
"
deps_%s :=
\\\n
"
,
target
);
m
=
p
+
1
;
clear_config
();
...
...
@@ -314,7 +315,8 @@ void parse_dep_file(void *map, size_t len)
}
m
=
p
+
1
;
}
printf
(
"
\n
"
);
printf
(
"
\n
%s: $(deps_%s)
\n\n
"
,
target
,
target
);
printf
(
"$(deps_%s):
\n
"
,
target
);
}
void
print_deps
(
void
)
...
...
@@ -325,6 +327,7 @@ void print_deps(void)
fd
=
open
(
depfile
,
O_RDONLY
);
if
(
fd
<
0
)
{
fprintf
(
stderr
,
"fixdep: "
);
perror
(
depfile
);
exit
(
2
);
}
...
...
@@ -336,7 +339,7 @@ void print_deps(void)
}
map
=
mmap
(
NULL
,
st
.
st_size
,
PROT_READ
,
MAP_PRIVATE
,
fd
,
0
);
if
((
long
)
map
==
-
1
)
{
perror
(
"mmap"
);
perror
(
"
fixdep:
mmap"
);
close
(
fd
);
return
;
}
...
...
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