public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Marciniszyn <mike.marciniszyn@intel.com>
To: mmarek@suse.cz
Cc: Doug Ledford <dledford@redhat.com>,
	linux-kbuild@vger.kernel.org, mmarcini@yahoo.com
Subject: [PATCH 1/3] kbuild: add %post section to create initramfs and grub hooks
Date: Mon, 24 Jun 2013 10:38:22 -0400	[thread overview]
Message-ID: <20130624143822.10761.47446.stgit@phlsvslse11.ph.intel.com> (raw)
In-Reply-To: <20130624143658.10761.3787.stgit@phlsvslse11.ph.intel.com>

/sbin/installkernel is used to insure grub hooks are
inserted and the initramfs is created on the
target system.

The invokation installkernel will work with any
kernel as long as:
- /sbin/installkernel exists
- the kernel and sysem map files are readable

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
---
 scripts/package/mkspec |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index fdd3fbf..0aa6a24 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -112,6 +112,15 @@ echo ""
 echo "%clean"
 echo 'rm -rf $RPM_BUILD_ROOT'
 echo ""
+echo "%post"
+echo "if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then"
+echo "cp /boot/vmlinuz-$KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm"
+echo "cp /boot/System.map-$KERNELRELEASE /boot/System.map-$KERNELRELEASE-rpm"
+echo "rm -f /boot/vmlinuz-$KERNELRELEASE /boot/System.map-$KERNELRELEASE"
+echo "/sbin/installkernel $KERNELRELEASE /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
+echo "rm -f /boot/vmlinuz-$KERNELRELEASE-rpm /boot/System.map-$KERNELRELEASE-rpm"
+echo "fi"
+echo ""
 echo "%files"
 echo '%defattr (-, root, root)'
 echo "%dir /lib/modules"


  reply	other threads:[~2013-06-24 14:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 14:38 [PATCH 0/3] RPM enhancements for kbuild Mike Marciniszyn
2013-06-24 14:38 ` Mike Marciniszyn [this message]
2013-07-23 13:19   ` [PATCH 1/3] kbuild: add %post section to create initramfs and grub hooks Michal Marek
2013-06-24 14:38 ` [PATCH 2/3] kbuilld: install firmware files in kernel relative directory Mike Marciniszyn
2013-07-23 13:19   ` Michal Marek
2013-06-24 14:38 ` [PATCH 3/3] kbuild: add generation of kernel-devel Mike Marciniszyn
2013-07-04 15:15   ` Michal Marek
2013-07-05 13:04     ` Marciniszyn, Mike
2013-07-05 20:29       ` Michal Marek
2013-07-05 13:12     ` Marciniszyn, Mike
2013-07-05 13:17     ` Marciniszyn, Mike
2013-07-05 20:30       ` Michal Marek
2013-07-08 11:55     ` Marciniszyn, Mike
2013-07-08 12:12       ` Michal Marek
2013-07-08 13:15         ` Marciniszyn, Mike
2013-07-08 13:32           ` Doug Ledford
2013-07-08 13:39             ` Marciniszyn, Mike
2013-07-08 14:45               ` Michal Marek
2013-07-08 15:52                 ` Marciniszyn, Mike
2013-07-08 16:20                 ` Doug Ledford
2013-07-08 17:17                   ` Marciniszyn, Mike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130624143822.10761.47446.stgit@phlsvslse11.ph.intel.com \
    --to=mike.marciniszyn@intel.com \
    --cc=dledford@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=mmarcini@yahoo.com \
    --cc=mmarek@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox