luars232 - Lua serial module

luars232 lets Lua talk to the serial port. Since every implementation of openWRT comes equipped with Lua and it doesn't take up much space on the Yun it seems to be an ideal way to talk to the Arduino side. Unfortunately it isn't included in any of the packages for the Atheros chip on the Yun.

I'd like to try to use GCC on the linux side of the Yun to make this module. I managed to copy the source files from https://github.com/ynezz/librs232 but I haven't got clue what to do with it.

Makefile of luars232:

#############
#
# Copyright (C) 2007-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=luars232
PKG_VERSION:=1.0.1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_FIXUP:=libtool

include $(INCLUDE_DIR)/package.mk

PKG_INSTALL=1

define Package/luars232
  SUBMENU:=Lua
  SECTION:=lang
  CATEGORY:=Languages
  TITLE:=Lua lib for serial communication over rs-232
  DEPENDS:=+lua
endef

define Package/luars232/description
 Lua lib for serial communication over rs-232
endef

TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC)

define Build/Configure
        $(call Build/Configure/Default, \
        CFLAGS="$(TARGET_CFLAGS)" \
        )
endef

define Build/InstallDev
 $(INSTALL_DIR) $(1)/usr/include
 $(CP) $(PKG_INSTALL_DIR)/usr/include/librs232 $(1)/usr/include/
 $(INSTALL_DIR) $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.{a,so*} $(1)/usr/lib/lua/
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.{a,so*} $(1)/usr/lib/lua/ 
 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/librs232.pc $(1)/usr/lib/pkgconfig/
endef

define Package/luars232/install
 $(INSTALL_DIR) $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/ 
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/librs232.so* $(1)/usr/lib/lua
 $(CP) $(PKG_INSTALL_DIR)/usr/lib/luars232.so* $(1)/usr/lib/lua 
endef

$(eval $(call BuildPackage,luars232))
cd /mnt/sda1

wget -O  luars232_1.0.1_ar71xx.ipk https://www.dropbox.com/s/a56jppa64gijtmt/luars232_1.0.1_ar71xx.ipk?dl=0 --no-check-certificate

opkg update

opkg install luars232_1.0.1_ar71xx.ipk
Installing luars232 (1.0.1) to root...
Configuring luars232.

mwalimu: ... I'd like to try to use GCC on the linux side of the Yun to make this module. I managed to copy the source files from https://github.com/ynezz/librs232 but I haven't got clue what to do with it.

Install lua_devel for GCC

http://forum.arduino.cc/index.php?topic=266549.msg1880787#msg1880787

A to Z method to make module:

http://forum.arduino.cc/index.php?topic=241368.msg1755247#msg1755247

http://forum.arduino.cc/index.php?topic=241368.msg1756252#msg1756252

Wow! That was more than I hoped for. Thank you. ;D