Jump to content

Recommended Posts

atinout_0.9.1-1_mips-3.4.ipk

atinout_0.9.1-1_mipsel-3.4.ipk

Makefile (фай atinout.c разместить с корне директории пакета рядом с Makefile`ом):

Скрытый текст
#

include $(TOPDIR)/rules.mk

PKG_NAME:=atinout
PKG_VERSION:=0.9.1
PKG_RELEASE:=1

include $(INCLUDE_DIR)/package.mk

define Package/atinout
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=a program that reads a list of AT commands
  URL:=https://github.com/beralt/atinout
endef

define Package/atinout/description
  Atinout is a program that will execute AT commands in sequence and
  capture the response from the modem.
endef

TARGET_CFLAGS += -DVERSION=\"$(PKG_VERSION)\"

define Build/Prepare
	mkdir -p $(PKG_BUILD_DIR)
endef

define Build/Compile
	$(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/atinout atinout.c $(TARGET_LDFLAGS)
endef

define Package/atinout/install
	$(INSTALL_DIR) $(1)/opt/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atinout $(1)/opt/bin
endef

$(eval $(call BuildPackage,atinout))

 

~ # atinout -V
atinout version 0.9.1
Copyright (C) 2013 Håkon Løvdal <hlovdal@users.sourceforge.net>
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions; see http://www.gnu.org/licenses/gpl.html for details.
~ # 
~ # ls -al /dev/tty*
crw-rw-rw-    1 root     root        5,   0 Aug 16 22:03 /dev/tty
crw-------    1 root     root        4,  64 Aug 16 22:06 /dev/ttyS0
crw-------    1 root     root        4,  65 Jan  1  1970 /dev/ttyS1
crw-r-----    1 root     root      188,   0 Aug 16 22:14 /dev/ttyUSB0
~ # 
~ # echo AT | atinout - /dev/ttyUSB0 -

OK
~ # 
~ # echo AT+CSCS=? | atinout - /dev/ttyUSB0 -

+CSCS: ("IRA","UCS2","GSM")

OK
~ #

 

  • Thanks 1
Link to comment
Share on other sites

10 часов назад, TheBB сказал:

Makefile (фай atinout.c разместить с корне директории пакета рядом с Makefile`ом)

Небольшой вопрос к вам. С гитхаба мне нужно скачать только atinout.c и положить его в дерикторию с пакетом, а после выполнить скипт? Я не собирал самостоятельно ничего еще, так как виндовод(

Link to comment
Share on other sites

Вот "классический" вариант, сам выкачивает исходники:

Скрытый текст
#

include $(TOPDIR)/rules.mk

PKG_NAME:=atinout
PKG_VERSION:=0.9.1
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/beralt/atinout
PKG_SOURCE_VERSION:=4013e8db4cd140c1df24bb90f929efeb9b61b238
PKG_MIRROR_HASH:=skip

include $(INCLUDE_DIR)/package.mk

define Package/atinout
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=a program that reads a list of AT commands
  URL:=https://github.com/beralt/atinout
endef

define Package/atinout/description
  Atinout is a program that will execute AT commands in sequence and
  capture the response from the modem.
endef

TARGET_CFLAGS += -DVERSION=\"$(PKG_VERSION)\"

define Build/Compile
	(cd $(PKG_BUILD_DIR); \
		$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o atinout atinout.c; \
	)
endef

define Package/atinout/install
	$(INSTALL_DIR) $(1)/opt/bin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/atinout $(1)/opt/bin
endef

$(eval $(call BuildPackage,atinout))

 

 

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...