Fixed the generation of config files for all

cases. Minor corrections to the documentation.

svn path=/branches/kernel-image-2.6.11/; revision=3198
This commit is contained in:
Jurij Smakov 2005-05-19 23:10:25 +00:00
parent 32599383b3
commit af95f5e28d
3 changed files with 30 additions and 31 deletions

7
README
View File

@ -28,8 +28,6 @@ For architecture without subarches:
For architecture with subarches:
y concatenating:
arch/config.common
arch/<arch>/config.common
arch/<arch>/<subarch>/config.common
@ -89,8 +87,9 @@ this file include the setting of the following variables:
include_common_config
Setting it to 'no' will prevent the common kernel config from being
included for this particular architecture. Typical usage:
Setting it to 'no' (without quotes) will prevent the common kernel
config from being included for this particular architecture.
Typical usage:
include_common_config := no

2
TODO
View File

@ -11,5 +11,3 @@ Major TODO items remaining:
* Various remaining kludges (stripping and sparc32/sparc64 stuff on sparc,
for example).
* Config file generation for arches with subarches is probably broken.

52
debian/rules.subarch vendored
View File

@ -20,17 +20,20 @@ ifeq (,$(DEB_HOST_ARCH))
endif
export version debnum DEBIAN_UPSTREAM_VERSION
karch := $(DEB_HOST_ARCH)
karch := $(DEB_HOST_ARCH)
#
# Build the list of common config files to be included
#
ifeq ($(subarch),none)
basedir := arch/$(karch)
else
basedir := arch/$(karch)/$(subarch)
endif
default := $(basedir)/config.default
configs := $(notdir $(wildcard $(basedir)/config.*))
configs := $(filter-out config.common config.default, $(configs))
tkdir := kernel-source-$(version)
kdir := kernel-source-$(version)-$(subarch)
default := $(basedir)/config.default
configs := $(notdir $(wildcard $(basedir)/config.*))
configs := $(filter-out config.common config.default, $(configs))
tkdir := kernel-source-$(version)
kdir := kernel-source-$(version)-$(subarch)
ifndef flavours
flavours := $(patsubst config.%,%,$(configs))
endif
@ -68,7 +71,10 @@ kpkg_headers_cmd += kernel-headers
ifndef headers_dirs
headers_dirs = $(karch)
endif
ifneq (no,$(include_common_config))
ccommon := arch/config.common
endif
ccommon += arch/$(karch)/config.common arch/$(karch)/$(subarch)/config.common
#
# TODO:
# * Check that make oldconfig does not actually
@ -136,7 +142,10 @@ header-install-$(subarch): header-install.in
-e 's,@headers_extra@,$(headers_extra),g' \
header-install.in > header-install-$(subarch)
chmod u+x header-install-$(subarch)
#
# The way to make the correct package names is to make a
# subarch-specific post-install script...
#
post-install: post-install.in
sed -e 's,@initrd_modules@,$(initrd_modules),' \
post-install.in > post-install
@ -147,25 +156,18 @@ post-install: post-install.in
# and subarch specific one (arch/$(karch)/config.subarch).
# It is possible to avoid the inclusion of the arch-indep
# config file by setting include_common_config = no in the
# arch/$(karch)/Makefile.inc. Absense of any of the above
# files is ignored.
# arch/$(karch)/Makefile.inc.
#
config.%:
@echo -n "Generating configuration file $@ ..."
arch='$(basedir)/config.common'; \
subarch='$(basedir)/$@'; \
include=''; \
if [ '$(include_common_config)' != 'no' ]; then \
include='arch/config.common'; \
fi; \
if [ -f "$${arch}" ]; then \
include="$${include} $${arch}"; \
fi; \
if [ -f "$${subarch}" ]; then \
include="$${include} $${subarch}"; \
fi; \
cat $${include} > $@
@echo " done."
@echo "Generating configuration file $@:"
rm -f $@
for i in $(ccommon); do \
if [ -f $${i} ]; then \
cat $${i} >> $@; \
fi; \
done
# Flavour config file must be present
cat $(basedir)/$@ >> $@
#
# TODO: subarch specific patches
#