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

📄 fwconvert

📁 无线网卡驱动程序 802.11b无线网卡可直接移植到2.6内核中去
💻
字号:
#!/bin/sh## fwconvert <fwid> <internal.h> <external.h>## Convert firmware from the form used in the Atmel driver source to the form# used for our driver.##   <fwid>       - The unique ID string used in the appropriate #defines (i.e.#                  "RFMD" or "I3861")#   <internal.h> - The atmelwlandriver-style header file containing the#                  internal firmware#   <external.h> - The atmelwlandriver-style header file containing the#                  external firmware## The initial comments (copyright messages, etc) from the beginning of the# internal .h file are preserved at the beginning of the converted output.## The resulting converted .h file is sent to standard output.fwid="$1"intfile="$2"extfile="$3"cat <<EOF/**************************************************************************** * The following firmware has been taken (and reformatted slighly) from the * * Atmel (atmelwlandriver) driver source.                                   * *                                                                          * *   Target:                                                                * *   Version:                                                               * ****************************************************************************/EOFawk '/{/ { nextfile } ! /^$/ { print }' < "$intfile"echo ""echo "#define FW_${fwid}_INTERNAL { \\"awk '/{/ { p=1; sub(".*{",""); } p { gsub("[[:blank:]};]*",""); printf "%s", $0; }' < "$intfile" | \  sed -e 's/\([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\)/\1 \\|/g' | \  tr '|' '\n'echo "}"echo ""echo "#define FW_${fwid}_EXTERNAL { \\"awk '/{/ { p=1; sub(".*{",""); } p { gsub("[[:blank:]};]*",""); printf "%s", $0; }' < "$extfile" | \  sed -e 's/\([^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,[^,]*,\)/\1 \\|/g' | \  tr '|' '\n'echo "}"

⌨️ 快捷键说明

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