[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <F54AEECA5E2B9541821D670476DAE19C2B80F3A9@PGSMSX102.gar.corp.intel.com>
Date: Thu, 6 Nov 2014 12:53:54 +0000
From: "Kweh, Hock Leong" <hock.leong.kweh@...el.com>
To: Andy Lutomirski <luto@...capital.net>,
Greg KH <gregkh@...uxfoundation.org>
CC: "Fleming, Matt" <matt.fleming@...el.com>,
Sam Protsenko <semen.protsenko@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
"Ong, Boon Leong" <boon.leong.ong@...el.com>,
"linux-efi@...r.kernel.org" <linux-efi@...r.kernel.org>,
Ming Lei <ming.lei@...onical.com>
Subject: RE: [PATCH v2 3/3] efi: Capsule update with user helper interface
> -----Original Message-----
> From: Andy Lutomirski [mailto:luto@...capital.net]
> Sent: Wednesday, November 05, 2014 12:36 AM
>
> Am I missing something here? The current proposal is missing the
> success/failure part, unless you count the loaded count (in a different sysfs
> directory) as a useful interface for that.
Here is my sample shell script which allow me to do multi capsule binaries upload
and obtain error message if error occur:
#!/bin/sh
old=$(cat /sys/devices/platform/efi_capsule_user_helper/capsule_loaded)
for arg in "$@"
do
if [ -f $arg ]
then
echo 1 > /sys/class/firmware/efi-capsule-file/loading
cat $arg > /sys/class/firmware/efi-capsule-file/data
echo 0 > /sys/class/firmware/efi-capsule-file/loading
oldtime=$(date +%S)
oldtime=$(((time + 2) % 60))
until [ -f /sys/class/firmware/efi-capsule-file/loading ]
do
newtime=$(date +%S)
if [ $newtime -eq $oldtime ]
then
break
fi
done
old=$((old + 1))
new=$(cat /sys/devices/platform/efi_capsule_user_helper/capsule_loaded)
if [ ! $new -eq $old ]
then
echo "Capsule binary $arg upload failed"
dmesg | tail | grep -v platform | grep -e efi
exit 1
fi
else
echo "File $arg not found !!"
fi
done
exit 0
Regards,
Wilson
Powered by blists - more mailing lists