YANO's digital garage

Copyright ©YANO All rights reserved. https://www.bravotouring.com/~yano/

Last-modified: 2024-04-17 (水)


[一語一絵/IT系]

kernel_source / 2011-11-25 (金)

ubuntu kernel buildの延長で kernel source パッケージを作ろうと

$ fakeroot make-kpkg --initrd --append-to-version=-custom --revision=20111111 kernel_image kernel_headers kernel_source
とかしたら、
scripts/Makefile.clean:17: /usr/src/linux-source-2.6.35/debian/linux-source-2.6.35/usr/src/linux-source-2.6.35/crypto/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-source-2.6.35/debian/linux-source-2.6.35/usr/src/linux-source-2.6.35/crypto/Makefile'.  Stop.
make: *** [_clean_crypto] Error 2
となってしまった。

[External]Ask Ubuntuを調べる/usr/share/kernel-package/ruleset/targets/source.mkに手を入れる必要があるそうな。

$ diff -Nub /usr/share/kernel-package/ruleset/targets/source.mk.orig /usr/share/kernel-package/ruleset/targets/source.mk
の結果は以下のとおり。
--- /usr/share/kernel-package/ruleset/targets/source.mk.orig    2009-08-21 22:47:53.000000000 +0900
+++ /usr/share/kernel-package/ruleset/targets/source.mk         2011-11-11 18:24:07.511058001 +0900
@@ -64,12 +64,10 @@
####
######################################################################
ifneq ($(strip $(int_follow_symlinks_in_src)),)
-       -tar cfh - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |       \
-       (cd $(SRCDIR); umask 000; tar xpsf -)
+       -(umask 000; find . -mindepth 1 -maxdepth 1 -not -name '*.deb' -not -name 'debian*' -exec cp -Lr {} $(SRCDIR) \;; )
        (cd $(SRCDIR)/include; rm -rf asm ; )
else
-       -tar cf - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |         \
-       (cd $(SRCDIR); umask 000; tar xspf -)
+       -(umask 000; find . -mindepth 1 -maxdepth 1 -not -name '*.deb' -not -name 'debian*' -exec cp -r {} $(SRCDIR) \;; )
        (cd $(SRCDIR)/include; rm -f asm ; )
endif
        $(install_file) debian/changelog      $(SRCDIR)/Debian.src.changelog

【参照】
●Ask Ubuntu - Stack Exchange http://askubuntu.com/
10.10 - Error encountered compiling kernel 2.6.35-25.44