A Brief Survey through Genode's ARMv8 Playground
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Kalkowski, Stefan
The Genode project has evolved over the past decade into a versatile toolkit for general-purpose computing. Even though support for ARM embedded devices is an inherent part of it since the very beginning, the focus of the past years was more x86-Architecture centered. Sculpt, the desktop incarnation of Genode, being the prime example. Recently, Genode's ARMv8 port ignited extensive development efforts to support more sophisticated workloads on top of modern embedded and mobile devices. The talk provides an overview about the current ARMv8 Genode landscape, its ambitions and potential. It will live demonstrate recent achievements from device support up to hardware-assisted virtualization on top of the NXP i.MX8 SoC.
 Hello and welcome to my talk. I'm Stefan Kalkowski. I'm working at Genote Labs as a developer since more than 10 years now. And I was focusing on the ARM architecture mainly in the last years. And within the last 10 months, we achieved quite a few steps to run Genote on NV8 machines, on certain NV8 hardware. And today I want to demonstrate this to you. So it's more technical demonstration with the focus on the demonstration, not so much on the technical details. And as you have seen in the previous talk, we are used to run our presentations on our own software stacks. So this applies to this talk. And like Norman already told you with regard to his setup, it's the same to me. So it was done a day before I was starting to foster them. So cross fingers that everybody, everything will work. So before we come to the actual demonstration, where I want to show three different aspects that might be interesting for embedded systems, which you could already use right now with Genote, I want to give you a short introduction on Genote's history on ARM and what were the findings of us that we made out of these experiences. Then I will showcase you certain aspects. And then we come to a short roadmap for this year related to the ARM development. So this picture shows in a rough sketch what kind of different ARM hardware was entering the Genote landscape. And what you can see, I don't want to go into much detail, but we had slight different ARM architectures from version four until now version eight. And we collected a lot of experiences, also with different SoC renders like Broadcom, the series that were used in the Raspberry Pi's, the OMAP4 from Texas Instruments and Incarnation of the Panda board and Exynos 5 from Samsung in Incarnation of the Andil board. And we did not just run a kernel on top of it with some timer driver and UART, but really tried hard to develop different device drivers for the peripherals for it. And so we had SATA drivers or SD card or different display engine and so on. And the experiences from this kind of development was that it's a pain and that it's really painful if you are just a small operating system, open source operating system with no access to documentation at all. And so the best reference you might get is Linux kernel drivers written by the SoC renders themselves, so there's not so much semantics that you can read out of it. And in the worst case, you've got even blob drivers which are just loaded by the Linux kernel drivers inside, so like HDMI blobs and whatever. So the situation is not that good, but the best experiences we made so far were with this NXP based the iMix series and their system on ships. So I wouldn't say it's great and everything is fine with NXP and I don't want to make marketing now for them, but from our experiences it was best with regards to open documentation. And we used it for instance for our extensive studies with using trust soon, with doing secure boot on this kind of platforms and also, yeah, we made some good experiences here. So this is what I wanted to give you as a result of this kind of history and we are not the only ones obviously that seem to recognize that NXP makes better documentation. So there are several open hardware projects right now that use this kind of system or some shit. So here you see the USB Armory which now has already a second version of it which was presented I think at CCC Congress this year or last year. And it's a kind of a smart cut system where you can store your cryptographic material which you can use for signing stuff or just storing encrypted stuff. And it's running on an NXP iMix 5 and it's completely open so you can download the layouts and you can assemble it yourself if you like. And we also had a genote port on the first version so yeah, I'm looking forward for the second one. And there is this MNT reform. It's a very cool self-made laptop project by MNT Research and it's really somehow a one person project. I mean there are more than one person but from the technical side it's not more than one person. And again you get all the material, you can just download it, you can build it yourself including a nice mechanical keyboard. And I'm really looking forward to bring the SCALTOS which you just had a look at if you attended the previous talk to this kind of device. And we have this Libram 5 smartphone which uses the same system on ship like the MNT reform and this is the iMix 8M. So it's an ARM V8 NXP system on ship. And again what they try to achieve is giving back control to the user, getting a smartphone which is mostly block-free as far as they can get with it. And yeah, I think we have this mindset in common with those kind of projects and this is somewhere where we like to meet and we also like to take this Libram 5 to make an Android-like environment, an Android runtime replacement so to say and those of you who attended the talk from Alexander Zinier about their component framework know what I mean. Okay, so this board for those of you who are not sitting in the first line is staying here in front of me on the table and I held the presentation now on this device. So it's the same system on ship like in the Libram 5 and in the MNT reform. And you see we have some Ethernet connector, USB connector, HDMI connector and SD card and we have peripheral drivers running right now in the system that drive all those kind of devices. And yeah, but this is not everything. But to show you this and not just list items I like to come to the actual demonstration part. So what are the use cases for? Used in the embedded world. So just imagine you stand in front of the ticket machine and the ticket is showing you blue screen or you drive in public transport and it doesn't show up the next station but some weird other desktop or whatever. And of course the ATM doesn't give you cash because it's one to do a Windows upgrade right now and doesn't work out until it gets this. So those are not some hypothetical examples but I think all of you somehow experienced already something like this. And here you see the WannaCry attack at Deutsche Bahn where they were out of order for several hours or even days I'm not sure anymore. So what you actually need is not a fully fledged desktop operating system like Microsoft for a Kiosk system but you need a custom tailored solution. And of course the costs for those who develop such systems are standing in the way if you have to do this all on your own. But those of you who attended the previous talk have seen how easily it is to integrate a custom tailored environment. But of course you need some support in form of components for this. And what you see here right now is again the slide central thing, this administration console and I want to show you now that in this system there are already on the small arm machine which only uses the first CPU because I didn't wrote a load balancer which automatically drives the components on different CPUs and did not manually tweak it. So everything is running on the first CPU and we have already 76 components running in this system. And as you can see it's like, yeah, I mean it's all, everything is software run, so it's really usable as a display panel or as a Kiosk system. Now we have very easy widget set, a very simple one. And maybe your programmers are not coming to this kind of widget set or programming in a genot environment. But of course we can also start something else. So let's start this Qt5 text editor. I mean, of course this takes some time because everything is read from a non-optimized SD card. And the all which is now doing is some I.O. and it's heavily copying over the bytes from the SD card. But in the end, crossing fingers, we will see this text editor you already know from the Sculpt version on x86. So what I wanted to show you, we did not just ported some peripheral drivers but we really went to the whole software stack. So we have different libraries like libpng and Qt5 and TCP IP stack. Of course in libc itself and the base library of genot obviously. And we went to the whole software stack to make this happen within the 10 months. So I'm quite convinced that we will also achieve more with regard to the hardware targets I already mentioned. Okay, but let's come back to the slides. Another example. So today everybody talks about IoT and all those crappy devices that are out there. And probably the idea is to have some shield gateways to as edge devices which are better shield those kind of IoT devices. And this is such a device. But of course you always have the problem of firmware upgrades in such environments. And as you have seen we have this depot packaging mechanism. And I can show you, ah sorry wrong key. I can show you, maybe you didn't notice but I have a vulnerability in my backdrop application and somebody defaced my wallpaper. So an upgrade routine that regularly gets information about new packages might get now the information about the fixed version. And now I will be the upgrade routine because it's not there yet. But I just do it by hand. So first I take away this Q5 it's in the way and I open up a new component. Ah no. Okay, now exactly this happened what shouldn't happen. So I have to reboot. I think the sculpt manager is not available yet. Yeah, sorry. But that can happen. Sorry. Ah there's some, I think the sculpt manager which is this graphical user interface for administration missed some signal or got, maybe it had to do a resource request or whatever. I cannot show you now because I do not have some report, some log output here to look at it. So yeah, as I mentioned it was already the day before. So, okay, sorry for this but we continue just go ahead. Okay. So I reuse the image from the SD card. Okay. So here we are again. And to fix the broken backdrop package I now first copy over this deploy configuration which contains all the packages are which are now running in this runtime. And I copy it over to a non-automatically managed space. So in the normal config. Ah no, I missed that. Sorry. Okay. So now it's known that we want to hand something manually and don't want the system to manage it automatically anymore. So I go over and here you see this sticks blue, black backdrop which is the package containing the bug. So I just know as the upgrade routine that there's a minus a version of it and I just save the file. And what you see now is, yeah, it throws away the original version. It's downloading the new version, verifies it, extracts it and replaces the running stuff. And if you somehow see that there are problems with it, maybe with a watchdog mechanism, the component is not coming up again. Yeah, we can just revert it of course. So sorry. Sorry. Sorry. Sorry. Sorry. Sorry. Yeah, of course. So I show it again. Okay. Now it does not has to download, of course. So it's fixed. Okay. So last example I have to hurry up because we are already running out of time. Okay. Last example, ops. Legacy software in industrial context. So often you have some custom software which costs a lot of money, which a lot of men power was used to do this only for very few instances of this running software. And they are also tied to a specific operating system version. So they use specific drivers on their own and you cannot just replace it with a newer version of Microsoft or whatever. So here the problem is they run out of support. Maybe they are also edge devices and you want to give some possibility to run this legacy OS. So what we did is we have a Witcher machine monitor for ARM v8. So I started Linux VM. And this Linux, of course, Linux is big. So it's a generic ARM v8 kernel of 18 megabyte or something like this. So it needs some time to be copied again from the SD card. And this was a joint project. It was not, we did not finance it on our own, but it was a corporate work with Bedrock system who also sit in this room. And I want to thank at this place for supporting us and doing so because they do a much more ambition project of building up a Witcher machine monitor that gets formally proved. But at that point they were not ready to develop it right now in their system. So we rapid prototype, so to say, and G-node and they could use it as a blueprint. And as far as I know, they are envisioned to open source their version too. So we are very looking forward to use that too. So I just want to show you, this is not just some Linux working, but it also has network access via Word.io. And so I can start a movie, a network stream movie. Only if the network is working. Yeah, okay. So the VMM contains a real complete CPU model. It has models for generic interrupt controller version two and three for the generic timer of ARM. And it has drivers for Word.io. Consola and for Word.io network. And yeah, I think we have some minutes left. Okay, so this is Star Wars streamed over Telnet. Let's come to the roadmap again. So those are my technical demonstrations. And my last slide is the roadmap for the upcoming year. So I definitely want to push this Scalp development on R&D further. So Scalp on this M&T reform would be really cool. But for this to happen, we need some kind of platform driver. So now the drivers are running, but we do not have access to the PCI bus, for instance. We do not have access to the clocking and power management. And we need this kind of stuff in incarnation of a platform driver. We want to have more Word.io support so that we can use it interactively, of course. Then we could really use a Scalp or S desktop like we know it from the x86 world. And of course, it would be pretty cool to use hardware accelerated graphics. So those are the plans for this year. And now I'm open for questions. Thank you for your attention. Yeah. Sorry, I forgot to mention it's our own kernel. So we did not use another one. Ah, sorry. I have to repeat the question. I forgot. So the question was what kernel did we use? So in the initial development of R&B 8 in the very first release where we brought the first R&B 8 support in, we used Fiasco OC because it already has R&B 8 support. But then we implemented it in our own kernel and also this whole virtualization support stuff is part of our own. So we can answer the questions. OK. And let's close the session. Thank you. Thanks, Stefan. Thank you. I'm sorry. Sorry. I'm sorry. Sorry. Sorry. I'm sorry. Sorry. Sorry. I was saying that this is our own kernel. We have to keep the kernel in. So you can see, the kernel is in. The kernel is in. So we can see the kernel is in. So you can see the kernel is in. So we can see the kernel is in.
 Hello and welcome to my talk.  I'm Stefan Kalkowski.  I'm working at Genote Labs as a developer since more than 10 years now.  And I was focusing on the ARM architecture mainly in the last years.  And within the last 10 months, we achieved quite a few steps to run Genote on NV8 machines,  on certain NV8 hardware.  And today I want to demonstrate this to you.  So it's more technical demonstration with the focus on the demonstration, not so much  on the technical details.  And as you have seen in the previous talk, we are used to run our presentations on our  own software stacks.  So this applies to this talk.  And like Norman already told you with regard to his setup, it's the same to me.  So it was done a day before I was starting to foster them.  So cross fingers that everybody, everything will work.  So before we come to the actual demonstration, where I want to show three different aspects  that might be interesting for embedded systems, which you could already use right now with  Genote, I want to give you a short introduction on Genote's history on ARM and what were  the findings of us that we made out of these experiences.  Then I will showcase you certain aspects.  And then we come to a short roadmap for this year related to the ARM development.  So this picture shows in a rough sketch what kind of different ARM hardware was entering  the Genote landscape.  And what you can see, I don't want to go into much detail, but we had slight different  ARM architectures from version four until now version eight.  And we collected a lot of experiences, also with different SoC renders like Broadcom, the  series that were used in the Raspberry Pi's, the OMAP4 from Texas Instruments and Incarnation  of the Panda board and Exynos 5 from Samsung in Incarnation of the Andil board.  And we did not just run a kernel on top of it with some timer driver and UART, but really  tried hard to develop different device drivers for the peripherals for it.  And so we had SATA drivers or SD card or different display engine and so on.  And the experiences from this kind of development was that it's a pain and that it's really  painful if you are just a small operating system, open source operating system with  no access to documentation at all.  And so the best reference you might get is Linux kernel drivers written by the SoC renders  themselves, so there's not so much semantics that you can read out of it.  And in the worst case, you've got even blob drivers which are just loaded by the Linux  kernel drivers inside, so like HDMI blobs and whatever.  So the situation is not that good, but the best experiences we made so far were with  this NXP based the iMix series and their system on ships.  So I wouldn't say it's great and everything is fine with NXP and I don't want to make  marketing now for them, but from our experiences it was best with regards to open documentation.  And we used it for instance for our extensive studies with using trust soon, with doing  secure boot on this kind of platforms and also, yeah, we made some good experiences  here.  So this is what I wanted to give you as a result of this kind of history and we are  not the only ones obviously that seem to recognize that NXP makes better documentation.  So there are several open hardware projects right now that use this kind of system or  some shit.  So here you see the USB Armory which now has already a second version of it which was presented  I think at CCC Congress this year or last year.  And it's a kind of a smart cut system where you can store your cryptographic material  which you can use for signing stuff or just storing encrypted stuff.  And it's running on an NXP iMix 5 and it's completely open so you can download the layouts  and you can assemble it yourself if you like.  And we also had a genote port on the first version so yeah, I'm looking forward for the  second one.  And there is this MNT reform.  It's a very cool self-made laptop project by MNT Research and it's really somehow a  one person project.  I mean there are more than one person but from the technical side it's not more than  one person.  And again you get all the material, you can just download it, you can build it yourself  including a nice mechanical keyboard.  And I'm really looking forward to bring the SCALTOS which you just had a look at if you  attended the previous talk to this kind of device.  And we have this Libram 5 smartphone which uses the same system on ship like the MNT reform  and this is the iMix 8M.  So it's an ARM V8 NXP system on ship.  And again what they try to achieve is giving back control to the user, getting a smartphone  which is mostly block-free as far as they can get with it.  And yeah, I think we have this mindset in common with those kind of projects and this  is somewhere where we like to meet and we also like to take this Libram 5 to make an  Android-like environment, an Android runtime replacement so to say and those of you who  attended the talk from Alexander Zinier about their component framework know what I mean.  Okay, so this board for those of you who are not sitting in the first line is staying here  in front of me on the table and I held the presentation now on this device.  So it's the same system on ship like in the Libram 5 and in the MNT reform.  And you see we have some Ethernet connector, USB connector, HDMI connector and SD card  and we have peripheral drivers running right now in the system that drive all those kind  of devices.  And yeah, but this is not everything.  But to show you this and not just list items I like to come to the actual demonstration  part.  So what are the use cases for?  Used in the embedded world.  So just imagine you stand in front of the ticket machine and the ticket is showing you  blue screen or you drive in public transport and it doesn't show up the next station but  some weird other desktop or whatever.  And of course the ATM doesn't give you cash because it's one to do a Windows upgrade right  now and doesn't work out until it gets this.  So those are not some hypothetical examples but I think all of you somehow experienced  already something like this.  And here you see the WannaCry attack at Deutsche Bahn where they were out of order for several  hours or even days I'm not sure anymore.  So what you actually need is not a fully fledged desktop operating system like Microsoft  for a Kiosk system but you need a custom tailored solution.  And of course the costs for those who develop such systems are standing in the way if you  have to do this all on your own.  But those of you who attended the previous talk have seen how easily it is to integrate  a custom tailored environment.  But of course you need some support in form of components for this.  And what you see here right now is again the slide central thing, this administration  console and I want to show you now that in this system there are already on the small  arm machine which only uses the first CPU because I didn't wrote a load balancer which  automatically drives the components on different CPUs and did not manually tweak it.  So everything is running on the first CPU and we have already 76 components running  in this system.  And as you can see it's like, yeah, I mean it's all, everything is software run, so  it's really usable as a display panel or as a Kiosk system.  Now we have very easy widget set, a very simple one.  And maybe your programmers are not coming to this kind of widget set or programming in  a genot environment.  But of course we can also start something else.  So let's start this Qt5 text editor.  I mean, of course this takes some time because everything is read from a non-optimized SD  card.  And the all which is now doing is some I.O. and it's heavily copying over the bytes from  the SD card.  But in the end, crossing fingers, we will see this text editor you already know from the  Sculpt version on x86.  So what I wanted to show you, we did not just ported some peripheral drivers but we really  went to the whole software stack.  So we have different libraries like libpng and Qt5 and TCP IP stack.  Of course in libc itself and the base library of genot obviously.  And we went to the whole software stack to make this happen within the 10 months.  So I'm quite convinced that we will also achieve more with regard to the hardware targets I  already mentioned.  Okay, but let's come back to the slides.  Another example.  So today everybody talks about IoT and all those crappy devices that are out there.  And probably the idea is to have some shield gateways to as edge devices which are better  shield those kind of IoT devices.  And this is such a device.  But of course you always have the problem of firmware upgrades in such environments.  And as you have seen we have this depot packaging mechanism.  And I can show you, ah sorry wrong key.  I can show you, maybe you didn't notice but I have a vulnerability in my backdrop application  and somebody defaced my wallpaper.  So an upgrade routine that regularly gets information about new packages might get now  the information about the fixed version.  And now I will be the upgrade routine because it's not there yet.  But I just do it by hand.  So first I take away this Q5 it's in the way and I open up a new component.  Ah no.  Okay, now exactly this happened what shouldn't happen.  So I have to reboot.  I think the sculpt manager is not available yet.  Yeah, sorry.  But that can happen.  Sorry.  Ah there's some, I think the sculpt manager which is this graphical user interface for  administration missed some signal or got, maybe it had to do a resource request or whatever.  I cannot show you now because I do not have some report, some log output here to look  at it.  So yeah, as I mentioned it was already the day before.  So, okay, sorry for this but we continue just go ahead.  Okay.  So I reuse the image from the SD card.  Okay.  So here we are again.  And to fix the broken backdrop package I now first copy over this deploy configuration  which contains all the packages are which are now running in this runtime.  And I copy it over to a non-automatically managed space.  So in the normal config.  Ah no, I missed that.  Sorry.  Okay.  So now it's known that we want to hand something manually and don't want the system to manage  it automatically anymore.  So I go over and here you see this sticks blue, black backdrop which is the package containing  the bug.  So I just know as the upgrade routine that there's a minus a version of it and I just  save the file.  And what you see now is, yeah, it throws away the original version.  It's downloading the new version, verifies it, extracts it and replaces the running stuff.  And if you somehow see that there are problems with it, maybe with a watchdog mechanism,  the component is not coming up again.  Yeah, we can just revert it of course.  So sorry.  Sorry.  Sorry.  Sorry.  Sorry.  Sorry.  Yeah, of course.  So I show it again.  Okay.  Now it does not has to download, of course.  So it's fixed.  Okay.  So last example I have to hurry up because we are already running out of time.  Okay.  Last example, ops.  Legacy software in industrial context.  So often you have some custom software which costs a lot of money, which a lot of men power  was used to do this only for very few instances of this running software.  And they are also tied to a specific operating system version.  So they use specific drivers on their own and you cannot just replace it with a newer  version of Microsoft or whatever.  So here the problem is they run out of support.  Maybe they are also edge devices and you want to give some possibility to run this legacy  OS.  So what we did is we have a Witcher machine monitor for ARM v8.  So I started Linux VM.  And this Linux, of course, Linux is big.  So it's a generic ARM v8 kernel of 18 megabyte or something like this.  So it needs some time to be copied again from the SD card.  And this was a joint project.  It was not, we did not finance it on our own, but it was a corporate work with Bedrock  system who also sit in this room.  And I want to thank at this place for supporting us and doing so because they do a much more  ambition project of building up a Witcher machine monitor that gets formally proved.  But at that point they were not ready to develop it right now in their system.  So we rapid prototype, so to say, and G-node and they could use it as a blueprint.  And as far as I know, they are envisioned to open source their version too.  So we are very looking forward to use that too.  So I just want to show you, this is not just some Linux working, but it also has network  access via Word.io.  And so I can start a movie, a network stream movie.  Only if the network is working.  Yeah, okay.  So the VMM contains a real complete CPU model.  It has models for generic interrupt controller version two and three for the generic timer  of ARM.  And it has drivers for Word.io.  Consola and for Word.io network.  And yeah, I think we have some minutes left.  Okay, so this is Star Wars streamed over Telnet.  Let's come to the roadmap again.  So those are my technical demonstrations.  And my last slide is the roadmap for the upcoming year.  So I definitely want to push this Scalp development on R&D further.  So Scalp on this M&T reform would be really cool.  But for this to happen, we need some kind of platform driver.  So now the drivers are running, but we do not have access to the PCI bus, for instance.  We do not have access to the clocking and power management.  And we need this kind of stuff in incarnation of a platform driver.  We want to have more Word.io support so that we can use it interactively, of course.  Then we could really use a Scalp or S desktop like we know it from the x86 world.  And of course, it would be pretty cool to use hardware accelerated graphics.  So those are the plans for this year.  And now I'm open for questions.  Thank you for your attention.  Yeah.  Sorry, I forgot to mention it's our own kernel.  So we did not use another one.  Ah, sorry.  I have to repeat the question.  I forgot.  So the question was what kernel did we use?  So in the initial development of R&B 8 in the very first release where we brought the  first R&B 8 support in, we used Fiasco OC because it already has R&B 8 support.  But then we implemented it in our own kernel and also this whole virtualization support  stuff is part of our own.  So we can answer the questions.  OK.  And let's close the session.  Thank you.  Thanks, Stefan.  Thank you.  I'm sorry.  Sorry.  I'm sorry.  Sorry.  Sorry.  I'm sorry.  Sorry.  Sorry.  I was saying that this is our own kernel.  We have to keep the kernel in.  So you can see, the kernel is in.  The kernel is in.  So we can see the kernel is in.  So you can see the kernel is in.  So we can see the kernel is in.
