This page will help you through the process of building your Mihini's installation on your fast and powerful desktop computer for your embbeded architecture.
Raspbian (RaspberryPi & Debian)
The main files for this platform are already available, so that you will be able to get started quickly ; or it may be used as an example for the others platforms. Please, note that these steps have been validated on a 32 bit OS. Trying to run it on a 64 bit OS may give you errors when trying the build.sh .
Step 1: Get the prerequisitesOn a Debian-based system, you will need to:
$ sudo apt-get install build-essential cmake git telnet
If you want to make the .rpm packages on a Debian-based system, you will also need the package
Step 2: get the toolchainWe are going to use the Linaro toolchain, from the official raspberrypi repository:
$ cd $ git clone https://github.com/raspberrypi/tools.git
Step 3: get MihiniGet the sources
$ git clone https://github.com/nim65s/mihini-repo.git
Step 4: build and makeTo finish, let's build it:
$ cd mihini-repo $ ./bin/build.sh -t raspberrypi-linaro $ cd build.raspberrypi-linaro $ make lua luac # Optional, if you want to use Modbus over serial (e.g. to run the Greenhouse sample) $ make modbus_serial $ make package
And Voilà, you have a
.deb or a
.tar.gz ready to be installed on your RPi !
Step 5: use it
If you are not sure of what to do with this
.deb, you can go to the Install Mihini page, skipping the first shell command which downloads a similar
Then, you can go back to the main tutorial: Run Mihini on an Open Hardware platform
Configuring your own toolchain
The target you specify to
build.sh (which was «raspberrypi-linaro» in the example above) is used to select the toolchain. You will probably need to copy/paste an existing configuration in
cmake/, naming it
toolchain.<your target's name>.cmake, and changing the lines
SET(CMAKE_C_COMPILER /path/to/gcc) SET(CMAKE_CXX_COMPILER /path/to/g++)
Then, you shall also look at the folder
porting/, where you can make a new directory with the name of your target.
Prerequisites for making packages
sudo apt-get install build-essential cmake git telnet rpm
sudo yum install cmake gcc-c++ fedora-packager @development-tools telnet
sudo pacman -Syu base-devel inetutils
Ångström / OpenEmbedded / OpenWRT
opkg install cmake