Open Source Software

Transcription

Open Source Software
Open Source in Systems & Applications
A new business model
ENSI-Caen
November 28th, 2012
Open Source Software
Open Source Software is
computer software whose
source code is available
under
a
license
(or
arrangement such as the
public domain) that permits
users to use, change, and
improve the software, and to
redistribute it in modified or
unmodified form.
(Source: Wikipedia)
2
OpenSource in S&A
28/11/2012
Summary
The Economic Paradigm of Open Source
OSS Licenses
The Mixed Software Model
Customer Support
Linux Driver For Developers
3
OpenSource in S&A
28/11/2012
The Economic Paradigm of
Open Source
4
OpenSource in S&A
28/11/2012
A strong economic foundation
People feel that Open Source would not be sustainable
over the long term and would be incapable of scaling to
meet the market's need for new technology
– Eric Raymond (The Cathedral and the Bazaar)
• Programmers behave within their own private subculture
• Still effective today within the important group of Open Source
contributors
But there is a strong monetary return for many Open
Source developers.
– By 2011, expenditures on Linux-based hardware, software
and related services will be over US$50 billion (x2 2007).
That return is not as direct as in proprietary software
5
OpenSource in S&A
28/11/2012
Are we software vendors ?
The Microsoft model reflects the fact that most people have been
thinking about software from an extremely vendor-centric viewpoint
– Around 30% of the software that is written is sold as software
Most software is not sold
– It is developed directly for its customer, by the customer's own employees
or by consultants who bill for the service of software creation rather than
for the end product
Steve Ballmer (president of Microsoft) explained that Open Source
wasn't just source code, it was a form of software licensing
We may not be a software vendor, but the question is:
does software and Open Source impact our business ?
6
OpenSource in S&A
28/11/2012
Looking for economic impact
Open Source software is an enabling technology
–
–
–
–
Scalability of Linux to any HW system (embedded)
Platforms are virtualized and provide the same view of data and services
Value is no more in HW but in content and service access (WEB2.0)
Anyone can design an ―access‖ product (Android can be easily mapped)
• Smartphone and tablet market…
Smartphone example
– Android is 2nd OS
– Market share grows
+628% in 2010
– Thanks to
• « cloud computing »
• Google services access
• Low-cost makers
7
OpenSource in S&A
28/11/2012
Economic impact
Just everywhere…
8
OpenSource in S&A
28/11/2012
Cloud computing
Cloud computing is Internet-based computing
–
–
–
–
Software, shared resources and information are provided to devices on demand,
Natural evolution of the virtualization and service-oriented architecture,
Technology infrastructure details are abstracted from consumers,
Ease-of-access to remote computing sites provided by the Internet
•
•
Major service providers: Amazon, Salesforce, Microsoft and Google
Some IT firms actively involved: Dell, Red Hat, HP, IBM, VMware, NetApp
US$56 billion revenue in 2009, (+21.3 %). US$150 billion in 2013 (Gartner).
Open source provides the foundation for cloud computing implementations
– The Free Software Foundation released the Affero GPL (GPLv3 extension) for free
software designed to be run over a network,
– By 2011, 80% of commercial software will contain open source code,
– Cloud-based computing is making it easier for open source vendors to lower costs.
9
OpenSource in S&A
28/11/2012
Business differentiation
Differentiating technology is what makes your business
more desirable to your customer than your competitor's business
But it wouldn't hurt your business for your competitor to understand
how non-differentiating software works. Indeed, that competitor might
be the best collaborator because their needs are most similar to yours
– HP and IBM are partners in developing software for infrastructure
– HTC, Samsung, Motorola have partnership with Google for Smartphone
• But TI audio/video codec and platform accelerators are not open with Android
– TCP/IP stack is open for more than 15 years, but fast IP switching
hardware accelerators are proprietary: CISCO, Alcatel
Need to take an honest look
– "Not Invented Here" syndrome
• Managers and technical people aren't willing to consider the work of outsiders,
because they don't believe that it could be as good as their own.
– What is in stack ? Duplicate effort instead of spending their time on the
differentiating software that is most important to your business.
10
OpenSource in S&A
28/11/2012
A new economic relationship
Open Source created new economic relationships
– peer-to-peer
Customers participate with the vendor in software development
–
–
–
–
access the same source code
thus support the product
less lock-in and less exclusivity to the customer-to-vendor relationship
suppliers substitute Open Source products for proprietary software
Example: http://gforge.ti.com/
– TI releases Android versions for OMAP development platforms. The
OMAP display sub-system class driver adaptation has been published by
Nokia and is used by NXP (TDA19988), SilImg (SIL9022), Samsung
(LTE430), Sharp (LS037), Nokia (n800). According to product framework
integration, it is used by LG, Archos, Motorola that have OMAP, but also
by Mediateck, Freescale, Qualcomm for their own SoC integration.
11
OpenSource in S&A
28/11/2012
The economy of the contribution
Bernard Stiegler – Philosopher
– “The economic model is turning into a economy based on the
contribution and the knowledge sharing. Let define “working” as taking
care of “items of exchange”. Today people do not work anymore but
execute meaningless tasks that reduce the knowledge. The OSS has
imposed to the software industry because it gives a new goal and new
work to employees that were “coding” without knowing why. This model
can be applied to many economic sector, pushing the “care” in people’s
mind.”
12
OpenSource in S&A
28/11/2012
Android stack players
Stack is about 10GB sources
Product makers need extra
drivers in Linux kernel and extra
services in framework
What
Who
Size
Applications
Everybody in the street
No limit
Framework +
libraries + HAL
Google, Open Source
community
More than 150.000 source files
Platform
integration
Product makers
LG, TI, QCOM, SAMSUNG, MOTOROLA
Droid: about 100 source files
Kernel: about 50 source patched
Linux kernel
Open Source community
40.000 sources files
Device drivers
My company
About 5 source files
(core driver about 30 files)
13
OpenSource in S&A
28/11/2012
Testimony
Engineer Craig Small, a builder of network
infrastructure, sums up the advantages for his customers
– Using Open Source cut way down on startup software cost
• I could spend a fraction of the hours on the problem compared to what I
would have needed to implement from scratch.
– Expanding and customizing Open Source is by far easier to do
• It is written in a style that is easier to extend.
• Open Source project is easily updated to monitor new equipment.
• Extensions are returned back to the Open Source project.
– Convergence to best satisfaction of our need with the same sort of
technical needs for both developers and non-programmer users.
• We discuss how to better satisfy our needs
14
OpenSource in S&A
28/11/2012
Economic paradigms of
Software development
New keys for business plan
–
–
–
–
–
–
–
Efficiency,
Failure rate
Ways of software production
Distribution cost
– Retail
Distribution risk
Protects customer differentiation – In-house and contract
– Consortium and non-OSS collaboration
Protects vendor differentiation
– Open source
Required market size
Paradigm
Efficiency
Failure Rate
Distributes
Cost
Distributes
Risk
Protects
Customer
Differentiation
Protects
Vendor
Differentiation
Required Market
Size
less than 10%
50%
Late, sometime after
sales start.
No.
No.
Yes.
Mass market 100,000
and up, specialized
markets less.
In-House and
Contract
60% to 80%
50%
No.
No.
Yes.
Maybe.
1
Consortium and
Non-Open-Source
Collab.
60% to 80%
Perhaps 90%,
unacceptably
high.
Yes.
Yes.
Maybe.
Maybe.
5 and up.
Open Source
60% to 100%
50%
Early, during
development
Yes.
No.
No.
5 and up.
Retail
15
OpenSource in S&A
28/11/2012
Software production business methods
Open source helps to identify differentiating software
– businesses that require non-differentiating software are
advised to shift some development to Open Source and
reap greater economic efficiency,
• same story as assets outsourcing in semiconductors
– then shift dollars from non-differentiating
to differentiating software,
Participation in Open Source development is a key factor in
businesses strategy
– spend less on cost centers by distributing the cost and risk
among many collaborators, and makes more efficient use of
their software dollar than the retail paradigm
―OpenSource or not‖, that is not the question.
The question is how to partition between…
16
OpenSource in S&A
28/11/2012
How Open Source helps
product marketing
Collaborations arise between companies for the
purpose of building markets for new products
– smartphones, tablets
Carry out projects that would otherwise be beyond
the capability of any of the participating entities
– shorter time to market
The open-market-like paradigm gives
trustable tool for marketing analyses
– Darwinistic filtering is what recognizes that a particular path is successful
– Up to product maker to quickly react to new product trends
– Geek culture
17
OpenSource in S&A
28/11/2012
Just Google it
18
OpenSource in S&A
28/11/2012
Open source
wireless connectivity
Texas Instruments has announced delivery of a mobile-grade, batteryoptimized Wi-Fi solution to the open source Linux community as part of
the OpenLink™ project, focused on providing a wide range of wireless
connectivity solutions for native Linux.
– http://www.openlink.org
BeagleBoard-xM: is an ultra-low cost, high performance, low power
OMAPTM 3 based platform designed by BeagleBoard.org community
members. Hardware:
– 1GHz ARM® Cortex™-A8
• Based on TI's DM3730 DaVinci™ digital media processor and compatible with
the AM37x Sitara™ ARM microprocessors
• 800 MHz C64x+™ digital signal processor
• 3D graphics accelerator
19
OpenSource in S&A
28/11/2012
Cell phone market example
2010Q3: 417M cell phones sold (+35% than 2009Q3).
Smartphone: +96%, represents 19,3% of mobile market.
3rd in Europe
Historical cell
phone makers with
proprietary OS
New Smartphone
makers starting
with Android
Cell phone maker
market share
20
OpenSource in S&A
28/11/2012
Is Nokia in a survival position ?
21
OpenSource in S&A
28/11/2012
Next step… Are we player ?
22
OpenSource in S&A
28/11/2012
Ready for Google TV ?
Eric Schmidt and Google plan on
expanding their online ad empire
by offering hardware manufacturers
a free software platform that's
kinda open source.
The open source model will
mirror Android's – i.e. Google
will develop new versions of
the platform behind closed
doors before releasing the
code to world and dogs (2011H2).
23
OpenSource in S&A
28/11/2012
Sigma Designs and Western Mediabridge to Demo
Android™ Set-Top Box at CES
LAS VEGAS — 2010 International CES
Sigma and Western Mediabridge demonstrate the first Android-based
set-top box with the Office software suite
In addition, the demonstrations feature a Video-On-Demand (VOD)
client.
―The Android market is quickly evolving from the mobile market to a
wide range of home entertainment products,‖
―This demonstration of the world’s first commercially available Android
set-top box from Sigma and Western Mediabridge is an important
milestone as it demonstrates the consumer industry’s desire to take
advantage of the benefits of the Android platform.‖
24
OpenSource in S&A
28/11/2012
Open Source and security
―Cryptographic algorithms should be public
so that they can be scrutinized and tested.
Secret algorithms aren’t more valuable
because they are secret.‖ Bruce Schneier (Chief Security Technology Officer of BT)
OpenSSL Example
– Open source implementation of the Transport Layer Security (TLS) and its
predecessor, Secure Sockets Layer (SSL) SSL and TLS protocols.
• The core library (written in the C programming language) implements the basic
cryptographic functions and provides various utility functions.
– Available for most Solaris, Linux, Mac OS X, Microsoft Windows
– OpenSSL includes support for several different hardware accelerators
• CryptoSwift (by CryptoSwift Inc), Atalla (by Compaq) and CHIL (by nCipher)
25
OpenSource in S&A
28/11/2012
Open Source experts needed
Experts are needed to figure out
–
–
–
–
–
software partitioning between core drivers and Open Source
differentiating technology issue
best hardware interfacing
cloud computing and product trends
geek culture, OSS projects
and OSS community whishes
Specify hardware that best fits
Open Source based systems
– Track all hig-tech interfaces
4G, BTooth, GPS, WiFi, HDMI,
and all broadcast technologies
– Identify new data flow
26
OpenSource in S&A
28/11/2012
OSS licenses
The good, the bad and the ugly
27
OpenSource in S&A
28/11/2012
Click-Through License
What is it and what to do?
All the legal text you usually do not read and accept when installing a
software.
Concerns software but also documents such as Standardization
documents.
Terms and conditions of these licenses might not be acceptable for
business.
 Legal must always be consulted to review the License
 Contact OSS officer when you are confronted with one.
