Embedded software: strategic issues Embedded software: strategic issues Brent Frère, LiLux Linux Da ys 2002 Some definitions Some definitions Free Software Free software does not means 'gratis software' but software respecting the following principles: Some definitions Free Software ­ Freedom 0: Free dom of execution Whenever country you are in. For whatever environment: business, private, educational purpose. Free Software doesn't mean 'non commer cial '. Examples of commercial free software: Linux distributors (Suse, RedHat, Mandrake, Caldera, Slackware...), MySQL, IBM... Whenever the purpose of the execution is. Whatever the power of the executing host is. Even if the software is used concurrently by numerous users. Some definitions Free Software ­ ­ Freedom 0: Free dom of execution Freedom 1: Free dom to a dapt, m odif y, study the soft Implies the availability of the sources. Allows learning process. Learning computer skills on a closed systems is not learning: it's training how to use commercial product. Allows adaptations for a specific use. Allows fast correction process. Prevents spy code, secret back-doors. Enhance security by white-box testings, and fast security fix availability. Some definitions Free Software ­ ­ ­ Freedom 0: Free dom of execution Freedom 1: Free dom to a dapt, m odif y, study the soft Freedom 2: Free dom to distribute c opies For free or against a fee. Free software doesn't mean 'gratis'. The copies must be distributed under the same license terms, in order to guarantee the software to remain free. Some definitions Free Software ­ ­ ­ ­ Freedom 0: Free dom of execution Freedom 1: Free dom to a dapt, m odif y, study the soft Freedom 2: Free dom to distribute c opies Freedom 3: Free dom to e nhance the sof t You can modify the software, enhance, add functionalities and distribute the new obtained version under the same license terms. Some definitions Free Software Free-Software foundation Created by Mr Richard Stallman in 1985, originator of the 'Free Software' concepts. This organization created the 'CopyLeft', GPL and LGPL licenses, and has developed the GNU project. GNU/Linux is a complete software solution using Linux as free operating system (kernel) and free GNU tools on it. Some definitions Free Software Free-Software foundation Open-Source Open Source is a newer organization that uses 'Open' instead of 'free' to avoid confusion between free in the expressions * free beer * free entrance Some definitions Free Software Free-Software foundation Open-Source ­ Not only acc ess to the sour ce s Open source does not only mean access to the sources. Some definitions Free Software Free-Software foundation Open-Source ­ ­ Not only acc ess to the sour ce s Slight cha nges compared with Fr ee Softwar e: It actually gives the same rights as the 'Free software' but with some differences: Some definitions Free Software Free-Software foundation Open-Source ­ ­ Not only acc ess to the sour ce s Slight cha nges compared with Fr ee Softwar e: Distribution of modifie d c opies ma y be re stricted The distribution of modifications can be limited to patches. This does not harm the freedom of changing the source and distributing the modified software but force some respect to the origina l version of the software, avoiding various slightly different versions to be distributed under the same name and version number. Some definitions Free Software Free-Software foundation Open-Source ­ ­ ­ Not only acc ess to the sour ce s Slight cha nges compared with Fr ee Softwar e: GPL is compliant with Open-Sourc e de finition Actually, the most famous license of the 'free software world' (the GPL) is compliant with Open Source principles. Some definitions Free Software Free-Software foundation Open-Source Standards A it * * * standard is not a widely used format or protocol: is Published Exist in multiple independent implementations Is interoperable between different systems Ex: IP, HTML, ... Counter examples: Autocad, Word, MediaPlayer... Situation in embedded software world Situation in embedded software world Large amount of processors , micro controllers There exists a huge amount of different hardware architectures, including various processors or micro-controllers, busses, interfaces, ... Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Embedded systems means usually an architecture that must fits the requirements of the application, no more, no less, and be low cost for large series industrial production. This leads to about as much architectures as embedded applications. Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Embedded systems have usually various interfaces (or even about no interface, such as a car alarm). When thinking about a Internet-ready home TV and a router, it is clear that the nature of the interfaces are not exactly the same. Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Real-time, preemptive multi-tasking support required Most of the time, embedded applications are supposed to react in a given, limited, controlled amount of time (as example an ABS system embedded in a car) and perform multiple tasks at the same time. Real-time services and preemptive multi-tasking is thus required. Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Real-time, preemptive multi-tasking support required Many proprie tary embedded s ys tems Consequence: the embedded systems world has known a huge amount of different proprietary embedded OS and software suites. Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Real-time, preemptive multi-tasking support required Many proprie tary embedded s ys tems High cost for a proprietary system maintenance Because of they were proprietary and noncompatible, the cost of development of drivers for new interfaces, the cost of port to new architectures, ... was not shared among large number of customers, leading to high prices for such dedicated embedded systems. Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Real-time, preemptive multi-tasking support required Many proprie tary embedded s ys tems High cost for a proprietary system maintenance Requires efficiency, portability, standardization So the embedded system we need requires efficiency (low CPU and memory use), portability (sharing the development costs on all the platforms) and standardization (for strategic reasons but also to lower the price) Situation in embedded software world Large amount of processors , micro controllers Numerous hardware architectures Lots of different interfaces Real-time, preemptive multi-tasking support required Many proprie tary embedded s ys tems High cost for a proprietary system maintenance Requires efficiency, portability, standardization Embedded Linux The embedded software suite of choice is Linux, as we will see in the next slides. Example of embedded devices: PDAs Numerous PDA vendors (in Asia) are basing their systems on Linux, with the advantage that huge amount applications (games, web browsers, word processors) are already available for free. Linux runs on Mips, ARM, ... Cross-compilation is not an issue. Stability of Linux allows the system to go to 'sleep mode' when not used, so the system is actually never rebooting. This is for sure not possible with OS that requires reboots to change settings, install software or suffer from memory leakings... Example of embedded devices: Single board Pcs Single board PCs are ready for embedded applications. From few EUROs, you can purchase a complete computer, with USD, IDE, Serial, Ethernet interfaces. Linux can be used with only a serial interface as console. Example of embedded devices: Remote management PCI-cards In order to remotely manage hosts running instable unreliable OSes, a remote management card can be used. Often, it just runs a reliable embedded OS: Linux, allowing to remotely reboot the ill computer or access some part of it for remote diagnostic. Example of embedded devices: Network elements IP/DVB Gateways Ne twork s tora ge devices Terminal se rve rs, routers Terminal server offers 8 serial console ports plus a modem connection and an Ethernet interface. It offers secured remote network connections (SSH). System fits in 4MB of ROM and runs on 16MB of RAM. File servers running Linux and booting from a ROM can support huge journalized file systems (300GB) on software raid-5 and recover from a power outage (they don't crash you know) in 27 seconds. This kind of availability makes the user unaware of the server power-cycle: he just notice some network slow-down for some time... Example of embedded devices: Home devices Digita l se t-top box Watc h Web scree n phones Interne t T V Car MP 3 player VoIP phones Linux is so CPU-cycles efficient that it fits in a watch. It can work in devices with very different interfaces, such as a phone or an Internet-ready TV. Why embedded Linux ? Why embedded Linux ? Proved stability, re liability Uptimes of three years are usual on c omputers running GNU/Linux or other free OS (F re eBSD). Systems can be updated, softwares can be installed/uninstalled, drive rs can be loaded/unloaded without a system reboot. Groups are even working on ways to upgrade the entire Linux kernel without interrupting the system at all (without reboot) ! The system is not suffering from memory leaking, improper memory protection or uptime limitations. Why embedded Linux ? Proved stability, re liability ­ The largest uptim e of a Linux system is 1062 days in aver age for the last tree r eboots (www.rinri- jpn.or.jp) Largest up-time systems on the Internet (about 4 years of uninterrupted service in average on the last 3 reboots) is achieved by BSD and Linux systems only. Why embedded Linux ? Proved stability, re liability ­ The largest uptim e of a Linux system is 1062 days in aver age for the last tree r eboots (www.rinri- jpn.or.jp) What about the 48.7 da ys bug of WinNT ? ­ Some years ago, Microsoft recognized an uncorrectable bug (part of the specs actually) in WinNT 4 that pre vents such a system to run reliably longer than 48.7 days. Nobody notic e, because Microsoft OSes are so unstable and memory-leaking that it is admitted that such a system crashes from time to time. Such a bug would be immediately noticed by Unix-like system administrators, because those systems have typical uptimes of several years. Why embedded Linux ? Proved stability, re liability ­ The largest uptim e of a Linux system is 1062 days in aver age for the last tree r eboots (www.rinri- jpn.or.jp) What about the 48.7 da ys bug of WinNT ? Cluste re d VoIP router ­ ­ A Microsoft partner produc ing VoIP gate kee pers presented in 2000 its product, proud of its stability: it was based on a clustered embedded WinNT system. The justification of the speaker was: 'under this heavy work load, each of the node gets crashed in average once per day. But thanks our cluster architecture, the other node is keeping the services. The crashed node takes less than 3 minutes to reboot, so that the probability of having the two nodes crashed simultaneously is very low, providing a very reliable service.' Incredible, isn't it ? He was proud of using a buggy, unreliable OS. Why embedded Linux ? Proved stability, re liability ­ The largest uptim e of a Linux system is 1062 days in aver age for the last tree r eboots (www.rinri- jpn.or.jp) What about the 48.7 da ys bug of WinNT ? Cluste re d VoIP router Embedded system s are not suppose d to be rebooted ­ ­ ­ Uptimes of three years are usual on c omputers running GNU/Linux or other free OS (F re eBSD). Systems can be updated, softwares can be installed/uninstalled, drive rs can be loaded/unloaded without a system reboot. Groups are even working on ways to upgrade the entire Linux kernel without interrupting the system at all (without reboot) ! The system is not suffering from memory leaking, improper memory protection or uptime limitations. Why embedded Linux ? Proved stability, re liability Proved security Lloyds insurance fees are 30% lower to cove r security attack risks on Linux-based systems tha n on Microsoft ones, as example. TIS recommends installation of its Gauntlet firewall on BSD or Linux instead of proprieta ry OS because of the proved and verifiable security of their network stack, among others. Security fixes are often available within few days on free software, while they are sometimes not made available at all on some proprietary OS. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Linux is ported on ARM, Mips, PowerPC, Sparc, Alpha, Intel 386, 486, Pentium I, Pentium II, Pentium III, Pentium IV, IA 64, lots of microcontrollers, ... If you have an another platform, port might be already available, or you can port it yourself: you're free ! Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform ­ Linux for X- Box (since 3/9/2002) Examples of port of Linux: Linux is available since 3/9 on Microsoft's XBox, despite an architecture dedicated to prevent execution of softwares not approved by Microsoft. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform ­ ­ Linux for X- Box Linux for Cisco routers Belgacom has ported Linux on Cisco's proprietary routers architecture to enjoy the functionalities and reliability of Linux. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform ­ ­ ­ Linux for X- Box Linux for Cisco routers Linux for Palm , Poc ke t PC s, ... Linux has been ported on hardware that have not even the required functionalities to support Linux: Linux is a demand-paging, virtual memory OS that uses memory protection and dynamic address translation provided by the underlaying hardware (state-of-the art in operating systems). Palm PDAs hardware does not provide those services, but Linux is however available on it. Linux runs also on Pocket PCs such as IPaq. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform ­ ­ ­ ­ Linux for X- Box Linux for Cisco routers Linux for Palm , Poc ke t PC s, ... Linux as f irst OS rea dy for IA64 Intel gave to the Linux kernel development community the specifications and a simulator of the future IA64, the 64 bits Intel processor. On the first day this processor was available, Linux was ready for it and ran. It was the only OS available on IA64 at that time. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch The Linux kernel is not especially designed for real-time services. However, a patch exist in order to replace the kernel scheduler by a real-time one. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch ­ Non R T kernel gives rea l-time servic es But the unpatched kernel offers already pseudoreal-time system calls, such as timers and watchdog support. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch ­ ­ Non R T kernel gives rea l-time servic es Non R T kernel has 100 µs accuracy Our experience using Linux in real-time applications is that non patched kernel can respect timings so tiny as 0.1 ms, which is already very good result. In comparison, Windows systems have an accuracy of 10ms. A car at 120 Km/h rides 30cm in 10ms while it rides only 3mm in 0.1 ms. The difference in the case of embedded security systems is obvious. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs Production of a dedicated kernel supporting exactly the services required by an embedded application is provided by Linux from day one. Why embedded Linux ? Even a graphical interface is provided to choose what should be part or not of a given kernel. Production of a dedicated kernel is easy to do. Options are numerous: under the IP stack option, lots of elements are available for choices. Please note that this snapshot is partial. Other options are available above and below this partial list. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs An OS supporting Ethernet, IPv4, IPv6, Ethernet, PPP, Serial, PCI, Bootp, DHCP, compres sed ROMFS, USB, J FS, IDE, ... fits in 360 KB . A shareware using '.NET' requires 300MB of libs... I buil d a Linux kerne l im age for an embe dded proje ct choosi ng exact ly what I needed. The im age of t he OS i s 360KB. It perfect ly f it s in an em bedded sys tem ROM. Com pared wit h thi s, it shows the i mport ance of t he choi ce of an OS: Hell o. Je vo us tro uve tr ès genti l av ec M S. M oi, je n' y ar ri ve plus . En f ai t, je su is pro gr am meu r V B depu is QB 2.0. Je sui s pass é pa r QB 2.0, QB 4.5, M SPDS 7. 0, VB DO S 1. 0, V B W IN 2.0, VB WI N 4. 0, V B W I N 5. 0, VB WI N 6.0. .. . A l' épo qu e, j' a va is fa is un peu de C, de C++ et de l ' asse mbl eur ( j' ou bla is : un peu de GW BAS IC a ussi !) sa ns pou voi r décr och er de la fa mi lle du ba sic à ca us e de so n e nor me f ac ili té de dev r api de et ce ma lg ré ses pro blèm es de mém oi re et de vi tesse . J' a i atte ndu lo ngtem ps d'a vo ir u n V B7 e t a uj ou rd' hu i, j e peu x vou s dir e q ue je su is trè s déc u. A u poin t q ue j e vi ens de cha nger de l an ga ge en choi sis san t bo rl an d c++ 6. 0 Bu il der. J' a ime pa s delph i, c' est pa s f or cem ent lo giq ue m ai s s ur tout vi scér al . Po ur q uoi s uis -je décu ? J' ai bi en sur r eçu l es bé tas de .NE T, j' a i fa is un peu de dev dessu s pu is j' a i ar rê té, no n san s pr endr e u n abo nne men t MS DN pou r être su r d'a vo ir l a ver sio n fin al e de s q u' el le so rt. Et des qu ' ell e es t so rti e, je m e s uis m is sur u n pro jet pers o plut ôt techn iq ue et c om plex e - vu l a fo rc e de . net, j e m e sui s di s q ue j e po uva is m ettre le pa qu et : un gr os lo gi ciel d' a na lyse gra phi qu e po ur l a bou rs e Tr ès bien . Je co mm enc e et à pa rt q uel qu es pro blèm es de cl ar té dan s l e l an ga ge à pro pos des décl ar ati on s va le ur /r éf éren ce, to ut va bie n.. . . Et j' a ppréc ie éno rm éme nt l e com ila teu r in tégr é qu i perm et de r ecom pil er du la ng ag e V B.NE T depuis u n e xécu ta ble .NE T - Ca per me t à m es uti lis ateu rs de pro gr am mer eux m ême des co ur bes g ra phi qu es e t en pl us ça com pile . Seul eme nt, q ua nd je com me nce à a ff ich er une di za in e de co ur bes gra phi qu es cal cul ées en tem ps r éel , je me r end c om pte q ue l e tr uc va f ra nc heme nt pa s as sez ra pidem ent dépas sé, je ch erch e de s so lu tio ns, j e pl eur e sur l es NG de m icr oso ft, j' obti ent qu elq ues r épon ses qu e j ' appl iq ue à mo n pro gr am me, ça s' fin al eme nt ça me co nvi ent tou jou rs pa s. Pou r pa lie r défi niti vem ent à ce pro blèm e, j' u til ise la bi bli othèq u e de co mpa tibi lité . NET / V B6 et je dess ine Dir ectX 8. La plu s de pr obl èmes , ca boo ste. La l enteu r pro vi ent donc bie n de GD I +. Bo n, j e m e sens pa s tr ès bien q ua nd mêm e pa r ce qu e ça m' obl ig 20 m éga , Di rectX 8 : e nvir on 10 meg a, m on pr og ra mm e : 300ko . v ite et q u 'i l sera am él ior e un peu m ai s me s g ra phiq u es e n u til isa nt e à di str ibuer le fr am ewo rk : Pa r a cq uis de co nsci ence, j e fa is un test d' ins tal la tio n de to ut ça su r un wi ndow s 98 fo rm a té. Je c opie l e n ecessa ir e : .NE T fr am ewo rk redi st, Di re ctX 8. 0 et mo n pro gra m me. Je dou ble cl iq ue sur . net f ra mew or k i nsta ll ati on et vla n prem ier mess age : i l fa ut I E6 pou r in stal ler l e tru c. R esul tat: Je tél écha rg e IE 6 : 80 m ega Je l' i nsta ll e et j' i nsta lle l e f ra m ewor k: pr emi er re bo ot. J' i nsta lle D ir ectX : de ux iem e r eboo t. Je cli qu e s ur m on pro gr am me po ur le l an cer : il ma nq ue MD AC (po ur l es ba ses de donn ées) . je télé cha rg e M DAC 2.6 et j' in stal le : tr oi sièm e r ebo ot. Je cli qu e a nou vea u sur mo n pr og ra mm e, i l ma nq ue MS- JE T 4.0 (G estio n des ba ses de do nnée s A ccess) : Je tél écha rg e : 5 ME G A. Je rec liq ue su r mo n pro gra m me : il m a nqu e les bibl iot hèq ues de com pat V B6 (po ur di rec tx) f ou rni es ave c V S. NET ma is pa s avec le fr am ewo rk. J' in stal le le s bi blio thèq ue s et enf in m on pr ogr a mm e m ar che . Ma is sa crée g al ère q ua nd m êm e. Po ur f a ir e to ur ner u n pro gra m me de 300 ko su r un post e w98 vi erg e, j' a i du insta ll er en vir on 120meg a de pro gra m mes co mpr essés. C'es t pa s ma l pou r un pro gr am me q ue je veu x di str ibue r en sha rew ar e !!! A bsur de ! !! Si le fr a mew or k est bien en su bsta nce, i l se tra in e des ta res m ons tres . C'es t à di re q u' il f au t q u asi men t di stri buer u ne ver sio n .ne t de wi ndows po ur u n pr og ra mm e de 300ko . De plu s, il est f r anc hem ent tro p l ent. Si s ur de no mbr eux po ints, il est plu s r a pide qu e V B6, je su is pers ua dé q ue su r d' au tre il l 'e st m oi ns. To ut ceci , m' a dég ou té e t m e f a it cha nger de la nga ge, a vec r egr ets ma is sa ns cho ix. J' a i au ssi testé A SP.NE T et j e pe ux vo us dir e q u e m es pro gra m mes f ai t en A SP 2. 0 étai t c om pi lé et tou rn ai ent très vi te c ar j 'u til isa is AS P u niq ue men t co mm e passe rel le de qu elq ues l ign es po ur l a ncer des DLL Acti veX . De ce poi nt de vu e, A SP.NE T ne révo lu tio nne ri en pou r mo i. La co mpi la tio n exi sta it dé jà bi en ava nt. Co ncer na nt les W E B Con tro les, ils n' o nt au cun in tere t, si ce n' est de f a ir e r am er l 'a ppli cat ion we b. En ef f et, ces co ntrô les se co mpo rten t co mm e les co ntrô les d' un e a ppli ca tion s w indo ws cla ssi qu e : ils décl ench ent des événem ents q ui so nt im médi ate ment r envo yés ver s l e serv eur m ai s avec l 'é nor me pr oblè me qu e cela pa sse pa r int erne t et q ue ca r al enti t g ra ve. E n intr a net, ça peut être inter essa nt, m a is sur i nter net : zér o. O n e n r evi ent à la pr og ra mm a tion cl a ssiq ue de site web, ma is av ec l ' ava nta ge évi dent de po uv oir pr og ra mm er a vec de vra is la ng ag es : VB. NET, C# et bientô t D E LPH I .NE T, c' est qu an d m ême bie n po ur ç a, c es l an ga ges so nt n ettem ent plus évo lu és qu e l es an cien nes ver sio ns d'A SP. Pa r co ntre , pro gra m mer u n site web av ec . NE T, c' est pas un e s inéc ure ca r 1) V S.NE T ra me lo ur dem ent et l 'a l tern ati ve W E BMA TRI X n 'e n e st pa s une ca r el le est tro p l imi té : pas d' int elli sens e, pa s de mi se en fo rm e de la synta x e, etc. E nsu ite , il f au t a u mi nim um windo ws xp pro o u win dows 2000 et bi en sur I I S vers io n 5 mi nim um . A upa ra va nt, on po uva it cr éer so n site web av ec PW S (pe rso na l web s erve r) gr a tuit emen t et so us win dows 98. D onc f ina nci ère men t, c' est pas la m êm e h isto ir e n on plu s. E n rev anc he, l e co nce pt des web ser vice s se mble tr ès intér essa nt pou r les a ppli cati on s di stri buées . En co ncl usi on, à l' heu re a ctuel le il a ppar a it éviden t q ue . NET n' est pas a dapté a u devel oppem ent d'a ppli ca tio ns windo ws cr itiq ue s, ra pide s, por tabl es entr e di ff ér entes ver sio ns de windo ws, à des di str ibuti on s g ra nd pu bli c pa r in tern et sou s f or me de sha re war es ou f re ewa re, e tc Il a ppar a it, pa r con tre, etre un e é vol uti on sér ieu se du la nga ge AS P en per metta nt la pro gra m ma tio n s ou s di ff ére nts la nga ges de site s w eb et in tegr e l es con tro les web pou r des appli ca tio ns intr an et. Ou e nco re des appl ica tio ns distr ibu és v ia l es serv ices web. C' es t do nc plutô t u n pro dui t q ui vi se plutô t les entr epri ses. L' in sta lla tio n du fr am ewo rk sur tous l es po stes ser necess ai re. S i l' on deva it f ai re un e c om pa r ai son a vec Java , j e di ra is q ue si Java n' av ai t pa s l a po rta Fra mew or k / C# m ai s co mm e ce n' est pas le ca s, le s c hose s so nt dif fér ente s. Da ns le ca s ou l' o n le fo rm e ci ble est wi ndows /i nter net, . net r este l' ou til de prem ie r cho ix. Da ns le cas co ntr ai re, il fa u t u ai t u n vér ita ble plu s da ns de nom breu x ca s m a lgr é l' im por tan te m ise à j ou r bili té qu 'i l a, il ser ai t é cra sé par pa r l e tr io V isu a l S tudi o. NET / . NET poi d du déplo ie ment des ou til s n e po se pas de pro blèm e e t q ue la pla te tili ser Ja va sa ns discu ter . Qu and à m oi , je res pecte cette fa ço n de vo ir , et j' ai c hoi si bor la nd Buil der c++ ca r i l di spos e d' o util s ra d i nex ista nts ai ll eur s qu e ch ez m icr os of t. E n e ff et, BC++ Bui lder per me t de cons tru ir e u ne appl i de l a mê me fa ço n q u 'a vec vb. net. La bi blio thèq ue f ou rni e ave c Bo rl and C++Bu il der ver sio n entr epri se est pl us ri che q ue cel le de . net. pa r a il leu rs, l es appli ca tio ns pro duite s a vec Bor la nd C++Bu ilde r son t r api des e t po rta bles ( lin ux ,wi ndow s95,98, etc) . Il e st d' a ill eur s fo rt pro babl e q u e j e c han ge de pl at e f or me pou r li nu x pour de s r a iso ns écon om iq ues: la depen dan ce m ic ro sof t r evi ent cher e ( no tam ent à ca use des li cenc es) Mêm e si j ' ai évi té les a spects pur eme nt te chni qu es, j 'e spère a voi r appo rté u n pe u de l um ièr e s ur . net. A+ Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs The YOPY kernel+bas e applica tions fits in 24 MB (OS, X-Window, base a pplica tions...) As example, the commercial PDA called Yopy, has a total memory of 64MB. The OS, base applications such as graphical interface, multimedia player, web browser, e-mail client, games, shell, ... fits only in 24 MB of RAM. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs Is maintained, ported by the community Linux was created in 1991. The evolution of this OS was so fast, due to the Internet community support, that it supplanted Hurd (the free OS developed by the FSF) and it evolved to the best OS available, forcing IBM to port Linux to all its platforms from the desktop to the mainframe. (Some NASDAQ IBM mainframes are running Linux) Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs Is maintained, ported by the community Is free Meaning that for companies that sells hardware (not software), they have the total freedom to access the embedded OS source code, to correct it, adapt it, tune it and use it on as many systems as they want for free, receive for free updates, bug fixes, security fixes, ... Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs Is maintained, ported by the community Is free Is very efficient in memory and C PU usage Tests made by Oracle and newspapers shows that on the same hardware, Linux is in average about 30% more efficient than Microsoft OS. A Linux-based router running G703 2Mb/s line, plus IEEE 802.1q vlan tagging on a fast-Ethernet line, plus SDLS on PPPoE, plus firewalling, routing, Network Address Translation, web proxy service, file and graphical desktop service plus other services (SNMP, NTP, FTP, NFS, ...) fits in 128MB of ram. No swap is required. Why embedded Linux ? Proved stability, re liability Proved security Is ported on a bout any platform Exis ts a rea l-time ke rnel patch Can be tailored to match specific embedded needs Is maintained, ported by the community Is free Is very efficient in memory and C PU usage Is designed to work without gra phical interfac e Linux can be configured to offer all services (including remote GUI) on system having no graphical interface ! Embedded devices, such as routers, MP3 players, set-top boxes, car radios... can be fully accessed, maintained, debugged through a simple Ethernet or serial interfaces. Strategic considerations Anti-competitive proprietary OSes Proprietary OSes can have anti-competitive behaviors such as hiding APIs, changing implementations from update to update to prevent competitors software to be supported, hide some hardware specifications to prevent competitor's product to use it, not support some interface that did not pay an entrance fee, integrate undocumented services to their 'OS' to give advantage to their own software against concurrents. Strategic considerations Anti-competitive proprietary OSes ­ The Office Suite example Microsoft finally admitted that hidden APIs were part of Windows OS suite to give advantage to MS-Office. Too late: there isn't a commercial alternative to MS-Office on Windows any more. Strategic considerations Anti-competitive proprietary OSes ­ ­ The Office Suite example The web browse r e xam ple The market of commercial we b browsers is out. Microsoft integrated this functionality in its OSes against legal decisions (Mic rosoft was a lready condemned before launch of Windows-95 for this). Developing a commercial product based on Windows means that you play a game against an opponent that rules the game, changes the rules during the game & does not respect them. Strategic considerations Anti-competitive proprietary OSes ­ ­ ­ The Office Suite example The web browse r e xam ple The Palm example Palm since 2000 does not support a nymore synchronization between its PDAs and laptops by IR interfaces because Microsoft changed the way this device was handled by Windows since Win2000 and refuse to disclose the way to use it. Knowing that Microsoft decided to enter the PDA market, it's not strange to see them refusing suc h an information to their main concurrent on that market. Such a behavior has a name: it abuse of dominant position to extend monopoly to other markets. It is strictly illegal but when it will be ruled, Palm will be out of the market since yea rs. Take this as example and avoid any link with proprietary OSes for your embedded business, if you don't want to be out in short term. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols Same applies to protocols. As soon as a proprietar y protocol is used, the dependency to the legal owner of the protocol is total. That's why telecommunication standards have always been published and interoperable between va rious manufacturers: GSM are using a standard to communicate, TVs are all using same published process to reproduce pictures, phones of any trademark are usable on public phone network, success of the Internet is based on published IP, TCP, UDP, HTML standards, success of CDs is due to the publication of the standard by its creator. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols ­ Media -player Media-player is a video signal streaming forma t that is NOT published, not interoperable, forces the customer to purchase proprietary OS, forc es the service provider to purchase proprieta ry streamer... It's exactly the opposite of a standa rd and is dangerous because it concentrate control on multi-media services in the hands of a single monopolist. Could we accept a single company to control totally the telecommunication market ? Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols ­ ­ Media -player CIFS Instead of supporting standardized file transfer protocols such as FTP, NFS, HTTP file transfer protocol, ... Microsoft preferred to use the C IFS published standard. Because this allowed interconnection between Windows-based system with other systems running CIFS service s, Microsoft changed progressively the CIFS implementation so that it is no more a standard. Even the famous open-source CIFS implementation that follows those changes is forbidden to use by Windows licenses. Micros oft hates interoperability, prevents it by changes in its proprietary protocols and if it's not e nough, prohibit interoperability by license terms. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols ­ ­ ­ Media -player CIFS ... Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols => Avoid using proprietary elements under control of (potential, future, actual) concurrents ! Integration of proprietary elements in an embedded system puts letha l dependency on potential or actual concurrents. Examples are numerous: in mid or long-terms, this will put you out of business because of illegal anti-competitive behaviors. More than that, EC directive demand publication of tele communication standard when used on public network and targeting public audience. Use of proprietary protocols or systems supporting only proprietary protocols is to be avoided by principle and by law. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols => Avoid using proprietary elements under control of (potential, future, actual) concurrents ! Counter exa mples: Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols => Avoid using proprietary elements under control of (potential, future, actual) concurrents ! Counter exa mples: Sony's success with Sony PlayStation II Sony is not out of the game console business because it has chosen to build it's embedded system on non proprietary system and they develop their game on Linux. They have the control of their hardware and software pla tform. They don't depend on concurrent's proprieta ry parts. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols => Avoid using proprietary elements under control of (potential, future, actual) concurrents ! Counter exa mples: Sony's success with Sony PlayStation II Ericss on & Nokia using Java technology on GSM Ericsson and Nokia understood that the proposed OS for GSMs by Microsoft cannot be used by them. If they take that alternative, Microsoft will sell all GSMs within next few years. They have no choice but using standard systems and protoc ols not under cont rol of a proprietary software vendor: they have chosen Java as software platform for their next generation GSMs. Strategic considerations Anti-competitive proprietary OSes Anti-competitive proprietary protocols => Avoid using proprietary elements under control of (potential, future, actual) concurrents ! Counter exa mples: Sony's success with Sony PlayStation II Ericss on & Nokia using Java technology on GSM ... Strategic considerations Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS In order to be ready for new emerging ha rdwa re and keep the possibility to change of hardware if useful, in order to be in good position for the negotiation with hardware manufacturer, the choice of an OS and software suite that is portable must be done. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS In order to be vendor-independent, choose an OS that is sold by multiple distributors. The same product (Linux) is proposed in more than 200 different distributions. Prices are variable: * RedHat Linux professional is around 275 USD. * Suse Linux professional is around 40 EUR. * Some distributions are available gratis. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... It is possible with a bit of attention to develop software that does not contain Linux-specific code. Ex: Ansi-C, C++ with TCL/Tk graphical interface based on GLIB, or Perl, Java, ... applications ca n run on as many platforms as Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MaxOS X, Win95, Win98, Win2000, WinNT3.51, WinNT4, WinXP, HP-UX, IRIX, AIX, True64, Hurd, ... This way, the project remains highly inde pendent of a specific OS. If some Linux-specific code is required, locate it in a documented specific part of the code (OS adaptation layer module) so that port will be easier. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your business market as open as the world i s. In some proprietary OS licenses, there are exportation restrictions. There is no guarantee the list of banned countries will not change, so using those softwares in an embedded application gives the control of a foreign country on the market you can work on. Some US exportation regulations also limit the functionalities of software, even for Europea n Union: security is treated differently for exported software than for local ones. Do we have to accept that products we sell must be less secure than concurrent ones ? Is this difference limited to security ? Will it remain limited to security issues ? Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations In order to protect your business against unfair competitors, it is important to keep secrecy about your customers. OSes or other proprietary software that require s on-line registration shows to (potential) competitors the list of your e mbedded application customers, gives a s much information as the proprietary OS vendor wants to know. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Evolution to new emerging platforms, such as Hurd or L4 is not a problem when using sta nda rd APIs and programming languages. New OSes such as Hurd or L4 are using the same standards: Posix processes and inter-process communication mechanisms, support of the GLIB library and Ansi-C programming language. All other tools, such as other programming la nguage compilers or interpreters are then portable on those new OSes, as well as graphical interfaces and other applications. In other words, if you develop on Linux, you're ready for OSes that are not ye t available. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies By choosing proprietary tools (OS, programming language, libraries, protocols, formats, ...) provided by a single vendor, even if the first license price is low, your business becomes de pendent of a single provider, meaning that the future prices for licenses or services can raise as high as the monopolist decides. You have no way to change of provider (it's unique) but to port your application to an another proprietary system, or choose an open platform, interoperable with other system s, keeping you in good situation for the negotiation of software and services prices. Linux is currently the most mature platform giving this kind of guarantee: it's free and multi-vendor. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies Keep tec hnology control: Acc ess to all APIs, adapt the kernel... In order to be able to develop the best e mbedded applications, access to all the underlaying sources is a must: depending on the kind of application, slight changes to the kernel or some part of it (IP stack, real-time scheduler, ...) will make the difference between your product and concurrent's ones. If the concurrent is using proprietary close d tools, you have key advantage on it. If the concurrent is the vendor of a closed proprietary software suite that you have chosen, you are the looser. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies Keep tec hnology control: Acc ess to all APIs, adapt the kernel... Keep up-to-date: Researc h, high e ducation, ne w protocols... New standards (such as Internet protocols, new data formats, ...) are developed by consortiums or work groups such as the IETF. To develop new prototypes of protocols implementations, access to the entire kernel source is re quired. That's why new protocols, new data formats are developed as example by IETF members on Solaris, BSD and Linux. That's why Linux implemented IPv6 three years in advance on other proprietary systems. Linux also implements already IGMPv3, lots of encryption mechanisms and security features unknown to other proprietary systems. Linux is used in universities, research centers... So it is upto-date, state of the art OS. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies Keep tec hnology control: Acc ess to all APIs, adapt the kernel... Keep up-to-date: Researc h, high e ducation, ne w protocols... Avoid OS that has a for eign inte lligence agency ba ck-door in it It is well known and has been admitted that Windows systems contains a back-door allowing US intelligence se rvices to enter any c omputer running this kind of software and connected to a network. Development of embedded applications on such a system is dangerous for stra tegic reasons: let's imagine all TV sets, all phones, all cars in Europe running this kind of software. What about our independence, our freedom of choice, especially if they diverge from those of US ? More than that, those kind of OS might be in s hort or mid-term forbidden by EU authorities for obvious security reasons. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies Keep tec hnology control: Acc ess to all APIs, adapt the kernel... Keep up-to-date: Researc h, high e ducation, ne w protocols... Avoid OS that has a for eign inte lligence agency ba ck-door in it Avoid OS that ar e f or bidden by states or a dm inistrations So when choosing proprietary OS or software tools for an embedded application, it must be known that some states or organizations are already banning some systems. As example, German army bans use of Microsoft systems in militar y applications. Other countries, such as China, Peru, UK are following the same direction. Strategic considerations Stay har dwar e inde pe ndent: use a m ulti-platf orm OS Stay vendor inde pe ndent: use multi-vendor OS Stay OS inde pe ndent: use standard API, libs, tools, ... Keep business fr eedom : no expor t regulations in lice nses Keep your customers base secre t: no mandator y OS registrations Be re ady for ne w e merging platform s Avoid uncontrolled licenses prices cause d by m onopolies Keep tec hnology control: Acc ess to all APIs, adapt the kernel... Keep up-to-date: Researc h, high e ducation, ne w protocols... Avoid OS that has a for eign inte lligence agency ba ck-door in it Avoid OS that ar e f or bidden by states or a dm inistrations ... Conclusion Conclusion Linux gives you all strategic guarantees Conclusion Linux gives you all strategic guarantees Linux is efficie nt, reliable, tailorable, portable, up-to-date, secure, fast evolving, widely supported, real-time ready, embeddable, low-cos t, implement standard protocols, supports portable APIs, use few memory, does not require GUI... Conclusion Linux gives you all strategic guarantees Linux is efficie nt, reliable, tailorable, portable, up-to-date, secure, fast evolving, widely supported, real-time ready, embeddable, low-cos t, implement standard protocols, supports portable APIs, use few memory, does not require GUI... Linux is the OS of choice for embedded applications Links relative to embedded Linux http://embedded.linuxjournal.com http://www.embedded-linux.org http://www.embeddedlinux.com http://www.embeddedsys.com http://www.realtimelinux.com Links to embedded Linux products http://www.lineo.com http://www.yopy.com http://www.cyclades.com http://www.b2c2.com/products/homestreamer.html http://www.penguincomputing .com http://hippoinc.com http://www.ch1.com http://www.opentv.c om Embedded systems: strategic issues http://BFrere.net/linuxdays2002 Questions ? Embedded software: strategic issues