Need your help to solve the following issue. I have documented the implementation process and please post your comments regarding this issue and solutions to make the correct build.
Issue: Newly added packages are not functioning.
Preparing the build box
Prerequisites
- build-essential (
sudo apt-get install build-essential). This installs
gcc, make, g++, dpkg-dev and libc6-dev
- util-linux (
sudo apt-get install util-linux)
- git (
sudo apt-get install git-core)
- hg (mercurial) (
sudo apt-get install mercurial meld)
- libstdc++6 32-bit (on 64-bit systems) (
sudo apt-get install libstdc++6)
Also required for creating the SD card image:
- e2fsprogs (
sudo apt-get install e2fsprogs)
- dosfstools (
sudo apt-get install dosfstools)
- parted (
sudo apt-get install parted)
- qemu (
sudo apt-get install qemu)
Following package should be installed for menu configuration
sudo apt-get install ncurses-dev
Cloning the repository
$ git clone –b develop --recursive https://github.com/Outernet-Project/orx-rpi.git
Including new packages:
Following packages should be included with the BR2_EXTERNAL.
smbus-cffi 0.5.1
Create a folder python-smbus inside the orx-rpi/rpi/package/
Create following two files inside python-smbus
Config.in
config BR2_PACKAGE_PYTHON_SMBUS
bool "python-smbus"
select BR2_PACKAGE_PYTHON_CFFI
help
This Python module allows SMBus access through the I2C /dev interface on Linux hosts. The host kernel must have I2C support, I2C device interface support, and a bus adapter driver.
https://pypi.python.org/pypi/smbus-cffi/
python-smbus.mk
################################################################################
#
# python-smbus
#
################################################################################
PYTHON_SMBUS_VERSION = 0.5.1
PYTHON_SMBUS_SOURCE = smbus-cffi-$(PYTHON_SMBUS_VERSION).tar.gz
PYTHON_SMBUS_SITE = https://pypi.python.org/packages/source/s/smbus-cffi
PYTHON_SMBUS_SETUP_TYPE = setuptools
PYTHON_SMBUS_LICENSE = GPLv2+ or Python software foundation license v2
PYTHON_SMBUS_LICENSE_FILES = LICENSE.GPL LICENSE.PSF
PYTHON_SMBUS_CFFI_DEPENDENCIES = host-python-cffi
$(eval $(python-package))
RPi.GPIO 0.6.1
Create another folder rpi-gpio inside the orx-rpi/rpi/package/
Create following two files inside rpi-gpio
Config.in
config BR2_PACKAGE_RPI_GPIO
bool "rpi-gpio"
help
A module to control Raspberry PI GPIO channels.
http://sourceforge.net/projects/raspberry-gpio-python
rpi-gpio.mk
################################################################################
#
# rpi-gpio
#
################################################################################
RPI_GPIO_VERSION = 0.6.1
RPI_GPIO_SOURCE = RPi.GPIO-$(RPI_GPIO_VERSION).tar.gz
RPI_GPIO_SITE = http://pypi.python.org/packages/source/R/RPi.GPIO
RPI_GPIO_LICENSE = MIT
RPI_GPIO_LICENSE_FILES = LICENSE.txt
RPI_GPIO_SETUP_TYPE = distutils
$(eval $(python-package))
Open Config.in file inside the orx-rpi/rpi and add following two lines at the end of the file before endmenu. You can use gedit text editor to edit the file.
source "$BR2_EXTERNAL/package/python-smbus/Config.in"
source "$BR2_EXTERNAL/package/rpi-gpio/Config.in"
Now save and close the file.
Menu configuration
Open a terminal and change the directory to orx-rpi.
cd orx-rpi
Run following command to make the menu configuration.
$make menuconfig
Following are the series of screens for menu configuration.
Select User-provided options
Select Dependencies
Press ‘Y’ to select python-smbus and rpi-gpio. Then select Save option.
Select OK
Select Exit
Finally run the following command to write the configuration in orx_defconfig file inside the directory orx/rpi/rpi/configs
$make savedefconfig
Build
To build the rootfs rub make with the target Raspberry Pi 2.
$make B=rpi2
Once build completes, you can build the image file.
$sudo make image
Circuit
Fritzing representation. - Image taken from Adafruit Industries
Schematic - Image taken from Adafruit Industries
How to run the test python script.
Using SSH log in to your ORxPi
Run following command from the prompt.
python lcd.py
Connect with ORxPi using PuTTY SSH Client
First install PuTTY SSH Client on Ubuntu with following command.
sudo apt-get install putty
Now start PuTTY SSH Client.
The following status will display on the LCD screen.
Type the IP address of your ORxPi and click Open.
Transfer files with Ubuntu
I copied following two sample python scripts to test the newly installed packages. The Adafruit_CharLCD_IPclock_example.py will display the IP address assigned with the Raspberry Pi.
The sample code bundle can be found at GitHub - adafruit/Adafruit-Raspberry-Pi-Python-Code: Adafruit library code for Raspberry Pi
Using terminal run following commands.
pradeeka@pradeeka-Inspiron-3521:~$ scp /home/pradeeka/Downloads/lcd/Adafruit_CharLCD.py outernet@10.0.0.1:/home/outernet/
outernet@10.0.0.1's password:
Adafruit_CharLCD.py 100% 7725 7.5KB/s 00:00
pradeeka@pradeeka-Inspiron-3521:~$
pradeeka@pradeeka-Inspiron-3521:~$ scp /home/pradeeka/Downloads/lcd/Adafruit_CharLCD_IPclock_example.py outernet@10.0.0.1:/home/outernet/
outernet@10.0.0.1's password:
Adafruit_CharLCD_IPclock_example.py 100% 546 0.5KB/s 00:00
pradeeka@pradeeka-Inspiron-3521:~$
Now in PuTTY terminal run python script.
python Adafruit_CharLCD_IPclock_example.py
Unfortunately I got the following run time error and seems the compiler couldn’t found the RPi.GPIO library.

Please help to solve this issue.