Documente Academic
Documente Profesional
Documente Cultură
Share Your
ED: Its great to hear from you. We will definitely cover the
topics suggested by you in one of our forthcoming issues. Keep
reading our magazine. And do feel free to get in touch with us if
you have any such valuable feedback.
Overseas subscriptions
Previously, I used to get the copies of LINUX For You/ Open
Source For You and Electronics For You from local book stores
but, lately, none of them carry these magazines any more. So
how can I get the copies of all these magazines in Malaysia, and
where can I get previous issues too?
Abdullah Abd. Hamid;
ab@sirim.my
ED: Thank you for reaching out to us. Currently, we do not have
any reseller or distributor in Malaysia for news stand sales, but you
can always subscribe to the print edition or the e-zine version of the
magazines. You can find the details of how to subscribe to the print
editions on www.pay.efyindia.com and for the e-zine version, please
go to www.ezines.efyindia.com
The Editor,
Open Source For You,
D-87/1, Okhla Industrial Area, Phase I,
New Delhi 110020, Phone: 011-26810601/02/03,
Fax: 011-26817563, Email: osfyedit@efy.in
8 | August 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
offe
rS
THE
monTH
2000
Rupees
Coupon
One
month
free
Hurry!till 31st
alid
r
e
Off vust 2014!
Aug
www.cloudoye.com
www.esds.co.in
35%
Get 10%
discount
Hurry!till 31st
alid
Offer vust 2014!
Aug
Get 25%
Pay Annually & get 12 Month Free
Services on Dedicated Server Hosting
Hurry!till 31st
alid
Offer vust 2014!
Aug
www.goforhosting.com
www.vectratech.in
www.space2host.com
Get
12 Months
Free
Off
PACKWEB
PACK WEB
HOSTING
ProX
Hurry!till 31st
alid
Offer vust 2014!
Aug
www.prox.packwebhosting.com
Email : sales-in@liferay.com
FOSSBYTES
Powered by www.efytimes.com
The CentOS Project has announced the general availability of CentOS 7, the first
release of the free Linux distro based on the source code for RedHat Enterprise
Linux (RHEL) 7. It is the first major release after the collaboration between the
CentOS Project and Red Hat. CentOS 7 is built from the freely available RHEL 7
source code tree. The features closely resemble that of Red Hats latest operating
system. Just like RHEL 7, it
is now powered by version
3.10.0 of the Linux kernel, with
a default file system. It is also
the first version to include a
management engine, systemd,
dynamic firewall system called the firewalld, and the boot loader, GRUB2.
The default Java Development Kit has also been upgraded to OpenJDK 7, and
the system now ships with open VMware tools and 3D graphics drivers, out-ofthe-box. Also, like RHEL 7, this is the version of CentOS that claims to offer an inplace upgrade path. Soon, users will be able to upgrade from CentOS 6.5 to CentOS
7 without reformatting their systems.
The CentOS team has launched a new build process, in which the entire
distro is built from code hosted at the CentOS Projects own Git repository.
Source code packages (SRPMs) are created as a side effect of the build cycle,
and will be hosted on the main CentOS download servers.
Disc images of CentOS 7, which include separate builds for the Gnome and KDE
desktops, a live CD image and a network-installable version, are also now available.
OSFYClassifieds
Classifieds for Linux & Open Source IT Training Institutes
IPSR Solutions Ltd.
WESTERN REGION
SOUTHERN REGION
*astTECS Academy
Courses Offered: Basic Asterisk Course,
Advanced Asterisk Course, Free PBX
Course, Vici Dial Administration Course
Advantage Pro
Courses Offered: RHCSS, RHCVA,
RHCE, PHP, Perl, Python, Ruby, Ajax,
A prominent player in Open Source
Technology
NORTHERN REGION
GRRASLinuxTrainingandDevelopmentCenter
Courses Offered: RHCE,RHCSS,RHCVA,
CCNA,PHP,ShellScripting(onlinetraining
isalsoavailable)
Address (HQ): GRRASLinuxTrainingand
DevelopmentCenter,219,HimmatNagar,
BehindKiranSweets,GopalpuraTurn,
TonkRoad,Jaipur,Rajasthan,India
Contact Person: Mr.AkhileshJain
Contact No.: +91-141-3136868/
+91-9983340133,9785598711,9887789124
Email: info@grras.com
Branch(es): Nagpur,Pune
Website(s): www.grras.org,www.grras.com
Duestor Technologies
Courses Offered: Solaris, AIX,
RHEL, HP UX, SAN Administration
(Netapp, EMC, HDS, HP),
Virtualisation(VMWare, Citrix, OVM),
Cloud Computing, Enterprise
Middleware.
Address (H.Q.): 2-88, 1st floor,
Sai Nagar Colony, Chaitanyapuri,
Hyderabad - 060
Contact Person: Mr. Amit
Contact Number(s): +91-9030450039,
+91-9030450397.
E-mail id(s): info@duestor.com
Websit(es): www.duestor.com
Eastern Region
Academy of Engineering and
Management (AEM)
Courses Offered: RHCE, RHCVA,
RHCSS,Clustering & Storage,
Advanced Linux, Shell
Scripting, CCNA, MCITP, A+, N+
Address (HQ): North Kolkata, 2/80
Dumdum Road, Near Dumdum
Metro Station, 1st & 2nd Floor,
Kolkata - 700074
Contact Person: Mr. Tuhin Sinha
Contact No.: +91-9830075018,
9830051236
Email: sinhatuhin1@gmail.com
Branch(es): North & South Kolkata
Website: www.aemk.org
FOSSBYTES
Expect Android Wear app
section along with Google Play
Service update
Description
Website:
http://www.gartner.com
CeBit
November 12-14, 2014;
BIEC, Bengaluru
Website:
http://www.cebit-india.com/
Hostingconindia
December 12-13, 2014;
NCPA, Jamshedji Bhabha
Theatre, Mumbai
Website:
http://www.hostingcon.com/
contact-us/
An all-new podcast app for Ubuntu was launched recently. This app, called
Vocal, has a great UI and design. Nathan Dyer, who is the developer of this
project, has released unstable beta builds of the app for Ubuntu 14.04 and 14.10,
for testing purposes.
Only next-gen easy-to-use desktops are capable of running the beta version
of Vocal. Installing beta versions of the app on Ubuntu is not as difficult as
installing them on KDE, GNOME or Unity, but users cant try the beta version of
Vocal without installing the unstable elementary desktop PPA. Vocal is an open
source app, and one can easily port it to mainstream Linux versions from Ubuntu.
However, Dyer suggests users wait until the first official beta version of the app for
easy-to-use desktops is available.
The official developers blog has a detailed report on the project.
FOSSBYTES
software packages, their updates and also provides the controls to administrators to
manually update a few packages if they want to. It has a roll-back feature in case
an update causes any malfunction in a machine. CoreUpdate can manage multiple
systems at a time.
CoreOS was designed to promote the use of open source OS kernel, which
is used in a lot of cloud based virtual
servers. The CoreOS consumes less
than half of instance as compared
to other Linux distribution services.
Applications of distributions run in
a virtualised container called Docker. They can start instantly. CoreOS was
launched in December last year. It uses two partitions, which help in easily
updating distributions. One partition contains the current OS, while the other
is used to store the updated OS. This smoothens out the entire process of
upgrading a package or an entire distribution. The service can be directly
installed and run in the system or via cloud services like Amazon, Google or
Rackspace. The venture capital firm, Kleiner Perkins Caulfield and Byers,
has invested over US$ 8 million in CoreOS. The company was also backed by
Sequoia Capital and Fuel Capital in the past.
FOSSBYTES
Microsoft to abandon
X-Series Android
smartphones too
that the companys streaming stick will come with open source technology, which will
help developers to develop HDTV streaming apps for smartphones.
Motorola is implementing an
alternative security system
for Moto X. It is frustrating to
remember difficult passwords
while simpler passwords are easy
to crack. To counter this, VivaLnk
has launched digital tattoos. This
tattoo will automatically unlock
the Moto X when applied to the
skin.
This technology is based
on Near Field Communication to connect with smartphones and authenticate
access. Motorola is working on optimising digital tattoos with Googles Advance
Technology and Projects.
The pricing is on the higher side but this is a great initiative in wearable
technology. Developing user friendly alternatives to the password and PIN number
has been a major focus of tech companies. Motorola had talked about this in the
introductory session of the D11 conference at California this May, when it discussed
the idea of passwords in pills or tattoos. The idea may seem like a gimmick, but you
never know when it will become commonly used. VivaLnk is working on making
this technology compatible with other smartphones too. It is considering entering
the domain of creating tattoos of different types and designs.
PHP recently pushed out new versions for its popular scripting language, which fix
many crucial bugs and, out of those, two are of OpenSSL. The flaws are not serious
like Heartbleed, which popped up a couple of months back. One flaw is directly
related to OpenSSL handling time stamps and the other is related to the same thing
in a different way. PHP 5.5.14 and 5.4.30 have fixed both flaws.
FOSSBYTES
Other bugs which were fixed were not security related but of a more
general type.
Looks like global search engine giant Google wants to leave no stone
unturned in its quest to make its ambitious Android One smartphone-forthe-masses project reach its vastly dispersed target audience in emerging
economies (including India). The buzz is that Google is planning to splurge
over a whopping Rs 1,000 milllion with its official partners on advertising
and marketing for the platform.
Even as Sundar Pichai, senior
VP at Google who is in charge
of Android, Chrome and Apps, is all set to launch the first batch of low
budget Android smartphones in India sometime in October this year, the
latest development shows how serious Google is about the project.
It was observed that Googles OEM partners were forced into launching a new
smartphone every nine months to stay ahead in the cut-throat competition. However,
thanks to Googles new Android hardware and software reference platform, its
partners will now be able to save money and get enough time to choose the right
components, before pushing their smartphones into the market. Android One will
also allow them to push updates to their Android devices, offering an optimised stock
Android experience. With the Android One platform falling into place, Google will be
able to ensure a minimum set of standards for Android-based smartphones.
www.OpenSourceForU.com | OPEN SOURCE For You | aUGUST 2014 | 19
FOSSBYTES
With the Android One platform, Google aims to reach the 5 billion
people across the world who still do not own a smartphone. According to
Pichai, less than 10 per cent of the worlds population owns smartphones
in emerging countries. The promise of a stock Android experience at
a low price point is what Android One aims to provide. Home-grown
manufacturers such as Micromax, Karbonn and Spice will create and sell
these Android One phones for which hardware reference points, software
and subsequent updates will be provided by Google. Even though the spec
sheet of Android One phones hasnt been officially released, Micromax is
already working on its next low budget phone, which many believe will
be an Android One device.
Its certainly not a case of an overnight conversion. The city of Munich began
to seek open source alternatives way
back in 2003.
With a population of about 1.5
million citizens and thousands of
employees, this German city took its
time to adopt open source. Tens of
thousands of government workstations
were to be considered for the change. Its
initial shopping list had suitably rigid
specifications, spanning everything from
avoiding vendor lock-in and receiving
regular hardware support updates, to
having access to an expansive range of
free applications.
In its first stage of migration, in 2006,
Debian was introduced across a small percentage of government workstations,
with the remaining Windows computers switching to OpenOffice.org, followed
by Firefox and Thunderbird.
Debian was substituted for a custom Ubuntu-based distribution named
LiMux in 2008, after the team handling the project realised Ubuntu was the
platform that could satisfy our requirements best.
In The News
Buyers Guide
HDDs vs SSDs
Portability
High speed
Buyers Guide
Durability
Power consumption
HyperX Fury
Buyers Guide
from Samsung
1200 SSD
from Seagate
It is designed for applications demanding the fast,
consistent performance and has dual port
12 GBps SAS
It comes with 800 GB capacity
Random read/write performance of up to 110K /40K IOPS
Sequential read/write performance from 500 MBps to
750 MBps
Developers
How To
This article provides an introduction to the Linux kernel, and demonstrates how
to write and compile a module.
Developers
How To
Installing CentOS
Installing Ubuntu
Our system is ready now. Let us write the first kernel module.
Open your favourite text editor and save the file as hello.c
with the following contents:
#include <linux/kernel.h>
#include <linux/module.h>
int init_module(void)
{
printk(KERN_INFO Hello, World !!!\n);
}
return 0;
void cleanup_module(void)
{
printk(KERN_INFO Exiting ...\n);
}
How To
Developers
MODULE_LICENSE(GPL);
MODULE_AUTHOR(Narendra Kangralkar.);
MODULE_DESCRIPTION(Hello world module.);
MODULE_VERSION(1.0);
MODULE_VERSION(1.0);
#include <linux/kernel.h>
#include <linux/module.h>
static int __init hello_init(void)
{
printk(KERN_INFO Hello, World !!!\n);
[mickey]$ make
make -C /lib/modules/2.6.32-358.el6.x86_64/build M=/home/
mickey modules
make[1]: Entering directory `/usr/src/kernels/2.6.32-358.
el6.x86_64
CC [M] /home/mickey/hello.o
Building modules, stage 2.
MODPOST 1 modules
CC
/home/mickey/hello.mod.o
LD [M] /home/mickey/hello.ko.unsigned
NO SIGN [M] /home/mickey/hello.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.el6.
x86_64
return 0;
[mickey]$ ls
hello.c hello.ko hello.ko.unsigned hello.mod.c hello.
mod.o hello.o Makefile modules.order Module.symvers
Developers
How To
/* Dont do anything */
module_init(pid_init);
module_exit(pid_exit);
MODULE_LICENSE(GPL);
MODULE_AUTHOR(Narendra Kangralkar.);
MODULE_DESCRIPTION(Kernel module to find PID.);
MODULE_VERSION(1.0);
[root]# dmesg
Hello, World !!!
Exiting ...
obj-m += pid.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD)
modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD)
Let us write one more kernel module to find out the Process
ID (PID) of the current process. The kernel stores all process
related information in the task_struct structure, which is
defined in the <linux/sched.h> header file. It provides a
current variable, which is a pointer to the current process.
To find out the PID of a current process, just print the value
30 | August 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
clean
Now compile and insert the module and check the output
using the dmesg command:
[mickey]$ make
[root]# insmod pid.ko
[root]# dmesg
pid = 6730
How To
Developers
clean
#include <linux/kernel.h>
#include <linux/module.h>
[mickey]$ ls
cleanup.c Makefile startup.c
[mickey]$ make
#include <linux/kernel.h>
#include <linux/module.h>
module_exit(hello_exit);
[mickey]$ su Password:
return 0;
module_init(hello_init);
MODULE_LICENSE(GPL);
MODULE_AUTHOR(Narendra Kangralkar.);
MODULE_DESCRIPTION(Startup module.);
MODULE_VERSION(1.0);
MODULE_LICENSE(BSD);
MODULE_AUTHOR(Narendra Kangralkar.);
MODULE_DESCRIPTION(Cleanup module.);
MODULE_VERSION(1.1);
Developers
How To
MODULE_AUTHOR(Narendra Kangralkar.);
MODULE_DESCRIPTION(Module with command line arguments.);
MODULE_VERSION(1.0);
static int i;
printk(KERN_INFO Name
: %s\n, name);
printk(KERN_INFO Roll no
: %ld\n, roll_no);
printk(KERN_INFO Subjectwise marks );
for (i = 0; i < total_subjects; ++i) {
printk(KERN_INFO Subject-%d = %d\n, i + 1,
marks[i]);
}
}
return 0;
Insight
Developers
jQuery, the cross-platform JavaScript library designed to simplify the client-side scripting
of HTML, is used by over 80 per cent of the 10,000 most popularly visited websites. jQuery
is free open source software which has a wide range of uses. In this article, the author
suggests some best practices for writing jQuery code.
Developers
Insight
Insight
//bad way
var disableTask1 = false;
var defaultTask1 = 5;
var pointerTask1 = 2;
var disableTask2 = true;
var defaultTask2 = 10;
var currentValueTask2 = 10;
//like that many other variables
//better way
var task1 = {
disable: false,
default: 5,
pointer: 2,
getNewValue: function(){
//do some thing
return task1.default + 5;
}
};
var task2 = {
disable: true,
default: 10,
currentValue: 10
};
//how to use them
if(task1.disable){
//do some thing
return task1.default;
}
Developers
9. Don't repeat code: Never write any code again and again.
If you find yourself doing so, halt your coding and read
the eight points listed above, all over again.
Next time Ill explain how to write more effective plugins,
using some examples.
By: Savan Koradia
The author works as a senior PHP Web developer at Multidots
Solutions Pvt Ltd. He writes tutorials to help other developers
to write better code. You can contact him at: savan.koradia@
multidots.in; Skype: savan.koradia.multidots
Developers
Lets Try
--host
--host
--host
--host
--host
--host
localhost:38020
localhost:38021
localhost:38022
localhost:48020
localhost:48021
localhost:48022
--out
--out
--out
--out
--out
--out
.\shard1\replica1
.\shard1\replica2
.\shard1\replica3
.\shard2\replica1
.\shard2\replica2
.\shard2\replica3
CODE
Sandya Mannarswamy
SPORT
Types of entities
Exploring Software
Anil Seth
Guest Column
The environment
em1
Internet
ssh cirros@172.24.4.229
virbr0
Desktop
eth0
br-ext
OpenStack VM
eth0
VM
Router
You should be signed into the virtual machine Figure 1: Simplified network diagram
without needing a password.
You can experiment with importing the Fedora VM
Should Packstack install OpenStack client tools [y|n] [y]
image you used for the OpenStack VM and launching it
: y
in the cloud. Whether you succeed or not will depend on
the resources available in the OpenStack VM.
The answers to the other questions will depend on the
network interface and the IP address of your desktop, but
there is no ambiguity here. You should answer with the
Installing only the needed OpenStack services
interface lo' for CONFIG_NOVA_COMPUTE_PRIVIF and
You will have observed that OpenStack comes with a
CONFIG_NOVA_NETWORK_PRIVIF. You don't need an
very wide range of services, some of which are not likely
extra physical interface as the compute services are running
to be very useful for your experiments on the desktop,
on the same server.
e.g., the additional networks and router created in the
Now, you are ready to test your OpenStack
tests above. Here is a part of the dialogue for installing
installation on the desktop. You may want to create a
the required services on the desktop:
project and add a user to the project. Under Project/
Compute/Access & Security, you will need to add
[root@amd ~]# packstack
firewall rules and key pairs, as above.
Welcome to Installer setup utility
However, you will not need to create any additional
Enter the path to your ssh Public key to install on
private network or a router.
servers:
Import a basic cloud image, e.g., from http://fedoraproject.
Packstack changed given value to required value /root/.
org/get-fedora#clouds under Project/Compute/Images.
ssh/id_rsa.pub
You may want to create an additional flavour for a
Should Packstack install MySQL DB [y|n] [y] : y
virtual machine. The m1.tiny flavour has 512MB of RAM
Should Packstack install OpenStack Image Service (Glance)
and 4GB of disk and is too small for running Hadoop. The
[y|n] [y] : y
m1.small flavour has 2GB of RAM and 20GB of disk,
Should Packstack install OpenStack Block Storage (Cinder)
which will restrict the number of virtual machines you
service [y|n] [y] : n
can run for testing Hadoop. Hence, you may create a mini
Should Packstack install OpenStack Compute (Nova) service
flavour with 1GB of RAM and 10GB of disk. This will
[y|n] [y] : y
need to be done as the admin user.
Should Packstack install OpenStack Networking (Neutron)
Now, you can create an instance of the basic cloud
service [y|n] [y] : n
image. The default user is fedora and your setup is ready
Should Packstack install OpenStack Dashboard (Horizon)
for exploration of Hadoop data.
[y|n] [y] : y
Should
[y|n]
Should
[y|n]
Should
[y|n]
Developers
Let's Try
MariaDB
History
Let's Try
Why MariaDB is better than MySQL
Features
Installing MariaDB
Developers
Developers
Let's Try
USE students;
Deleting a table
Let's Try
Developers
References
[1] http://en.wikipedia.org/wiki/MariaDB
[2] https://mariadb.org/
[3] http://tecadmin.net/install-mariadb-5-5-in-ubuntu/#
[4] https://www.digitalocean.com/community/tutorials/howto-create-a-table-in-mysql-and-mariadb-onan-ubuntucloud-server
[5] http://en.wikibooks.org/wiki/MariaDB/Introduction
By: Amrutha S.
The author is currently studying for a bachelors degree in Computer
Science and Engineering at Amrita University in Kerala, India. She is
an open source enthusiast and also an active member of the Amrita
FOSS club. She can be contacted at amruthasangeeth@gmail.com.
Developers
Let's Try
The first line is the type signature in which the function name,
arguments and return types are separated using a double colon (::).
The arguments and the return types are separated by the symbol
(->). Thus, the above type signature tells us that the sum function
takes two arguments of type Int and returns an Int. Note that the
function names must always begin with the letters of the alphabet
in lower case. The names are usually written in CamelCase style.
You can create a Sum.hs Haskell source file using your
favourite text editor, and load the file on to the Glasgow
Haskell Compiler interpreter (GHCi) using the following code:
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
48 | August 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
( Sum.hs, interpreted )
*Main> :t sumInt
sumInt :: Int -> Int -> Int
*Main> sumInt 2 3
5
Let's Try
Developers
from a list:
*Main> :t sumInt 2
sumInt 2 :: Int -> Int
*Main> tail a
[2,3,4,5]
*Main> :t tail
tail :: [a] -> [a]
*Main> :t last
last :: [a] -> a
*Main> :t init
init :: [a] -> [a]
*Main> init a
[1,2,3,4]
( Sum.hs, interpreted )
*Main> :t sumTwoInt
sumTwoInt :: Int -> Int
The take function picks the first n' elements from a list:
*Main> sumTwoInt 3
5
*Main> take 3 a
[1,2,3]
*Main> :t take
take :: Int -> [a] -> [a]
*Main> head a
1
*Main> :t drop
drop :: Int -> [a] -> [a]
*Main> :t head
head :: [a] -> a
The zip function takes two lists and creates a new list of
tuples with the respective pairs from each list. For example:
Developers
Let's Try
*Main> zip a b
[(1,"one"),(2,"two"),(3,"three"),(4,"four"),(5,"five")]
*Main> :t zip
zip :: [a] -> [b] -> [(a, b)]
1
*Main>
1
*Main>
2
*Main>
6
*Main>
24
*Main>
120
factorial 1
factorial 2
factorial 3
factorial 4
factorial 5
*Main> :t map
map :: (a -> b) -> [a] -> [b]
How To
Developers
What is Qt-WebKit?
Programming paradigm
Q_INVOKABLE
<html>
<head>
<script>
function Multiply()
{
/** MultOfNumbers a C++ Invokable method **/
var result = myoperations.MultOfNumbers(document.forms["DEMO_
FORM"]["Multiplicant_A"].value, document.forms["DEMO_FORM"]
["Multiplicant_B"].value);
document.getElementById("answer").value = result;
}
</script>
</head>
<body>
<form name="DEMO_FORM">
Multiplicant A: <input type="number"
name="Multiplicant_A"><br>
Multiplicant B: <input type="number"
www.OpenSourceForU.com | OPEN SOURCE For You | August 2014 | 51
Developers
How To
name="Multiplicant_B"><br>
Result: <input type="number" id="answer"
name="Multiplicant_C"><br>
<input type="button" value="Multiplication_compute_on_C++"
onclick="Multiply()">
</form>
</body>
</html>
<QtGui/QApplication>
<QApplication>
<QDebug>
<QWebFrame>
<QWebPage>
<QWebView>
Here are the steps that need to be taken for the callback to be
installed:
a) Add a JavaScript window object to the
javaScriptWindowObjectCleared slot.
b) Declare a signal in the class.
c) Emit the signal.
d) In JavaScript, connect the signal to the JavaScript
function slot.
Here is the syntax to help you connect:
<JavaScript_window_object>.<signal_name>.connect(<JavaScript
function name>);
How To
Developers
QT_DEMO
<html>
<head>
<script>
function alert_click()
{
alert("you clicked");
}
function JavaScript_function()
{
alert("Hello");
}
myoperations.alert_script_signal.connect(JavaScript_
function);
</script>
</head>
<body>
<form name="myform">
<input type="button" value="Hit me" onclick="alert_click()">
</form>
</body>
</html>
Hit Me
Developers
Overview
Overview
Developers
Latest updates
Yocto Project 1.6
The latest release of Yocto Project (YP) 1.6 Daisy has a
great set of features to help developers build with a very
good user interface. The Toaster, a new UI to the YP build
system, enables detailed examination of the build output,
with great control over the view of the data. The Linux
kernel update and the GCC update to 4.8.2 adds further
functionality to the latest release. It also supports building
Python 3. The new client for reporting errors to a central
Web interface helps developers to focus on problem
management.
Figure1: YP community
DeveloperSpecific Layer
Commercial
Layer
HardwareSpecific BSP
UI-Specific Layer
Yocto-Specific
Layer Metadata
OpenEmbedded
Core Metadata
Figure 2: YP layers
Technical leaders: Those who work within the subprojects, doing the same thing as the layer maintainers.
Upstream projects: Many Yocto Project components such
as the Linux kernel are dependent on the upstream projects.
Advisory board: The advisory board gives direction to the
project and helps in setting the requirements for the project.
Layers
By: Vishnu N K
The author, an open source enthusiast, is in the midst of his B. Tech
degree in Computer Science at Amrita Vishwa Vidyapeetham and
contributes to Mediawiki. Contact him at mails2vichu@gmail.com
Developers
How To
One of the aspects of hacking a Linux kernel is to port it. While this might sound difficult, it wont be
once you read this article. The author explains porting techniques in a simplified manner.
How To
Developers
$ make config
$ make help
Developers
-T
-C
-a
-e
-n
-d
==>
==>
==>
==>
==>
==>
set
set
set
set
set
use
How To
image type
compression type
load address (hex)
entry point (hex)
image name
image data from file
How To
Developers
open the .config file, and there will be an entry as shown below:
CONFIG_MY_DRIVER=m
$ insmod my_driver.ko
Components of LSP
LSP placement
Machine ID
Developers
How To
done here. This function should be defined during the board
porting. This includes things such as setting up the pin
multiplexing, initialisation of the serial console, initialisation
of RAM, initialisation of Ethernet, USB and so on.
MACHINE_END ends the macro. This macro is defined
in arch/arm/include/asm/mach/arch.h.
MACHINE_START macro
4. Update the corresponding makefile, so that the boardspecific file gets compiled. This is shown below:
obj-$(CONFIG_MACH_MY_BOARD) += board-my_board.o
How To
Developers
Developers
How To
After all this, the Linux RTC subsystem can use the
registered protocol drivers read and write routines to read and
write the RTC.
Linux Kernel
SPI Master
driver
spi master
write
Write
address
RTC
register
Range
0x81
0x01
Seconds
0 - 59
0x83
0x03
Minutes
0 - 59
0x85
0x05
Hours
0 - 23
0x87
0x07
Date
1 - 31
0x89
0x09
Month
1 - 12
0x8B
0x0B
Day
1-7
0x8D
0x0D
Year
0 - 99
0x8F
0x0F
Control
00H - 81H
0x97
0x17
Status
03H - E7H
0xBF
0x3F
Clock burst
spi master
read
SPI
BUS
RCT
DS1347
SPI Subsystem
C
P
U
Slave device
registration
spi write
operation
struct spi_device
spi read
operation
RTC
write
RTC
read
RTC Subsystem
How To
Linux kernel, which is a part of the board support package.
The board file resides in arch/ directory in Linux (for
example, the board file for the Beagle board is in arch/arm/
mach-omap2/board-omap3beagle.c). The struct spi_device
is not directly written but a different structure called struct
spi_board_info is filled and registered, which creates the
struct spi_device in the kernel automatically and links it to the
SPI master driver that contains the routines to read and write
on the SPI bus. The struct spi_board_info for RTC DS1347
can be written in the board file as follows:
struct spi_board_info spi_board_info[] __initdata = {
.modalias = ds1347,
.bus_num = 1,
.chip_select = 1,
};
Developers
The name field has the name of the driver (this should be
the same as in the modalias field of the struct spi_board_info).
Owner is the module that owns the driver, THIS_MODULE
is the macro that refers to the current module in which the
driver is written (the owner field is used for reference
counting of the module owning the driver). The probe is the
most important routine that is called when the device and the
driver are both registered with the kernel.
The next step is to register the driver with the kernel.
This is done by a macro module_spi_driver (struct spi_
driver *). In the case of RTC DS1347, the registration is
done as follows:
module_spi_driver(ds1347_driver);
Developers
How To
registered. The first thing the probe routine does is to set the
SPI parameters to be used to write on the bus. The parameters
are the mode in which the SPI device works. In the case of
RTC DS1347, it works on Mode 3 of the SPI:
spi->mode = SPI_MODE_3;
How To
tm_hour: hour (0 to 23, same as RTC DS1347)
tm_mday: day of month (1 to 31, same as RTC DS1347)
tm_mon: month (0 to 11 but RTC DS1347 provides
months from 1 to 12, so the value returned by RTC needs to
have 1 subtracted from it)
tm_year: year (year since 1900; RTC DS1347 stores years
from 0 to 99, and the driver considers the RTC valid from
2000 to 2099, so the value returned from RTC is added to 100
and as a result the offset is the year from 1900)
First the clock burst command is executed on the RTC,
which gives out all the date and time registers through the SPI
interface, i.e., a total of 8 bytes:
buf[0] = DS1347_CLOCK_BURST | 0x80;
err = spi_write_then_read(spi, buf, 1, buf, 8);
if (err)
return err;
Then the read date and time is stored in the Linux date
and time structure of the RTC. The time in Linux is in binary
format so the conversion is also done:
dt->tm_sec = bcd2bin(buf[0]);
dt->tm_min = bcd2bin(buf[1]);
dt->tm_hour = bcd2bin(buf[2] & 0x3F);
dt->tm_mday = bcd2bin(buf[3]);
dt->tm_mon = bcd2bin(buf[4]) - 1;
dt->tm_wday = bcd2bin(buf[5]) - 1;
dt->tm_year = bcd2bin(buf[6]) + 100;
After storing the date and time of the RTC in the Linux
RTC date and time structure, the date and time is validated
through rtc_valid_tm API. After validation, the validation
status from the API is returnedif the date and time is valid,
then the kernel will return the date and time in the structure
to the user application; else it will return an error:
Developers
After this, the data is sent to the RTC device, and the
status of the write is sent to the kernel as follows:
return spi_write_then_read(spi, buf, 9, NULL, 0);
return rtc_valid_tm(dt);
=
=
=
=
=
=
=
References
[1] DS1347 datasheet, datasheets.maximintegrated.com/en/ds/
DS1347.pdf
[2] DS1347 driver file https://git.kernel.org/cgit/linux/kernel/git/
torvalds/linux.git/tree/drivers/rtc/rtc-ds1347.c
[3] Writing and submitting your first Linux kernel patch video,
https://www.youtube.com/watch?v=LLBrBBImJt4
[4] Writing and submitting your first Linux kernel patch text file
and presentation, https://github.com/gregkh/kernel-tutorial
Developers
Let's Try
Linux Kernel
Development
This article is aimed at newbie developers who are planning to set up a development
environment or move their Linux kernel development environment to GIT.
The kernel
Let's Try
compressed Linux kernel. With the development of
virtual memory, the prefix vm was used to indicate that the
kernel supports virtual memory.
Initrd.img-3.2.0-29-generic: An initial ramdisk for your kernel.
Config-3.2.0-29-generic: The config file is used to
configure the kernel. We can configure, define options and
determine which modules to load into the kernel image
while compiling.
System.map-3.2.0-29-generic: This is used for memory
management before the kernel loads.
Public1
Developer
Developer
Main repository
Integration
Figure 1: GIT
Kernel modules
Public2
Developers
User Applications
Kernel
System Call
Process
Management &
architecture
Physical/ virtual
Memory
Management
Hardware
CPU
Memory
Lets set up our own local repository for the Linux kernel.
Note: 1. Multiple Linux kernel repositories exist online.
Here, we pull Linus Torvalds Linux-2.6 GIT code -- Git clone
http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
2. In case you are behind a proxy-server, set the proxy
by running git config global https.proxy https://domain\
usernmae:password@proxy:port.
Cd linux-2.6
Git pull
Developers
Let's Try
your current config.
There are multiple files that start with config; find the file that
is associated with your kernel by running uname a. Then run:
cp /boot/config-`uname -r`* .config or
cp /boot/config-3.13.0-24-generic .config
Make defconfig
<---- for default configuration
Or
Make nconfig
<---- for minimal configuration, here we
can enable or disable features
Now run:
Make
Figure 6: Make
[1] http://linux.yyz.us/git-howto.html
[2] http://kernelnewbies.org/KernelBuild
[3] https://www.kernel.org/doc/Documentation/
[4] http://kernelnewbies.org/LinuxVersions
ACCESS ELECTRONICS
B2B INDUSTRY WITH A
www.electronicsb2b.com
Log on to www.electronicsb2b.com and be in touch with the Electronics B2B Fraternity 24x7
68 | August 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
How To
Admin
Admin
How To
Bandwidth throttling
Table 1
Based on
the firewall
Service
Source
Destination Priority
Guaranteed
rate (KBps)
Limited rate
(KBps)
Yes
Any
Any
512
Yes
Any
Any
512
Yes
Any
Any
1024
2048
Yes
Any
Any
1024
2048
Yes
Any
Any
10
How To
Admin
Table 2
Based on the
firewall
Service
Source
Destination
Priority
Guaranteed
rate (KBps)
Limited
rate (KBps)
Yes
Any
Any
10
60
200
References
[1] http://en.wikipedia.org/wiki/Proxy_server#Transparent_proxy
[2] http://en.wikipedia.org/wiki/Bandwidth_throttling
[3] http://doc.zentyal.org/en/qos.html
None
OSFY?
Insight Admin
Windows as the host OS
VMware workstation (Any guest OS)
VirtualBox (Any guest OS)
Hyper-V (Any guest OS)
Linux as the host OS
VMware workstation
Microsoft virtual PC
VMLite workstation
VirtualBox
Xen
A hypervisor or virtual machine monitor (VMM) is a piece
of computer software, firmware or hardware that creates and
runs virtual machines. A computer on which a hypervisor is
running one or more VMs is defined as a host machine. Each
VM is called a guest machine. The hypervisor presents the
guest OSs with a virtual operating platform, and manages the
execution of the guest operating systems. Multiple instances
of a variety of operating systems may share the virtualised
hardware resources.
VMware ESXi
Citrix Xen
KVM (Kernel Virtual Machine)
Hyper-V
VMware Workstation
VirtualBox
Table 1
Hypervisors and their cloud service providers
Hypervisor
Xen
Amazon EC2
IBM SoftLayer
Fujitsu Global Cloud Platform
Linode
OrionVM
VMware Cloud
ESXi
KVM
Hyper-V
Red Hat
HP
Dell
Rackspace
Microsoft Azure
Cloud simulations
Admin
Insight
Table 2
Tier
Level
1
Possible unavailability
in a given year
Requirements
Single non-redundant distribution path serving the IT equipment
Non-redundant capacity components
Basic site infrastructure with expected availability of 99.671 per cent
Meets or exceeds all Tier 1 requirements
Redundant site infrastructure capacity components with expected availability of 99.741 per
cent
Meets or exceeds all Tier 1 and Tier 2 requirements
Multiple independent distribution paths serving the IT equipment
All IT equipment must be dual-powered and fully compatible with the topology of a sites
architecture
Concurrently maintainable site infrastructure with expected availability of 99.982 per cent
Meets or exceeds all Tier 1, Tier 2 and Tier 3 requirements
All cooling equipment is independently dual-powered, including chillers, heaters, ventilation
and air-conditioning (HVAC) systems
Fault-tolerant site infrastructure with electrical power storage and distribution facilities with
expected availability of 99.995 per cent
1729.224 minutes
(28.8 hours)
1361.304 minutes
(22.6 hours)
94.608 minutes
(1.5 hours)
26.28 minutes
(0.4 hours)
CloudAnalyst
GreenCloud
iCanCloud
MDCSim
NetworkCloudSim
VirtualCloud
CloudMIG Xpress
CloudAuction
CloudReports
RealCloudSim
DynamicCloudSim
WorkFlowSim
CloudSim
Insight Admin
The major limitation of CloudSim is the lack of a
graphical user interface (GUI). But despite this, CloudSim is
still used in universities and the industry for the simulation of
cloud-based algorithms.
Admin
Insight
Starting Cloud Simulation with Dynamic and Hybrid Secured Key
Initialising...
MD5 Hash Digest(in Hex. format)::
6e47ed33cde35ef1cc100a78d3da9c9f
Hybrid Approach (SHA+MD5) Hash Hex format:
b0a309c58489d6788262859da2e7da45b6ac20a052b6e606ed1759648e43e40b
Hybrid Approach Based (SHA+MD5) Security Key Transmitted =>
ygcxsbyybpr4 ?
Starting CloudSim version 3.0
CloudDatacentre-1 is starting...
CloudDatacentre-2 is starting...
Broker is starting...
Entities started.
3. Give a name to
your project.
4. Configure the
build path for adding
the CloudSim library.
5. Search and select
the CloudSim JAR files.
In the integration
and implementation
of Java code and
CloudSim, the Javabased methods and
packages can be used.
In this approach, the
Java library is directly
associated with
CloudSim code.
After executing
the code in Eclipse,
the following output
Figure 6: JAR files of CloudSim visible in the
will
be generated, which
referenced libraries of Eclipse with Java Project
makes it evident that the
integration of the dynamic key exchange is implemented with
the CloudSim code:
SUCCESS
160
0.2
160.2
SUCCESS
320
0.2
320.2
SUCCESS
320
0.2
320.2
Insight Admin
Figure 8: Writing the Java code with the import of CloudSim packages
EB Times
Electronics Trade Channel Updates
is Becoming Regional
Get North, East, West & South Edition at you
doorstep. Write to us at myeb@efyindia.com and
get EB Times regularly
This monthly B2B Newspaper is a resource for traders, distributors, dealers, and those
who head channel business, as it aims to give an impetus to channel sales
Admin
How To
Docker is an open source project, which packages applications and their dependencies
in a virtual container that can run on any Linux server. Docker has immense possibilities
as it facilitates the running of several OSs on the same server.
I will not delve too deeply into what LXC is and how it works,
but will just describe some major components.
LXC is an OS level virtualisation method for running
multiple isolated Linux operating systems or containers on
78 | August 2014 | OPEN SOURCE For You | www.OpenSourceForU.com
Cgroups
Copy-on-write filesystem
How To
libcontainer
Systemdnspawn
libvirt
LXC
Linux Kernel
netlink
netfilter
SELinux
cgroups
apparmor namespace
Admin
Containerisation vs virtualisation
Linux containers
Installation of Docker
Figure 2: Virtualisation
www.OpenSourceForU.com | OPEN SOURCE For You | August 2014 | 79
Admin
How To
How To
Admin
Admin
How To
How To
Admin
Wireshark displays the ARP reply under the Info box as:
192.168.51.1 is at 00:21:97:88:28:21.
Thus, with the help of an ARP request and reply, system
192.168.51.208 has detected the MAC address belonging to
192.168.51.1.
Admin
How To
1. The DHCP Server Identifier field, which specifies the IP
address of the accepted server.
2. The host name of the client computer.
Use Pane 2 of Wireshark to view these parameters under
Bootstrap Protocol Options 54 and 12.
The DHCP request packet also contains additional
client requests for the server to provide more configuration
parameters such as the default gateway, DNS (Domain Name
Server), address, etc.
DHCP acknowledgement: The server acknowledges a
DHCP request by sending information on the lease duration
and other configurations, as requested by the client during the
DHCP request phase, thus completing the DHCP cycle.
For better understanding, capture a few packets, use
Wireshark Display Filters to filter and view ARP and DHCP,
and read them using Wireshark panes.
Saving packets
Troubleshooting tips
A word of caution
Let's Try
Open Gurus
Binder IPC
Media Services
AudioFlinger
Camera
Service
MediaPlayer
Service
Search Service
Activity
Manager
Other Media
Services
Window
Manager
Other System
Services and
Managers
HAL
Camera HAL
Audio HAL
Graphics HAL
Other HALs
Linux Kernel
Camera Driver
Audio Driver
(ALSA, OSS,
etc)
Display Drivers
Other Drivers
Open Gurus
Let's Try
respectively.
$ mkdir ~/android
$ mkdir ~/android/kernel
$ mkdir ~/android/ndk
Let's Try
Open Gurus
This will trigger the build for kernel modules, and .ko files
should be generated in the corresponding module directories.
Run the find command to get a list of .ko files in the kernel
directory:
$ find . -name *.ko
What next?
References
https://source.android.com/
https://developer.android.com/
http://xda-university.com
For U & Me
Lets Try
$ maxima -q
[a, b]);
(%o1)
(%o3)
[2, 4, 6, 8, 10]
[p1a, p1b, p2a, p2b, p3a, p3b, q1a, q1b, q2a, q2b, q3a,
q3b]
(%o2)
(%i4) quit();
(%i4) quit();
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
(%i4) rest(L);
(%o4)
$ maxima -q
(%i1) atom(5);
(%o1)
(%o5)
true
(%i2) atom([5]);
(%o2)
[8, 9, 10]
false
true
[1, 2, 3, 5, 7, 8, 9, 10]
false
[1, 2, 3, 4, 5, 7, 8, 9, 10]
true
[1, a, 2, b, 3, c, 4, d]
true
[1, 2, 3, 4, 5, 6, 7]
false
(%i4) listp([x]);
(%o4)
[4, 5, 6, 7, 8, 9, 10]
false
(%i3) listp(x);
(%o3)
[2, 3, 4, 5, 6, 7, 8, 9, 10]
[4, 5, 6, 7]
true
[1, 2, 3]
(%o14)
(%o10)
(%i15) reverse(L);
true
[8, 9, 10, 4, 5, 6, 7, 1, 2, 3]
(%o15)
(%o11)
false
(%i12) quit();
List recreations
(%o16)
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
[10, 1, 9, 2, 8, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 8, 2, 9, 1,
10]
(%i17) unique(join(reverse(L), L));
(%o17)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
(%i18) L;
(%o18)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
(%i19) quit();
Note that the list L is still not modified. For that matter, ,
even L1, L2, L3 are not modified. In fact, that is what is meant
when we state that all these functions recreate new modified
lists, rather than modify the existing ones.
List extractions
For U & Me
Lets Try
(%o8)
(%i9) K: copylist(L);
$ maxima -q
(%o9)
(%i10) length(L);
(%o1)
(%o10)
[a, 2 a, 3 a, 4 a, b, 2 b, 3 b, 4 b, c, 2 c, 3 c, 4 c]
(%i2) first(L);
(%i11) pop(L);
(%o2)
(%i3) seventh(L);
(%o11)
(%i12) length(L);
(%o3)
3 b
(%i4) last(L);
(%o12)
(%i13) K;
(%o4)
4 c
(%o13)
(%i14) L;
(%o5)
3 a
(%o14)
(%o6)
4 c
(%i7) L;
(%o7)
(%i8) quit();
(%i16) quit();
List manipulations
[2, 4, 6]
[1, 5]
(%o3)
(%o1)
(%o4)
[2, 3, 4, 6]
[1, 3]
(%o2)
(%o5)
(%o3)
(%o6)
false
(%o4)
(%o7)
/usr/share/maxima/5.24.0/share/macro/basic.mac
(%i6) L;
(%o6)
na
(%i8) quit();
(%i8) L;
Replicant is a free and open source mobile operating system based on the Android
platform. It aims at replacing proprietary Android apps and components with open source
alternatives. It is security focused, as it blocks all known Android backdoors.
For U & Me
Overview
Replicant
F-Droid
For U & Me
Open Strategy
t was not very long ago (July 25, 2011, to be precise) that
Andreas Gal, director of research at Mozilla Corporation,
announced the Boot to Gecko project (B2G) to build a
complete, standalone operating system for the open Web, which
could provide a community-based alternative to commercially
developed operating systems such as Apples iOS and
Microsofts Windows Phone. Besides, the Linux-based operating
system for smartphones and tablets (among others) also aimed
to give Googles Android, Jollas Sailfish OS as well as other
community-based open source systems such
as Ubuntu Touch, a run for their money
(pun intended!). Although, on
paper, the project boasts of
tremendous potential, it has
failed to garner the kind of
response its developers had
initially hoped for. The
relatively few devices in a
market that is flooded with
the much-loved Android
OS could be one possible
reason. Companies like
ZTE, Telefnica and
GeeksPhone have taken the
onus of launching Firefox OSbased devices; however, giants
in the field have shied away from
adopting it, until now.
Hong Kongs Alcatel One
Touch is one of the few companies
that has bet on Firefox by launching the
Alcatel One Touch Fire smartphone globally, last year.
The Firefox OS 1.0-based Fire was primarily intended for
emerging markets with the aim of ridding the world of
feature phones. Sadly, the Indian market was left out when
the first Firefox OS-based smartphone was testedcould
Android dominance be the reason? Alcatel Fire (Alcatel
4012) was launched globally last year. We tried everything,
With that said, it has taken a fairly long time for the company to
realise that the Firefox OS could be a deal-breaker in an extensive
market such as India. Firefox OS may change the mobile game.
However, it still needs to grow in India. Considering the fact
Theme
Featured List
buyers guide
March 2014
Network monitoring
Security
-------------------
April 2014
Android Special
Anti Virus
May 2014
Certification
External Storage
June 2014
Mobile Apps
UTMs fo SMEs
July 2014
August 2014
Kernel Development
September 2014
Cloud
Android Devices
October 2014
Projectors
November 2014
Cloud Special
December 2014
Web Development
AV Conferencing
January 2015
Programming Languages
February 2015
Wireless Routers
Since you have just launched your latest servers here, what
is your take on the Indian server market?
For U & Me
Interview
Yes, there are quite a few SMBs in India that are very
positive about integrated systems. Customers, irrespective
of the segment that they belong to, look at it from the angle
of how the business functions, and what kind of specificity
they want to get to. I wouldnt be particularly concerned
about the segment, but I would look at it from the context of
what workload specificity a customer wants.
What are the issues that you have seen IT heads face
while adopting converged IT systems?
Overview
For U & Me
For U & Me
Overview
cat /proc/sys/vm/swappiness
cat /proc/swaps
By: Roopak T J
www.electronicsforu.com
www.eb.efyindia.com
www.OpenSourceForu.com
www.ffymag.com
www.efyindia.com
TIPS
&
TRICKS
a b c d
dev@home$ echo !$
echo d
d
a b c d
initrd (loop)/casper/initrd.lz
echo c
c
Shivam Kotwalia,
shivamkotwalia@gmail.com
hdparm -I /dev/sda
Pankaj Rane,
pankaj.rane2k8@gmail.com
Manu Prasad,
mmanuprasad@gmail.com
Did you ever think that you could type commands that
would be invisible on your system but still would execute,
provided you typed them correctly? This can easily be done by
changing the terminal settings using the following command:
stty -echo
For U & Me
Overview