Skip to content

Commit c672639

Browse files
committed
Add openwrt trunk support
1 parent d682aba commit c672639

File tree

6 files changed

+483
-4
lines changed

6 files changed

+483
-4
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ uninstall:
1616
-rm $(prefix)/lib/udev/rules.d/60-gobi.rules
1717

1818
clean:
19-
-rm gobi_loader
20-
-rm *~
19+
-rm -f gobi_loader
20+
-rm -f *~
2121

2222
dist:
2323
mkdir gobi_loader-$(VERSION)

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ gobi_loader
22
===========
33

44
Firmware Loader for Qualcomm Gobi USB Chipsets.
5+
6+
- clone from http://www.codon.org.uk/~mjg59/gobi_loader/download/gobi_loader-0.7.tar.gz
7+
- fix CDMA firmware download failed issue
8+
- add openwrt big-endian platform support

gobi_loader.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ void usage (char **argv) {
178178
printf ("usage: %s [-2000] serial_device firmware_dir\n", argv[0]);
179179
}
180180

181-
#define DATA_ENCODE 1 /* add 0x7e head/tail, do encode */
181+
#define DATA_ENCODE 1 /* add 0x7e head/tail, do encode */
182182
#define DATA_NOENCODE 0 /* no 0x7e head/tail, no encode */
183183
int qdl_server_send_request(int fd, const char *data, int len, char flag) {
184184
int i, cnt;
@@ -224,7 +224,6 @@ static void die(const char *err) {
224224
}
225225

226226
int qdl_server_wait_response(int fd, char code) {
227-
int i;
228227
int len;
229228
char buff[64];
230229

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#
2+
# Example for user-defined program
3+
#
4+
5+
include $(TOPDIR)/rules.mk
6+
7+
PKG_NAME:=gobi_loader
8+
PKG_VERSION:=1.0
9+
PKG_BUILD_DIR:=$(BUILD_DIR)/gobi_loader-$(PKG_VERSION)
10+
11+
include $(INCLUDE_DIR)/package.mk
12+
13+
# SECTION currently unused
14+
define Package/$(PKG_NAME)
15+
SECTION:=utils
16+
CATEGORY:=Utilities
17+
TITLE:=Firmware loader for Qualcomm Gobi USB chipsets
18+
SUBMENU:=iPkg
19+
MAINTAINER:=Matthew Garrett, Kicer Jiao
20+
URL:=
21+
DEPENDS:=
22+
endef
23+
24+
define Package/$(PKG_NAME)/description
25+
Firmware loader for Qualcomm Gobi USB chipsets
26+
endef
27+
28+
# backup this files when upgrade
29+
define Package/$(PKG_NAME)/conffiles
30+
endef
31+
32+
# install script
33+
define Package/$(PKG_NAME)/install
34+
$(INSTALL_DIR) $(1)/usr/bin
35+
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin
36+
endef
37+
38+
# pre-install script
39+
define Package/$(PKG_NAME)/preinst
40+
endef
41+
42+
# post-install script
43+
define Package/$(PKG_NAME)/postinst
44+
endef
45+
46+
# pre-remove script
47+
define Package/$(PKG_NAME)/prerm
48+
endef
49+
50+
# post-remove script
51+
define Package/$(PKG_NAME)/postrm
52+
endef
53+
54+
define Build/Prepare
55+
[ -d $(PKG_BUILD_DIR) ] || mkdir -p $(PKG_BUILD_DIR)
56+
$(CP) ./src/* $(PKG_BUILD_DIR)
57+
endef
58+
59+
define Build/Configure
60+
endef
61+
62+
#define Build/Compile
63+
#endef
64+
65+
$(eval $(call BuildPackage,$(PKG_NAME)))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all: gobi_loader
2+
3+
%.o: %.c
4+
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^
5+
6+
gobi_loader: gobi_loader.o
7+
$(CC) -o $@ $^
8+
9+
clean:
10+
rm -f *.o gobi_loader

0 commit comments

Comments
 (0)