Implemented arch/subarch-specific patches and
updated README and TODO files accordingly. svn path=/branches/kernel-image-2.6.11/; revision=3204
This commit is contained in:
parent
e11de50bef
commit
c0665811a3
33
README
33
README
|
@ -8,6 +8,14 @@ configuration files. For arches with subarches the subdirectory
|
||||||
arch/<arch>/<subarch> with the same file structure must be created
|
arch/<arch>/<subarch> with the same file structure must be created
|
||||||
for each subarch.
|
for each subarch.
|
||||||
|
|
||||||
|
Support for arch/subarch-specific patches
|
||||||
|
-----------------------------------------
|
||||||
|
Patches specific to a particular architecture or subarchitecture and
|
||||||
|
not included into the debian patch set should be placed in the
|
||||||
|
'patches' subdirectory of arch/<arch> or arch/<arch>/<subarch>. This
|
||||||
|
directory is expected to contain the patch files and a file 'list'
|
||||||
|
with list of patches to apply.
|
||||||
|
|
||||||
Config files
|
Config files
|
||||||
------------
|
------------
|
||||||
Configuration files are constructed dynamically by concatenating a number
|
Configuration files are constructed dynamically by concatenating a number
|
||||||
|
@ -167,3 +175,28 @@ initrd_modules
|
||||||
be give, no quoting is necessary. Typical usage:
|
be give, no quoting is necessary. Typical usage:
|
||||||
|
|
||||||
initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko
|
initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko
|
||||||
|
|
||||||
|
image_postproc [NOT IMPLEMENTED YET]
|
||||||
|
|
||||||
|
A command to be run on the kernel image after it's built. Location of
|
||||||
|
the image will be appended to this command as the last argument. One
|
||||||
|
usage is stripping the image on sparc, otherwise it is too big to be
|
||||||
|
booted:
|
||||||
|
|
||||||
|
image_postproc := strip -R .comment -R .note -K sun4u_init -K _end -K _start
|
||||||
|
|
||||||
|
Note that for cross-compiling a proper strip command should be used
|
||||||
|
(such as sparc-linux-strip, or something like this).
|
||||||
|
|
||||||
|
image_prefix [NOT IMPLEMENTED YET]
|
||||||
|
|
||||||
|
This variable may contain an expression, which will be used as a wrapper
|
||||||
|
for the make-kpkg when its target is kernel_image. This option is a kludge,
|
||||||
|
needed for sparc, which has to prepend this call with either 'sparc32' or
|
||||||
|
'sparc64', depending on the flavour being built (otherwise depmod breaks
|
||||||
|
when building sparc32 kernels on sparc64). For this obscure case it may
|
||||||
|
be used like that (very evil):
|
||||||
|
|
||||||
|
image_prefix := $${i%-smp}
|
||||||
|
|
||||||
|
The shell variable ${i} will contain the current flavour in the rules file.
|
||||||
|
|
8
TODO
8
TODO
|
@ -1,18 +1,10 @@
|
||||||
Major TODO items remaining:
|
Major TODO items remaining:
|
||||||
|
|
||||||
* Patching mechanism: where are the debian and subarch-specific patches
|
|
||||||
going to be available and how they are going to be applied.
|
|
||||||
|
|
||||||
* Naming of the subarch-specific header packages. For that some magic
|
|
||||||
should be done in post-install.
|
|
||||||
|
|
||||||
* Looks like it would be optimal to have a common kernel-headers package
|
* Looks like it would be optimal to have a common kernel-headers package
|
||||||
which would contain common headers for all arches without unmerged patches.
|
which would contain common headers for all arches without unmerged patches.
|
||||||
|
|
||||||
* Various remaining kludges (stripping and sparc32/sparc64 stuff on sparc,
|
* Various remaining kludges (stripping and sparc32/sparc64 stuff on sparc,
|
||||||
for example).
|
for example).
|
||||||
|
|
||||||
* Get rid of the /lib/modules/<version>/source symlink.
|
|
||||||
|
|
||||||
* Generate the control file for individual files dynamically, so that we
|
* Generate the control file for individual files dynamically, so that we
|
||||||
do not have that ridiculous master control file.
|
do not have that ridiculous master control file.
|
||||||
|
|
|
@ -21,7 +21,8 @@ karch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
|
||||||
ifndef subarchs
|
ifndef subarchs
|
||||||
subarchs := $(shell find arch/$(karch) \
|
subarchs := $(shell find arch/$(karch) \
|
||||||
-type d -mindepth 1 -maxdepth 1 \
|
-type d -mindepth 1 -maxdepth 1 \
|
||||||
! -name '.svn' -printf '%f\n')
|
! -name '.svn' ! -name 'patches' \
|
||||||
|
-printf '%f\n')
|
||||||
endif
|
endif
|
||||||
ifeq (,$(subarchs))
|
ifeq (,$(subarchs))
|
||||||
subarchs := none
|
subarchs := none
|
||||||
|
|
|
@ -12,6 +12,8 @@ debver := $(version)-$(abiname)
|
||||||
uver := $(subst .,_,$(version))
|
uver := $(subst .,_,$(version))
|
||||||
debnum := -$(abiname)
|
debnum := -$(abiname)
|
||||||
kbpkg := kernel-kbuild-$(version)-$(abiname)
|
kbpkg := kernel-kbuild-$(version)-$(abiname)
|
||||||
|
# This will eventually have to be changed to a command, applying
|
||||||
|
# the debian's patches from the local tree (arch/patches?)
|
||||||
kpatch := /usr/src/kernel-patches/all/$(version)/apply/debian $(version)-$(ktver)
|
kpatch := /usr/src/kernel-patches/all/$(version)/apply/debian $(version)-$(ktver)
|
||||||
DEBIAN_UPSTREAM_VERSION := $(version)
|
DEBIAN_UPSTREAM_VERSION := $(version)
|
||||||
ifeq (,$(DEB_HOST_ARCH))
|
ifeq (,$(DEB_HOST_ARCH))
|
||||||
|
@ -182,7 +184,14 @@ $(kdir): post-install-$(subarch)
|
||||||
touch $(tkdir)/debian/official
|
touch $(tkdir)/debian/official
|
||||||
install post-install-$(subarch) $(tkdir)/debian/post-install
|
install post-install-$(subarch) $(tkdir)/debian/post-install
|
||||||
cd $(tkdir) && $(kpatch)
|
cd $(tkdir) && $(kpatch)
|
||||||
# Here we need to do the subarch-specific patching
|
# Arch/subarch-specific patches
|
||||||
|
if [ -d $(basedir)/patches ] && \
|
||||||
|
[ -s $(basedir)/patches/list ]; then \
|
||||||
|
cd $(tkdir); \
|
||||||
|
for i in $$(cat ../$(basedir)/patches/list); do \
|
||||||
|
patch -p1 < ../$(basedir)/patches/$${i}; \
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
mv $(tkdir) $@
|
mv $(tkdir) $@
|
||||||
|
|
||||||
build-%: $(kdir)
|
build-%: $(kdir)
|
||||||
|
|
Loading…
Reference in New Issue