Difference between revisions of "Install Amahi 7 on an Orange Pi"

From Amahi Wiki
Jump to: navigation, search
 
Line 1: Line 1:
<!--
+
{{NeedsUpdate}}
This page is created automatically by a script.
 
This part is commented and shall not show
 
-->
 
<!--At the top of the page can be visible one of the following tags..-->
 
<!-- {{WorkInProgress}} -->
 
<!--{{NeedsUpdate}}-->
 
<!--{{NeedsMerge | [[Main Page]]}}-->
 
<!--{{NeedsExpantion}}-->
 
<!--{{NeedsDelete |[[Main Page]]}}-->
 
<!--Please remove or place comment accordingly-->
 
  
<!--
 
'''This page is being edited actively and a lot of sections are missing currently; feel free to help improving it.'''
 
-->
 
  
 
=Current state=
 
=Current state=

Latest revision as of 00:47, 15 September 2015

Msgbox.update.png Update Needed
The contents of this page have become outdated or irrelevant. Please consider updating it.


Current state

Amahi can be installed and running under development on an Orange Pi. I have managed to get the core platform running and tested applications PhpSysInfo and WikkaWiki.

This page describes how to get things working. Note that due to the immature state of the code installing it is mainly interested for people who want to get a feeling of it, help in testing and resolving issues.

Known Issues

Feel free to add issues here. If you add an issue an email to the amahi developers list with a more detailed description and/or a bug report in our bugzilla is also greatly appreciated.

  • scrypt gem has been remove because of this issues:- https://github.com/pbhogan/scrypt/issues/23
    • update there is now a amahi/scrypt that will be used, -msse & -msse2 command line parameters have been removed.

Requirements

  • A copy of Fedora 21 can be download from the Fedora download website. http://mirror.karneval.cz/pub/linux/fedora/linux/releases/21/Images/armhfp/Fedora-Minimal-armhfp-21-5-sda.raw.xz
  • An Orange PI (Orange Pi Mini, Banana Pi and Banana Pi Pro might also work, please report here if you manage to get things working.
  • A 8GB SD card or bigger.
  • A PC to copy the Fedora image onto the SD card and to run the console.
  • A serial console for the Orange Pi (see http://www.orangepi.org/Docs/LogintotheOrangePi.html#Using_TTL_serial_port)

Installation

SD Card Installation Using the dd Command

The image can also be installed using the Unix/Linux dd command.

Needed:

  • A computer with at least 5 GB of free disk space, running some form of Unix or Linux.
  • An SD or SDHC card, with a capacity of 4GB or more. (Good-quality class 4 cards usually work well faster is advised).
  • An SD/SDHC card writer, either built in to the computer or connected to a USB port.
  • An Internet connection.


Important.png Danger of Data Loss / System Damage!
The selected device will be overwritten.
If you select the wrong device, you may lose data. Exercise extreme caution when using dd.


See this section on how to download and create your SDHC card: http://fedoraproject.org/wiki/Architectures/ARM/F21/Installation#Manual

Also perform the step writing u-boot to the media. Follow the Banana Pi instructions

Extend the root filesystem

This assumes your card is /dev/sdd

  1. fdisk /dev/sdd
  2. delete partition 3, create a new primary partition 3 starting at the same place with maximum size; write results to disk
  3. e2fsck -f /dev/sdd3
  4. resize2fs /dev/sdd3

Boot into the fedora image

  1. Put the sd card in your orange pi.
  2. connect your serial cable. See http://www.orangepi.org/Docs/LogintotheOrangePi.html#Using_TTL_serial_port for details
  3. start a console to connect to your board. I use minicom. 115200 n-8-1. For me it is /dev/ttyUSB0
  4. power the board and configure your fedora install


Install Amahi 7 core platform

  1. login as root.
    1. enter the root password (not the one from the first user)
  2. yum update (this will take a while)
  3. yum -y install tar koji net-tools
  4. yum -y install make git mysql-devel sqlite-devel mysql-server gcc-c++ tar rpm-build
  5. yum -y install ruby ruby-devel libxml2-devel libxslt-devel which patch rubygem-bundler
  6. exit the root user and use a regular user.
  7. we suggest you create a new folder to put the amahi development code.

Building hda-ctl

  1. git clone https://github.com/amahi/hda-ctl.git
  2. cd hda-ctl
  3. git checkout fedora-21
  4. make rpm
  5. cd ..

Building hda-platform

  1. git clone https://github.com/amahi/hda-platform.git
  2. cd hda-platform
  3. git checkout fedora-21
  4. git clone https://github.com/amahi/platform.git
  5. rmdir platform;mv platform html
  6. cd html
  7. git checkout fedora-21
  8. edit Gemfile; comment out the line gem 'scrypt'
  9. edit Gemfile.lock
    1. remove the line containing scrypt and the two lines below (ffi-compiler and rake)
    2. change the line
    3. libv8 (~> 3.16.14.0)
    4. into
    5. libv8 (~> 3.16.14.7)
    6. (so change 0 to 7)
    7. There is a second place where you need to make the same change but this time from 3.16.14.3 to 3.16.14.7
  10. cd ..
  11. make rpm
  12. if this fails you may need to re-edit Gemfile.lock and try 'make rpm' again
  13. have patience. On a fast (x633) SDHC card this took 1 hr 20 minutes. With a slower card it will take longer. If you decided to go for an install on a SATA disk or a fast USB hard disk it may be faster.

Installing the image

  1. Prepare another micro SD card (or if you don't mind a polluted system use your build card) and boot and configure it.
  2. copy the two rpm's over that you created before (for hda-ctl and hda-platform (see the release directories).
  3. install these with yum install
  4. intall your hda using
    1. hda-install your-install-code
    2. where your-install-code is the code you obtain from www.amahi;org

Testing your work

After installing you need to reboot, then log in as root and do the following

  1. service firewalld stop

To stop the firewall daemon.

After that you can remotely access your hda through it's ip address or through http://hda if your test system uses your hda as DNS server.

You may also be able to install PhpSysInfo and WikkaWiki apps.