Message ID | 1397477996-24575-1-git-send-email-fathi.boudra@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 2014-04-14 at 15:19 +0300, Fathi Boudra wrote: > The kernel headers package (linux-headers) doesn't include > the arch/arm/mach-*/include header files. > > It makes the package unusable on ARM architecture and prevent > out-of-tree modules build: > /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: > fatal error: mach/memory.h: No such file or directory > #include <mach/memory.h> > ^ > compilation terminated. > > While this patch explicitely test arm architecture, avr32 and blackfin are > affected since they ship mach-* headers. However, they haven't been included > in the test because they aren't official architectures supported by Debian. I don't see why you can't generically look for all include directories in arch/$SRCARCH. There also seem to be some files missing for several other architectures: arch/ia64/module.lds arch/m68k/kernel/module.lds arch/mips/Kbuild.platforms arch/mips/*/Platform In the Debian official packages we use these commands to find arch-specific headers and scripts: find arch/$(KERNEL_ARCH) -maxdepth 1 -name 'Makefile*' -print; \ find arch/$(KERNEL_ARCH) \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print; \ find $$(find arch/$(KERNEL_ARCH) \( -name include -o -name scripts \) -type d -print) -print; \ > minor tweak: clean up the linux-headers package by using tar exclude option. [...] Shouldn't that be a separate patch? Ben.
On 14 April 2014 22:27, Ben Hutchings <ben@decadent.org.uk> wrote: > On Mon, 2014-04-14 at 15:19 +0300, Fathi Boudra wrote: >> The kernel headers package (linux-headers) doesn't include >> the arch/arm/mach-*/include header files. >> >> It makes the package unusable on ARM architecture and prevent >> out-of-tree modules build: >> /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: >> fatal error: mach/memory.h: No such file or directory >> #include <mach/memory.h> >> ^ >> compilation terminated. >> >> While this patch explicitely test arm architecture, avr32 and blackfin are >> affected since they ship mach-* headers. However, they haven't been included >> in the test because they aren't official architectures supported by Debian. > > I don't see why you can't generically look for all include directories > in arch/$SRCARCH. If you think that we should all include dirs independently from their support in the official archive, that's fine to me. The header package is a bit bigger but it's still reasonable. I'll fix in v2. > There also seem to be some files missing for several > other architectures: > > arch/ia64/module.lds > arch/m68k/kernel/module.lds > arch/mips/Kbuild.platforms > arch/mips/*/Platform > > In the Debian official packages we use these commands to find > arch-specific headers and scripts: > > find arch/$(KERNEL_ARCH) -maxdepth 1 -name 'Makefile*' -print; \ > find arch/$(KERNEL_ARCH) \( -name 'module.lds' -o -name 'Kbuild.platforms' -o -name 'Platform' \) -print; \ > find $$(find arch/$(KERNEL_ARCH) \( -name include -o -name scripts \) -type d -print) -print; \ It will be fixed in v2. >> minor tweak: clean up the linux-headers package by using tar exclude option. > [...] > > Shouldn't that be a separate patch? Ack. > Ben. > > -- > Ben Hutchings > I say we take off; nuke the site from orbit. It's the only way to be sure. Thanks for the review. -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2014-04-15 at 08:06 +0300, Fathi Boudra wrote: > On 14 April 2014 22:27, Ben Hutchings <ben@decadent.org.uk> wrote: > > On Mon, 2014-04-14 at 15:19 +0300, Fathi Boudra wrote: > >> The kernel headers package (linux-headers) doesn't include > >> the arch/arm/mach-*/include header files. > >> > >> It makes the package unusable on ARM architecture and prevent > >> out-of-tree modules build: > >> /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: > >> fatal error: mach/memory.h: No such file or directory > >> #include <mach/memory.h> > >> ^ > >> compilation terminated. > >> > >> While this patch explicitely test arm architecture, avr32 and blackfin are > >> affected since they ship mach-* headers. However, they haven't been included > >> in the test because they aren't official architectures supported by Debian. > > > > I don't see why you can't generically look for all include directories > > in arch/$SRCARCH. > > If you think that we should all include dirs independently from their > support in the official archive, that's fine to me. [...] I think it's a reasonable starting point. If that later turns out to be insufficient for some new-to-Debian architecture, we can fix it then. Ben.
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index f46e4dd..74ebd54 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -287,14 +287,18 @@ EOF fi -# Build header package +# Build kernel header package (cd $srctree; find . -name Makefile\* -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") +if [ "$ARCH" = "arm" ]; then + (cd $srctree; find arch/arm/mach-*/include -type f >> "$objtree/debian/hdrsrcfiles") +fi (cd $objtree; find arch/$SRCARCH/include Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") destdir=$kernel_headers_dir/usr/src/linux-headers-$version mkdir -p "$destdir" -(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) -(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) +excludes="--exclude-vcs --exclude=*.cmd --exclude=*.o --exclude=Documentation" +(cd $srctree; tar $excludes -cf - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) +(cd $objtree; tar $excludes -cf - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) (cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
The kernel headers package (linux-headers) doesn't include the arch/arm/mach-*/include header files. It makes the package unusable on ARM architecture and prevent out-of-tree modules build: /usr/src/linux-headers-3.14.0/arch/arm/include/asm/memory.h:24:25: fatal error: mach/memory.h: No such file or directory #include <mach/memory.h> ^ compilation terminated. While this patch explicitely test arm architecture, avr32 and blackfin are affected since they ship mach-* headers. However, they haven't been included in the test because they aren't official architectures supported by Debian. minor tweak: clean up the linux-headers package by using tar exclude option. Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> --- scripts/package/builddeb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)