Labels

Friday 9 January 2015

Which are useful for linux after instaling in system.

1 – Expand the Software Repository List
First of all, lets make Ubuntu “see” more packages. Go to the terminal and edit your sources.list with :
sudo gedit /etc/apt/sources.list
Here is the content of my sources.list which I think is quite complete to have all the necessary applications you could ever need. So delete the whole content of your sources list and replace it with the content of mine
Save it. Now import the necessary repositories keys to avoid “apt-get” crying about some missing keys, go to the terminal and type:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com DCF9F87B6DFBCBAE F9A2F76A9D1A0061 A040830F7FAC5991 2EBC26B60C5A2783
Get your system up to date with :
sudo apt-get update && sudo apt-get dist-upgrade
Now all your programs will run on the last version.
2 – Anti-Virus
Windows equivalent : AVG AntiVirus, NAV, TrendMicro, F-Prot, Kaspersky, …
Ubuntu equivalent : ClamAV, Avast
ClamAV
sudo apt-get install clamav clamtk
Access it through System Tools → Virus Scanner .
Avast
wget http://files.avast.com/files/linux/avast4workstation_1.3.0-2_i386.deb && sudo dpkg -i avast4workstation_1.3.0-2_i386.deb
Access it through Accessories → avast! Antivirus .
3 – Essential tools for compiling from sources
sudo apt-get install build-essential checkinstall cdbs devscripts dh-make fakeroot libxml-parser-perl check avahi-daemon
4 – Java runtime environment
Java is a very important thing to install, now that many programs like Azureus need it to run. So type:
sudo apt-get install sun-java6-jre sun-java6-plugin equivs
6 – Multimedia
Windows equivalent : windows media player, real player, vlc, mplayer
Ubuntu equivalent : vlc, mplayer, helix player
To have Ubuntu playing all kinds of stuff, you need to install many codecs. So on the Terminal, type:
* Installing vlc and mplayer (plays almost everything):
sudo apt-get install vlc mplayer
* Common packs
sudo apt-get install libxine1-ffmpeg gxine mencoder mpeg2dec vorbis-tools id3v2 mpg321 mpg123 libflac++6 ffmpeg libmp4v2-0 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 libjpeg-progs libquicktime1 flac faac faad sox ffmpeg2theora libmpeg2-4 uudeview flac libmpeg3-1 mpeg3-utils mpegdemux liba52-0.7.4-dev
* Gstreammer 0.10
sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-fluendo-mp3 gstreamer0.10-gnonlin gstreamer0.10-pitfdll gstreamer0.10-sdl gstreamer0.10-plugins-bad-multiverse gstreamer0.10-schroedinger gstreamer0.10-plugins-ugly-multiverse totem-gstreamer
* More programs
sudo apt-get install gstreamer-dbus-media-service gstreamer-tools ubuntu-restricted-extras
* Enable dvd support
sudo apt-get install libdvdread4 && sudo /usr/share/doc/libdvdread4/./install-css.sh
* Flash
sudo apt-get install gsfonts gsfonts-x11 flashplugin-nonfree
7. Tweak your eyecandy
Ubuntu 10.04 comes with compiz fusion effects OOTB but doesn’t offer a way to customize them.
In a terminal copy/paste this:
sudo apt-get install simple-ccsm
Now navigate to System → Preferences → Simple CompizConfig Settings Manager .
8 – Missing Windows software?? Run Windows softwares in Linux!!!
Run Windows Applications such as 7zip, Google Sketchup, AutoCAD, Dreamwaver, Flash MX, Fireworks MX, IE6, IE7, Safari, Itunes, Windows Media Player and many more…
Play Windows Games in Linux like Age Of Empires, Call Of Duty, Diablo, Fear, Fallout, Far Cry, Grand Theft Auto, Half Life, Halo, Hitman, Max Payne, Need For Speed, Prince Of Persia, Sim City Star Wars, The Simsworld of warcraft , Tomb Raider, Warcraft, World Of Warcraft, Counterstrike and many other can be played.
Install Playonlinux. It’s based on wine. Wine is a compatibility layer for running Windows programs in Linux.
sudo apt-get install wine playonlinux
9 – Clipboard Management
By Default in ubuntu when u copy something from an application and closes the application u will not be able to access it from the clipboard. And also when u copy severals text in serial u only have the last on available to you in the clipboard. To solve that install either of the following but Glipper is better because it supports plugins.
Glipper
sudo apt-get install glipper
Then right click ur panel → Add to Panel then drag Clipboard Manager to ur panel
Parcellite
sudo apt-get install parcellite
10 – Archiver/ Packing software
Windows equivalent : winrar, zip, 7zip
Ubuntu equivalent : tar, unrar, p7zip, arj, unace
It’s bad when you don’t have Internet on your computer/notebook, but you have to pack/unpack something but the file format isn’t recognized by the system. To prevent from this bad situation, you can install a bunch of packing software by typing this on the terminal:
sudo apt-get install unace rar unrar zip unzip p7zip-full p7zip-rar sharutils uudeview mpack lha arj cabextract file-roller
11 – Graphical web browser
Windows equivalent : Internet explorer, firefox, opera
Ubuntu equivalent : Firefox, opera, chromium
Opera
sudo apt-get install opera
Firefox (installed by default intrepid)
sudo apt-get install firefox
Chromium (open source equivalent of Google Chrome)
sudo apt-get install chromium-browser chromium-browser-l10n
12 – Download Manager
Windows equivalent : Free download manager
Ubuntu equivalent : Multiget
MultiGet is a http/ftp downloader with a nice GUI for linux desktop users. It can run on almost all desktops without any configuration. It has many powerful functions comparing to others.
sudo apt-get install multiget
Access it through Applications → Internet → MultiGet .
13 – Graphical Email client
Windows equivalent : Outlook
Ubuntu equivalent : Evolution, Thunderbird
Evolution (installed by default in maverick)
sudo apt-get install evolution evolution-mapi
Access it through Applications → Internet → Evolution Mail .
Thunderbird
sudo apt-get install thunderbird
Access it through Applications → Internet → Mozilla Thunderbird Mail/News .
14 – Instant Messanging protocal clients
Windows equivalent : MSN messenger, Yahoo messenger, QQ, AIM, Gtalk, ICQ,IRC
Ubuntu equivalent : Empathy, Pidgin, emesene
Empathy IM Client (installed by default)
Add the related launchpad repository :
sudo add-apt-repository ppa:telepathy/ppa && sudo apt-get update
Then install it by running the following :
sudo apt-get install empathy telepathy-mission-control-5 telepathy-gabble telepathy-butterfly telepathy-haze telepathy-idle telepathy-salut telepathy-sofiasip libtelepathy-farsight0 python-tpfarsight galago-eds-feed python-galago python-galago-gtk msn-pecan
Access it through Applications → Internet → Empathy IM Client .
Pidgin
Pidgin is an easy to use and free chat client used by millions. Connect to AIM, MSN, Yahoo, and more chat networks all at once. Supported chat networks: AIM, Bonjour, Gadu-Gadu, Google Talk, Groupwise, ICQ, IRC, MSN, MySpaceIM, QQ, SILC, SIMPLE, Sametime, XMPP, Yahoo!, Zephyr
Add the launchpad repository :
sudo add-apt-repository ppa:pidgin-developers/ppa && sudo apt-get update
Then install it :
sudo apt-get install pidgin pidgin-data pidgin-lastfm pidgin-guifications msn-pecan pidgin-musictracker pidgin-plugin-pack pidgin-themes
Access it through Applications → Internet → Pidgin Internet Messenger .
Emesene only for MSN Messenger.
Add the launchpad repository :
sudo add-apt-repository ppa:bjfs/ppa && sudo apt-get update
Then install it :
sudo apt-get install emesene
Access it through Applications → Internet → Emesene .
15 – VOIP
Windows equivalent : skype
Ubuntu equivalent : skype
Skype
sudo apt-get install skype
Access it through Applications → Internet → Skype.
16 – Viewing PDF files
Windows equivalent : Adobe Reader
Ubuntu equivalent : Adobe Reader
Adobe Reader
sudo apt-get install acroread
Access it through Applications → Office → Adobe Reader.
17– Adobe Air
wget http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin
chmod +x ./AdobeAIRInstaller.bin

