⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fwbin2pkg.sh

📁 无线网卡驱动程序 802.11b无线网卡可直接移植到2.6内核中去
💻 SH
字号:
#!/bin/bash# script to convert a binary fw package (output from gen_fw)# into a .h file for static inclusion# call fwbin2h.sh "comment" input_file output_fileif [ $# -ne 3 ]; then        echo "#ERR to convert a binary fw file into a .h file"        echo "#ERR call $0  "comment" input_file output_file"        exit 1fiDEBUG=1COMMENT=$1INF=$2OUTF=$3[ $DEBUG -eq 1 ] && echo "#DBG comment $COMMENT, converting $INF into $OUTF"echo '/* $Id: fwbin2pkg.sh,v 1.3 2006/06/21 08:50:08 maximsch2 Exp $ */' > $OUTFecho "/* $COMMENT */" >> $OUTFecho '/**************************************************************************/' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/*            Copyright (c) 1999-2000 by Atmel Corporation                */' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/*  This software is copyrighted by and is the sole property of Atmel     */' >> $OUTFecho '/*  Corporation.  All rights, title, ownership, or other interests        */' >> $OUTFecho '/*  in the software remain the property of Atmel Corporation.  This       */' >> $OUTFecho '/*  software may only be used in accordance with the corresponding        */' >> $OUTFecho '/*  license agreement.  Any un-authorized use, duplication, transmission, */' >> $OUTFecho '/*  distribution, or disclosure of this software is expressly forbidden.  */' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/*  This Copyright notice may not be removed or modified without prior    */' >> $OUTFecho '/*  written consent of Atmel Corporation.                                 */' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/*  Atmel Corporation, Inc. reserves the right to modify this software    */' >> $OUTFecho '/*  without notice.                                                       */' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/*  Atmel Corporation.                                                    */' >> $OUTFecho '/*  2325 Orchard Parkway               literature@atmel.com               */' >> $OUTFecho '/*  San Jose, CA 95131                 http://www.atmel.com               */' >> $OUTFecho '/*                                                                        */' >> $OUTFecho '/**************************************************************************/' >> $OUTFecho '' >> $OUTFecho 'u8 fw_bin[] = {' >> $OUTFod -An -tx1 -v -w8 $INF | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g' >> $OUTFecho '};' >> $OUTFecho '' >> $OUTFecho "const struct firmware static_fw = {`ls -l $INF | awk '{print $5}'`, fw_bin};" >> $OUTFecho '' >> $OUTF

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -