From patchwork Thu Jan 7 08:01:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 564192 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 543A21402BC for ; Thu, 7 Jan 2016 19:01:38 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3CB721A0ADD for ; Thu, 7 Jan 2016 19:01:38 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e06smtp17.uk.ibm.com (e06smtp17.uk.ibm.com [195.75.94.113]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 360AA1A00E9 for ; Thu, 7 Jan 2016 19:01:32 +1100 (AEDT) Received: from localhost by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jan 2016 08:01:27 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp17.uk.ibm.com (192.168.101.147) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 7 Jan 2016 08:01:25 -0000 X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: clg@fr.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0945F219006A for ; Thu, 7 Jan 2016 08:01:14 +0000 (GMT) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u0781Ood13238674 for ; Thu, 7 Jan 2016 08:01:24 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u0781N0e032464 for ; Thu, 7 Jan 2016 01:01:24 -0700 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u0781NOd032451; Thu, 7 Jan 2016 01:01:23 -0700 Received: from [9.164.128.245] (icon-9-164-128-245.megacenter.de.ibm.com [9.164.128.245]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 6E6C422011B; Thu, 7 Jan 2016 09:01:22 +0100 (CET) To: Vasant Hegde , skiboot@lists.ozlabs.org References: <1448975646-9293-1-git-send-email-clg@fr.ibm.com> <565DC03D.4000809@linux.vnet.ibm.com> <565DC8E2.6040009@fr.ibm.com> <568E0ADE.1080905@linux.vnet.ibm.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <568E1B4B.6040007@fr.ibm.com> Date: Thu, 7 Jan 2016 09:01:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <568E0ADE.1080905@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16010708-0005-0000-0000-000009EDE468 Subject: Re: [Skiboot] [RFC PATCH] add a skiboot rpm spec file X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" On 01/07/2016 07:51 AM, Vasant Hegde wrote: > On 12/01/2015 09:50 PM, Cédric Le Goater wrote: >> On 12/01/2015 04:43 PM, Vasant Hegde wrote: >>> On 12/01/2015 06:44 PM, Cédric Le Goater wrote: > > .../... > > Stewart, Cedric, > > IIUC we all agree to have 3 separate packages here.. > opal-prd -- binary package contains opal-prd daemon > opal-firmware - contains skiboot.lid > opla-utils -- Contains developer utilities like gard, xscom utilities etc. > > Thankfully Fedora folks haven't accepted opal-prd package. If everyone agrees > with above 3 package/naming convention then I would like to propose changes now. Please see below the .spec that I am using and in which I have taken into account your comments. Tested on skiboot git HEAD with a f23/ppc64le. >>>> +%build >>>> +SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags} >>> >>> Not sure cross compilation works in build environment. Have you verified? >> >> No. I compiled on a f22/ppc64le which is good enough for skiboot. The above >> disables the cross compiler. > > > But this will generate LE version of LID right? Are we fine with that? No, skiboot is always '-mbig-endian -m64' Cheers, C. From: Cédric Le Goater Subject: [PATCH] add a skiboot rpm spec file Date: Tue, 01 Dec 2015 14:02:50 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This spec file is based on : https://hegdevasant.fedorapeople.org/opal-prd/v4/opal-prd.spec in which a new 'opal-firmware' package was added. It contains a skiboot.lid and is generated as a noarch package. Signed-off-by: Cédric Le Goater --- skiboot.spec | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) Index: skiboot.git/skiboot.spec =================================================================== --- /dev/null +++ skiboot.git/skiboot.spec @@ -0,0 +1,111 @@ +Name: opal-prd +Version: 5.1.12 +Release: 1%{?dist} +Summary: OPAL Processor Recovery Diagnostics Daemon + +Group: System Environment/Daemons +License: ASL 2.0 +URL: http://github.com/open-power/skiboot +ExclusiveArch: ppc64le + +BuildRequires: systemd + +Requires: systemd + +Source0: https://github.com/open-power/skiboot/archive/skiboot-%{version}.tar.gz +Source1: opal-prd.socket +Source2: opal-prd.service + +%description +This package provides a daemon to load and run the OpenPower firmware's +Processor Recovery Diagnostics binary. This is responsible for run time +maintenance of OpenPower Systems hardware. + + +%package -n opal-utils +Summary: OPAL firmware utilities +Group: Applications/System + +%description -n opal-utils +This package contains utility programs. +The 'gard' utility, can read, parse and clear hardware gard partitions +on OpenPower platforms. + +%package -n opal-firmware +Summary: OPAL firmware +BuildArch: noarch + +%description -n opal-firmware +OPAL firmware, aka skiboot, loads the bootloader and provides runtime +services to the OS (Linux) on IBM Power and Open Power systems. + + +%prep + +%setup -q -n skiboot-skiboot-%version + +%build +SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags} +OPAL_PRD_VERSION=%version make %{?_smp_mflags} V=1 -C external/opal-prd +GARD_VERSION=%version make V=1 %{?_smp_mflags} -C external/gard +PFLASH_VERSION=%version make V=1 %{?_smp_mflags} -C external/pflash +make V=1 %{?_smp_mflags} -C external/xscom-utils + +%install +make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr +make -C external/gard install DESTDIR=%{buildroot} prefix=/usr +cp external/xscom-utils/{get,put}scom %{buildroot}%{_sbindir} +cp external/pflash/pflash %{buildroot}%{_sbindir} + +mkdir -p %{buildroot}%{_unitdir} +install -m 644 -p %{SOURCE1} %{buildroot}%{_unitdir}/opal-prd.socket +install -m 644 -p %{SOURCE2} %{buildroot}%{_unitdir}/opal-prd.service + +mkdir -p %{buildroot}%{_datadir}/qemu +install -m 644 -p skiboot.lid %{buildroot}%{_datadir}/qemu/skiboot.lid + +%post +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl enable opal-prd.service >/dev/null 2>&1 || : + /bin/systemctl start opal-prd.service >/dev/null 2>&1 || : +fi + +%preun +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable opal-prd.service > /dev/null 2>&1 || : + /bin/systemctl stop opal-prd.service > /dev/null 2>&1 || : +fi + +%postun +systemctl daemon-reload >/dev/null 2>&1 || : +if [ "$1" -ge 1 ] ; then + /bin/systemctl try-restart opal-prd.service >/dev/null 2>&1 || : +fi + +%files +%doc README +%license LICENCE +%{_sbindir}/opal-prd +%{_unitdir}/opal-prd.socket +%{_unitdir}/opal-prd.service +%{_mandir}/man8/* + +%files -n opal-utils +%doc README +%license LICENCE +%{_sbindir}/opal-gard +%{_sbindir}/getscom +%{_sbindir}/putscom +%{_sbindir}/pflash +%{_mandir}/man1/* + +%files -n opal-firmware +%doc README +%license LICENCE +%{_datadir}/qemu/ + +%changelog +* Mon Nov 23 2015 Vasant Hegde - 5.1.12 +- initial upstream spec file