sudo ./AdobeAIRInstaller.bin
Access it through Applications → Accessories → Adobe Air Application Installer.
18 – Music / MP3 / OGG Players
Windows equivalent : iTunes, Winamp
Ubuntu equivalent : Rhythmbox, Banshee, Amarok
Rhythmbox
sudo apt-get install rhythmbox
Access it through Applications → Sound & Video → Rhythmbox Music Player.
Banshee
sudo apt-get install banshee banshee-extension-ubuntuonemusicstore banshee-extension-appindicator banshee-extension-lyrics banshee-extension-mirage
Access it through Applications → Sound & Video → Banshee Media Player.
Amarok
sudo apt-get install amarok amarok-common
Access it through Applications → Sound & Video → Amarok.
19– Hard Disk Partitions Manager
Windows equivalent : Symanted Partition Magic
Ubuntu equivalent : GParted
GParted
sudo apt-get install gparted ntfsprogs menu ntfs-config
Access it through System → Administration → Partition Editor.
20 – Vector Graphics Editor
Windows equivalent : Adobe Illustrator
Ubuntu equivalent : Inkscape
Inkscape
sudo apt-get install inkscape
Access it through Applications → Graphics → Inkscape Vector Graphics Editor.
21 – Image Editor
Windows equivalent : Adobe Photoshop, Paint.Net
Ubuntu equivalent : GIMP
GIMP
Add the launchpad repository :
sudo add-apt-repository ppa:matthaeus123/mrw-gimp-svn && sudo apt-get update
Then install it with the following command :
sudo apt-get install gimp gimp-data gimp-plugin-registry gimp-data-extras
Access it through Applications → Graphics → GIMP Image Editor.
PINTA
Add the launchpad repository :
sudo add-apt-repository ppa:moonlight-team/pinta && sudo apt-get update
Then install it with the following command :
sudo apt-get install pinta
Access it through Applications → Graphics → Pinta Image Editor.
22 – 3D Graphics Applications
Windows equivalent : 3D Studio MAX
Ubuntu equivalent : Blender
Blender
sudo apt-get install blender
Access it through Applications → Graphics → Blender (windowed).
23 – Simple Yet Advanced Text Editor
Windows equivalent : Notepad ++
Ubuntu equivalent : GEdit
GEdit
sudo apt-get install gedit gedit-plugins
Access it through Applications → Accessories → Text Editor.
24 – Office Applications
Windows equivalent : Microsoft Office
Ubuntu equivalent : OpenOffice
OpenOffice
sudo apt-get install openoffice.org
Access it through Applications → Office
25 – Microsoft Visio
Windows equivalent : Microsoft Visio
Ubuntu equivalent : Dia
Dia
sudo apt-get install dia
Access it through Applications → Graphics → Dia Diagram Editor
26 – Microsoft Project
Windows equivalent : Microsoft Project
Ubuntu equivalent : OpenProj
OpenProj
wget http://nchc.dl.sourceforge.net/sourceforge/openproj/openproj_1.4-2.deb && sudo dpkg -i openproj_1.4-2.deb
Access it through Applications → Office → OpenProj
27 – Development IDE
Windows equivalent : Dreamweaver
Ubuntu equivalent : Quanta, Kompozer, NetBeans
Quanta
sudo apt-get install quanta
Access it through Applications → Programming → Quanta Plus
Komposer
sudo apt-get install kompozer nvu
Access it through Applications → Internet → Kompozer
NetBeans
sudo apt-get install netbeans
Access it through Applications → Programming → NetBeans IDE
28 – Source Control Management
Windows equivalent : TortoiseSVN
Ubuntu equivalent : RabbitVCS
RabbitVCS
Add the launchpad repository :
sudo add-apt-repository ppa:rabbitvcs/ppa && sudo apt-get update
Then install it :
sudo apt-get install rabbitvcs-nautilus
killall nautilus
Right Click on any folder or file and access the RabbitVCS submenu
29 – Graphical FTP clients
Windows equivalent : CuteFTP, SmartFTP
Ubuntu equivalent : FileZilla
FileZilla
This is great FTP program, very complete, in my opinion, the best one for linux.
On the terminal type:
sudo apt-get install filezilla filezilla-common
Access it through Applications → Internet → FileZilla FTP Client.
30 – P2P Clients / Servers, File Sharing
Windows equivalent : utorrent, azureus, emule
Ubuntu equivalent : Deluge, azureus, amule
Bittorent clients
Deluge (written in python)
Add the launchpad repository :
sudo add-apt-repository ppa:deluge-team/ppa && sudo apt-get update
Then install it :
sudo apt-get install deluge-torrent
Access it through Applications → Internet → Deluge Torrent.
Azureus: Uses Java to run, very complete but a bit heavy
sudo apt-get install azureus
Access it through Applications → Internet → Azureus.
Emule Donkey Clients
Amule
Add the launchpad repository :
sudo add-apt-repository ppa:happyaron/amule-dlp && sudo apt-get update
Then install it with the following command :
sudo apt-get install amule-dlp amule-dlp-gnome-support amule-dlp-utils-gui amule-dlp-daemon
Access it through Applications → Internet → aMule.
31 – Programs for CD burning with GUI
Windows equivalent : Nero, Roxio Easy CD Creator
Ubuntu equivalent : K3b, Brasero
K3b
Nero is available for linux,but its not free.A trial is available for 1 month usage and later it asks or activation code.But K3B is as good as Nero.Have a good feature set as Nero.
sudo apt-get install k3b k3b-data libk3b6
Access it through Applications → Sound & Video → K3B.
Brasero (installed by default in Maverick)
sudo apt-get install brasero
Access it through Applications → Sound & Video → Brasero Disc Burning .
33 – Install Vista like gadgets.
Windows equivalent : Vista Sidebar
Ubuntu equivalent : google-gadgets
Google gadgets
sudo apt-get install google-gadgets-gtk
This will complete the installation.
Now press Alt+F2, and type “ggl-gtk” to start them. You should see a small icon show up in your system tray, and a sidebar. Right click on any of them and select ‘Add Gadgets’ to show a menu. If you’d like to have Google Gadgets start automatically, go to System – Preferences – Session, click ‘Add’, paste ‘Google Gadgets’ for the name and ‘ggl-gtk’ for the command. Click OK and Close, and you’re good to go.
34 – Google Desktop
Google Desktop allows one to full text search of a user’s e-mail, computer files, music, photos, chat, and Web pages viewed,OpenOffice documents , PDF files and more .
Now similar tools already existed on Linux like beagle (supported by novell ) , meta tracker etc . However Google Desktop search is not based on any of these tools and uses its proprietary algorithms to search for files on the computer ,also being 1.0 release and more stable then these products it could be preferred over tools like beagle .
To install Google Desktop Search type the following command in the terminal window : -
sudo apt-get install google-desktop-linux
Access it through Applications → Google Desktop → Google Desktop
Now after choosing appropriate option through Applications → Google Desktop → Google Desktop Preferences, you would find Google Desktop icon in the bar at the top of the screen , now it would automatically scan and index files on computer and store it in local database which could be searched using web browser .
35 – Photo Management
Google Picasa
Google Picasa is an extremely professional good looking photo management application available on Windows ,Linux and Mac OS. Now Google Picasa has a number of features that many photo management software on Linux dont have further Google Picasa looks very user friendly as compared to similar open source application available on linux . Now Google Picasa for Linux is not a native linux application but runs on Linux thru application layer called wine which allows many windows application to run flawlessly on Linux.
Now to install Google – Picasa type the following command in the terminal window
wget http://dl.google.com/linux/deb/pool/non-free/p/picasa/picasa_3.0-current_i386.deb && sudo dpkg -i picasa_3.0-current_i386.deb
Access it through Applications → Graphics → Picasa → Picasa
36 – Map Viewing and Management
Google Earth
To install Google Earth type the following command in the Terminal Window.
sudo apt-get install googleearth
After downloading is over you will get a screen like this press ¨Yes¨ to accept the license agreement and complete software installation.
Now you can launch Google Earth from Application → Internet → Google Earth
37 – Gmail Notification
Checkgmail
If you would like to get notified when you have a new mail in your google mail account, checkgmail is for you. To install Checkgmail type the following command in the Terminal Window.
sudo apt-get install checkgmail
Now you can launch it from Application → Internet → CheckGmail
38 – Configure Firewall
If you are concern about your security, then it is pertinent that you activate the firewall and prevent any unauthorized access to your computer.
UFW is installed by default, but if you need a graphical interface, install GUFW.
sudo apt-get install gufw
39– Gnome Do
Gnome Do is a small application that allows you to search and do things faster and more efficiently in your Ubuntu machine. It is similar to QuickSilver in Mac and Launchy in Windows. For those who have not tried Gnome Do before, it might take some time for you to get used to it. But once you’re hooked to it, there will be no turning back for you.Gnome Do also comes with a dock interface that you can use it like any other docks.
sudo apt-get install gnome-do
Now you can launch it from Application → Accessories → Gnome Do
40 – Ubuntu Tweak
Ubuntu Tweak allows you to tweak your system settings, all in one place. You can install new applications, customize your desktop settings, configure your startup applications, changing the system filetype association and many more tweaks in this single application.
Add the launchpad repository :
sudo add-apt-repository ppa:ubuntu-tweak-testing/ppa && sudo apt-get update
Then install it with the following command :
sudo apt-get install ubuntu-tweak
Then access it through Applications → System Tools → Ubuntu Tweak
App Runner
App Runner is a small open source utility that makes it very easy to run any type of program/executable/script on any distro/OS that uses the nautilus file manager: Debian/Ubuntu/Super OS/Fedora/etc
wget http://hacktolive.org/files/app_runner/App_Runner_0.2.deb && sudo dpkg -i App_Runner_0.2.deb
Then right-click the file -> Scripts -> Run This App or Run This App (root)