uk_genode_armv8_0_155.png uk_genode_armv8_156_1811.png uk_genode_armv8_1812_15887.png uk_genode_armv8_15888_16559.png uk_genode_armv8_16560_17279.png uk_genode_armv8_17280_17435.png uk_genode_armv8_17436_18335.png uk_genode_armv8_18336_19739.png uk_genode_armv8_19740_19859.png uk_genode_armv8_19860_19955.png uk_genode_armv8_19956_20543.png uk_genode_armv8_20544_20711.png uk_genode_armv8_20712_20783.png uk_genode_armv8_20784_21335.png uk_genode_armv8_21336_21443.png uk_genode_armv8_21444_21539.png uk_genode_armv8_21540_21707.png uk_genode_armv8_21708_21899.png uk_genode_armv8_21900_22583.png uk_genode_armv8_22584_23147.png uk_genode_armv8_23148_24335.png uk_genode_armv8_24336_25019.png uk_genode_armv8_25020_25151.png uk_genode_armv8_25152_25739.png uk_genode_armv8_25740_26003.png uk_genode_armv8_26004_26123.png uk_genode_armv8_26124_26255.png uk_genode_armv8_26256_26303.png uk_genode_armv8_26304_27815.png uk_genode_armv8_27816_28199.png uk_genode_armv8_28200_28559.png uk_genode_armv8_28560_31547.png uk_genode_armv8_31548_34667.png uk_genode_armv8_34668_34715.png uk_genode_armv8_34716_34837.png