"Good enough to build broken i386 packages" commit.
Everything is more or less in place, need to audit the build procedure for individual arches and put in the remaining bits and pieces. svn path=/branches/kernel-image-2.6.11/; revision=3113
This commit is contained in:
parent
93519f0dce
commit
7cf165867d
11
README
11
README
|
@ -4,11 +4,12 @@ All the config files live in the arch subdirectory. The config
|
||||||
file for a particular subarch is constructed by concatenating
|
file for a particular subarch is constructed by concatenating
|
||||||
the following files (any of them can be missing):
|
the following files (any of them can be missing):
|
||||||
|
|
||||||
arch/config.common - architecture-independent config file
|
arch/config.common - architecture-independent config file
|
||||||
arch/<arch>/config.common - subarch-independent config file
|
arch/<arch>/config.common - subarch-independent config file
|
||||||
for a particular architecture
|
for a particular architecture
|
||||||
arch<arch>/config.<subarch> - subarch-specific config file.
|
arch/<arch>/config.<subarch> - subarch-specific config file.
|
||||||
|
arch/<arch>/config.default - the arch-specific config file used
|
||||||
|
to build the kernel-headers.
|
||||||
It is possible to avoid the inclusion of the arch-independent
|
It is possible to avoid the inclusion of the arch-independent
|
||||||
config file (handy for the transitional period) by setting the
|
config file (handy for the transitional period) by setting the
|
||||||
include_common_config variable to 'no' in arch/<arch>/Makefile.inc.
|
include_common_config variable to 'no' in arch/<arch>/Makefile.inc.
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,11 +4,12 @@
|
||||||
#
|
#
|
||||||
version := 2.6.11
|
version := 2.6.11
|
||||||
abiname := 1
|
abiname := 1
|
||||||
ktver := 2
|
ktver := 4
|
||||||
kbuildver := 2.6-3
|
kbuildver := 2.6-3
|
||||||
#
|
#
|
||||||
# Generally nothing needs to be modified below this line
|
# Generally nothing needs to be modified below this line
|
||||||
#
|
#
|
||||||
|
SHELL := sh -e
|
||||||
debver := $(version)-$(abiname)
|
debver := $(version)-$(abiname)
|
||||||
uver := $(subst .,_,$(version))
|
uver := $(subst .,_,$(version))
|
||||||
debnum := -$(abiname)
|
debnum := -$(abiname)
|
||||||
|
@ -16,12 +17,13 @@ bpkg := kernel-build-$(debver)
|
||||||
kdir := kernel-source-$(version)
|
kdir := kernel-source-$(version)
|
||||||
kbpkg := kernel-kbuild-$(kbuildver)
|
kbpkg := kernel-kbuild-$(kbuildver)
|
||||||
kpatch := /usr/src/kernel-patches/all/$(version)/apply/debian
|
kpatch := /usr/src/kernel-patches/all/$(version)/apply/debian
|
||||||
export DEBIAN_SRCTOP := $(CURDIR)/$(kdir)
|
DEBIAN_SRCTOP := $(CURDIR)/$(kdir)
|
||||||
export DEBIAN_UPSTREAM_VERSION := $(version)
|
DEBIAN_UPSTREAM_VERSION := $(version)
|
||||||
ifeq (,$(DEB_HOST_ARCH))
|
ifeq (,$(DEB_HOST_ARCH))
|
||||||
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
|
||||||
endif
|
endif
|
||||||
|
export version debnum DEBIAN_SRCTOP DEBIAN_UPSTREAM_VERSION
|
||||||
#
|
#
|
||||||
# The CROSS variable is only used on sparc to call
|
# The CROSS variable is only used on sparc to call
|
||||||
# the correct 'strip' binary on the kernel-image.
|
# the correct 'strip' binary on the kernel-image.
|
||||||
|
@ -33,9 +35,11 @@ endif
|
||||||
karch := $(DEB_HOST_ARCH)
|
karch := $(DEB_HOST_ARCH)
|
||||||
|
|
||||||
controls := $(wildcard arch/*/control.in)
|
controls := $(wildcard arch/*/control.in)
|
||||||
|
default := arch/$(karch)/config.default
|
||||||
configs := $(notdir $(wildcard arch/$(karch)/config.*))
|
configs := $(notdir $(wildcard arch/$(karch)/config.*))
|
||||||
|
configs := $(filter-out config.common config.default, $(configs))
|
||||||
ifndef flavours
|
ifndef flavours
|
||||||
flavours := $(filter-out common, $(patsubst config.%,%,$(configs)))
|
flavours := $(patsubst config.%,%,$(configs))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
-include arch/$(karch)/Makefile.inc
|
-include arch/$(karch)/Makefile.inc
|
||||||
|
@ -72,8 +76,6 @@ ifndef headers_dirs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Problems:
|
|
||||||
# * What to do with default config?
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# * Check that make oldconfig does not actually
|
# * Check that make oldconfig does not actually
|
||||||
# change the config file. If it does, something
|
# change the config file. If it does, something
|
||||||
|
@ -112,10 +114,17 @@ build-stamp: unpack-stamp
|
||||||
touch build-stamp
|
touch build-stamp
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
dh_testdir
|
||||||
rm -f *-stamp header-install config.*
|
rm -f *-stamp header-install config.*
|
||||||
rm -rf $(kdir) build-* install-* bin/touch.orig
|
rm -rf $(kdir) build-* install-* bin/touch.orig
|
||||||
dh_clean
|
dh_clean
|
||||||
|
#
|
||||||
|
# Problems:
|
||||||
|
# * Due to some reason i386 build runs some debhelper
|
||||||
|
# commands on the kernel-headers package, as if
|
||||||
|
# building it manually. I thought make-kpkg was supposed
|
||||||
|
# to take care of it.
|
||||||
|
#
|
||||||
binary-indep: build
|
binary-indep: build
|
||||||
#
|
#
|
||||||
# Problems:
|
# Problems:
|
||||||
|
@ -137,8 +146,8 @@ binary-arch: build
|
||||||
cd install-$$i; \
|
cd install-$$i; \
|
||||||
$(kpkg_image_cmd); \
|
$(kpkg_image_cmd); \
|
||||||
cd ..; \
|
cd ..; \
|
||||||
cat install-$$i/debian/files >> debian/files \
|
cat install-$$i/debian/files >> debian/files; \
|
||||||
rm -rf install-$$i
|
rm -rf install-$$i ; \
|
||||||
done
|
done
|
||||||
mv *.deb ..
|
mv *.deb ..
|
||||||
|
|
||||||
|
@ -193,13 +202,15 @@ debian/control:
|
||||||
sed 's/^Package:/\n&/g' > debian/control
|
sed 's/^Package:/\n&/g' > debian/control
|
||||||
|
|
||||||
$(kdir):
|
$(kdir):
|
||||||
@echo -n "Unpacking kernel source $(version) ..."
|
dh_testdir
|
||||||
@tar jxf /usr/src/kernel-source-$(version).tar.bz2
|
tar jxf /usr/src/kernel-source-$(version).tar.bz2
|
||||||
@cd $(kdir) && $(kpatch) $(version)-$(ktver)
|
cd $(kdir) && $(kpatch) $(version)-$(ktver)
|
||||||
@mkdir -p $(kdir)/debian
|
mkdir -p $(kdir)/debian
|
||||||
@cp debian/changelog $(kdir)/debian
|
cp debian/changelog $(kdir)/debian
|
||||||
@cp debian/control $(kdir)/debian
|
cp debian/control $(kdir)/debian
|
||||||
@cp debian/copyright $(kdir)/debian
|
cp debian/copyright $(kdir)/debian
|
||||||
@touch $(kdir)/debian/official
|
cp $(default) $(kdir)/.config
|
||||||
@install post-install $(kdir)/debian
|
touch $(kdir)/debian/official
|
||||||
@echo " done."
|
install post-install $(kdir)/debian
|
||||||
|
|
||||||
|
.PHONY: clean build unpack binary-indep binary-arch binary
|
||||||
|
|
Loading…
Reference in New Issue