How to install NGINX RTMP server in ubuntu

Installing Nginx and Nginx-RTMP

Install the tools required to compile Nginx and Nginx-RTMP from source.

sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
 
Make a working directory and switch to it.

mkdir ~/working
cd ~/working
 
Download the Nginx and Nginx-RTMP source.

wget http://nginx.org/download/nginx-1.7.5.tar.gz
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
 
Install the Unzip package.

sudo apt-get install unzip
 
Extract the Nginx and Nginx-RTMP source.

tar -zxvf nginx-1.7.5.tar.gz
unzip master.zip
 
Switch to the Nginx directory.

cd nginx-1.7.5
 
Add modules that Nginx will be compiled with. Nginx-RTMP is included.

./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master
 
Compile and install Nginx with Nginx-RTMP.

make
sudo make install
 
Install the Nginx init scripts.

sudo wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
sudo update-rc.d nginx defaults
 
Start and stop Nginx to generate configuration files.

sudo service nginx start
sudo service nginx stop

Installing FFmpeg

Add the FFmpeg PPA.

sudo apt-add-repository ppa:jon-severinsson/ffmpeg
 
Update the package lists.

sudo apt-get update
 
Install FFmpeg.

sudo apt-get install ffmpeg
Note: The apt-add-repository command may not be installed in some cases. To install it run sudo apt-get install software-properties-common.

