From patchwork Mon Jun 24 14:38:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Marciniszyn, Mike" X-Patchwork-Id: 2771801 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3C271C0AB1 for ; Mon, 24 Jun 2013 14:38:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 307B92021B for ; Mon, 24 Jun 2013 14:38:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B90420247 for ; Mon, 24 Jun 2013 14:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750936Ab3FXOie (ORCPT ); Mon, 24 Jun 2013 10:38:34 -0400 Received: from mga11.intel.com ([192.55.52.93]:64451 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752003Ab3FXOid (ORCPT ); Mon, 24 Jun 2013 10:38:33 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 24 Jun 2013 07:39:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,928,1363158000"; d="scan'208";a="354893013" Received: from sedona.ch.intel.com ([143.182.228.65]) by fmsmga001.fm.intel.com with ESMTP; 24 Jun 2013 07:39:07 -0700 Received: from phlsvsles11.ph.intel.com (phlsvsles11.ph.intel.com [10.228.195.43]) by sedona.ch.intel.com (8.13.6/8.14.3/Standard MailSET/Hub) with ESMTP id r5OEcNOC004603; Mon, 24 Jun 2013 07:38:23 -0700 Received: from phlsvslse11.ph.intel.com (localhost [127.0.0.1]) by phlsvsles11.ph.intel.com with ESMTP id r5OEcMa8010820; Mon, 24 Jun 2013 10:38:22 -0400 Subject: [PATCH 1/3] kbuild: add %post section to create initramfs and grub hooks To: mmarek@suse.cz From: Mike Marciniszyn Cc: Doug Ledford , linux-kbuild@vger.kernel.org, mmarcini@yahoo.com Date: Mon, 24 Jun 2013 10:38:22 -0400 Message-ID: <20130624143822.10761.47446.stgit@phlsvslse11.ph.intel.com> In-Reply-To: <20130624143658.10761.3787.stgit@phlsvslse11.ph.intel.com> References: <20130624143658.10761.3787.stgit@phlsvslse11.ph.intel.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP /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 --- scripts/package/mkspec | 9 +++++++++ 1 file changed, 9 insertions(+) -- 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 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"