1. 18 6月, 2010 1 次提交
    • M
      kbuild: Clean up and speed up the localversion logic · 09155120
      Michal Marek 提交于
      Now that we run scripts/setlocalversion during every build, it makes
      sense to move all the localversion logic there. This cleans up the
      toplevel Makefile and also makes sure that the script is called only
      once in 'make prepare' (previously, it would be called every time due to
      a variable expansion in an ifneq statement). No user-visible change is
      intended, unless one runs the setlocalversion script directly.
      Reported-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Greg Thelen <gthelen@google.com>
      Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      09155120
  2. 07 3月, 2010 1 次提交
  3. 02 2月, 2010 1 次提交
  4. 12 12月, 2009 3 次提交
    • J
      scripts/package: deb-pkg: use fakeroot if available · db1d1865
      Jonathan Nieder 提交于
      Running "make deb-pkg" requires setting KBUILD_PKG_ROOTCMD or
      becoming root oneself or it errors out.  Unless already running
      as root or KBUILD_PKG_ROOTCMD is already set, use fakeroot as a
      good default.
      
      With this patch applied, you can run "make oldconfig deb-pkg" as
      an ordinary user to build a binary package for an updated kernel
      tree and it should just work.
      
      fakeroot is too zealous by default in treating files as owned by
      root.  Its wrapped stat() sets st_uid and st_gid to 0 for all
      files, which causes Git to go on a wild goose chase if
      CONFIG_LOCALVERSION_AUTO is set, checking if any file's content
      has changed along with its stat information.  Avoid this by
      telling fakeroot to use the actual owner and group for
      preexisting files, by passing it the -u option.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      db1d1865
    • J
      scripts/package: add KBUILD_PKG_ROOTCMD variable · 05ba4488
      Jonathan Nieder 提交于
      Let the deb-pkg target acquire (fake) root privileges before
      running commands that need them.  Without such privileges,
      deb-pkg errors out because chown fails.
      
      The new KBUILD_PKG_ROOTCMD variable, if defined, is used as a
      command to run other commands with possibly fake elevated
      privileges.  Since this is not needed for the tar-pkg and rpm-pkg
      targets, it is only used by deb-pkg.  If it is not defined, the
      behavior is as before, and the user will have to rerun make as
      root.
      
      In other words, as a shortcut, instead of running 'make oldconfig &&
      make && fakeroot -u make deb-pkg', one can use the single command
      'make oldconfig deb-pkg KBUILD_PKG_ROOTCMD="fakeroot -u"'.
      Suggested-by: NRyan Anderson <ryan@michonline.com>
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      05ba4488
    • M
      scripts/package: tar-pkg: use tar --owner=root · 91d16185
      Michal Marek 提交于
      Use the --owner= and --group= options to make sure the entries in
      the built tar file are owned by root.  Without this change, a
      careless sysadmin using the tar-pkg target can easily end up
      installing a kernel that is writable by the unprivileged user
      account used to build the kernel.
      
      Test that these options are understood before using them so that
      non-GNU versions of tar can still be used if the operator is
      appropriately cautious.
      Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      91d16185
  5. 12 10月, 2009 1 次提交
  6. 18 7月, 2009 1 次提交
  7. 27 6月, 2009 1 次提交
  8. 10 6月, 2009 14 次提交
  9. 02 4月, 2009 1 次提交
  10. 07 3月, 2009 2 次提交
    • J
      kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree · b925dbfe
      Josh Hunt 提交于
      Running 'make rpm' fails when CONFIG_LOCALVERSION_AUTO=y and using a kernel source
      tree under SCM.  This is due to KERNELRELEASE being different when the initial make
      is run and when make is run from rpmbuild.
      
      mkspec creates kernel.spec using KERNELRELEASE:
      
      <mkspec>
      echo "%files"
      echo '%defattr (-, root, root)'
      echo "%dir /lib/modules"
      echo "/lib/modules/$KERNELRELEASE"
      echo "/lib/firmware"
      echo "/boot/*"
      echo ""
      </mkspec>
      
      When CONFIG_LOCALVERSION_AUTO=y scripts/setlocalversion is called and grabs any
      additional version info from SCM.  Next, the srctree is tarred up and SCM
      information is excluded.
      
      rpmbuild reruns make and in the process generates a new include/config/kernel.release
      and thus a new KERNELRELEASE.  However this time the SCM information is gone so
      KERNELRELEASE no longer has the additional version information.  When "make modules_install"
      runs, it uses the new KERNELRELEASE value to determine where to install the modules.
      This conflicts with where the spec file assumes they are going because of the
      mis-matching KERNELRELEASE versions.
      
      <snippet>
      + INSTALL_MOD_PATH=/var/tmp/kernel-2.6.29rc4tip01479g5d85422-root
      + make -j16 modules_install
        INSTALL crypto/aead.ko
        INSTALL crypto/cbc.ko
        INSTALL crypto/chainiv.ko
        INSTALL crypto/crc32c.ko
        INSTALL crypto/crypto_algapi.ko
        INSTALL crypto/crypto_blkcipher.ko
        INSTALL crypto/crypto_hash.ko
        INSTALL crypto/cryptomgr.ko
        INSTALL crypto/ecb.ko
        INSTALL crypto/eseqiv.ko
        INSTALL crypto/krng.ko
        INSTALL crypto/md5.ko
        INSTALL crypto/pcbc.ko
        INSTALL crypto/rng.ko
        INSTALL drivers/block/cciss.ko
        INSTALL drivers/hid/hid-dummy.ko
        INSTALL drivers/scsi/iscsi_tcp.ko
        INSTALL drivers/scsi/libiscsi.ko
        INSTALL drivers/scsi/libiscsi_tcp.ko
        INSTALL drivers/scsi/scsi_transport_iscsi.ko
        INSTALL drivers/scsi/scsi_wait_scan.ko
        INSTALL fs/lockd/lockd.ko
        INSTALL fs/nfs/nfs.ko
        INSTALL fs/nfsd/nfsd.ko
        INSTALL lib/libcrc32c.ko
        INSTALL net/sunrpc/sunrpc.ko
        DEPMOD  2.6.29-rc4-tip
      + cp arch/x86/boot/bzImage
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinuz-2.6.29-rc4-tip-01479-g5d85422
      + cp System.map
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/System.map-2.6.29-rc4-tip-01479-g5d85422
      + cp .config
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/config-2.6.29-rc4-tip-01479-g5d85422
      + cp vmlinux vmlinux.orig
      + bzip2 -9 vmlinux
      + mv vmlinux.bz2
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/boot/vmlinux-2.6.29-rc4-tip-01479-g5d85422.bz2
      + mv vmlinux.orig vmlinux
      + /usr/lib/rpm/brp-compress
      Processing files: kernel-2.6.29rc4tip01479g5d85422-2
      error: File not found:
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422
      
      RPM build errors:
          File not found:
      /var/tmp/kernel-2.6.29rc4tip01479g5d85422-root/lib/modules/2.6.29-rc4-tip-01479-g5d85422
      make[1]: *** [rpm] Error 1
      make: *** [rpm] Error 2
      </snippet>
      
      I have tested this patch on git -tip, Linus' git tree, and the kernel.org tar files, both
      with and without CONFIG_LOCALVERSION_AUTO=y.
      Signed-off-by: NJosh Hunt <josh@scalex86.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      ----
      b925dbfe
    • J
      kbuild: fix mkspec to cleanup RPM_BUILD_ROOT · a2ebcc7a
      Josh Hunt 提交于
      The contents of the %clean section in mkspec is currently commented
      out leaving RPM_BUILD_ROOT and its contents on the build machine.
      This patch removes it once the rpm build process is complete.
      Signed-off-by: NJosh Hunt <josh@scalex86.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      a2ebcc7a
  11. 15 2月, 2009 1 次提交
    • J
      kbuild: add vmlinux to kernel rpm · fc370ecf
      Josh Hunt 提交于
      We are building an automated system to test kernels weekly and need to
      provide an rpm to our QA dept.  We would like to use the ability to create
      kernel rpms already in the kernel's Makefile, but need the vmlinux file
      included in the rpm for later debugging.
      
      This patch adds a compressed vmlinux to the kernel rpm when doing a
      make rpm-pkg or binrpm-pkg and upon install places the vmlinux file in /boot.
      Signed-off-by: NJosh Hunt <josh@scalex86.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      fc370ecf
  12. 06 12月, 2008 1 次提交
  13. 04 12月, 2008 1 次提交
  14. 10 11月, 2008 1 次提交
  15. 30 10月, 2008 2 次提交
  16. 09 2月, 2008 1 次提交
  17. 29 1月, 2008 2 次提交
  18. 18 10月, 2007 1 次提交
  19. 22 5月, 2007 1 次提交
  20. 25 9月, 2006 1 次提交
  21. 09 6月, 2006 1 次提交
    • M
      kbuild: fix make rpm for powerpc · 1a0f3d42
      Mike Wolf 提交于
      The default target for most powerpc platforms is zImage.  The
      zImage however is in arch/powerpc/boot and the mkspec script
      was set up to get the kernel from the top level of the kernel
      tree.  This patch copies vmlinux to arch/powerpc/boot and then
      copies the kernel to the tmp directory so the rpm can be made.
      Signed-off-by: NMike Wolf <mjw@us.ibm.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      1a0f3d42
  22. 09 3月, 2006 1 次提交