Configuring Nginx-RTMP and FFmpeg

Open the Nginx configuration file.

sudo nano /usr/local/nginx/conf/nginx.conf
 
Append the following.

rtmp {
    server {
            listen 1935;
            chunk_size 4096;

            application live {
                    live on;
                    record off;
                    exec ffmpeg -i rtmp://localhost/live/$name -threads 1 -c:v libx264 -profile:v baseline -b:v 350K -s 640x360 -f flv -c:a aac -ac 1 -strict -2 -b:a 56k rtmp://localhost/live360p/$name;
            }
            application live360p {
                    live on;
                    record off;
        }
    }
}
After you've added the above, you can customize settings such a video bitrate, audio bitrate and resolution. These changes will only be applied to the lower quality stream. To add more qualities, copy and paste the exec ffmpeg line and change the settings. You'll also need to create a new application. You can do this by copying and pasting the live360 example that has been included. Don't forget to update the exec ffmpeg line with the address of the new application. You can do this by changing the final RTMP address in the exec ffmpeg line.
Note: Changing the value after -b:v will change the video bitrate. This is measured in kilobits per second. Changing the value after -b:a will change the audio bitrate. This is measured in kilobits per second. Changing the value after -s will change the resolution.
Save the file by pressing Control and X together. Restart Nginx.

