Files
scst/qla_isp/firmware/fwbin
Yan Burman e8f0d9af09 Merged revisions 5671,5687-5697,5723 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x

................
  r5671 | bvassche | 2014-07-10 09:27:29 +0300 (Thu, 10 Jul 2014) | 1 line
  
  scst: Create /var/lib/scst/pr and /var/lib/scst/vdev_mode_pages during installation (merge r5669 and r5670 from trunk)
................
  r5687 | bvassche | 2014-07-20 08:59:31 +0300 (Sun, 20 Jul 2014) | 1 line
  
  iscsi-scst: Handle data buffers with non-zero offset correctly (merge r5683 from trunk)
................
  r5688 | bvassche | 2014-07-20 09:01:49 +0300 (Sun, 20 Jul 2014) | 1 line
  
  Makefile: Only report which RPMs have been built if "make rpm" is run as a non-privileged user (merge r5560 from trunk)
................
  r5689 | bvassche | 2014-07-20 09:03:55 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Remove an unused variable (merge r5605 from trunk)
................
  r5690 | bvassche | 2014-07-20 09:04:43 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Move exch_done() calls into ft_cmd_done() (merge r5606 from trunk)
................
  r5691 | bvassche | 2014-07-20 09:05:27 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Handle frame send failures properly (merge r5607 from trunk)
................
  r5692 | bvassche | 2014-07-20 09:07:57 +0300 (Sun, 20 Jul 2014) | 1 line
  
  qla2x00t: Documentation / source code comment / log messages spelling fix (merge r5555 from trunk)
................
  r5693 | bvassche | 2014-07-20 09:46:28 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst: Make lockdep_assert_held() easier to use (merge r5573 from trunk)
................
  r5694 | bvassche | 2014-07-20 09:47:58 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst: Leave out FSF mail address (merge r5572 from trunk)
................
  r5695 | bvassche | 2014-07-20 09:52:12 +0300 (Sun, 20 Jul 2014) | 1 line
  
  Change BUG_ON(1) into BUG() (merge r5618 from trunk)
................
  r5696 | bvassche | 2014-07-20 09:54:00 +0300 (Sun, 20 Jul 2014) | 1 line
  
  iscsi-scst: Suppress a compiler warning (merge r5614 from trunk)
................
  r5697 | bvassche | 2014-07-20 10:03:04 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst/include/scst.h: Define lockdep_assert_held() only once (follow-up for r5693)
................
  r5723 | vlnb | 2014-08-21 08:21:55 +0300 (Thu, 21 Aug 2014) | 11 lines
  
  Merged revisions 5721 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5721 | vlnb | 2014-08-20 22:17:47 -0700 (Wed, 20 Aug 2014) | 5 lines
    
    Fix incorrect address computation during receive PDUs preparations
    
    Found and fix suggested by Кирилл Тюшев <kirill.tyushev8@gmail.com>
  ........
................


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 13:49:04 +00:00

103 lines
3.3 KiB
Plaintext
Executable File

#/bin/sh
#
# $Id: fwbin,v 1.3 2009/06/07 22:27:50 mjacob Exp $
#
# Copyright (c) 1997-2008 by Matthew Jacob
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#
# Alternatively, this software may be distributed under the terms of the
# the GNU Public License ("GPL") with platforms where the prevalant license
# is the GNU Public License:
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Version 2 GNU General Public License as
# published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.
#
#
# Matthew Jacob
# Feral Software
# 421 Laurel Avenue
# Menlo Park, CA 94025
# USA
#
# gplbsd at feral com
#
dowr()
{
echo -n $* >> /tmp/x$$.c
echo "" >> /tmp/x$$.c
}
if [ $# -ne 1 ]; then
echo "usage: $0 fwfile"
exit 1
fi
name=`grep 'static const' $1 | head -1 | awk ' { print $4 }' | sed 's/..$//'`
stok=`grep 'static const' $1 | head -1 | awk ' { print $3 }'`
cp /dev/null /tmp/x$$.c
dowr '#include <unistd.h>'
dowr '#include <stdlib.h>'
dowr '#include <stdio.h>'
dowr '#include <stdint.h>'
dowr '#include <memory.h>'
dowr '#include <fcntl.h>'
dowr '#include <errno.h>'
dowr '#define ISP_2400 1'
dowr '#define ISP_2500 1'
cat $1 >> /tmp/x$$.c
dowr ' int main(void)'
dowr '{'
dowr ' size_t i, amt = (sizeof ' $name ') / sizeof (' $name '[0]);'
dowr ' for (i = 0; i != amt; i++) {'
case $stok in
uint16_t)
dowr ' putchar('$name '[i] >> 8);'
dowr ' putchar('$name '[i] >> 0);'
;;
uint32_t)
dowr ' putchar('$name '[i] >> 24);'
dowr ' putchar('$name '[i] >> 16);'
dowr ' putchar('$name '[i] >> 8);'
dowr ' putchar('$name '[i] >> 0);'
;;
esac
dowr ' }'
dowr ' return (0);'
dowr '}'
cc -g -o /tmp/x$$ /tmp/x$$.c || exit 1
/tmp/x$$ > `echo $1|sed 's/.[ch]//'`.bin
rm -f /tmp/x$$*
echo Result in `echo $1|sed 's/.[ch]//'`.bin