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
e272a0c6
Commit
e272a0c6
authored
Sep 21, 2003
by
Sam Ravnborg
Browse files
Options
Browse Files
Download
Plain Diff
Merge mars.ravnborg.org:/home/sam/bk/kbuild-patchset-1
into mars.ravnborg.org:/home/sam/bk/sepout
parents
09009772
efacc216
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
64 additions
and
22 deletions
+64
-22
Documentation/kbuild/00-INDEX
Documentation/kbuild/00-INDEX
+2
-0
Documentation/kbuild/modules.txt
Documentation/kbuild/modules.txt
+28
-0
Makefile
Makefile
+8
-5
arch/ppc/Makefile
arch/ppc/Makefile
+0
-4
arch/ppc64/Makefile
arch/ppc64/Makefile
+0
-4
scripts/Makefile.lib
scripts/Makefile.lib
+1
-1
scripts/kconfig/Makefile
scripts/kconfig/Makefile
+3
-0
scripts/kconfig/conf.c
scripts/kconfig/conf.c
+22
-8
No files found.
Documentation/kbuild/00-INDEX
View file @
e272a0c6
...
...
@@ -4,3 +4,5 @@ kconfig-language.txt
- specification of Config Language, the language in Kconfig files
makefiles.txt
- developer information for linux kernel makefiles
modules.txt
- how to build modules and to install them
Documentation/kbuild/modules.txt
0 → 100644
View file @
e272a0c6
For now this is a raw copy from the old Documentation/modules.txt,
which was removed in 2.6.0-test5.
The information herein is correct but not complete.
Installing modules in a non-standard location
---------------------------------------------
When the modules needs to be installed under another directory
the INSTALL_MOD_PATH can be used to prefix "/lib/modules" as seen
in the following example:
make INSTALL_MOD_PATH=/frodo modules_install
This will install the modules in the directory /frodo/lib/modules.
/frodo can be a NFS mounted filesystem on another machine, allowing
out-of-the-box support for installation on remote machines.
Compiling modules outside the official kernel
---------------------------------------------
Often modules are developed outside the official kernel.
To keep up with changes in the build system the most portable way
to compile a module outside the kernel is to use the following command-line:
make -C path/to/kernel/src SUBDIRS=$PWD modules
This requires that a makefile exits made in accordance to
Documentation/kbuild/makefiles.txt.
Makefile
View file @
e272a0c6
...
...
@@ -302,12 +302,15 @@ RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CV
# Helpers built in scripts/
scripts/docproc scripts/
fixdep scripts/
split-include
:
scripts ;
scripts/docproc scripts/split-include
:
scripts ;
.PHONY
:
scripts
.PHONY
:
scripts
scripts/fixdep
scripts
:
$(Q)$(MAKE)
$(build)
=
scripts
scripts/fixdep
:
$(Q)$(MAKE)
$(build)
=
scripts
$@
# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
...
...
@@ -385,8 +388,8 @@ include .config
# If .config is newer than include/linux/autoconf.h, someone tinkered
# with it and forgot to run make oldconfig
include/linux/autoconf.h
:
scripts/fixdep
.config
$(Q)$(MAKE)
$(build)
=
scripts/kconfig
silentoldconfig
include/linux/autoconf.h
:
.config
$(Q)$(MAKE)
-f
$(srctree)
/Makefile
silentoldconfig
endif
...
...
@@ -745,7 +748,7 @@ MRPROPER_FILES += \
.menuconfig.log
\
include/asm
\
.hdepend include/linux/modversions.h
\
tags TAGS cscope kernel.spec
\
tags TAGS cscope
.out
kernel.spec
\
.tmp
*
# Directories removed with 'make mrproper'
...
...
arch/ppc/Makefile
View file @
e272a0c6
...
...
@@ -58,10 +58,6 @@ bzImage: zImage
$(BOOT_TARGETS)
:
vmlinux
$(Q)$(MAKE)
$(build)
=
arch
/ppc/boot
$@
%_config
:
arch/ppc/configs/%_defconfig
rm
-f
.config
arch
/ppc/defconfig
cp
-f
arch
/ppc/configs/
$
(
@:config
=
defconfig
)
.config
archclean
:
$(Q)$(MAKE)
$(clean)
=
arch
/ppc/boot
...
...
arch/ppc64/Makefile
View file @
e272a0c6
...
...
@@ -41,10 +41,6 @@ boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm
$(boottarget-y)
:
vmlinux
$(Q)$(MAKE)
$(build)
=
$(boot)
$(boot)
/
$@
%_config
:
arch/ppc64/configs/%_defconfig
rm
-f
.config
arch
/ppc64/defconfig
cp
-f
arch
/ppc64/configs/
$
(
@:config
=
defconfig
)
arch
/ppc64/defconfig
bootimage-$(CONFIG_PPC_PSERIES)
:=
zImage
bootimage-$(CONFIG_PPC_ISERIES)
:=
vmlinux.sm
BOOTIMAGE
:=
$
(
bootimage-y
)
...
...
scripts/Makefile.lib
View file @
e272a0c6
...
...
@@ -262,7 +262,7 @@ if_changed_rule = $(if $(strip $? \
# If quiet is set, only print short version of command
cmd
=
@
$(
if
$
(
$(quiet)
cmd_
$(1)
)
,echo
' $(
$(quiet)
cmd_
$(1
)
)
'
&&
)
$
(
cmd_
$(1)
)
cmd
=
@
$(
if
$
(
$(quiet)
cmd_
$(1)
)
,echo
'
$(
subst
'
,
'\'',$(
$(quiet)
cmd_
$(1)
))
'
&&
)
$
(
cmd_
$(1)
)
# $(call descend,<dir>,<target>)
# Recursively call a sub-make in <dir> with target <target>
...
...
scripts/kconfig/Makefile
View file @
e272a0c6
...
...
@@ -40,6 +40,9 @@ allmodconfig: $(obj)/conf
defconfig
:
$(obj)/conf
$<
-d
arch
/
$(ARCH)
/Kconfig
%_defconfig
:
$(obj)/conf
$(Q)$<
-D
arch
/
$(ARCH)
/configs/
$@
arch
/
$(ARCH)
/Kconfig
# Help text used by make help
help
:
@
echo
' oldconfig - Update current config utilising a line-oriented program'
...
...
scripts/kconfig/conf.c
View file @
e272a0c6
...
...
@@ -26,6 +26,7 @@ enum {
set_no
,
set_random
}
input_mode
=
ask_all
;
char
*
defconfig_file
;
static
int
indent
=
1
;
static
int
valid_stdin
=
1
;
...
...
@@ -483,11 +484,12 @@ static void check_conf(struct menu *menu)
int
main
(
int
ac
,
char
**
av
)
{
int
i
=
1
;
const
char
*
name
;
struct
stat
tmpstat
;
if
(
ac
>
1
&&
av
[
1
][
0
]
==
'-'
)
{
switch
(
av
[
1
][
1
])
{
if
(
ac
>
i
&&
av
[
i
][
0
]
==
'-'
)
{
switch
(
av
[
i
++
][
1
])
{
case
'o'
:
input_mode
=
ask_new
;
break
;
...
...
@@ -498,6 +500,15 @@ int main(int ac, char **av)
case
'd'
:
input_mode
=
set_default
;
break
;
case
'D'
:
input_mode
=
set_default
;
defconfig_file
=
av
[
i
++
];
if
(
!
defconfig_file
)
{
printf
(
"%s: No default config file specified
\n
"
,
av
[
0
]);
exit
(
1
);
}
break
;
case
'n'
:
input_mode
=
set_no
;
break
;
...
...
@@ -516,18 +527,21 @@ int main(int ac, char **av)
printf
(
"%s [-o|-s] config
\n
"
,
av
[
0
]);
exit
(
0
);
}
name
=
av
[
2
];
}
else
name
=
av
[
1
];
}
name
=
av
[
i
];
if
(
!
name
)
{
printf
(
"%s: Kconfig file missing
\n
"
,
av
[
0
]);
}
conf_parse
(
name
);
//zconfdump(stdout);
switch
(
input_mode
)
{
case
set_default
:
name
=
conf_get_default_confname
();
if
(
conf_read
(
name
))
{
if
(
!
defconfig_file
)
defconfig_file
=
conf_get_default_confname
();
if
(
conf_read
(
defconfig_file
))
{
printf
(
"***
\n
"
"*** Can't find default configuration
\"
%s
\"
!
\n
"
"***
\n
"
,
nam
e
);
"***
\n
"
,
defconfig_fil
e
);
exit
(
1
);
}
break
;
...
...
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