sudo service nginx restart
Note: For best performance, each stream being converted should have its own CPU core. For example two qualities, 360P and 480P are being created from a 720P stream. A Vultr instance with at least two CPU cores should be used.

Security Note

If you're using a firewall, you'll need to make sure TCP 1935 is allowed.
The current configuartion allows anyone to stream to your server. We can fix this by only allowing certain IP addresses the publish permission. Open the Nginx configuration.

sudo nano /usr/local/nginx/conf/nginx.conf
 
Look for the following lines.

                live on;
                record off;
 
Add the following to each set of the above lines. Change 0.0.0.0 to your IP address.
                allow publish 127.0.0.1;
                allow publish 0.0.0.0;
                deny publish all;
 
The configuration should now look something like this.

rtmp {
    server {
            listen 1935;
            chunk_size 4096;

            application live {
                    live on;
                    record off;
                    allow publish 127.0.0.1;
                    allow publish 0.0.0.0;
                    deny publish all;
                    exec ffmpeg -i rtmp://localhost/live/$name -threads 1 -c:v libx264 -profile:v baseline -b:v 350K -s 640x360 -f flv -c:a aac -ac 1 -strict -2 -b:a 56k rtmp://localhost/live360p/$name;
            }
            application live360p {
                    live on;
                    record off;
                    allow publish 127.0.0.1;
                    allow publish 0.0.0.0;
                    deny publish all;
        }
    }
}
 
