 جيد morning everyone so my name is Anas Nashif principle engineer at Intel I will be talking about Zephar in general and the history behind Zephar how Zephar became to be how Zephar was created the ideas behind Zephar and progress over over time show you some some some of the major things that happened over the years before we launched the project as an open source project all the way to where we are right now and you know a few thoughts about the future as well and where we are going so the assumption here that you are somehow familiar with Zephar but if you are not let's see how I can jump slides here if you are not a quick introduction so the Zephar project was started by Intel in 2014 and was publicly launched as a Linux Foundation project in 2016 with Synopsys, NXP and Windriver back then as as the founding members I'm saying here it was started in 2014 and you would see the details that that's where the whole idea and the concept was established and it took us two years actually to take an idea or a need all the way to making it an open source project you know open for everyone and you know with with industry partners and so on yeah so that's if you have open source something internal you know in your company you would know what I'm talking about it takes a long time yeah I mean there's a lot of processes a lot of things that you know you need to get tried to be successful in the open primary goals of the Zephar project adoption was to to to have adoption by Silicon vendors and the embedded community while embracing the open source and open ecosystem vision of the founding members and the idea here was to to put something out there that solves some of the problems that existed back then in terms of fragmentation not having like you know and a real open source solution for embedded controllers and having something with governance and you know with beside being open source but also have a community and something that is driven by the community yeah the idea also was to to create a sustainable open source system something that would survive over the years and something that does not depend on one single vendor or a few vendors you know and something that is driven by the community obviously doing that while providing value to firmware developers inside the within the you know the founding members but also others that actually have joined the project later most of the goals actually have been achieved with the majority of Silicon vendors adopting Zephar there are a lot of products that have been launched over the years starting like from the first year all the way to I mean every day we hear about new products launched using Zephar there are plenty of products out there that are using Zephar we are not aware of that's not something that boots up with a logo on your screen and that's something usually is hidden behind you know and on a controller or on a bc and you don't get to see you know Zephar booting and with guides you know showing how and like like with Linux and with Windows yeah so that's there's a lot of adoption out there we try to track all of this I would be talking about some examples there but it's you know since the project has been launched we have seen a lot of adoption and this continues to grow the project also maintains like a major role in the open source community I mean we are not a standalone project you know on an island in the middle of an ocean we actually collaborate and work with many other projects and the Zephar itself became like an essential project and like ranked among the top critical open source project by Google you know so a ranking that is maintained based on based on community growth you know activity and you know adoption and so on so you can take a look at that and and see other projects as well at the same level as with Zephar so just to give you an idea where we are and I mean these numbers are you know give and take so don't quote me there it's not accurate by the unit there but it gives you an idea so as I said project was started 2014 launched 2016 a growing number of contributors this number I just got from github the other day over 80 000 commits I usually you will see the reference to commit as a metric across all over the slide that's not something I usually like because this is like a very bad metric in my opinion but at least when you compare apples to apples that's actually you know it gives you an idea you know about projects and activity in projects in terms of hardware support at the moment we support at least 13 uh different eyes us architectures we launched the project actually with just three x86 arm and and the synopsis arc in the meantime we have different variants of those like 64 bit we have you know more architectures added over the year and I will show a few examples of what has been added over the years there but it is it is like something in terms of hardware support it covers most of the things out there that you know would use a micro control or the choir and artists in this case in terms of platforms over 500 from different vendors over 50 40 releases over the years we just released 3.4 a few weeks back we have two lts releases behind us long term support releases over 1 million lines of code that's not that will show you that this is not just you know an artist's scheduler or it's actually more than that with a lot of things integrated a lot of you know subsystems services drivers hardware support documentation obviously etc this is the number of lines lines of code in c so there's there's a lot of a lot of content there a lot of things that you can use obviously every software project has bugs yeah so we have not proud of the number but it's something to show yeah 376 خلاص issues that shows you where we are in terms of we also fix bugs we don't just introduce them so over 11 000 over the years and in terms of contributions how things go into the project we use github and you know we got to this number of commits and this number of lines of code with over 40 000 per request and that's a lot yeah so with that said i mean and and going back to the title of the presentation when when you look at the zephyr project the first thing you know probably you want to see how how all of this has started and you'll see this you know as typical in a in a get rebusery you know when when you have written something and the first commit you have no انسبارات what right first commit right i mean this is very typical or initial import or whatever very typical and that's you know what happened back then in 2015 and obviously this is not like somebody submitted submitting a readme file and then things started this this was you know something that existed somewhere else and you know the way the way it happens in in commercial entities and you know you just squash everything and just put it in one commit yeah so obviously there was something before that yeah a lot of activity getting to this point and this is this is almost one year before the public release and this was required because as i said earlier when you release something like zephyr and altos where you actually looking for collaboration and you know members of the project and and you know doing things in open source speaking the right license speaking the right name creating the infrastructure around it you have to do a lot of preparation so a lot of work has gone into making this happen before the the public launch in 2016 in february 2016 so the commit i have just shown is is here basically and that's well you can see yeah so it's you know in april 2015 obviously a lot of things happened before so this is not a lot of work has happened i will go into that but this this timeline here shows you basically a lot of activity over the years obviously a lot of things i mean i i didn't go into what happened last month or you know last year i mean there are a lot of things still happening it's not like the the project is becoming inactive or anything like that that the the purpose behind this slide is to show that okay we have launched and there was a lot of things because because it was launched with an idea with a goal and probably like you know it was small enough that you know it walked the way it was but when the project grows when you get more adaptor when you get more members when you get more views and ideas about how to solve the problem when you want to support it on different architectures things start adding up and certain things that you have launched with might you know a few layers later don't won't make sense or won't scale or whatever so a lot of work went into creating or making that scalable and and usable by by many of the vendors that joined the project or the members who joined the project later on so there was a lot of activity in the first three or four years that includes like adding new architectures changing build systems introducing different ways of defining hardware device tree introducing different ways of you know managing third party modules vendor has and so on using west and and so on and so on and directly after most of this activity we managed to release LTS 1 1.14 in this case which which was like one a major release in terms of like after a long time in development that many many many members started using you know to base products on yeah and that obviously after LTS 1 things didn't stop and we continued to add more features i didn't so don't be angry if i didn't add your feature here in terms of like a major milestone i just you know you get the idea a lot of things are going in every month every day yeah and it's it's it's really significant yeah there is like too much to list here and going back to where things have started so i was talking about the first commit so obviously what i was showing that was not the first commit yeah and that actually you know just to show you how things were staged there was another first commit that we had which was how the project actually you know it gives you an idea where the project came from and in this case that was like in late 2014 where we got or we started collaborating with wind river and we got like the first drop of code from wind river based on dx micro or as they call it viber now the interesting part here is that this code i mean in one way or another was already you know running as an artist on some products so it was not some concept or anything like that and probably this code is here if you have like a laptop from three four years ago this code that i'm showing here is is running on your laptop an inter laptop yeah uh so that that was like production quality in many in many ways has a lot of features that went beyond what zafar wanted probably to do and that's where a lot of the work went in so going back here so the the project or the the concept was announced in early 2014 in an internal conference at intel and that's where a lot of work broadly happened i was not involved in this back then in inside wind river we got this code drop we started working on the zafar application i called that here although back then it was not even called zafar and i joined actually the whole effort like in early 2015 and that's where we took this code and started you know moving forward and and making all of this work just a note here a quick note is that before the public launch of zafar as zafar wind river also launched something based on the same code base a few months earlier as rocket this this thing doesn't exist anymore but it was supposed to be the commercial version of zafar it's like an downstream version of zafar that is you know maintained in a in a cloud ide wind river helix app and uh yeah this i mean if you go search for that that doesn't exist anymore obviously zafar was a little bit maybe overpowering or people wanted to do that open sourcing and not go with with commercial solutions or it was it was not ready for prime time there yeah so having said all of that i mean and looking at at at the phases so there are like the early days of zafar and a lot of things happened there yeah so just to give you an idea about what happened so basically by the release in 2016 we were at approximately 7 000 كومتس in first commit in the current zafar 3 was 2200 كومتس in squash كومتس so a lot of things happened in this year where that's explained here so we had to clean the code you know just imagine you're getting some code that was meant internally maintained and you have to put it out there so you have to run it through check patch or clean up you know the coding guidelines coding style uh the build system was a proprietary like custom build system so most of the people working on this came from a linux background so we embraced the config cable so we moved like from this custom build system to cable we introduced the device model also based somehow inspired by linux and we also removed a lot of features a lot of features that actually we added later on in the zafar project so for example the user space was implemented in one way but it was not it was literally a very custom implementation so we had to remove it you know and a few other features to be able to to release that in open source some of this feature will added later obviously when you release something you want to have some hardware so you know we added the launch hardware i will show a picture of that and started implementing the first abis that actually existed today in zafar right like gbio i square c i don't know and obviously a lot of these things went through a lot of transition and transformation but the the the origin of all of this that the device model and how it works how the abis etc that that was there from the very beginning if you are doing something with zafar and this is like one of the strength of zafar is with that with that with the obstruction of of hardware you can and that's was like really the selling point is that you you you write an application your application can be moved to other architectures or other vendors without changing too much you still have to change here and there but the idea is that your abi is hardware agnostic in this case yeah and that was the selling point and in in terms of like getting vendors and buy in and getting more members but it was also very important for us at Intel because this is also where we wanted to go in terms of like bushing zafar as you know an artist to replace like custom implementations of embedded controllers in the company لائسنس just a quick note on لائسنس so originally actually we wanted to read that as bsd but at that time we were like in lots of negotiations with different potential members and one of them requested actually something else so you know we had to go and replace or change the license from from bsd to to abachi 2 in this case and that's what we have today yeah so zafar is released under abachi obviously that you know that the main problem is that it's not compatible with gbl and and and stuff like that and this is right now and given where we are back then obviously that probably didn't make sense in terms of oh this really has nothing to do with linux in terms of hardware support and so on right now we are seeing that that there are a lot of use cases and people looking on using their existing drivers on linux also on on zafar so that is a problem we have to deal with all the time yeah now some some fun fact about zafar and its name so this is actually i found the spreadsheet where we were like brainstorming names for the project and lots of lots of candidates right i mean yeah actually very interesting one right now when you look at that uh so yeah i mean some funny names there and things probably you will not use but actually i mean in hindsight you know i would definitely have chosen something other than zafar right i mean because if you go and google for zafar right now it's it's it's it's tough to find something that you know basically our project i mean just look i mean this is this is just probably one percent of the things that you get yeah it's it's really amazing there are so many things called zafar out there inside intel we have we have internal project internal products called zafar and sometimes i get emails you know and i have no idea what they are talking about yeah it's it's it's really confusing i mean we have to live with that it's uh it's really uh yeah it is hard yeah actually last night when i was researching i even found out that zafar project.org our domain was was taken like 20 years ago by some you know real whatever hobbyist site or whatever i mean this is this is a very busy name so just to go back to how we launched we launched basically with bots a bot actually for i said three architectures and these are the bots that we launched with yeah so there was the arduino one on one actually the main reason why intel started all of that if if you remember there was the intel query which is like a microcontroller that actually had three architectures on there on it yeah so it was it has x86 it has arc and it had arm the arm part was a Nordic BED controller that actually run basically a custom firmware but the idea was to run zafar on the intel the x86 and the synopsis arc so that's where we have launched with obviously we had support for you know generic arm boards like freedom board in this case was also one of that man or first boss to be supported are doing a duo and intel galilee or if you remember these days yeah you could actually run linux at that on this thing as well yeah but actually yokto i think used to run on this but we use that for development and until recently actually we had some drivers like you know from these from the days of galilee or and and after we you know these spots actually don't exist in zafar right now i mean nobody's using them i don't want to be maintaining them so i actually we removed them at some point yeah so going back to that you know growing and developing on altos for everyone that's that's really that when when a lot of we were getting a lot of a lot of contributors a lot of a lot of members the project was growing and i said earlier there was a lot of things being introduced all the time a lot of a lot of chair right so i was talking about the build system earlier where we had to move internally from cable to to sorry from a custom to cable so then we decided to to move to seamek yeah because cable didn't really work well on windows yeah and we wanted actually to expand our user base and windows actually it's very important platform to support knit walk i mean knit walk by the way i didn't touch on that but knit working and bluetooth were also like you know features that were there from the very beginning so bluetooth as i mentioned because we were talking about iot and and you know b and e best devices so we had like a host controller when we started and over like in this period of zafar where a lot of things were added or or changed we also added the bluetooth controller the Nordic Nordic best one and that's also where when Nordic joined the project so uh we started with the contiki best act you know over time we moved to a native implementation the kernel we moved to uh you know from the the the design of the kernel that we had which was based on a dual kernel mode like nano and micro i will talk about it in a bit to a unified kernel over the years we moved from get it to get hub we moved from like some some random c i provider to get hub action that there are like a lot of transitions like that i i'm i'm just going in into one here one one of the major transitions that we had and i'm glad we did it like very early on was moving from a dual kernel model to the unified kernel the dual kernel model as as you know you can see here in the picture where we had the nano kernel which is like at the bottom and a micro kernel the nano kernel would actually run cooperative threads we call that fibers and the micro kernel runs preemptive threads which we call tasks and there was a lot of problem with this design it worked probably for certain use cases but as a general artist and to be able also to compete with whatever was available out there we needed to clean this up and the problems are listed here i hope that's big enough yes so basically it was not really intuitive there was double context switching something we obviously we want to avoid and a lot of duplication between the the the nano kernel and the micro kernel so objects would have to be sorry implemented twice things like semaphores mutex says and so on and it was not really efficient so basically the unified kernel made the kernel basically we created the concept of yeah okay you have preemptible threads and we have cooperative threads we moved away from fibers and tasks into threads yeah so we had like one way to create threads and yeah one limitation was cooperative threads were not able to to talk or use many objects so that actually went away when we did that and all of that was done with or accomplished by introducing a new API that you know provided some some level of combat ability so the transition period like was a little bit long but we were able to move away and and all users moved to the unified kernel and we don't have the confusion we had initially because like this was like the most common question should i use nano kernel or should micro kernel and you know obviously this this was and the name micro kernel obviously is very confusing as well because you know when you see micro kernel you assume this is like a true micro kernel which is it's really not so with that going to the last phase which is basically the phase where we have adoption products and and really self-sustaining ecosystem yeah that's where we have started as as i have shown you right and that was really very limited a few bots some chemo support things that you can put in your bucket but now and thanks to bricks here that's where zephyr is running right i mean when turbines this is just like you know shows you the extent and where we have gone you know in terms of like having several having zephyr running on on on critical systems like a wind turbine providing power to millions of people and this is just an example there are so many we have like a web page this thing all the products running zephyr and this is this is really growing and going back to the whole open sourcing and the whole vision and how we wanted the project to grow it was very important to us at least at intel when releasing the project is that this will never be perceived or looked at as an intel project that was always like really confusing oh intel oh you guys don't i mean what do you know about embedded systems so etc etc right and i think we did a very good job although we we started like very strong because that that that project came really from intel and wind river but the idea here i'm looking at at how the project has been growing over the years that in terms of contributors in terms of uh uh uh uh members and so on immediately after the launch you will see that the the members or community community in general grows continue to go up all the time we at intel obviously we have a you know a lot of interest and we are very invested in this uh continue obviously to contribute we didn't drop the ball or anything like that but there was no there was was no plan or anything to oh we want to have control i mean right now when you talk about zefar people don't associate that with intel back then it was because i mean we just had a few boards most of them intel related and so on but now we are just like one player among many yeah so that that gives you an idea and this is like the way when i created this chart i was doing that for something internal and i look at that this is really what i want to see in every project like launched yeah because there are different ways how you can put things in open source you can't just like put something in github and and go away and let people figure it out on their own yeah we definitely wanted the growth the industrial collaboration and and the governance as well and and that's how how you see that the project is successful it's not it's not really run or governed by by by one entity so evolving and self-sustaining open ecosystem is like one of the main things that we see right now like in this last phase is that there are a lot of things happening in so many different ways so getting things things done in zefar can be done and by those who need a feature for example you need a feature you submit it you know you submit a board request you submit an rfc either to support your own hardware and we have many vendors that are not even members of the project you know and they you know they submit there is a hardware if needed or you know extend architecture support to support their their their boards add soc support add the boards add the drivers and they can do that on their own right and this can also be done for generic features you know like a new subsystem or things like that obviously a lot of the work happening in the project happens through collaboration so major features usually is something that everybody is interested in this is different than adding a driver for a specific hardware when i'm add when when somebody adds a logging subsystem or or or posix support or you know can support yeah this is something that you will not be using on your own this is something that the community need to participate that's why we have we have like different forums where such features are discussed our abis are never stable unless they are supported on different platforms so you can submit something for your own platform right now but it's it's it's experimental until there are other users yeah and there are also other models where we we can see a lot of things happen is that you know if you can't implement the feature if you are interested in a feature you can there are members in the project and also outside of the project like different people who are involved in the project that can go and implement the feature for you and we see that this is this is like a healthy ecosystem and if you if you have enough power with with your vendor software vendors you can go ask them you know hey my idea doesn't support zephar can you go do that because i am paying your license fee and we see that all the time whether it's an idea whether it's like some tracing debugging tool and and this is this shows that there is interest similar like with compiler yeah and and that's that's really successful so this is approaching that the end of that presentation the the last slide is looking forward so obviously we want to maintain the project health and scale up to support growing user-based contributors and members we are at this level where we see growth all the time in terms of like people submitting changes poor requests member joining the project people asking questions we are at this stage where we have our own conference right thank you for joining and and this is this is this is all really great and i expect all of that to grow and and you know over the years i mean we are just getting started yeah we want to focus we just had a tsc first to first actually the last day we had a lot of discussions and i think one of them man things that we want to be focusing on is is user and developer experience so we want to make migration between releases easy and maintain obviously a stable and and and rich abi we want to you know continue to aggressive basically pursue project safety and security goals this is like some of the one one you know two of the pillars of the project safety and security and there's a lot of interest from different vendors and different members of the project to make this happen and we are looking into doing that and we want to also enable and encourage people to use to more rely on something like like lts you know for product releases and next year we are planning to release the third lts so that's where a lot of the planning happening right now and a lot of the activities trying to figure out what do we want to have in this release and how we want to release that so with that and if you have further questions if you want to interact with us later today we have a session called meet the maintainers where we discuss you know different roles and responsibilities in the project and how we keep up with the project growth so this is going to be in this room as well at around four o'clock so please join us if you want to interact with people who are actively working on zephar or if you have any questions so with that thank you very much i know we have just two minutes for questions yeah or three minutes yeah but go ahead if you have any questions well if we have support for intelzion can you repeat the question yes the question was if we have support for intelzion zephar should run on intelzion as well but it's like a very basic support in terms of like running on the architecture but if you are looking for support for all of the extensions and the features azion processor would have that would be something that need to be added like you have to steal my laptop yeah actually i the history so the question was about history back into zephar so this is a lot of that go back like 20 years ago yeah i mean the way that the transition of the os you know from i think some italian company to to wind river and then to intel that the history i have goes basically to the first first commit that i i showed yeah anything beyond that i you know is is actually if you go and dip the code that we have you will not find any similarity you you will not even see you know that it is coming from this code because zephar has changed so much right so if you're trying to bisect or something like that you it will not work yeah i can tell you that yeah go ahead that's probably all the time we have enough sorry we're at time yeah okay so thank you very much