1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-04 02:00:04 +00:00

Rename /openembedded/ -> /meta/

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie
2006-07-21 10:10:31 +00:00
parent 2cf0eadf9f
commit b2f192faab
1725 changed files with 6 additions and 6 deletions
+85
View File
@@ -0,0 +1,85 @@
device "orinoco_cs"
class "network"
module "hermes", "orinoco", "orinoco_cs"
device "spectrum_cs"
class "network" module "hermes", "orinoco", "spectrum_cs"
# This manfid was used for cards with Lucent/Agere and Intersil firmware.
# orinoco_cs supports both types, so we don't need to distinguish them.
card "Orinoco or Intersil Prism 2 Wireless"
manfid 0x0156,0x0002
bind "orinoco_cs"
# Cards with Lucent/Agere firmware (Hermes chipset)
card "Lucent Technologies Wavelan/IEEE"
version "Lucent Technologies", "WaveLAN/IEEE"
bind "orinoco_cs"
card "Avaya World Card"
version "Avaya Communication", "Avaya Wireless PC Card"
bind "orinoco_cs"
card "Cabletron RoamAbout 802.11 DS"
version "Cabletron", "RoamAbout 802.11 DS"
bind "orinoco_cs"
card "ELSA AirLancer MC-11"
version "ELSA", "AirLancer MC-11"
bind "orinoco_cs"
card "MELCO WLI-PCM-L11"
version "MELCO", "WLI-PCM-L11"
bind "orinoco_cs"
card "ARtem Onair"
version "ARtem", "Onair"
bind "orinoco_cs"
# Cards with Symbol firmware in flash (Spectrum24 chipset)
card "LA4111 Spectrum24 Wireless LAN PC Card"
version "Symbol Technologies"
bind "orinoco_cs"
card "3Com AirConnect"
version "3Com", "3CRWE737A AirConnect Wireless LAN PC Card"
bind "orinoco_cs"
card "Intel PRO/Wireless 2011"
manfid 0x0089,0x0001
bind "orinoco_cs"
card "Ericsson WLAN Card C11"
manfid 0x016b,0x0001
bind "orinoco_cs"
card "Nortel Networks e-mobility 802.11 Wireless LAN PC Card"
version "Nortel Networks", "emobility 802.11 Wireless LAN PC Card", "1.00"
bind "orinoco_cs"
card "D-Link DWL-650H"
version "D-Link Corporation", "D-Link DWL-650H 11Mbps WLAN Adapter"
bind "orinoco_cs"
# Cards with Symbol firmware without flash memory (Spectrum24 Trilogy).
# These cards need a separate driver that loads the firmware.
card "LA4100 Spectrum24 CF WLAN Card"
manfid 0x026c, 0x0001
bind "spectrum_cs"
card "Socket Communications CF+ LP WLAN Card"
manfid 0x0104, 0x0001
bind "spectrum_cs"
card "Intel PRO/Wireless 2011B"
manfid 0x0089, 0x0001
bind "spectrum_cs"
@@ -0,0 +1,2 @@
options orinoco_cs ignore_cis_vcc=1
+18
View File
@@ -0,0 +1,18 @@
device "spectrum_cs"
class "network" module "hermes", "orinoco", "spectrum_cs"
card "LA4100 Spectrum24 CF WLAN Card"
manfid 0x026c, 0x0001
bind "spectrum_cs"
card "LA4137 Spectrum24 CF WLAN CARD"
manfid 0x014d, 0x0001
bind "spectrum_cs"
card "Socket Communications CF+ LP WLAN Card"
manfid 0x0104, 0x0001
bind "spectrum_cs"
card "Intel PRO/Wireless 2011B"
manfid 0x0089, 0x0001
bind "spectrum_cs"
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
DESCRIPTION = "PCMCIA-cs configuration files for Hermes (Orinoco) wireless LAN cards"
SECTION = "kernel/modules"
PRIORITY = "optional"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de> Marcin Juszkiewicz <openembedded@hrw.one.pl>"
LICENSE = "GPL"
PACKAGE_ARCH = "all"
PR = "r2"
SRC_URI = "file://spectrum.conf \
file://hermes.conf \
file://orinoco_cs.conf"
do_install() {
install -d ${D}${sysconfdir}/pcmcia
install -d ${D}${sysconfdir}/modutils
install -m 0644 ${WORKDIR}/spectrum.conf ${D}${sysconfdir}/pcmcia/
install -m 0644 ${WORKDIR}/hermes.conf ${D}${sysconfdir}/pcmcia/
install -m 0644 ${WORKDIR}/orinoco_cs.conf ${D}${sysconfdir}/modutils/
}
@@ -0,0 +1,56 @@
Index: orinoco-0.15rc2/orinoco_cs.c
===================================================================
--- orinoco-0.15rc2.orig/orinoco_cs.c 2004-07-28 07:06:45.000000000 +0100
+++ orinoco-0.15rc2/orinoco_cs.c 2005-08-03 18:38:34.000000000 +0100
@@ -189,11 +189,13 @@
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
client_reg.EventMask =
CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
client_reg.event_handler = &orinoco_cs_event;
+#endif
client_reg.Version = 0x0210; /* FIXME: what does this mean? */
client_reg.event_callback_args.client_data = link;
@@ -612,6 +614,9 @@
.name = DRIVER_NAME,
},
.attach = orinoco_cs_attach,
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
+ .event = orinoco_cs_event,
+#endif
.detach = orinoco_cs_detach,
};
Index: orinoco-0.15rc2/spectrum_cs.c
===================================================================
--- orinoco-0.15rc2.orig/spectrum_cs.c 2005-08-03 11:51:09.000000000 +0100
+++ orinoco-0.15rc2/spectrum_cs.c 2005-08-03 18:38:46.000000000 +0100
@@ -699,11 +699,13 @@
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
client_reg.EventMask =
CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
client_reg.event_handler = &spectrum_cs_event;
+#endif
client_reg.Version = 0x0210; /* FIXME: what does this mean? */
client_reg.event_callback_args.client_data = link;
@@ -1096,6 +1098,9 @@
.name = DRIVER_NAME,
},
.attach = spectrum_cs_attach,
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
+ .event = spectrum_cs_event,
+#endif
.detach = spectrum_cs_detach,
};
@@ -0,0 +1,21 @@
Index: orinoco-0.15rc1/kcompat.h
===================================================================
--- orinoco-0.15rc1.orig/kcompat.h 2005-08-03 14:51:18.000000000 +0000
+++ orinoco-0.15rc1/kcompat.h 2005-08-03 15:11:02.000000000 +0000
@@ -1,3 +1,4 @@
+#include <linux/utsname.h>
#include <linux/version.h>
/********************************************************************/
Index: orinoco-0.15rc2/orinoco.h
===================================================================
--- orinoco-0.15rc2.orig/orinoco.h 2004-07-28 07:06:45.000000000 +0100
+++ orinoco-0.15rc2/orinoco.h 2005-08-03 18:43:46.000000000 +0100
@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/netdevice.h>
#include <linux/wireless.h>
+#include <linux/utsname.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25)
#include <linux/moduleparam.h>
@@ -0,0 +1,48 @@
diff -up orinoco-0.15rc2/orinoco_pci.c orinoco-0.15rc2-new/orinoco_pci.c
--- orinoco-0.15rc2/orinoco_pci.c 2004-07-28 08:06:45.000000000 +0200
+++ orinoco-0.15rc2-new/orinoco_pci.c 2005-06-19 17:13:07.000000000 +0200
@@ -327,7 +327,7 @@ static int orinoco_pci_suspend(struct pc
orinoco_unlock(priv, &flags);
- pci_save_state(pdev, card->pci_state);
+ pci_save_state(pdev);
pci_set_power_state(pdev, 3);
return 0;
@@ -344,7 +344,7 @@ static int orinoco_pci_resume(struct pci
printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
pci_set_power_state(pdev, 0);
- pci_restore_state(pdev, card->pci_state);
+ pci_restore_state(pdev);
err = orinoco_reinit_firmware(dev);
if (err) {
diff -up orinoco-0.15rc2/spectrum_cs.c orinoco-0.15rc2-new/spectrum_cs.c
--- orinoco-0.15rc2/spectrum_cs.c 2004-07-28 08:06:45.000000000 +0200
+++ orinoco-0.15rc2-new/spectrum_cs.c 2005-06-19 18:06:39.000000000 +0200
@@ -579,12 +579,13 @@ static int
spectrum_dl_firmware(hermes_t *hw, dev_link_t *link)
{
int ret;
+ client_handle_t handle = link->handle;
#ifndef SPECTRUM_FW_INCLUDED
const struct firmware *fw_entry;
if (request_firmware(&fw_entry, primary_fw_name,
- spectrum_cs_device) == 0) {
+ &handle_to_dev(handle)) == 0) {
primsym = fw_entry->data;
} else {
printk(KERN_ERR PFX "Cannot find firmware: %s\n",
@@ -593,7 +594,7 @@ spectrum_dl_firmware(hermes_t *hw, dev_l
}
if (request_firmware(&fw_entry, secondary_fw_name,
- spectrum_cs_device) == 0) {
+ &handle_to_dev(handle)) == 0) {
secsym = fw_entry->data;
} else {
printk(KERN_ERR PFX "Cannot find firmware: %s\n",
@@ -0,0 +1,22 @@
#
# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
#
--- orinoco-0.15rc1/kcompat.h~list-move.patch 2004-04-19 07:08:24.000000000 +0200
+++ orinoco-0.15rc1/kcompat.h 2004-06-15 19:16:17.000000000 +0200
@@ -39,13 +39,12 @@
typedef void irqreturn_t;
#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
+#if 0
static inline void list_move(struct list_head *list, struct list_head *head)
{
__list_del(list->prev, list->next);
list_add(list, head);
}
-
static inline void list_move_tail(struct list_head *list,
struct list_head *head)
{
@@ -0,0 +1,13 @@
Index: orinoco-0.15rc2/Makefile
===================================================================
--- orinoco-0.15rc2.orig/Makefile 2004-07-28 07:06:45.000000000 +0100
+++ orinoco-0.15rc2/Makefile 2005-05-24 00:09:07.000000000 +0100
@@ -12,7 +12,7 @@
# The default kernel is the one you are running, but you may want to set
# it to another configured Linux source tree
-KERNEL_SRC = $(shell readlink -f /lib/modules/`uname -r`/build)
+KERNEL_SRC = $(KERNEL_SOURCE)
# Output directory that you used when building Linux kernel, if any.
# Note: this driver will be compiled to the current directory regardless.
@@ -0,0 +1,101 @@
Index: orinoco-0.15rc2/spectrum_cs.c
===================================================================
--- orinoco-0.15rc2.orig/spectrum_cs.c 2005-08-03 18:43:58.000000000 +0100
+++ orinoco-0.15rc2/spectrum_cs.c 2005-08-03 22:27:03.000000000 +0100
@@ -1092,6 +1092,17 @@
" (Pavel Roskin <proski@gnu.org>,"
" David Gibson <hermes@gibson.dropbear.id.au>, et al)";
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
+static struct pcmcia_device_id spectrum_cs_ids[] = {
+ PCMCIA_DEVICE_MANF_CARD(0x026c, 0x0001),
+ PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0001),
+ PCMCIA_DEVICE_MANF_CARD(0x0089, 0x0001),
+ PCMCIA_DEVICE_PROD_ID12("Symbol", "Spectrum24 LA4100 Series WLAN PC Card", 0xd20d85fd, 0x63066cd9),
+ PCMCIA_DEVICE_NULL,
+};
+MODULE_DEVICE_TABLE(pcmcia, spectrum_cs_ids);
+#endif
+
static struct pcmcia_driver orinoco_driver = {
.owner = THIS_MODULE,
.drv = {
@@ -1100,6 +1111,7 @@
.attach = spectrum_cs_attach,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
.event = spectrum_cs_event,
+ .id_table = spectrum_cs_ids,
#endif
.detach = spectrum_cs_detach,
};
Index: orinoco-0.15rc2/orinoco_cs.c
===================================================================
--- orinoco-0.15rc2.orig/orinoco_cs.c 2005-08-03 18:43:55.000000000 +0100
+++ orinoco-0.15rc2/orinoco_cs.c 2005-08-03 22:58:58.000000000 +0100
@@ -608,6 +608,58 @@
" (David Gibson <hermes@gibson.dropbear.id.au>, "
"Pavel Roskin <proski@gnu.org>, et al)";
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
+static struct pcmcia_device_id orinoco_cs_ids[] = {
+ PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300),
+ PCMCIA_DEVICE_MANF_CARD(0x0089, 0x0001),
+ PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x01eb, 0x080a),
+ PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001),
+ PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305),
+ PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613),
+ PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673),
+ PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001),
+ PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
+ PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021),
+ PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
+ PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
+ PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
+ PCMCIA_DEVICE_PROD_ID12("3Com", "3CRWE737A AirConnect Wireless LAN PC Card", 0x41240e5b, 0x56010af3),
+ PCMCIA_DEVICE_PROD_ID123("Instant Wireless ", " Network PC CARD", "Version 01.02", 0x11d901af, 0x6e9bd926, 0x4b74baa0),
+ PCMCIA_DEVICE_PROD_ID12("ACTIONTEC", "PRISM Wireless LAN PC Card", 0x393089da, 0xa71e69d5),
+ PCMCIA_DEVICE_PROD_ID12("Avaya Communication", "Avaya Wireless PC Card", 0xd8a43b78, 0x0d341169),
+ PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-PCM-L11G", 0x2decece3, 0xf57ca4b3),
+ PCMCIA_DEVICE_PROD_ID12("Cabletron", "RoamAbout 802.11 DS", 0x32d445f5, 0xedeffd90),
+ PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCC-11", 0x5261440f, 0xa6405584),
+ PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCCA-11", 0x5261440f, 0xdf6115f9),
+ PCMCIA_DEVICE_PROD_ID12("D", "Link DRC-650 11Mbps WLAN Card", 0x71b18589, 0xf144e3ac),
+ PCMCIA_DEVICE_PROD_ID12("D", "Link DWL-650 11Mbps WLAN Card", 0x71b18589, 0xb6f1b0ab),
+ PCMCIA_DEVICE_PROD_ID12("ELSA", "AirLancer MC-11", 0x4507a33a, 0xef54f0e3),
+ PCMCIA_DEVICE_PROD_ID12("HyperLink", "Wireless PC Card 11Mbps", 0x56cc3f1a, 0x0bcf220c),
+ PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE", 0x74c5e40d, 0xdb472a18),
+ PCMCIA_DEVICE_PROD_ID12("Lucent Technologies", "WaveLAN/IEEE", 0x23eb9949, 0xc562e72a),
+ PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11", 0x481e0094, 0x7360e410),
+ PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11G", 0x481e0094, 0xf57ca4b3),
+ PCMCIA_DEVICE_PROD_ID12("Microsoft", "Wireless Notebook Adapter MN-520", 0x5961bf85, 0x6eec8c01),
+ PCMCIA_DEVICE_PROD_ID12("NCR", "WaveLAN/IEEE", 0x24358cd4, 0xc562e72a),
+ PCMCIA_DEVICE_PROD_ID12("NETGEAR MA401RA Wireless PC", "Card", 0x0306467f, 0x9762e8f1),
+ PCMCIA_DEVICE_PROD_ID12("PLANEX", "GeoWave/GW-CF110", 0x209f40ab, 0xd9715264),
+ PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PC CARD HARMONY 80211B", 0xc6536a5e, 0x090c3cd9),
+ PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26),
+ PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b),
+ PCMCIA_DEVICE_PROD_ID1("Symbol Technologies", 0x3f02b4d6),
+ PCMCIA_DEVICE_NULL,
+};
+MODULE_DEVICE_TABLE(pcmcia, orinoco_cs_ids);
+#endif
+
static struct pcmcia_driver orinoco_driver = {
.owner = THIS_MODULE,
.drv = {
@@ -616,6 +668,7 @@
.attach = orinoco_cs_attach,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12))
.event = orinoco_cs_event,
+ .id_table = orinoco_cs_ids,
#endif
.detach = orinoco_cs_detach,
};
@@ -0,0 +1,38 @@
DESCRIPTION = "A driver for wireless LAN cards based on Hermes(Orinoco) cards. \
Also contains support for cards using downloadable firmware, i.e. the Symbol/Socket family."
SECTION = "kernel/modules"
PRIORITY = "optional"
PROVIDES = "spectrum-modules"
DEPENDS = "orinoco-conf spectrum-fw"
RDEPENDS = "orinoco-conf"
MAINTAINER = "Michael 'Mickey' Lauer <mickey@Vanille.de>"
LICENSE = "GPL"
PR = "r9"
SRC_URI = "http://ozlabs.org/people/dgibson/dldwd/orinoco-${PV}.tar.gz \
file://makefile_fix.patch;patch=1 \
file://list-move.patch;patch=1 \
file://add_utsname.patch;patch=1 \
file://add_event.patch;patch=1 \
file://spectrum_cs_ids.patch;patch=1 \
file://catch-up-with-kernel-changes.patch;patch=1"
S = "${WORKDIR}/orinoco-${PV}"
inherit module
do_install() {
install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/
install -m 0644 *${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/
}
PACKAGES = "orinoco-modules-cs orinoco-modules-pci orinoco-modules-usb orinoco-modules-nortel orinoco-modules"
FILES_orinoco-modules-cs = "/lib/modules/${KERNEL_VERSION}/net/*_cs${KERNEL_OBJECT_SUFFIX}"
FILES_orinoco-modules-pci = "/lib/modules/${KERNEL_VERSION}/net/orinoco_p*${KERNEL_OBJECT_SUFFIX}"
FILES_orinoco-modules-usb = "/lib/modules/${KERNEL_VERSION}/net/*_usb${KERNEL_OBJECT_SUFFIX}"
FILES_orinoco-modules-nortel = "/lib/modules/${KERNEL_VERSION}/net/orinoco_tmd${KERNEL_OBJECT_SUFFIX} \
/lib/modules/${KERNEL_VERSION}/net/orinoco_nortel${KERNEL_OBJECT_SUFFIX}"
FILES_orinoco-modules = "/lib/modules/"
RDEPENDS_orinoco-modules-cs = "orinoco-modules spectrum-fw"
RDEPENDS_orinoco-modules-pci = "orinoco-modules"
RDEPENDS_orinoco-modules-usb = "orinoco-modules"
RDEPENDS_orinoco-modules-nortel = "orinoco-modules"
+21
View File
@@ -0,0 +1,21 @@
DESCRIPTION = "Firmware for Spectrum Wireless LAN cards"
LICENSE = "unknown"
PR = "r0"
PACKAGE_ARCH = "all"
SRC_URI = "file://get_symbol_fw \
file://parse_symbol_fw"
S = "${WORKDIR}"
do_compile() {
./get_symbol_fw
}
FILES_${PN} += "${base_libdir}/firmware/symbol*"
do_install() {
install -d ${D}${base_libdir}/firmware/
install -m 0755 ${WORKDIR}/symbol_sp24t_prim_fw ${D}${base_libdir}/firmware/symbol_sp24t_prim_fw
install -m 0755 ${WORKDIR}/symbol_sp24t_sec_fw ${D}${base_libdir}/firmware/symbol_sp24t_sec_fw
}
+43
View File
@@ -0,0 +1,43 @@
#!/bin/sh
# Get firmware for Symbol Spectrum24 Trilogy.
# Both the header file and the binary firmware files are produced.
# Copyright (C) 2004 Pavel Roskin <proski@gnu.org>
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# Usage: get_symbol_fw
# Output: spectrum_fw.h symbol_sp24t_prim_fw symbol_sp24t_sec_fw
# Needed tools: curl (or wget), unzip, perl.
set -e
URL_BASE='ftp://symstore.longisland.com/Symstore/services_download/wirless_prod/'
DL_FILE='MC&DriverOnlyInstallers.zip'
DL_INT1='S24DRVR392B67-01.exe'
DL_INT2='Driver Only Installer/NetWLan5.sys'
DRIVER1=symbol1.drv
DRIVER2=symbol2.drv
get_file() {
curl --remote-name "$1" || \
wget --passive-ftp "$1" || \
wget "$1" || \
ftp "$1" </dev/null || \
exit 1
}
if ! test -f $DL_FILE; then
get_file $URL_BASE/$DL_FILE
fi
unzip -p $DL_FILE "$DL_INT1" >$DRIVER1
unzip -p $DRIVER1 "$DL_INT2" >$DRIVER2
perl parse_symbol_fw $DRIVER2 spectrum_fw.h symbol_sp24t_prim_fw \
symbol_sp24t_sec_fw
rm -f $DRIVER1 $DRIVER2
+129
View File
@@ -0,0 +1,129 @@
#!/usr/bin/perl -w
# Extract Symbol firmware and convert is to a header file and two binary
# files.
# Copyright (C) 2004 Pavel Roskin <proski@gnu.org>
# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License. A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
# Usage:
# parse_symbol_fw infile header binfile1 binfile2
use strict;
# Print message and exit (like "die", but without raising an exception).
# Newline is added at the end.
sub error
{
printf STDERR "ERROR: ";
printf STDERR @_;
printf STDERR "\n";
exit 1;
}
sub readnum_ba ()
{
my $byte_a;
read INFILE,$byte_a,1;
my $byte_b;
read INFILE,$byte_b,1;
return (ord($byte_b) << 8) + ord($byte_a);
}
if ($#ARGV != 3) {
error ("Usage: parse_symbol_fw infile header binfile1 binfile2");
}
unless (open (INFILE, "< $ARGV[0]")) {
error ("couldn't open $ARGV[0] for reading: $!");
}
unless (open (OUTFILE, "> $ARGV[1]")) {
error ("couldn't open $ARGV[1] for writing: $!");
}
# Process one array, either for primary or for secondary firmware
sub process_one_array($$) {
my $arrname = shift(@_);
my $binfile = shift(@_);
my $offset = -1;
my $str_offset = 0;
# Skip to the beginning of firmware
$/ = "\x00";
while (<INFILE>) {
if (m{FILE: }g) {
$offset = $str_offset + pos() - 6;
last;
}
$str_offset = tell(INFILE);
}
if ($offset == -1) {
error("Cannot find FILE: marker");
}
my @fwdata = split;
print $fwdata[1] . "\n";
seek(INFILE, $offset, 0);
my $blknum = $fwdata[3];
my $pdrlen = $fwdata[4];
my $crclen = $fwdata[5];
my $compatlen = $fwdata[6];
while (!eof(INFILE)) {
my $byte;
read INFILE, $byte, 1;
last if (ord($byte) == 0x1a);
}
# Walk all blocks
my $block = $blknum;
while ($block-- > 0) {
seek(INFILE, 4, 1);
my $len = readnum_ba();
seek(INFILE, $len, 1);
}
my $img_len = tell(INFILE) - $offset + $pdrlen + $crclen + $compatlen + 2;
seek(INFILE, $offset, 0);
# Write binary file for the section
unless (open (BINFILE, "> $binfile")) {
error ("couldn't open $binfile for writing: $!");
}
# Output the array
printf OUTFILE "/* %s %s */\n", $fwdata[1], $fwdata[2];
printf OUTFILE "static u8 %s[] = {\n", $arrname;
my $count = 0;
while ($count++ < $img_len) {
my $byte;
read INFILE, $byte, 1;
$byte = ord($byte);
printf OUTFILE "0x%02x,", $byte;
printf BINFILE "%c", $byte;
if ($count % 16 == 0) {
printf OUTFILE "\n";
}
}
if ($img_len % 16) {
printf OUTFILE "\n";
}
print OUTFILE "};\n";
close(BINFILE);
}
process_one_array("primsym", $ARGV[2]);
process_one_array("secsym", $ARGV[3]);
close(INFILE);
close(OUTFILE);