28
OpenSource in S&A
28/11/2012
Examples
29
OpenSource in S&A
28/11/2012
OSS : Let’s start with an example (1/2)
FractSqrt(Fract a)
{
register unsigned long root, remHi, remLo, testDiv, count;
root = 0;
/* Clear root */
remHi = 0;
/* Clear high part of partial remainder */
remLo = a;
/* Get argument into low part of partial remainder */
count = 30;
/* Load loop counter */
do
{
remHi = (remHi << 2) | (remLo >> 30); remLo <<= 2; /* get 2 bits of arg */
root <<= 1; /* Get ready for the next bit in the root */
testDiv = (root << 1) + 1; /* Test divisor */
if (remHi >= testDiv)
{
remHi -= testDiv; root += 1;
}
} while (count-- != 0);
return(root);
}
30
OpenSource in S&A
28/11/2012
Let’s start with an example (2/2)
FractSqrt(Fract a)
{
The source code available from this page may be freely
register unsigned long root, remHi, remLo, testDiv, count;
downloaded
and
used
root = 0;
/* Clear
root */in any applications for any purpose, as
remHi
0; code
/* Clear
high part
partial
remainder
long
as=the
is used
inofits
entirety
and*/ the copyright notice
remLo = a;
/* Get argument into low part of partial remainder */
and
warranty
information
is retained.
count = 30;
/* Load
loop counter
*/
do
{
If you remHi
make= (remHi
any improvements
toremLo
this <<=
software,
<< 2) | (remLo >> 30);
2; /* get 2 you
bits ofshould
arg */
root <<=
1; /* Get ready
the next
bitimprovements.
in the root */
provide
me for
with
said
testDiv = (root << 1) + 1; /* Test divisor */
if (remHi >= testDiv)
{ this code is incorporated into a commercial product,
If any of
remHi -= testDiv; root += 1;
you should
notify me of this by email, and provide me with a
}
} while (count-!= 0);
complimentary
copy of said product.
return(root);
}
31
OpenSource in S&A
28/11/2012
Use of Open Source in businesses
OSS
application
users
OSS
as tools
in R&D
OSS
component
integration
Active
participation
and
management
of OSS
communities
Launching
new
communities
Product makers
Gradual usage of Open Source in businesses
32
OpenSource in S&A
28/11/2012
Use of Open Source Software
Benefits and Risks
Low cost of ownership, Vendor independence
High quality and security due to peer review
Continued innovation by large communities of users
Conformity with open standards, good support and documentation
33
OpenSource in S&A
28/11/2012
Open Source Software definition
Open Source Software is computer software whose
source code is available under a license (or
arrangement such as the public domain) that
permits users to use, change, and improve the
software, and to redistribute it in modified or
unmodified form.
(Source: Wikipedia)
34
OpenSource in S&A
28/11/2012
Type of Open Source Software license
Free-For-All open source
Must credit the origin
Keep-Open open source
Must share modifications
Share-Alike open source
Must share modifications
Must share extensions
35
OpenSource in S&A
28/11/2012
Type of Open Source Software license
Free-For-All
open source
BSD, MIT
Must credit the origin
MOZILLA
Keep-Open
open source
Must share modifications
(Firefox)
Share-Alike open source
GPL, LGPL
Must share modifications
Must share extensions
36
OpenSource in S&A
28/11/2012
The Free Software Foundation (FSF) is a nonprofit with a worldwide
mission to promote computer user freedom and to defend the rights of
all free software users.
– “Free from restriction, to share, copy, learn, adapt and work with others”
Most likely licenses
– GPLV2 : "Liberty or Death" clause
• if somebody has restrictions imposed that prevent him or her from distributing
GPL-covered software in a way that respects other users' freedom (for
example, if a legal ruling states that he or she can only distribute the software in
binary form), he or she cannot distribute it at all
– LGPL : less restrictive license
• would be strategically useful for the C library and for software libraries that
essentially did the job of existing proprietary ones
– GPLV3 : software license compatibility
• most important changes are in relation to patents and license compatibility, the
definition of "source code", and hardware restrictions on software modification
• prevent patent cross-licenses (Microsoft–Novell style agreement)
37
OpenSource in S&A
28/11/2012
Consequence of Using Share-Alike license
Supplier
You
Customer
Supplier
Supplier
38
OpenSource in S&A
28/11/2012
Consequence of Using Share-Alike license
GPL
Supplier
You
Customer
Supplier
Supplier
39
OpenSource in S&A
28/11/2012
Consequence of Using Share-Alike license
GPL
Supplier
You
Customer
Supplier
Supplier
40
OpenSource in S&A
28/11/2012
Consequence of Using Share-Alike license
GPL
Obligation for you and
Customer to fulfill GPL
not for supplier
Supplier
You
Customer
Supplier
Supplier
Customer can ask for
financial compensation
41
OpenSource in S&A
28/11/2012
Default policy
Free-For-All open
source
ALLOWED
Must credit the origin
Keep-Open open source
Must share modifications
STRICTLY FORBIDDEN
Share-Alike open source
Must share modifications
Must share extensions
42
OpenSource in S&A
28/11/2012
How to avoid license contamination?
Like any third party software the use of open source software is
a business decision not a developer decision, therefore developers
must always seek management agreement before using open source
software in their development.
Supplier
You
Customer
License terms are complex and must be properly analyzed in order to
decide or not to use an open source software component.
43
OpenSource in S&A
28/11/2012
How to handle request from Customers?
Customers are getting aware of open source license issues.
They might have request on what kind of open source we use.
Because of the business sensitive aspects of open source, all
answers must be provided via sales channel after consultation of legal.
To initiate action please contact the OSS officer directly.
Do not answer directly to customers.
44
OpenSource in S&A
28/11/2012
Rules to apply for product development
Usage of Free-for-all open source is allowed in most of product
development.
Always check with OSS officer before inclusion of open source in code:
– License verification.
– Tracking and record in order to provide correct information to customer
when required.
Always keep the copyright header of the open source when included in
source code (even if you include a small part of code).
Modify the open source code only if it is allowed (check with OSS
officer).
45
OpenSource in S&A
28/11/2012
Can we open some drivers ?
Using a Free-for-All License, we accept to expose software to the
OpenSource community. There is 3 impacts:
– We claim it is not a software maker and does not make money with it.
• Only software makers can afford to develop and maintain proprietary software.
– We claim the software is out of its responsibility in terms of maturity and
bug fixing. So the product integration is definitely under the scope of
customer, and we can only give support (if the customer likes to).
– Business model is moving. Most MID makers use Open Source. SoC
makers take this opportunity to promote new chips by opening all drivers
for free. Some product makers upload their software stack in OpenSource
and buy only chips delivered with OSS license.
46
OpenSource in S&A
28/11/2012
Rules to apply for demonstrators and tools
Share-Alike OSS (e.g. GPL or LGPL) may be used for internal
demonstrators and tools.
However as soon as a demonstrator or a tool, including this type of
OSS, is not under exclusive company control (e.g. provided to
customer) you put it at risk.
It is therefore strongly recommended to follow the same rules for the
development of demonstrators and tools.
47
OpenSource in S&A
28/11/2012
Internal tools covering open source
Project life cycle checklist covering check point with OSS officer.
―3rd party components - Licenses and Obligations v1.0.doc‖
– Covers all third party software including open source
– Provides all information and legal obligation towards the use of these
components.
– Will be updated on quarterly basis.
48
OpenSource in S&A
28/11/2012
Conclusion
Be careful when using OSS with proprietary source software
– GPL license jeopardizes company confidential source software
– In case the code requires to be released under Apachev2 or GPL/LGPL, it
must remain a business decision and proper investigation must be done in
relation with IP&L
But take it easy with non-differentiating software
– If you propose software to the OSS community, you get
new friends and at best your patch will be adopted
– If you deliver a Linux module, the final integration
is under the final user responsibility.
At best your customer will appreciate your
contribution in supporting him.
49
OpenSource in S&A
28/11/2012
The mixed software model
Deployment rules
50
OpenSource in S&A
28/11/2012
Differentiating software
Remember !!!
Differentiating technology is what makes your business more desirable
to your customer than your competitor's business
But it wouldn't hurt your business for your competitor to understand how
non-differentiating software works. Indeed, that competitor might be
the best collaborator because their needs are most similar to yours
Focus only on differentiating software, the core driver that set up the
chip, handle event and contains optimization and workarounds
Need to take an honest look
– "Not Invented Here" syndrome
• People aren't willing to consider the work of outsiders, because
they don't believe that it could be as good as their own.
– What is in stack ? Duplicate effort instead of spending time on the
differentiating software that is most important to the business.
51
OpenSource in S&A
28/11/2012
A new development and business model
Open Source is an enabling technology
Participation in Open Source development
is part of businesses overall strategy
Do not over specify software, but get legacy
from Open Source API
Identity the differentiating technology
that should be kept proprietary
Do closed-source modules mixed into
a mostly open source codebase
– securing most of the benefits of both models
– creating new benefits from the marriage
– allowing open competition between both
ways of developing software
52
OpenSource in S&A
28/11/2012
A new development and business model
Examples :
– Android framework is an open platform that
can embedded specific modules on
demand.
• These modules can be added for
performance enhancement and features
add-on but are not mandatory, likes AV
codec, state-of-the-art firmware, fast
computation algorithm…
– Smartphone makers do their own platform
adaptation on firmware and keep the
hardware differentiating technologies closed
53
OpenSource in S&A
28/11/2012
Development on Android
Apache v2
or BSD like
GPL, LGPL
54
OpenSource in S&A
28/11/2012
Development on Android
BSD License
– Free-For-All type of license
– Keep the licence and copyright in the code, claim it on
the device if the SW is not available. It can be mixed
with proprietary code without impact.
Apache V2
– No obligation to redistribute Android source code.
Code can be distributed under proprietary license
terms !
– But contribution to Android is of course provided to
OHA for integration in future releases of Android ;)
GNU/GPLv2
– Must share modifications
– Must share extensions
55
OpenSource in S&A
28/11/2012
Android: BSD License
Free-For-All type of license
Can be used and further licensed under terms and conditions of choice.
However, the conditions below may apply:
– The author may have to give credit to the original author(s), either in
source code, in documentation or in an interactive programme; and/or
– The name of the author/copyright holder may not be used to endorse the
software.
56
OpenSource in S&A
28/11/2012
Android: Apache v2
Redistribution of Android object code can be done. You have no
obligation to redistribute Android source code.
Code contributing to Android
– Code provided to OHA for integration in future releases of Android
– Your company shall grant copyright license under Apachev2 to OHA.
– Your company shall grant patent license to all Android users for your
company technology included in the contribution.
Code link to Android but not contributing to Android
– Falls out of the scope of Apache v2  Code can distributed under
proprietary license terms.
57
OpenSource in S&A
28/11/2012
Development on Linux (GPL)
GPL
GPL
Your
source
source application
Your
application
Modification
Extension
Linux kernel (GPL)
GPL
driver
GPL kernel
Your
module
kernel module
Your
driver
Your
GPL
kernel
source module
GPL
source
Your
driver
Your hardware
Kernel modifications
Device
Kernel
drivers
extensions
can
Separate
…Your
kernel
but they
Drivers
should
not
shoulditnot
IP in
… butalso
of course
Your application can
must be released
also
must
be be
kept
released
modules
can
bebe
derived
keptshouldn’t
be
from
derived
anybe from
any
hardware
modules
can
based
on
be kept proprietary ...
under GPLproprietary
under GPL
proprietary
...GPL code GPL code
remain proprietary
58
OpenSource in S&A
28/11/2012
Smartphone makers and GPLv2
Linux kernel contributions examples:
• http://www.archos.com/support/support_tech/updates.html?country=fr&lang=fr
• http://www.lg.com/global/support/opensource/opensource.jsp
• https://opensource.motorola.com/sf/sfmain/do/home
59
OpenSource in S&A
28/11/2012
Development on Linux
Userland
– In case of dynamic linking you may integrate proprietary code under
proprietary license terms with LGPL components.
– If LGPL code needs to be modified in order to integrate your proprietary
component, you shall redistribute modification of the LGPL component
Kernel
– Check GPL dependency
• No libraries nor EXPORT_SYMBOL_GPL allowed
– Make sure that the integrator follows the appropriate rules
• downloadable kernel module, with only #include <linux/module.h>
• proprietary license declaration via the macros MODULE_LICENSE/AUTHOR
– Note:
• there is a tendency by platform manufacturer to not have ―tinted‖ kernel.
60
OpenSource in S&A
28/11/2012
Development on Linux (kernel space)
The following is required for integrating the product in the kernel space.
Verify the external dependency and make sure that there is no dependency
towards GPL
– Libraries: No GPL, LGPL linked dynamically only
– Linux Symbols: No EXPORT_SYMBOL_GPL allowed
Make sure that the integrator follows the appropriate rules
– downloadable kernel module
– proprietary license declaration via the macros
•
•
MODULE_LICENSE(―Proprietary, Copyright (c) 2006 My company. All rights reserved.‖)
MODULE_AUTHOR(―My company‖)
Note:
–
–
–
–
there is a tendency by platform manufacturer to not have ―tinted‖ kernel.
The Linux community is pushing to have GPL only export symbol for new features.
More and more difficult to develop proprietary drivers
Avoid kernel space as much as possible
61
OpenSource in S&A
28/11/2012
Development on Android / Linux
Because of the nature of Android / Linux and their licensing scheme,
rules must be adapted for this specific case.
General policy remain the same: avoid that source code becomes
public and that IPR is at risk.
In case the code requires to be released under Apachev2 or
GPL/LGPL , It must remain a business decision and proper
investigation must be done in relation with IP&L.
In any case contact the OSS officer to initiate a proper investigation
62
OpenSource in S&A
28/11/2012
SW deployment suggestion
Low level drivers :
►Proprietary
►Version
►Fine
algorithms
patches
One time support
Might comes from ext.
tuning
►Customer
Chip know-how
specific settings
System know-how
Micro code :
►Secured
data
►Architecture
control
No comment
Chip know-how
►Protocol
stack
Know-how if optimized
►Interface
driver
Know-how if optimized
63
OpenSource in S&A
28/11/2012
SW deployment suggestion
Framework :
►Plugins
Plug and play spirit
►Interfaces
Legacy first
►Services
Higher integration
►Features
System know-how ?
Driver :
►API
Native plugin as best
►Real
time
Exposed is matured
►Core
control
Start/stop/switch… ok
►Default
settings
Easy to update ;)
64
OpenSource in S&A
28/11/2012
Open or not open ?
That is the question !
No
Yes
SW
Algorithm ?
System
Knowhow ?
No
Registers
Access ?
No
Yes
No
No
Yes
IP
Knowhow ?
Yes
Yes
Patent ?
Yes
Patent ?
No
Ok, let the
competition do it
for you
65
OpenSource in S&A
28/11/2012
SW deployment suggestion
Protected SW can also be written in a Open Source like style ;)
– It may become OpenSource in 1 or 2 years !
– Just update the header
– It is BCAM compliant
Do closed-source modules mixed into a mostly open source
codebase
Participating in a successful free software project is fun, and ultimately
that's what keeps the whole system going
66
OpenSource in S&A
28/11/2012
Conclusion (1/2)
Continuously track OSS usage and report to OSS
officer
Include the OSS dimension in your processes
Get support from the IP&L Department via OSS
officer
67
OpenSource in S&A
28/11/2012
Conclusion (2/2)
Use of OSS is a business reality
There are associated risks
(Loss of patent rights, source code
disclosure)
It is better to be prepared to avoid later
business damages
68
OpenSource in S&A
28/11/2012
Customer support
69
OpenSource in S&A
28/11/2012
Software package
The software delivery is a self-consistent Linux module with only :
– Sources (no compiled objects)
– One single Makefile that is Linux kernel oriented
– One single release note in a text file of few kB max with:
•
•
•
•
•
Description of the eature (10 lines max)
Targeted OS and SoC
History of versions
Installation how-to (5 lines max)
FAQ : with all questions from FAE and customers like:
– Q: "How can my application get the HDMI event ?":
A: Create a dedicated event thread in your apps and use ioctl WAIT_EVENT
– Q: . "I would like to dump the EDID of the TV":
A: Install the module with debug messages > insmod hdmitx.ko verbose=1
– Q: . "On the TV display some pixel are flickering":
A: Check the OMAP DSS setup and update the dssdev->panel.config parameters
• User manuel of the core driver and its proprietary API
70
OpenSource in S&A
28/11/2012
Technical training and integration
There are several kinds of customers:
–
–
–
–
some like Motorola wants to know and understand the feature
some like Archos get the package and are silent until mass production,
some like LG want you to make the full feature up and running asap,
Some like Qualcomm want just a demo for their own customers
But all like to get a demo up and running asap with a ZERO software
integration target, let’s say 1 or 2 days
With Linux module, no training nor teaching is required for API,
technical background and basic application sample
A software guy knows how to compile and install a Linux
package. Once the module is running on the target, the demo is
there thanks to the default settings (like 720p@50Hz, I2S 16bits)
Cost : 1 day maximum for the customer. What else ? ;)
71
OpenSource in S&A
28/11/2012
Issue solving
Core driver (or deep HAL) is almost a black box for customers. There
is hardly no chance for the customer to investigate here. But thanks to
the development platform you bought, you can reproduce many use
cases and fix remotely.
Linux module on top of the core driver is like an application sample
that fits basic customer requirements. It cannot fit all products
specification nor support a default implementation of all use cases ! So
we provide it as a demonstration package, not as a product bloc.
Customers might add others system or kernel plugins !
The Linux module (or the top of the driver) is under GPL license, so
the header strongly invites developers to solve issue themselves !
Don’t forget that, if you have uploaded your Linux module in Open
Source community, anyone is a potential bug solver !
72
OpenSource in S&A
28/11/2012
Interfaces integration
Do not develop software for hardware interfacing, get Linux legacy
technology (like tty, I2C, SPI, gpio, irq) that are already up and running
on any development platform
– Developing a new board with LPC, RS232, USB, I2C cost time and
money. Who can afford to pay for I2C or SPI bus integration again and
again… Does it makes sense to have people that debug LPC, I2C, SPI or
RS232 interfaces ? How many laptop have serial port nowadays ?
Spend time to imagine new demonstration use cases with technology
used by everybody: WiFi, internet, gaming, Android applications…
73
OpenSource in S&A
28/11/2012
GigaBytes in the pocket
Using SD card, the file system is out of the hardware
– It contains u-boot, Linux image and graphical OS like Android
– The drivers
– But it can also embeds
•
•
•
•
•
3D HD streams
Slideshow
Android applications
Youtube shortcuts
…
74
OpenSource in S&A
28/11/2012
API ! Why ?
Many customers want new technology and put high pressure for time to
market, so they have no time to learn how the technology works
API means the customer shall pay for integration, does it wants to ?
With a development platform you gain from the multimedia framework.
Give it control of your chip adding software pluggin (about 100 C lines)
in your Linux module.
– Power up/standy, defaut settings, play/pause is ok
When you provide a Linux module to a software guy, the only think he
knows is how to install the module in the target during run time.
This is enough to get your design-in demo running !
Do not over-specify API, provide an autonomous Linux module
with plugins that natively interface with the framework.
75
OpenSource in S&A
28/11/2012
A probe for debug ! Why ?
Do not update Linux kernel,
Do not flash de development platform
But use modules that can be installed/removed on target at runtime in
less than 5s, use adb tool (Android Debug Box) with a USB
connection between the platform and your laptop
Linux kernel provides core dump and stack status for post analyses
76
OpenSource in S&A
28/11/2012
Linux driver for developers
77
OpenSource in S&A
28/11/2012
Architecture of the GNU/Linux operating system
Quiz : where is Linux ? Linux kernel ? Android ?
What are Ubuntu, Debian… ? Where is it ?
78
OpenSource in S&A
28/11/2012
Linux Kernel
The HDMI driver is no
more a standalone driver
but a piece of a puzzle in
the Linux kernel
architecture
Quiz: where is HDMI
driver ?
79
OpenSource in S&A
28/11/2012
No architecture effort
No specification documentation but a 2 pages ―how-to‖ for developers
Only if you are the first one to provide a feature, no architecture
specification is needed. The Linux kernel supports a tremendous set of
interfaces already optimized that fit each others and guarantee the
kernel stability. Just be inspired while copying some to create yours
Others vendors have already set their own drivers, just find the right
place to put the right driver
Get legacy, your driver should
be ―a kind of‖ with inherited
structures
User Space
Kernel
My Driver
Tuner
HDMI
RF
80
OpenSource in S&A
28/11/2012
Use a kernel, not a platform
Linux supports many interfaces. They are all deeply integrated in the
Linux kernel
Linux kernel version indicates a interfaces set maturity level in terms of
hardware abstraction layer and generic platform adaptation
Indeed, do not adapt to a platform but ―use” a Linux kernel version
that supports it
Only SoC makers are in
charged of platform
adaptation
My Driver
My Software
use
2.6.29
2.6.35
Linux kernel
TI QCOM
OMAP Snapdragon
arm
Intel
mips x86
Atom
Freescale
68k
ColdFire
SoC
RISC machines
81
OpenSource in S&A
28/11/2012
Hardware abstraction layering
Common hardware abstraction interfaces like I2C, virtual memory,
register mapping, GPIO, IRQ are already up and running, so just use it
and do NOT re-invent the wheel…
Linux kernel provides all necessary objects with their methods,
just “declare” what you use and implement your back-end
User Space
Kernel
USB
I2C
My Driver
IO
Flash RAM
Serial
82
OpenSource in S&A
28/11/2012
I2C example
1. Declare some I2C client
struct i2c_device_id this_i2c_id[] = {
{ “TDA19988“,0},
};
MODULE_DEVICE_TABLE(i2c, this_i2c_id);
2. Provide its probe/remove methods
with your driver specific stuff
struct i2c_driver this_i2c_driver = {
.id_table = this_i2c_id,
.probe = this_i2c_probe,
.remove = this_i2c_remove,
};
err = i2c_add_driver(&this_i2c_driver);
Like some I2C start-up/stop-down
sequence for the TDA
int this_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
i2c_set_clientdata(client,…);
my_tda_init(…);
}
int my_block_write(struct i2c_client *client, u8 reg,
u16 alength, u8 *val)
{
struct i2c_msg msg[1];
msg->addr = client->addr;
msg->flags = I2C_M_WR;
msg->len = alength;
memcpy(msg->buf, val, alength);
3. Map your own R/W register
functions on your I2C client
return( i2c_transfer(client->adapter, msg, 1));
}
83
OpenSource in S&A
28/11/2012
Plugins
Overall system and framework description is needed to figure out the
customer requirements and how you can provide your features
Main concern is the ―features v.s. framework‖ mapping
Most part of features might be directly handled by the system using
small interfacing piece of software called plugins.
Do not provide proprietary API but
design your functions so it matches
existing system objects structure
My Plugin1
ALSA
My Plugin2
DSS
User Space
Kernel
Provide small plugins in both
kernel and user space
with your core driver
My Driver
My
feature
s
Framework
84
OpenSource in S&A
28/11/2012
Display Sub-System plugin example
1. Declare some DSS objects
2. Provide its methods with
your driver specific stuff
Like some power up/down
sequence for the TDA
static struct omap_dss_driver hdmi_driver = {
.enable = hdmi_panel_enable,
.disable = hdmi_panel_disable,
.suspend = hdmi_panel_suspend,
.resume = hdmi_panel_resume,
};
static int hdmi_panel_enable(struct omap_dss_device *dssdev)
{
dssdev->platform_enable(dssdev);
my_power_up(…);
return 0;
}
85
OpenSource in S&A
28/11/2012
Fine tuning of the driver during runtime
If your features can only be tuned with extra control that is not provided by the
system, if you like to give legacy of your core driver interface from kernel to
user space, if you like to embed your debugging tools set, export input output
control of your driver using IOCTL
But if the customer does not
like to compile some proprietary
header file in the application,
provide him device attribute control
at runtime using Linux File System
philosophy
Some
application
User Space
script
ioctl
Kernel
tty
FileSys
DEV ATTR
CHAR DEV
My Driver
86
OpenSource in S&A
28/11/2012
Device attribute example
1. Declare some device attribute
Like audio, resolution, i2c
DEVICE_ATTR(audio, S_IRUGO|S_IWUSR, audio_show, audio_store);
DEVICE_ATTR(i2cW, S_IRUGO|S_IWUSR, NULL, i2cW_store);
2. Provide methods with
your driver specific stuff
Like some i2c writting
ssize_t i2cW_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t size)
{
unsigned int page,address,mask,value;
char desc_format[]="%x %x %x %x\n";
sscanf(buf,desc_format,&page,&address,&mask,&value);
return my_i2c_write(page,address,mask,value);
}
user@host/$ echo “1 0x03 2” >/sys/hdmitx/i2cW
write 0x02 in register 0x01 using mask 0x03
87
OpenSource in S&A
28/11/2012
Linux module or Linux driver
Driver sources are in the kernel sources
Some drivers may not be complied according to the Kernel
configuration, some may be declared as module
A module is a driver than is compiled apart but still need the kernel
header files
A compiled module can be uploaded and inserted in the target in live,
I mean without recompiling the kernel nor flashing the platform nor
rebooting the target
Quiz : how many time for the kernel compilation ? For the module ?
88
OpenSource in S&A
28/11/2012
Installation of a module
It’s an online process, no need to
recompile the kernel.
Prompt “insmod hdmitx.ko” in the
console to install
Prompt “rmmod hdmitx” in the
console to remove the module
89
OpenSource in S&A
28/11/2012
Linux GPL license
HDMI drivers
IOCTL
HdmiTx and HdmiCec Linux drivers are GPLv2
HDMI-Tx/CEC
libraries
– Pure GPL software like GPIO and IRQ is used
– MODULE_LICENSE(―GPL‖)
Core driver (DevLib and BSL libraries) is claimed as
proprietary, but it is compiled with GPL sources.
So it ―becomes‖ GPL, even used as a module.
I2C/GPIO/IRQ
90
OpenSource in S&A
28/11/2012
How to get ride of GPL license
HDMI drivers
IOCTL
Core driver (DevLib and BSL libraries) is claimed as
proprietary
If compiled without GPL dependency in a external
module, it can be kept proprietary:
– Only #include <kernel/module.h> is tolerated at
compilation using module_init() and module_exit()
Linux primitives
– Then each function of core driver API should be
exported in Linux kernel using EXPORT_SYMBOL()
• See tmdlHdmiTx_Functions.h
GPIO/IRQ
EXPORT_SYMBOL(…)
Core driver
#include <kernel/module.h>
HDMI-Tx/CEC
libraries
module_init(...);
module_exit(…);
I2C
– If I2C client is not tolerated in the core driver, then
export functions in another GPL driver.
91
OpenSource in S&A
28/11/2012
92
OpenSource in S&A
28/11/2012