Save the file by pressing Control and X together. Restart Nginx.

sudo service nginx restart

Configuring Software to Work with Nginx-RTMP

Streaming applications typically have two fields for connection information. The first field is usually for the server information and the second field is usually for the stream name or key. The information that you should place into each field is listed. The stream name or key can be set to anything.

Field 1: rtmp://your.vultr.ip/live/
Field 2: stream-key-your-set
 
To view streams open the following links in a player supporting RTMP.

rtmp://your.vultr.ip/live/stream-key-you-set
rtmp://your.vultr.ip/live360p/stream-key-your-set
 
Setting up a player to display live video on a website is beyond the scope of this guide. Searching for the term 'RTMP web player' might assist you.

Brief introduction about I2C, SPI and UART

I2C / SPI / UART

I2C is a 2-wire (SCL and SDA) half-duplex serial bus. SPI is 4-wire (SCLK, MOSI, MISO, and SS) full duplex serial bus. UART is point t0 point full duplex communication interface.
  • UART data rate – 0.3 Kbps to 1 Mbps
  • I2C speeds – 100 kHz, 400 kHz, 3.4 MHz 
  • SPI – Tens of MHz: Suitable for higher speed applications
 UART is asynchronous interface (i.e. sender and receiver use different clock source and embed the sync/clock information into data stream; re-sync is usually done through start and stop bits) while I2C and SPI are synchronous interfaces (dedicated receive/transmit clock signal, master device usually outputs clock signal).

UART is mostly used in communication between external devices via cables to bridge larger distances. I2C and SPI are used to connect peripheral devices on same circuit board and are suitable for relatively short distances.

Multi-Master Systems: I2C interface has built in arbitration to detect multiple devices sending on bus at same time. SPI uses dedicated slave select pin to detect request of devices to become master. Multi-master in UART requires software protocol implementation to handle bus arbitration as not supported by hardware.

I2C is bit complex compared to SPI, and requires mechanism to address devices (7/10 bit addressing). In case of SPI dedicated chip select signal is required for each device and hence pins increases with device.

I2C is more sensitive to noise and hence lower data integrity. I2C is level triggered and samples data during the high or low phase of a bit, noise could flip bit. SPI is edge triggered and less sensitive to noise.

How to cross compile open ssl for ARM platform

Gather the Sources


Now that we have a workspace created and we are currently in the src directory we can begin bringing down the sources and extracting them.

openssl

$ wget ftp://ftp.openssl.org/source/openssl-1.0.1e.tar.gz
$ tar -pxzf openssl-1.0.1e.tar.gz
 
$ wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1e-fix_parallel_build-1.patch
 
$ wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1e-fix_pod_syntax-1.patch
 

Build Environment


To make things a little smoother let's setup some environment variables:

