Difference between revisions of "Odroid"
m (→How to compile Qt5) |
m (→How to compile Qt5) |
||
(23 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | = Odroid Wiki = | ||
+ | |||
+ | [http://odroid.us/mediawiki/index.php?title=Main_Page#Tutorials Tutorials about kernel rebuild and step-by-step Ubuntu SD Card Setup] | ||
+ | |||
+ | = How to install on U2 a custom built stable kernel = | ||
+ | |||
+ | Alas till today (2013, Jan 7) the official images for X2 and U2, as found on the HardKernel site, suffer from a fatal flaw that locks the whole system under heavy ethernet load. | ||
+ | |||
+ | Several users signaled the issue ( [http://odroid.foros-phpbb.com/t2086-u2-running-ubuntu-last-image-freezes-repeatedly-under-heavy-load see this thread] ). | ||
+ | |||
+ | The Hardkernel guys are actively investigating the problem; in the meanwhile a forum user (zehome) developed a patch of kernel config and provided on his web site a package for a new kernel that fixes the above problem. | ||
+ | |||
+ | The install procedure is as follows: | ||
+ | |||
+ | cd | ||
+ | wget http://odroid.zehome.com/odroidu2_ed_kernel_rel3.tar.gz | ||
+ | tar xzf odroidu2_ed_kernel_rel3.tar.gz | ||
+ | cd odroidu2_ed_kernel_rel3 && ./install.sh | ||
+ | |||
+ | sha1sum: b3e86718f69b9801097819a7250876cd0053b9cd odroidu2_ed_kernel_rel3.tar.gz | ||
+ | md5sum: ba0088cb23e0be5a11012cd4acf3c844 odroidu2_ed_kernel_rel3.tar.gz | ||
+ | |||
= How to compile Qt5 = | = How to compile Qt5 = | ||
Line 4: | Line 26: | ||
Moreover, you have to install the mesa packages: | Moreover, you have to install the mesa packages: | ||
− | + | sudo apt-get install mesa-utils mesa-common-dev libgl1-mesa-dev x11proto-xext-dev libxrender-dev | |
− | sudo apt-get install mesa-utils mesa-common-dev libgl1-mesa-dev x11proto-xext-dev libxrender-dev | + | |
− | + | ||
missing this step, the build will fail on unknown OpenGL symbols, '''even if the OpenGL build has been explicitly disabled'''. | missing this step, the build will fail on unknown OpenGL symbols, '''even if the OpenGL build has been explicitly disabled'''. | ||
+ | |||
+ | Append to ~/.bashrc the following lines: | ||
+ | |||
+ | export CPPFLAGS='-O2 -fPIC' | ||
+ | export CXXFLAGS='-O2 -fPIC' | ||
+ | export CFLAGS='-O2 -fPIC' | ||
+ | |||
+ | [https://bugs.launchpad.net/gcc-linaro/+bug/924726 See the bug #924726] | ||
Clone the base repository: | Clone the base repository: | ||
− | + | cd | |
− | cd | + | git clone git://code.qt.io/qt/qt5.git |
− | git clone git:// | + | |
− | + | ||
this is only a template repository, it is almost empty, we need to download the whole code using the initialization script | this is only a template repository, it is almost empty, we need to download the whole code using the initialization script | ||
− | + | cd qt5 | |
− | cd qt5 | + | perl init-repository |
− | perl init-repository | + | |
− | + | ||
Next we have to configure, avoiding to compile examples and test programs, in order to shorten the build time: | Next we have to configure, avoiding to compile examples and test programs, in order to shorten the build time: | ||
− | + | ./configure -developer-build -opensource -nomake examples -nomake tests -no-pch -qt-xcb | |
− | ./configure -developer-build -opensource -nomake examples -nomake tests -no-pch -qt-xcb | + | '''make -j8''' |
− | make -j8 | + | |
− | + | ||
If the build ends successfully, there is no need to install the package, it is enough use includes and libraries as found in ~/qt5/qtbase directory. | If the build ends successfully, there is no need to install the package, it is enough use includes and libraries as found in ~/qt5/qtbase directory. | ||
− | + | export PATH=~/qt5/qtbase/bin:$PATH | |
− | export PATH=~/qt5/qtbase/bin:$PATH | + | |
− | + | ||
== Reference == | == Reference == | ||
[http://qt-project.org/wiki/Building_Qt_5_from_Git Building Qt 5 from Git on Qt Project web site] | [http://qt-project.org/wiki/Building_Qt_5_from_Git Building Qt 5 from Git on Qt Project web site] | ||
+ | |||
+ | = Forcing all CPU's active = | ||
+ | |||
+ | echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor | ||
+ | |||
+ | |||
+ | = HardKernel documentation on ODROID X and Q = | ||
+ | |||
+ | [http://dev.odroid.com/projects/odroid-xq/ Can be found here.] | ||
+ | |||
+ | = A procedure for newbies to build their own Odroid system or to download ready to work images for -X or -U2 = | ||
+ | |||
+ | [http://www.lbp.fr/ham/Odroid-x/ODROID-U2_install-2.txt / See my notes on how to build here.] | ||
+ | |||
+ | [http://www.lbp.fr/ham/Odroid-x/note-odroid-x-v_ehp.txt / See my notes on how to run an already built image here.] | ||
+ | |||
+ | [http://www.lbp.fr/ham/Odroid-x/odroid-X_image_v4-std_15GB.img.tar.gz / Download the image file for the -X or -X2 card] | ||
+ | |||
+ | [http://www.lbp.fr/ham/Odroid-x/odroid-U2_image_v2-std_15GB.img.tar.gz / Download the image file for the -U2 card] | ||
+ | |||
+ | [http://www.lbp.fr/ham/remote.html#sdcard/ See my complete page here.] | ||
+ | =Odroid C1 ghpsdr3-alex Headless Server= | ||
+ | The [http://odroid.com/dokuwiki/doku.php?id=en:odroid-c1 Odroid C1] is powerful enough to run four instances of dspserver and an hpsdr-server to be a server for Hermes or Hermes-Lite, and probably for HiQSDR and other SDR units not requiring a sound card. In the notes below I will try to outline how I was able to get this going. I first purchased an Odroid C1 and 16 GB microSD card. Smaller cards might work, but I wanted one that would do at least 10 MB/s, and mine tested to that number. You also need a 5V 1A power supply, and I got mine from the local church used stuff recycling center. The connector is the same as was used on some older cell phones, coaxial, with an inner diameter of 0.8mm, and an outer diameter of 2.5mm. Then using my Ubuntu laptop, I downloaded the Ubuntu 14.04.1 [http://odroid.com/dokuwiki/doku.php?id=en:c1_release_linux_ubuntu Odroid C1 image]. The [http://odroid.com/dokuwiki/doku.php?id=en:odroid-c1 Odroid C1 Wiki] was very helpful, and everything there should be read. At first I tried to install the .xz file on the microSD card using the GUI, gnome-disk-utility 3.10.0 (disks). That worked for the Android image, but not for the Ubuntu image. I finally found the problem by explicitly following the [http://odroid.com/dokuwiki/doku.php?id=en:odroid_flashing_tools instructions to use unxz and dd.] Then I was able to plug the microSD card into the Odroid C1 and plug it into an Ethernet cable connected to my router, and into power. The red light came on and the blue light blinked a few times and then turned off. This is actually a bug, as with the newer kernel the blue LED when booted goes blink-blink blink-blink .... I'm sure the next update will take care of this. Then from my Ubuntu laptop, I logged into my router and looked at the DHCP leases, and found odroid on the list. That told me the IP address. I found I could ssh to odroid.local or that IP address. | ||
+ | ssh odroid@odroid.local | ||
+ | The user is odroid and the password is odroid. Then I followed the instructions to resize the [http://forum.odroid.com/viewtopic.php?f=111&t=7611 microSD card to use the whole card, and to update the kernel]. The command for that was: | ||
+ | /usr/local/bin/root-utility.sh | ||
+ | I also used that utility to turn off X, and then to install ghpsdr3-alex, I followed the [[Ubuntu14 instructions]], but didn't install any of the Qt things, because I don't need or want a GUI or QtRadio, because my server is headless. After | ||
+ | autoreconf -i && ./configure && make -j4 | ||
+ | which fails because there is no Qt, I changed directory to each of the following and did a | ||
+ | make && sudo make install | ||
+ | in the following order: ghpsdr3-alex/trunk/src/Dttsp, ghpsdr3-alex/trunk/src/server and ghpsdr3-alex/trunk/src/dspserver. Then I was able to start hpsdr-server and dspserver. | ||
+ | |||
+ | I also changed the username using usermod and a few other things, but that is the basic outline. |
Latest revision as of 12:11, 26 April 2016
Contents
- 1 Odroid Wiki
- 2 How to install on U2 a custom built stable kernel
- 3 How to compile Qt5
- 4 Forcing all CPU's active
- 5 HardKernel documentation on ODROID X and Q
- 6 A procedure for newbies to build their own Odroid system or to download ready to work images for -X or -U2
- 7 Odroid C1 ghpsdr3-alex Headless Server
Odroid Wiki
Tutorials about kernel rebuild and step-by-step Ubuntu SD Card Setup
How to install on U2 a custom built stable kernel
Alas till today (2013, Jan 7) the official images for X2 and U2, as found on the HardKernel site, suffer from a fatal flaw that locks the whole system under heavy ethernet load.
Several users signaled the issue ( see this thread ).
The Hardkernel guys are actively investigating the problem; in the meanwhile a forum user (zehome) developed a patch of kernel config and provided on his web site a package for a new kernel that fixes the above problem.
The install procedure is as follows:
cd wget http://odroid.zehome.com/odroidu2_ed_kernel_rel3.tar.gz tar xzf odroidu2_ed_kernel_rel3.tar.gz cd odroidu2_ed_kernel_rel3 && ./install.sh
sha1sum: b3e86718f69b9801097819a7250876cd0053b9cd odroidu2_ed_kernel_rel3.tar.gz md5sum: ba0088cb23e0be5a11012cd4acf3c844 odroidu2_ed_kernel_rel3.tar.gz
How to compile Qt5
In order to compile Qt5, is mandatory to start from a clean system, especially if you are using a 8 GB SD card. Moreover, you have to install the mesa packages:
sudo apt-get install mesa-utils mesa-common-dev libgl1-mesa-dev x11proto-xext-dev libxrender-dev
missing this step, the build will fail on unknown OpenGL symbols, even if the OpenGL build has been explicitly disabled.
Append to ~/.bashrc the following lines:
export CPPFLAGS='-O2 -fPIC' export CXXFLAGS='-O2 -fPIC' export CFLAGS='-O2 -fPIC'
Clone the base repository:
cd git clone git://code.qt.io/qt/qt5.git
this is only a template repository, it is almost empty, we need to download the whole code using the initialization script
cd qt5 perl init-repository
Next we have to configure, avoiding to compile examples and test programs, in order to shorten the build time:
./configure -developer-build -opensource -nomake examples -nomake tests -no-pch -qt-xcb make -j8
If the build ends successfully, there is no need to install the package, it is enough use includes and libraries as found in ~/qt5/qtbase directory.
export PATH=~/qt5/qtbase/bin:$PATH
Reference
Building Qt 5 from Git on Qt Project web site
Forcing all CPU's active
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
HardKernel documentation on ODROID X and Q
A procedure for newbies to build their own Odroid system or to download ready to work images for -X or -U2
/ See my notes on how to build here.
/ See my notes on how to run an already built image here.
/ Download the image file for the -X or -X2 card
/ Download the image file for the -U2 card
Odroid C1 ghpsdr3-alex Headless Server
The Odroid C1 is powerful enough to run four instances of dspserver and an hpsdr-server to be a server for Hermes or Hermes-Lite, and probably for HiQSDR and other SDR units not requiring a sound card. In the notes below I will try to outline how I was able to get this going. I first purchased an Odroid C1 and 16 GB microSD card. Smaller cards might work, but I wanted one that would do at least 10 MB/s, and mine tested to that number. You also need a 5V 1A power supply, and I got mine from the local church used stuff recycling center. The connector is the same as was used on some older cell phones, coaxial, with an inner diameter of 0.8mm, and an outer diameter of 2.5mm. Then using my Ubuntu laptop, I downloaded the Ubuntu 14.04.1 Odroid C1 image. The Odroid C1 Wiki was very helpful, and everything there should be read. At first I tried to install the .xz file on the microSD card using the GUI, gnome-disk-utility 3.10.0 (disks). That worked for the Android image, but not for the Ubuntu image. I finally found the problem by explicitly following the instructions to use unxz and dd. Then I was able to plug the microSD card into the Odroid C1 and plug it into an Ethernet cable connected to my router, and into power. The red light came on and the blue light blinked a few times and then turned off. This is actually a bug, as with the newer kernel the blue LED when booted goes blink-blink blink-blink .... I'm sure the next update will take care of this. Then from my Ubuntu laptop, I logged into my router and looked at the DHCP leases, and found odroid on the list. That told me the IP address. I found I could ssh to odroid.local or that IP address.
ssh odroid@odroid.local
The user is odroid and the password is odroid. Then I followed the instructions to resize the microSD card to use the whole card, and to update the kernel. The command for that was:
/usr/local/bin/root-utility.sh
I also used that utility to turn off X, and then to install ghpsdr3-alex, I followed the Ubuntu14 instructions, but didn't install any of the Qt things, because I don't need or want a GUI or QtRadio, because my server is headless. After
autoreconf -i && ./configure && make -j4
which fails because there is no Qt, I changed directory to each of the following and did a
make && sudo make install
in the following order: ghpsdr3-alex/trunk/src/Dttsp, ghpsdr3-alex/trunk/src/server and ghpsdr3-alex/trunk/src/dspserver. Then I was able to start hpsdr-server and dspserver.
I also changed the username using usermod and a few other things, but that is the basic outline.