$ export INSTALLDIR=~/workbench/gcc-4.8.2/arm
$ export PATH=$INSTALLDIR/bin:$PATH
$ export TARGETMACH=arm-none-linux-gnueabi
$ export BUILDMACH=i686-pc-linux-gnu
$ export CROSS=arm-none-linux-gnueabi
$ export CC=${CROSS}-gcc
$ export LD=${CROSS}-ld
$ export AS=${CROSS}-as
$ export AR=${CROSS}-ar
 
NOTE: Depending on whether you are using a cross-compiler built from my other wikis you might need to change INSTALLDIR to point to your cross-compiler.

Build OpenSSL


$ cd openssl-1.0.1e/
$ patch -Np1 -i ../openssl-1.0.1e-fix_parallel_build-1.patch
$ patch -Np1 -i ../openssl-1.0.1e-fix_pod_syntax-1.patch
$ ./Configure -DOPENSSL_NO_HEARTBEATS --openssldir=/home/<your user>/workbench/openssl/final shared os/compiler:arm-none-linux-gnueabi-
$ make
$ make install
$ cd ../../final/lib/
$ $AR -x libcrypto.a
$ $CC -shared *.o -o libcrypto.so
$ rm *.o
$ $AR -x libssl.a
$ $CC -shared *.o -o libssl.so
$ rm *.o

Output


cd into the final directory and output its contents:
$ cd ../
$ ls
You should have the following directories and file:
  • bin
  • certs
  • include
  • lib
  • man
  • misc
  • private
  • openssl.cnf

Make sure the binaries are for ARM:
$ cd bin/
$ file openssl
bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
If you see something similar to above you're good to go ;-)

Lastly, move the contents of these directories, or the directories themselves if they do not already exist, to your custom Linux file system or dev board. Read on to build OpenSSL 1.0.1g.


OpenSSL 1.0.1g


Create a Workspace


I recommend creating a workspace under your /home/<your user>/ directory that is dedicated to this build. In a new terminal:
$ export OPENSSL_SRC=~/workbench/openssl-1.0.1g/src
$ mkdir -pv ~/workbench/openssl-1.0.1g
$ mkdir $OPENSSL_SRC
$ cd $OPENSSL_SRC

Gather the Sources


Now that we have a workspace created and we are currently in the src directory we can begin bringing down the sources and extracting them.

openssl-1.0.1g

$ wget ftp://ftp.openssl.org/source/openssl-1.0.1g.tar.gz
$ tar -pxzf openssl-1.0.1g.tar.gz
 
$ wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1g-fix_parallel_build-1.patch
 
$ wget http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-1.0.1g-fix_pod_syntax-1.patch

Build Environment


To make things a little smoother let's setup some environment variables:
$ export INSTALLDIR=~/workbench/gcc-4.8.2/arm
$ export PATH=$INSTALLDIR/bin:$PATH
$ export TARGETMACH=arm-none-linux-gnueabi
$ export BUILDMACH=i686-pc-linux-gnu
$ export CROSS=arm-none-linux-gnueabi
$ export CC=${CROSS}-gcc
$ export LD=${CROSS}-ld
$ export AS=${CROSS}-as
$ export AR=${CROSS}-ar
 
NOTE: Depending on whether you are using a cross-compiler built from my other wikis you might need to change INSTALLDIR to point to your cross-compiler.

Build OpenSSL 1.0.1g


$ cd openssl-1.0.1g/
$ patch -Np1 -i ../openssl-1.0.1g-fix_parallel_build-1.patch
$ patch -Np1 -i ../openssl-1.0.1g-fix_pod_syntax-1.patch
$ ./Configure --openssldir=/home/<your user>/workbench/openssl-1.0.1g/final shared os/compiler:arm-none-linux-gnueabi-
$ make
$ make install
$ cd ../../final/lib/
$ $AR -x libcrypto.a
$ $CC -shared *.o -o libcrypto.so
$ rm *.o
$ $AR -x libssl.a
$ $CC -shared *.o -o libssl.so
$ rm *.o

Output


cd into the final directory and output its contents:
$ cd ../
$ ls
You should have the following directories and file:
  • bin
  • certs
  • include
  • lib
  • man
  • misc
  • private
  • openssl.cnf

Make sure the binaries are for ARM:


$ cd bin/
$ file openssl
bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped

If you see something similar to above you're good to go ;-)