Welcome, everyone, to this second day of this series on the role of metals in the energy and digital transition. I would like to welcome you all on behalf of La Casa Encendida, GF and Transición Verde, to this interesting session that we're going to be having. Before we begin, I would like to remind you some logistics details so that we make sure that everything is going to be perfect. Today's roundtable will be in Spanish, but we will have an English translation into English. And if you wish to listen to the English version, you can always click on the globe that you can see on your screen in the lower right corner and choose English. If you want to ask questions, you can always write them on the chat and you can say whether it's an open question or if it is a question for someone specific on the table. And thank you so much for being here. Before I introduce to you the speakers, I wanted to remind you of some of the conclusions that we drew from our first seminar. And you can obviously find the whole video that is uploaded in the La Casa Encendida YouTube channel and that we will be sharing with you. We all agree the fact that energy transition is very much needed, but it is also needed to put on the table what the weaknesses of this transition are so that we may find solutions. During the first day, we talked about the importance of promoting circular economy, to reducing consumption, to invest in innovations so that we can reduce our dependence from rare meat metals. And we also talked about something that was called responsible mining and mining projects in Europe that could somehow improve the environmental impact and respect human rights. And that's something that we mentioned during the last day, but I am looking forward to listening to our experts. So with no further ado, I will introduce to you Alitia Valero, who is a chemical engineer, who is the leader of the industrial ecology group at the Filthe Institute. And she's a professor at the University of Zaragoza. Alitia, are there limits to the use of metals in energy transition? Yes, obviously there are. And I hope to be able to show you some cases so that you can see that not everything that shines is gold. OK, then go ahead. The floor is yours. OK, thank you. I'm going to share my screen now. Muy bien, pues buenas tardes. Very well. So good afternoon, everyone, and thank you so much. I would like to thank the GEF and everyone who's listening today. There y sobre todo muchas gracias a la intérprete. And I would like to thank the interpreter who's going to have to bear with me during the next few minutes. So what I wanted to tell you all today were some of the conclusions that we have drawn during the last 15, 20 years working on this topic. Even before it was something that is very much present. I believe that it is something that's in everybody's mind. It's about the mineral limits in every field, not just energy transition and digital transition, but also nowadays in general. And I want I would like to start by telling you something that I also tell my students in university. I talk about exponential growth and then we will talk about the fact that the mineral assets are are being used up. We will also question the green ecological transition. We will also question circular economy and we will finally have some final conclusions. I will start with exponential growth. And it seems that it can be something obvious or trivial to some. But if we do not understand the exponential function, we will not be able to understand the problem that we face. And it is seminal to start from this and then follow along. This this the understanding of the of the problem. So first of all, and this is something that I tell my students, we all understand that exponential growth has this the shape, this curve that we see on this graph. We start little by little and then it peaks and it has a similar formula. But we don't have the time to see that. I would love to do the exercise with you, but I'm going to give you the solutions straight away. You need to know that population grows at a one percent rate per year. It can be more or less, but more or less, it's one percent per year. And the formula of population growth is this formula. So we might wonder how long has it been every time we grew a billion people? So going from one million inhabitants to one billion inhabitants took seven hundred years, so seven centuries, seven centuries. That's the time it took. But going from one billion to two billion, that only took a hundred years from two billion to three billion. It took 40 years and from three to four billion, 29 years. And from four to five billion, it only took 22. And getting to six billion only takes 18 years. So the time is being reduced. Every one billion we reduce the time it takes. And we will all remember, I'm sure that in 2011, not long ago, we reached the seven billion figure, seven billion inhabitants. And now we're close to eight billion inhabitants. And from now till 2050, we quite probably we will quite probably reach the 10 billion figures. So time is accelerating. Since the 70s, we have started with this ecological deficit. What does that mean? It means that the earth cannot produce everything that we need in a year. So in the 70s, everything that we consumed would be then replanted and replenished, but in the 70s and it wasn't 29th of December. But then we had in 2020 due to COVID. I don't know if thanks thankfully or not. But that year, 2020, we delayed the time when everything had been used up. It had it went down to the figures of 2009 around August. So in a report that was mentioned during the first round table, a report issued by the European Commission for the first time. Finally, in September 2020, finally, the EU, and this is a milestone, recognize that the need for resources is submitting the planet to an extreme pressure. And it is responsible for half of the greenhouse gases. And it is also the cause for a hydric stress and the loss of biodiversity. So I sometimes work as a counsellor. I am in different international tables around Europe. And every time I said, watch out, because we need to reduce our consumption, they would go straight for my neck. And finally, in 2020, they said, yes, yes, it's actually the case. If we count the numbers, these things cannot continue. And this is also another example that I have with my students. Imagine that we're in a football stadium. I chose Camp Nou because it's a big one, but it could be any stadium. This one is closed. And we have a drop counter, a magical drop counter. In a minute one, we have one drop and in a minute two, it's two drops. And minute three, it doubles from two to four and so on. Do you know at what and when the stadium would be completely full? It would be in minute 46. We will not be able to see the match. We wouldn't be able to see the whole match. But what's surprising is the following. Do you know when we would fill up the stadium up to 7 percent? And that's when we realize that we have a problem. Minute 42. So we only have four minutes to react and to act. And the message is actually quite clear. The exponential function is very dangerous. And the exponential function is actually something that is present everywhere. It is the behavior of the exploitation of all limited resources. We're talking about use of water, deforestation. We're talking about species extension and over exploitation, both in fishing and minerals. And you see that the degradation of nature grows at a 2.8 percent rate. But here I'm talking about nature. I'm talking about the fact that more people want more. In one generation, we will be consuming twice as much as we are consuming now. And this is a very important challenge because how can we satisfy all the future generations? So many people, 10 billion individuals in 2050, do we have enough resources? Well, now that we know the context, the general context, obviously, minerals are not an exception in this. And minerals as all resources have increased also there. We have increased the extraction of those minerals and it's been an exponential increase. Here we have a graph that goes from the 1900s till 2018. So the extraction of copper doubles every 25 years. And this is just an example, something that happens with almost all of the elements of the periodical table. And if minerals are the ones that we have and we are extracting them, we're mining them, then can we continue with this exponential growth? Obviously not, because the land and the earth are limited. So we have carried out some studies where we are evaluating the production peak for most of the elements in the periodical table. And the conclusion that we draw is quite clear. Mines are getting empty and the peak of extraction of most resources could end before this century is over. And many of them before half of this century is over. But it's not just about the fact that the mines are getting empty and will have less amount of minerals. But another problem that we have, another essential problem is the following. Here we see some minerals represented. This is also a study that we have carried out. Mines all over the world have been studied. We have represented the energy required for extraction and the concentration of minerals. So this is the mine law, the law. So as mines get empty, we have to remove, we have to remove more mineral that requires more energy, more emissions, more water being used, more environmental impacts and more CO2 being released. So the energy that is linked to mining, which nowadays is basically based on fuel on on fossil fuels, is going to increase and not linearly, but rather exponentially, because the laws of thermodynamics are very clear. As the concentration is reduced, we increase exponentially. The energy needed to extract the next amount. So if, probably, if we are around 80% of the energy required for mineral extraction, then in the future that will increase. So we wonder, green ecological transition. Well, we talked about that during the previous sessions, but I just wanted to give you some some data, some information. Imagine us, for instance, the thermal station in Andorra. I come from Zaragoza. We're very close. And since I work in energy, I am in the department of engines and thermal engines and machines. And I have this case quite present. So this central has one gigawatt power. So every one gigawatt power, wind energy would require 25 times more materials than conventional stations, because one gigawatt produced conventionally would represent 1,000 wind turbines. And that would be 25 times more material, but not just that. We also see that the amount is not what worries us most. It's also the quality because for conventional energies, we were talking about iron. We were talking about copper. We're talking about concrete. So materials that are relatively abundant. When we talk about renewable energies and in general clean technologies, we're talking about dispersion, neodymium, nickel, germanium, while we're talking about tellurium. So here, obviously, the wind that I have given you as an example is not the worst of them all. So if we look at PVFotovoltaic or e-cars, which is really mine on wheels, then things get even worse. So as a conclusion, once again, the exponential curve that I explained at the beginning. In previous times or at least previous centuries, we were using just a few materials and small amounts of those materials. Now we're using the whole periodical table and we can say that we are in the era of the periodical table and what materials are we using? I told you previously, I'm not going to stop here because we I'm not going to stop here and tell you all about it because that was mentioned in the previous panel and we also talked about rare earths and we have an important problem here because not only are we dependent of those materials, but also these materials are concentrated in certain countries. So the geology is capricious in that way. So that's where we find those minerals. And for instance, with rare earths, we depend from China in 90% of cases and China is providing lots of different elements and not just elements, but also technologies. So we really are stuck. We are actually under the thumb of different countries but a few countries, especially China. So we can say that there are, Carl, there are limits, there are mineral limits to the third industrial revolution. Here I have written some of the key minerals, lithium, tellurium, rare earths, vanadium in general for all the elements that have to do with steel, indium as well. So that's what we have. And we have done different studies about what those elements could be, those bottlenecks that we could find. Here you have some graphs. And basically the summary is that the demand up till 2050 of these elements here could be higher than the reserves that we actually have for silver, caudium, gallium, indium, magnesium, zinc, tellurium, all of the ones that you can see on this slide. And we said this a few days ago and it's not just, it's not something that is far away in the horizon. I just, I'm giving you here a couple of news clips that were published a few days ago. I'm referring to Farahota once again, my city, my hometown. Here we have a noble factory and the Bosch BSH plant for washing machines. For the first time in their history, they had to stop production for a few days and weeks because they didn't have pieces, they didn't have parts and what parts? It was semiconductors, the ones that have those rare metals. And this might not be, we might not find this surprising but this is going to be the trend, the general trend that they're going to have to face in the future as we face a greater scarcity of this element. So the alarm bells are ringing with a list of critical materials that have been listed by the European Commission. There are 30 elements that are considered critical. Critical means that we, that these elements are needed by our economy and they are found in certain places that could have a risk of supply. We'll talk about that. But what I wanted to say is the following, in 2014, the list, I don't know if it was a 14 element long list, but every three or four years, I think they issue new lists. Well, this list is showing more and more elements and those elements in the end, if we keep on going, we'll show the whole periodical table. All of the periodical table will be critical. And why? Well, because above the exponential consumption, as I said previously. And in 2017, we had a list of critical elements in the university that was issued by the university that was based on thermodynamic or physical criteria. And we listed some elements that were not in the list. They did not listen to us, but physics and economics in the end have to cross paths. And now I'll talk about the circular economy because obviously if there are limits to energy transition, what is the solution? Well, we talked about that the last time. We talked about the fact that we need to tend to a circular economy. And I am posing this as a question due to the following. Because a circular economy, we mentioned that it means to reuse, to prolong the life of machines and so on, to recycle and so on. But if we look at the reality, less than 1% is recycled in those elements that we considered key elements. And why is that? Well, that is basically due to the fact that we have a greater number of products and materials that obviously have a better capacity because we're reducing sizes and reducing weight. But how do we do that? By using very small amounts that are impossible to recycle from a functional standpoint. So a cell phone that has 30 different valuable elements in amounts that are micro and nano amounts. How can we recycle that? And they are used by mixing them with mixes that are absolutely impossible to recycle. So in the end, what we have is chemiodiversity in these new technologies. So we did a study together with a German Institute and we evaluated what we call thermodynamical rarity. We were considering the quality of the elements that are included in new technologies. And this is in this axis. And in the X axis, the number of devices sold during a certain year. So it seemed that those that have a greater chemiodiversity that are rarest, that have a higher thermodynamical rarity are the ones that are more efficient from an energy standpoint. But if we look at the easiness to recover these elements, it's impossible to recover them. So they're less sustainable from the point of view of materials. So bulb, a light bulb, for instance, it's more efficient from an energy standpoint than a fluorescent or a light. But is it more sustainable? Because a fluorescent has rare earth, it has mercury and it has many other elements. And a light has indium gallium, it has arsenic, it has rare earths. And those elements are impossible to recycle. And if we recycle our fluorescence, it's not because they have rare earths, it's because they contain mercury and we don't want that mercury to pollute our waters. So nowadays, nowadays, we either recycle iron, aluminum, basic heavy metals or what we do is avoid pollution because that's what we try to avoid. But recycling and design have not been considered in order to recover those scarce elements. So I'm really sorry, but there are other limits to circular economy. And we call it spiral economy. Why? Because thermodynamics, once again, have an influence in recycling. It's impossible to recover 100% of the materials. What we can do is reduce the amount of material lost. So let's try and design the product the right way so that we avoid for most of the materials to be lost. So it's not circular economy. I would say that this is a spiral economy. And some final thoughts. When we talk about solutions, technological solutions, obviously dematerialization less is more, but careful because if we micro-create, if we make miniatures, then this recovery will be impossible. We have to replace critical materials with abundant materials, but we have to be warned. If we continue with that exponential consumption, all materials will be critical. We have to design robust, modular and easily disassembled products and learn from the nature that does not create waste and that lives on and regenerates thanks to the action of the sun. And then there is something which is a proposal for the next speaker. We need urgently an infrastructure, metallurgic infrastructure that would allow us to recover secondary materials. Why? Because we depend of China and other countries and we say we have them technology, but not even that Chinese people already have a technology. So what do we have in Europe? We don't have anything. The only thing that we have is technological waste and that technological waste could be considered as a problem or we could consider it as an opportunity. And I think that the latter is true. It's an opportunity and we also have mines. We have urban mines. We have landfills and we have waste. We have abandoned mines that could be an opportunity. But what happens? We don't have the metallurgic infrastructure to recover this. There is only one plant in Europe that can recover those metals and not all of them, those scarce materials, those scarce metals. So please invest, investing in batteries is very good in that big lobby or big consortium between SEA, the Verdrola and banks with the production of batteries. But how are you going to produce batteries if you don't have the materials? You don't have your own materials to create them. So we urgently need at least one plant, one factory. What metallurgic plant to recover these metals because otherwise we will lose this battle. Now we need political and legal solutions. We need to have a more restrictive legislation for the recovery of critical materials and we need to pass laws with regards to quality, not quantity. Because nowadays a vehicle, they say, well, we recycle 95%. Well, yes, 95%. But what is it? It's a bad quality steel because everything is mixed. There is a bit of aluminum and a bit of copper. But a vehicle has 50 critical elements. It has over 200 euros in gold that are lost. And who says gold means, says palladium cobalt, it says palladium, it says lithium that are impossible to recycle. So the legislation needs to be a legislation that does not focus on weight, but on quality. And we also have to eliminate legal and administrative barriers so that waste can become raw materials so that we stop taking waste from one place to the other. In Aragon, for instance, let me give you an example. We cannot reuse certain waste, but we can use it in Catalonia. So there is a company that is in a village in Aragon that has waste that can be used in another factory. They take it to Lérida and then mysteriously the waste has become resources. So these administrative obstacles are what we face on the daily. So obviously we need to raise awareness with regards to reuse and recycling. We need education at all levels and the promotion of new models of consumption, not so much consumption, but use and services. We cannot keep on consuming at this pace that we are doing it right now. We saw it with the exponential example. And I want to open the debate for my colleagues. If the demand keeps on increasing, we will not be able to stop using mining. And the EU is now promoting mining in our own territory so that we do not depend of third parties and third countries, countries that are unstable from the economic and social standpoint. So it's not in my backyard. So I want to change my computer and my laptop every six months but I don't want a mine close to my home. Well, we have to be aware of those contradictions and we mustn't ask for a third countries with low social and economic standards to do the mining. Mining needs to be sustainable. There is no sustainable mining, but as sustainable as it can be. And it has to be here in my backyard and in my neighbor's backyard as well. And we also have communities that are willing, communities that are traditionally mining communities who are willing to reopen their mines. And we also have to consider the mining capital because what is it that we do nowadays? Here you have the trade travel pilar in Theragotha and what is it that we do nowadays? Well, currently what we're doing is selling cathedrals at the price of brick. I have been crunching numbers. Do you know how much this church would cost? It would cost two million euros. I'm sure you think it's not very expensive. How can you sell such heritage cultural passion that cultural heritage? Well, mines are natural heritage. There are assets and it belongs to us and to those who come after us. But the GDP and other economic indicators don't take into account our future generations. And the fact that future generations will have to mine those materials, will have to extract them, although they will be scarce and they will have a greater energy impact and social impact and economic impact. So we need to try and avoid dependence of fossil fuels, but that means being dependent of materials. So a multi-dependence without materials, there is no energy, but without energy, there are no materials. So the solutions are going to be very complex, multi-dimensional solutions because we will have very serious social problems linked to mining. And I am really sorry, but we don't have the time to make the same mistakes we made in the past. So that is why I'm proposing the Inspiral Economy. Thank you so much for listening. I'm sorry it took me so long to make this presentation. Here you have a book that has just been published where we talk about, well, my colleagues, Antonio Valero and Adriana Almazan, all the topics that I have just been mentioning. Thank you very much. Wow. Wow. What a reality. Shock. Thank you so much for condemning so much information in such little time. And we know that we could spend many hours talking about this and I'm sure that we will be able to talk about such an interesting topic in the future. I want to give the floor to our second speaker, Juan Cholo Peduralde, who is an ecologist and an activist, who is now an MP. He is a member of parliament in Spain and he is now facing the climate change law. So he is really busy right now. I was telling Alitia that the EU was thinking about self-provisioning because we have a series of materials that are seminal for this Green New Deal that the EU has just launched and for energy transition. So Juan Cholo, how do you see this European plan? Well, good afternoon. Good afternoon, everyone. First of all, I wanted to thank you for inviting me. I would like to thank the Foundation Transición Verde and the DEF for inviting me to this debate. And I also wanted to thank Alitia for the presentation that she has just made such a complete and well-documented presentation. I wanted to, in a few minutes, go through the charter of the Commission and the communication of the Commission to the European Parliament on this topic and to see what are the positive aspects and what are the weaknesses or the shadows we find in this document. First of all, I want to say that I defend ecological transition. I believe that we are in the process of quitting fossil fuels and living them under the cortex of the Earth. I think that that is something that is being very difficult. It costs lots of effort, but the impacts on climate change are too obvious not to continue with this process. But I also think that if we have reached the situation, it is due to the fact that we have done it without considering the limits of the planet. And I think that it would be stupid to make the same mistakes that we have made previously in this transition. So I think we need to be aware of the problems, to face the problems and try and do things better so that we do not make the same mistakes or that we make this climate crisis even worse. So the European Commission recognizes in this document that Europe's transition towards climate neutrality could end up changing the dependence of fossil fuels to the dependence of minerals. So the European Commission is aware of this diagnosis of the problem and they are aware of the reality of the problem. As we will see later on, a different thing is how they consider tackling this problem. But the diagnosis that they did is a correct diagnosis. They do an evaluation, an evaluation that has already been considered during the previous panel, the origin of some of those metals that Alitia referred to. And these metals that we need for new technologies such as, for instance, rare earths, 98% of those rare earths come from China. The case of platinum, 71% comes from South Africa. And then it does also a diagnosis of how needs will increase. In 2030, we will need 18 times more lithium and five times more cobalt. And in 2050, 60 times more lithium and 15 times more cobalt and 10 times more rare earths. So I think that the diagnosis is overwhelming with regards to what we need. And from my point of view, the first criticism would be the following. It has to do with this communication of the European Commission in the sense that never does it question the consumption in itself or the increase of the consumption of these materials in the sense that ecological transition shouldn't necessarily mean substituting a vehicle, a diesel, or just a gas vehicle with an electronic car. We should talk about something different, maybe. So we need to tackle the topic of consumption and the excessive consumption. And they do not tackle it. So what should be the strategy? That is one of the elements that I believe are missing in this policy of the European Commission. What would be the strategy to reduce within a landscape of growth? How would we reduce it? But that growth can be exponential. Or we could try and contain that growth with different strategies, integrated strategies in each of the different sectors that we are referring to here. We are talking about the transportation sector and energy production and so on. So in that sense, the first thing that I think is missing in the European Commission is that because they consider that there is going to be an increase of the consumption of those minerals. And maybe that is not something that we need to reach. Maybe we should find other ways. We should have other strategies to try and tackle that. And then the European Commission mainly considers a strategy that is based in four different action plans. In some of them, well, I'm going to talk in detail about some of them, but basically what they consider is, on the one hand, with regards to mineral provision, which in a very high percentage, the European Union recognizes that 75% to 100% comes from imports. And they tackle the safety of imports. And in that sense, one of the action plans that they consider is resilience, the resilience of the value chains. So making sure that the suppliers, the material suppliers are trustworthy, they're reliable, and they're resilient in the long term. And the second point, which I'll tackle later on, is about circular use, recycling innovation. The third point, which worries us as well, is about increasing the supply coming from the EU. And it worries us because that has direct impacts in some regions. For instance, in Spanish regions with the increase of mining projects, as I'm sure Santiago will talk about later on. And the fourth point is the diversification of the origin of supply. So in other words, the European Commission mainly considers a strategy that we have seen previously, which is an offer strategy. Let's see how we manage to solve or tackle. That increase in demand that we will face, but without considering at any point a demand strategy, how do we make sure that demand doesn't reach levels that make this whole process unsustainable? This ecological transition process would not be sustainable. So out of those four plans, I think there is a fifth plan missing. I think we should have a plan that has to do with managing the demand. The most interesting plan would be the second, which would be, how can we tackle a better use of metals? So in that sense, Alifi already said it, we have examples within the EU and in Spain even where the reuse of certain metals, those that are greatly used, for instance, in industrial uses, 80% of copper that is being used in Spanish industry comes from recycling. 75% of our steel, aluminum or lead also comes from recycling. So there is a potential there. It's also true that we're talking about materials that are singular and they're difficult as well. And that is why I think it has been said and if it hasn't been said, I'll say it's in the case of lithium. For instance, I would like to focus on lithium. We have recycling levels that are below 1%. And that is relevant. That is very much relevant because, for instance, lithium is an element that is seminal for electric car batteries. And it has a twofold story to it. If we cannot be efficient in the recovery and recycling of lithium, we're going to find ourselves in a situation where the waste volume keeps on growing and these are waste that will pollute our environment. And on the other hand, because these are raw materials that we are wasting, instead of using it, we are extracting it from mines instead of using the waste. So we're generating a further impact. So what is the problem? In the case of lithium, the problems are varied, but it's not so much a technological problem as a cost problem. The cost of lithium recovery, of recovering lithium or the cost of recovered lithium is three times higher than that of lithium coming from mines. So if that is still the case, things will not change. If recycling lithium will not be competitive, if that remains that way. So some car brands, when the battery is no longer useful, cannot be used in the car because it has gone over itself and it's not alive or it's efficient, it's lower than 70%. What they do is use that battery or try and find another use for that battery. So what we have called low cycling. It's not a strategy that is very efficient because what you're trying is to find new niches to use those batteries that are still something that cannot be used for electric cars. So right now, we could say that that is a niche, that for all of these metals has not yet been explored. We are just throwing away most of these materials. That does not mean that we can't tackle this and actually we should tackle it. We see that there are more patents being approved and presented. And the problem that we will have is that this problem will simply grow. But I think that it is impossible, it is necessary. And I agree with Alicia, we have to be very demanding. We need to be very clear that we need to have a legislation that considers the responsibility of the producer, that considers the problem of what will happen with that waste. And that's what I meant when I said at the beginning that we cannot repeat the same mistakes we made previously in this energy transition process because we will find ourselves facing new channels, new ways of creating waste. And there are many compounds or elements that we will have to extract and we need to find them in third countries or we will have to start mining it here in Europe and it will cause a great impact. So I think it is seminal for us to find a new way and it is something that is not being tackled nowadays. And secondly, I think that it is basic and it also has to do with this to keep on researching and different materials. I wanted to give you as an example the sodium battery as an alternative. Sodium is a material that is abundant in the environment and in theory it should be less problematic. So maybe we should also work on finding systems that are based on materials that are more abundant in nature so that they do not represent those same problems and their extraction maybe won't cause the environmental impacts that we're mentioning here. All of this obviously takes us to considering concepts that we already know and that have been faced with other materials and now we have to apply it. For instance, the recovery rates, the objectives of recycling efficiency, recovering materials, the accountability of producers, etc. I think that all of these things have to be applied and have to be enforced in a stricter way than what we have done up till now and as we have done with other materials because we're in a bottleneck situation right now. So I think that we have to really assess what are the materials that we can use and we should use them with the greatest efficiency during the whole cycle and then reintroduce them in the cycle as much as we can. Looking for the substitution or replacing them with lower impact materials or at least materials that have a lower environmental impact. I'm sorry, I used a bit more time than was given to me. I'm sorry, but I think that these are the two big strategies that I think we should put in place. I think that that's what Europe should do. And I insist on that. I think that we need to better manage demand to better manage these materials. And on the other hand, we have to find systems to really use them up in an efficient way and then reintroduce them in the cycle. So I think that those are some ideas that we should put on the table and maybe during the debate we can dig deeper into them. Thank you very much. Thank you so much, Juan, too. And it's quite clear that this plan is missing a leg, but it's in our hands to somehow try and find solutions to that. So you were saying that the diagnosis was right and so on. Well, I would like to give now the floor to our last expert, Santiago Martin Barajas. He has been fighting for our planet for his whole life. He's a member of Ecologistas and Actin and he's an expert in mining, water and energy. I'm not in my backyard, Santi. What's the situation in Spain with regards to mining? What situation do we find ourselves in? Good afternoon, everyone. First of all, I would like to thank the foundation for having invited me. And well, with no further ado, I will tell you what I think about the topic. Obviously, we all know that all of us who are here, we know them and we know that the mining activity is one of the human activities that has a greater environmental impact. We have completely destroyed the territory, natural resources, water, soil. Those areas where there was mining are areas where there are no inhabitants really around those areas, at least in our country. So it is an activity of all the human activities. It's one of the activities that has the greatest impact. So what is the current situation in our country with regards to the mining activities? Well, first of all, as Alika said previously, there is a greater demand for metals that has happened or it is happening. So obviously there is a rise in price of metals the last few years. It has been spectacular that rise in prices. To that, we have to add the fact that soil movement is now an activity that is less expensive thanks to the fact that machinery is now more efficient. So there is a boom in mining the world over. And there is a sort of mining that is quite impactful, which is the open sky mining. For you to understand the difference, nowadays we might find, all over Spain, we might find a mountain. And on the top, you see the village. It has forest. It has its farming areas. And there is an old mine that is a gallery.  But it has then been covered by the vegetation because it has been abandoned for 100 years. Well, the new mining activities, simply make the whole mountain disappear. It has nothing to do with the previous thing. The whole mountain, the village, the forest, the farmland, everything disappears. And there are some specific cases that we can be seen in our country. The impact that the new mining has is much more impactful than the conventional mining with galleries that would follow the mineral to find it. Because now, due to the higher value of metals, now it's more profitable. So right now, gold mine is profitable if there is one gram per ton. So one gram of gold per ton of soil removed. And the rivers that we have in our country that have gold are not being exploited. And I hope that they will never be exploited. So there would be 3.5 grams per ton in Spain. But right now, a mine with one gram per ton is profitable from an economical standpoint. So imagine the situation we find ourselves in. And to extract those minerals, we have to use other minerals, other chemical products. And we also use water and so on. But then we have to, well, we also see that in Spain we have a law, a mining law that is pre-constitutional. It's from 1973. But everyone agrees that it's unconstitutional because it goes against many rights of the people and the society. And this mining law, this law that was drafted by mining companies, foreign mining companies, has always been a law of miners for miners by miners. So this law has transformed in Spain what we are a paradise. We are a mining paradise. So there are financial havens. We are a mining haven in Spain. We are a mining haven. And that is due to that law. And in this mining haven that we have in Spain, we have the possibility of having speculation in mining. We have projects that are not viable from a technical and economical standpoint. But here they are being carried out or they are trying to carry them out because mining companies in our country are very skilled in order to get subsidies. I don't know if you remember the disaster of Alecoya in Spain. Well, that mine received millions of euros from the junta de Almenelufia. Then they disappeared and they left us what they left us. And this also favors the speculation in the stock markets. I don't know if you remember El Retortillo Mine a few weeks ago, the mine of El Retortillo that they want to start working on in Salamanca. They were giving an authorization. The administration gave them an authorization. And it went up in the stock in London. It went up 25% in value. So that is speculation. That is quite clear. So with all of these ingredients, what we have as a result is a boom, a boom of mining in our country in Spain. There is a boom in mining. That is the result that we have obtained with this. I'm just going to give you an example, one region. And the organizers asked me to talk about the lithium mine in Extremadura. I'm talking about Extremadura and it's not correct for one region because in Extremadura, for those of you who are not Spanish, that's a region in our country that is close to Portugal will be mining projects that have been granted or that will be granted according to the mining registry in the Ministry of Ecological Transition. Only the projects that have been granted or that are to be granted for metal mining. I'm talking about metal mining. Add up to 375, 375 environmental threats that we are facing with these metal mines in Extremadura. So there are more mines than ecologists in Extremadura. That is the situation. And there is a clear example, which is that of the lithium mine that they want to open in the city of Cáceres. But they say, well, it's in the municipality of Cáceres, less than two kilometers away from downtown Cáceres that has been considered heritage of the humanity. So and they have the support of the government, of the regional government. So imagine just close to that city. Imagine any monumental city that you might know. Imagine two kilometers away from that city having an open sky mine, like all the mining that they want to carry out now in Spain, all metal mining is going to be open sky. Only two kilometers away from the city that is going to have an impact in the quality of life of people living in Cáceres, obviously. So that is a reality. That is quite obvious. Now, on the other hand, there is also a speculation component because according to the data that has been published by the company, this mining company that wants to open a mine in Cáceres, the concentration of lithium that they have in this lithium vein in this mine is of around 20 times less than the one in Australia, for instance, in the Saladares in Australia. And that is if the vein where they're going to get the lithium off represents 52% of the material of the mountain and then they, it's unbelievable. No one can believe that, not even they can believe that. So now they have filled Cáceres with posters saying, we're going to create a thousand jobs with this lithium mine in Cáceres. That's what they're selling. And then they will ask for subsidies and so on. And the administration will start paying millions and millions of euros as they have done, for instance, in Andalusia, with the mine of Huelva. So the proposals of ecologistas en acción are policies the following. To try and put the brakes on this mining boom, we're trying to stop it as much as we can via the courts, with social protests, where the populations that are going to be impacted because in this case, not only will they impact their natural resources, but also the rural areas way of living. I mean, the farmers and someone are going to be affected even more so than the natural resources. These mines in Extremadura, 375 mines in Extremadura, will destroy tens and thousands of hectares. We're talking de esas. De esas are very specific areas in Extremadura, natural areas and some of them will be soft and some will not. But there is a fundamental element here to try and stop this mining wave in our country. And to have a reform, to reform the current mining law, it is not normal to have a law that was passed in 1973. It is horrific for such a law to still be enforced. Other laws from other sectors have been modified. So that is why we at Ecologistas en Acción have drafted a project, a project for the reform of the mining law that we have sent to all the political parties, the Congress and the Spanish Congress. And we sent it to the ministry for the ecologic transition. And they didn't even say, hello, we got it, we got your draft. They completely ignored our proposal. And we consider that it is necessary for the different political parties to bet for that law being reformed. This is homework that needs to be done in our country. It's not normal for us to be following a law that was drafted 50 years ago. This law does not take into account environmental criteria, but do you know why? Because in 1973, the environment was a word that did not exist in Spanish. Let me remind you that in 1973, the environment was not something that we took into account. And that is the law that currently sets the framework for mining in Spain. And the proposal that we have made for the new mining law wants to completely exclude any, the whole Natura 2000, all of the protected areas should be free of mines. And all of the areas where water is being used by populations should be protected because mines can also pollute the rivers and underground rivers. And we also want to exclude from the current mining law, mineral bottled water. Mineral bottled water that they sell in plastic bottles in supermarkets do not follow the water law. It's a mining product and it has less health controls than the water that comes out of the tap in our homes. And that's a water that is 250 times more expensive than tap water, but it's a water that has the same quality or worse than tap water. Actually mineral water is not recommended, especially in summer because it's not treated. And you don't know if it has been under the sun for a few days or if it could have some components that could be harmful such as bacteria or others. And with regards to sulfates, carbonates and so on, some mineral waters do not abide by the potabilization criteria for tap waters. So they would not be up to the standards of tap water and that is a mining product. So just like copper. So what we propose here is for mineral water to be a hydraulic public asset, something that we have been asking for for a very long time. We also asked for the public usefulness declaration should not be generic. Right now, as soon as you give an authorization for research, we understand that it is useful for the public. So the mining companies can get to your field and start digging or they can demolish a whole village because they're researching. It's the only economic activity in our country that is considered as something that is useful to the public. So what we want is for this declaration of something being useful for the public should be done in a case by case scenario. And it wouldn't be bad if the mining activities paid some taxes. It'd be great if they paid some taxes. Spain is the only country in the world where mining companies pay less taxes. It's the country in the world where they pay less taxes. So imagine what a haven Spain is for mining companies. So that is why we ask that since they create such an impact they should at least pay taxes. They should give something back to administrations as all other economic activities do. And finally, just to finish what we were saying previously we think that we really have to boost recycling, recycling metals. We have to replace in metals with others. It is basic. It's not going to be the solution. We know that it's not going to be the solution. But if lithium is being recycled under 1% of the times then it's a bit low. I think that that should be improved. We should work because not long ago we saw news where they said that in residual waters they are now recycling 99%, 99.7% of lithium. We have to work and we have to demand for a better recycling situation. For instance, although it doesn't have anything to do with metals. Did you know that phosphorus is, phosphates are being used in agriculture? That is why phosphates are so important in Western Sahara and so on. Well, right now the southern treatment water plan in Madrid the one that treats the water in Madrid part of the water in Madrid is now recovering this mineral. And only this water treatment plan is producing 6% of the phosphorus that is consumed in Spain. When they thought about doing it there they said that that was just, that that was crazy that they were hallucinating but they have managed to do it. They're doing it right now. So we have to decidedly bet on recycling. We cannot throw metals to the landfill as we're doing currently. In Spain we have thousands of applications for opening new mines. They want to exploit all the mines. They want to open all the mines that were abandoned even the ones from the Roman times. All these mines, they want to open them once again. They want to use them again. I remember that there was a mine in Asturias and the first thing that they did was take the beams out. The beams out of the Roman mine. So they took them out and they demolished the whole mountain. So they want to put the whole country upside down. Our natural resources, our rural areas they want to completely put it upside down with all of these mines being opened. And Alitha has also said that previously and Fonto has also tackled it. We have to degrow. We need a degrowth. We cannot continue with this exponential curve and we have to degrow. And I remember some colleagues from ecologistas who said a few years ago, what was it? Less to live better. I didn't agree with them at the time. I think it's less because there's no other way because the planet cannot grow. We cannot keep on growing. So less because there is no other way. And that is the road to be followed and I have mixed different topics. But I think that if we do different things we will manage to have a situation that is not as bad as it is. Yes, mining is always a hot topic. There is always lots of debate around mining because the impact of mining is obvious. And we can talk about mining whether it's responsible or not. And there are lots of different possibilities. So thank you, Santi, for giving us this vision, telling us what is happening in Spain and what we need to change in this law of mining. There is a very heated debate on the chat and I encourage you to read the debate if you can. They are writing the first question. So I'm going to start reading the questions. The first one is for Alikia. Juan asks if there are studies about the cost of materials with regards to waste treatment in this recovery metallurgic infrastructure and if this industry would not depend as well of the same metals that they want to recover. Alikia? Yes, I'm sorry. I was turning my camera on. Okay, thank you. Thank you, Juan. Well, obviously, any infrastructure requires materials for it to work. But the materials that these plants use are usually materials that are quite abundant and if we crunch numbers, it makes sense. It makes absolute sense because even if it is an infrastructure that is complex and that requires lots of different phases and lots of equipment, despite all of that, it is necessary. And they ask us and ask if there are any initiatives in the EU or maybe we have regulations here in Spain that would make it mandatory to return a device when you purchase a new one. Although it doesn't really solve the problem of that reduction of devices that Alikia was talking about since the components are so small that you can't really recycle them. Is there initiative or is there some regulation in Spain or in Europe that you know of, Juan, maybe? Well, yes, that is regulated. As a matter of fact, when you purchase a device or a home appliance, well, sometimes they take the old one or they should take the old one. The problem is not so much that they take the old one, is what do we do with that old appliance that they take? And this opens three different debates that are very much intertwined. First of all, it's the program of Celesan. It's the fact that the possibility of repairing equipment has kind of disappeared from our communities and we are now all fed up of, oh, no, it's much better to buy a new one. Yes, I don't care if it is a dryer, a toaster, or a car. So I think that that is an element that we need to work on. We need to change that, obviously, because... If we... If we managed to have a situation where appliances and products were more long-lasting, that would improve the situation. And as I said previously, in part of the metal industry, there is a secondary treatment of metals that allows for many metals to be reintroduced in the cycle. And I gave the data, for instance, of some metals in Spain that, for instance, copper, 80% of copper is being reused. But that is a journey that we have to keep on treading. So I would, yes, make the life of products longer and then use those that don't no longer work. For instance, for cell phones, the Foundation Transituent Verde did participate at some point in an experience with a group. They did put some chips in electronic ways to see where it ended. And a computer that was thrown away in some Madrid container appeared in Nigeria. So that's the reality. And that is something that we need to tackle. And we need to introduce stricter regulations in that sense. Yes, Santi. We have another question. It says that when we talk about de-growing, do we talk about reducing the energy impact or environmental impact? Or are we talking about reducing the increase of population? No, no, no. I'm not talking about reducing population. No, that's not what I'm referring to. I'm talking about our environmental footprint. It should be smaller. De-growing means reducing our GDP. Reducing our GDP. Let's not fool ourselves. That is what will happen at some point. I think that there are many elements. Actually, we're not even going in that direction. That's what Fanto just said. We're not fixing any of the old appliances. The other day I took my camera to a store so that they would fix it. And it cost me 75% of what a new machine would have cost me. And with regards to recycling, we will have to force the manufacturers to recycle. We will have to force them so that when they design the appliances, they do so so that we can take out those materials from them. That is necessary. And we will have to do it. And even if we do it, there will not be enough. And it's just what happens with water. The efficiency in water use has increased a lot in Spain, but the consumption is greater. So what we have to do is consume less. That's it. And we have to produce less. It's quite clear. We have to produce less. We have decreased the growing is to produce less. So. So we have to, to use less energy. Well, in the current society, it's going to be difficult to understand, but we have to do it. That's very, that's clear. Richard has a question for Alicia. He's saying, we, if we were to, to replace fossil fuel cars with shared cars that are one to 10 ratio, would we have enough cobalt lithium and rare earths already in our economy circulating in a, in our economy and available to be recycled so that we avoid the use of minerals. I'm sorry. Metals that come from mining. Well, first of all, just one thing to the previous questions. That I think is relevant. Well, not long ago, there was a European directive where the manufacturers of any appliance or any equipment have to, for 10 years, have the parts for the consumers to have the right to repair. So that is a small step, but at least it's a step in the right direction so that we can provide that programmed obsolescence and ask for Richard's question. Let me see. The figures, well, we would have to count the numbers, but it's true that we have been studying vehicles quite a bit because we are working with Seat to try and reduce their impact on materials. And we have published different, different articles with grocery materials and bottlenecks caused by vehicles. Having said that, first thing we need to consider is there is this lie. That vehicles are like pigs that you can recycle everything in a vehicle. And that's a lie. Why is that a lie? Well, because we because because only steel is taken for recycling steel aluminum and want to, I think he talked about copper. So those basic metals and the ones that we know how to recycle with physical procedures, physical such as using magnets or using dense media and things that are relatively cheap. But what happens? Well, a vehicle has around 20 different types of steel, 20 different types of steel. Some of them are ultra resistant. And obviously they have a series of elements that are critical. We're talking about Benelium. We're talking about now. We are more talking about Chrome and others. Well, all of those elements. Once you mix all of the steels together. It's not that we lose them. It's that they sub cycle. They're sub cycle. They're sub cycle. There's what Panza said. So they lose their initial functionality. So out of a vehicle, out of a recycled vehicle, we cannot recover 95% of that vehicle with the current technologies with the technology that we currently have. What Richard was saying is not viable. Why? Well, because the recycled materials that we get from vehicles. We're talking about substituting one car with another that would be impossible because we would firstly have to separate the bad steel from the good steel. We would have to add Virgin steel to that bad steel to get the same quality. And then we would have to, to add Chrome, Vanadium, niobium, all of those elements that we had lost along the way. And I would say that with copper, for instance, and with other elements or aluminum, for instance, when we have magnesium that has been sub cycled from mixing everything up, that's in them. That's that that is actually something that is impurity. That's so we have very valuable elements, but depending on what materials we find them, they're good or bad. So we have to use virgin materials that come from the extraction from mines. So since cars and in general, or all equipment have not been designed for them, for them to be recycled, we simply mix it all up. We reduce it as much as we can. And then with some basic simple procedures, we extract whatever we can, which is just a little and quite badly. So we either do things well from the beginning or it will be very complicated. I just have to say that lots of questions are getting our way. Lots of comments. I'm going to apologize because we will not be able to answer them all, but we promise that we will tackle these topics once again. And I also wanted to ask the speakers to be brief in their answers so that we can try and answer as many questions as we can. So MJG was saying that 100 years ago, mining is not comparable to the current mining that has more demanding environmental requirements. So it's about exploiting resources in a sustainable way. But I, I don't agree with what has been said mining. That we had 100 years ago was less impactful. Not because they didn't want to have an impact just because the capacity that they had at the time was the capacity they had at the time. And it used to be, especially with metals, it was gallery mining and it would go looking for the vein. They would look for it in the courts and so on where the metals were found. And now it's open sky mining. It's about eliminating the whole terrain to completely destroying the mountain and eliminating it from them, from the map really. So it's not, it's not that the mountain has been damaged by mining is that we simply don't have the mountain any longer. So in that sense, well, obviously social conditions of workers can be improved, but we can also improve the environmental conditions in minds to avoid polluting the rivers. And what's most important is to not have minds in areas of natural interest. That is the main thing. We have to exclude the whole Natura 2000 network of protected natural areas. And I think that right now mining is much more impactful than the one that took place 100 years ago, especially because the capacity that the human, that human beings have for destruction is 10 times greater than the one that we had 100 years ago. Juanjo asks if the, if raising awareness, if we could, especially with regards to circular economy and so on, and if circular economy and the, and this plan of being more self-sufficient in Europe could reduce our dependence on metals, that's what Juan asks to Juanjo. Juanjo. Yes, yes, yes. I'm sorry. I was, I was activating my microphone. Well, you asked us to be brief, but the questions are, are complicated. Yes, I know, I know. This is a topic that we could talk about for days. Okay. Obviously raising awareness is basic. It is, it is very much necessary, but it's not enough. I think that we have, obviously we have to work on raising awareness and education, environmental education. I think that that is very much necessary, but we also need to have regulations. We need to have rules that will force for, for an ecologic transition that will not worsen our climate change situation, our climate crisis, because we are in a limit situation. And that requires measures, measures that go beyond raising awareness. I always say when we talk about Barry Kamenach and peace with the planet, well, he talks about the fact that the most efficient thing, and that's a book that was published 40 years ago, but at the time he said that the most efficient thing in, in, in our fight to protect the planet, protect the planet against all the ecological crisis was regulation. And the second question, I don't remember the second question. Let me just try and look for it. Yes. If we think that circular economy and self-sufficiently, energetic self-sufficiency would decrease our dependence to metals. Well, yes, obviously, I mean, I'm not a great believer of mantras. We've talked about circular economy. I think that those are the natural cycles and natural cycles are really circular. What I think is that as we said, if we apply active policies, reduction, reuse and recycling, we will obviously reduce the need for, for new materials that, that is, that is obvious. So that, that is something that we have to keep on working on. Because if that comes hand in hand with, with objectives for the contention of the increase of demand, then maybe the crisis will not worsen. Okay. So we, we don't have much time and it's really a PT not being able to, to read all the questions that are being asked on the chat, but I did want to open this question for the three of you, because different participants have mentioned this. They said that. Geraldine was saying that the European commission and civil society share the same diagnosis. And sometimes they even share the same solutions, such as reparations, such as eco design, such as a obsolescence, programmed obsolescence, but things do not go, do not advance as fast as they should. So if we have the same diagnosis and we see the same solutions, why aren't we going faster about this? So this is a question that I asked the three of you, so that we can close this debate. Who wants to take the floor? If that's all right with you, I could start. I think that there are many factors that are important. First of all, lobbies, lobbies act, and they have a lot of influence. They have a lot of influence, political influence and, you know, revolving doors and so on. It's real. I really remember when the packaging directive started, it was the idea of reducing in the nineties, reducing the amount of packaging and plastic that was produced, but the result, the final result, unfortunately, has been quite the opposite. It has been a sort of open door for the amount of packaging to increase and its impact. So I think that's on the one hand, and on the other hand, I think that technological difficulties and price as well as we said, there is a diversity of factors, and that is why the raising awareness is so important and so important because the only thing that can face all of these things is pressure on the streets and people if they mobilize. Why aren't we going faster about this? Well, we are not going faster about this because growth continues picking up. The mantra of growth is something that nobody fights against and there is efficiency in many things, but now cars consume half the gas they consumed previously, but now there is more gas consumption. So in the end, we go towards efficiency, but the problem is that that can only be reduced so much. So what we have to say is no, we need to have less of this and that's it, and we have to reduce. And the only solution will be to reduce because that's how it's going to unfold. And metal recycling is important, very important, why? Because well, for instance, for the mines that we have here in Spain, the more recycling we have, the more material we will have in the market so prices will go down and if prices go down, then some mines are not profitable. So those mines will not destroy the territory. But the problem is that recycling is going to eat up part of that.  We will also have other mining activities. We will not stop the mining activities. And then there is another element, which is at the level of the EU that worries us quite a bit. Mining companies have a lot of power. And they are sending a clear message of, well, we need mines in Europe because it's better to have them here than to have them in other countries where the environmental laws are worse and the social conditions of workers are worse as well. So now we have to swallow that hard pill and have mines, even in protected areas, even in natural interest areas. The result that we see there is that when that has been done, and I'm talking for instance about production of eucalyptus and paper pulp, well, they started producing it in Europe. Everything was destroyed in Europe, but they also destroyed everything in other countries in the third world. So they want us to swallow this hard pill thing that there will not be mines there, but what will happen will be that there will be mines here and there. So we're not really going to improve the situation. As I said, mining companies in Europe are playing the game quite well because they're now making social movements in Europe. Think that we need a mining boom in Europe, but we are not willing to swallow that pill. We don't want for mines to be opened here or there. What we need to do is de-grow. So we need to de-grow. Well, yes, that's quite clear, Sandy. Everything goes through de-growth. Alicia, why can't we go faster about it? I don't know if you can see the slide, the slide that I just shared with you all. So what I wanted to say was that nowadays, well, I mean, today we have overcome four of the basic processes of Earth. Climate change is not the most important one, as you can see here. We are talking about biochemical flows that have been completely surpassed, but also genetic diversity. And here, this graph, which you can see, and Stephen Tal proposed this in 2015, he was talking about virus and the resilience of the planet when facing threats such as virus was going down. The resilience was going down. And what happened last year, a pandemic? So the thing is we don't learn, and the Earth is sending messages. The Earth is sending an SOS, warning, an SOS call. So climate change is one. Pandemic is another message. And if we continue with this crazy growth, we will get more and more messages, more science, and we will see how this ends. It will end up in some sort of collapse. So we are in minute 42 of the planet. If minute 46 was that of complete flooding of the football stadium and everyone drowning, well, we are in minute 42. We do not have time for things to flow as they have up till now. And I think that the pandemic could actually be a good sign for us to learn. We have already seen the dangers, and we should not be aware because this is only the beginning. There will be many other signs, many other signs with regards to metals, for instance. And I know metals are important, but there are many other threats such as phosphorus, phosphorus, for instance, and food, et cetera. Well, I have lots of questions left unanswered in the chat, lots of comments. Bethente was saying and he was actually asking for help to stop a project of a mining project in his village. Then someone else was saying that he did not agree with Santi with regards to mining. We will try and send you all the questions that have been left hanging. We will try to give you an answer, and we will try and keep on talking about this topic because as Alitia was saying, the solutions are not going to be just one of the solutions. They are going to be very complicated and will have lots of dimensions. So we have to cooperate all of us together because otherwise we will not manage to achieve this. And we will close it here. We will close this debate here. This debate on costs, the cost of energy transition. And we have talked about a very specific ingredient which was metals. I would like to thank all the participants, all of the public. Thank you for being here. I would like to thank the Green European Foundation, La Casa Encendida, and the Foundation Transición Verde for allowing for this to happen. The video will be available very soon. We will try and send you the links, but if we do not do so, they will be on La Casa Encendida's YouTube channel and Transición Verde's YouTube channel.  So thank you so much for being here and we will see you very soon. Thank you very much.


Good morning everybody. Thank you for being here in such large numbers even though John is right now giving the current report Which I would have liked to go to myself Today I'm going to talk about a Some things that I've experienced and that I think Are an opportunity to improve how we build embedded systems Let me first say a bit about myself. My name is Agnaut van de Kapella. I'm a embedded software architect whatever that means with focus on integration of Linux based systems so embedded systems I've been a consultant at mind since 2008 and so there my work is doing exactly that I've worked for plenty of different companies in different projects in many different domains and I'm Maintainer of one of the four maintainers of build routes I have to say though that what I'm discussing now is also a surprise for my built-root colleagues So it's not the opinion of build route. It's my own opinion. I Have checked it with my colleagues though at mind. So it is more or less minds opinion so what I want to discuss is some things that are missing when we Use the existing build systems to build an embedded system When I see it my customers How people build in a method system? There are a number of issues that? Always pop up that always have to be done and for which tools exist for which Solutions exist, but there's still some reinvention that needs to be done And there are four things that I want to highlight here There are probably more things as well that are missing but these are the four that I could think of First is field updates So updating the software after deployment Second is persistence and related to that this factory set The third one is how to do manufacturing and Related to that also provisioning So how to get the software on the device Before it goes into the field and the final one is verified boots Now all these topics I'm I have some familiarity with it But I'm not an expert in as I sit there is still some work to be done And so I absolutely welcome feedback during the presentation or afterwards So please interrupt me if you have any remarks or questions or whatever and I'll try to Get this in a more or less organized way to the end Let's start however with discussing a bit about build systems, so I Expected most of you are familiar with some kind of build system to to produce an embedded system there, too, which are very well known and Almost everybody uses them. That's open embedded or yokto I'm going to use yokto in the remainder of this talk and not try to do this distinction between open embedded and poking yokto In built routes there in fact very similar. I use both of them And So what what what is good about them is that are very configurable that? They have Everything that you need to build your embedded system, so they provide all the the tools all the packages that you're going to need But there is still In my opinion some redundant work that you have to do to get to an actual product Then I'm going to do this to introduce two others which go further And that is open-debatee and foundries. I owe there are many others But these are just some some Highlights to this thing. I mean to explain why There these problems are solved but not in built route in open embedded So in open-debatee What they do is basically make some Make a lot of explicit choices about the kind of system You build so there is less freedom for You as a developer to make these choices the choices already been made for you And open-debatee has kind of niche choices. It uses you was it uses progd so it's pretty specific it's also pretty focused on the Routers as the embedded system it can theoretically be used in other contexts as well, but you know, it's like fitting a Was it a round hole in a square peg or something? And there's also some things missing like rust There's no rust support. I think there's also no mess on support or well, there's some student things missing there So it's pretty niche And then there's foundries I owe Well foundries I was bigger bigger than the build system, but it has the Linux micro platform build system Which is basically a derivative of Yachto also making some specific choices like using OS 3 for the update system Using a rightful root file system and combat later to what that implies And so what I'm basically trying to claim in this presentation is that We should make these kind of choices or at least offer these options In an integrated way in other build systems as well Now the thing with foundries I owe and others like that so I think Balena is similar It's very it's tight pretty tightly to their foundries I owe cloud based system and so also it's Pretty much focused on using Docker for application development. So it's so again fairly niche. Well, it's it's applicable very generally But it has very specific choices with which are not appropriate for all systems So the traditional distros are another thing sometimes used in embedded systems, but not often So with traditional distros, I mean Fedora, Debian, Ubuntu and the like They're obviously more focused on the desktop in the server use cases and not on embedded use cases in the way They are typically Configured is to boot an installer and then updates the package manager and Everything is writable. None of these are really a I mean useful in embedded systems Or we actually want to actively avoid these things in embedded systems And then it turns out that they're Not even ideal for the desktop use case so Leonard's puttering made this blog post a few months ago about Basically the same things that I'm discussing now It's a kind of coincidence that he came up with this idea at the same time as me but I've used a lot of his His thoughts to make this presentation So absolutely Advice to to check out this post. It's not directly applicable to the system systems, but the ideas are there so now going to the the missing things in embedded build systems The first one is field updates when you deploy a system every system needs to have a way of doing field updates There is simply no way that you can deploy something and then hope that it's going to work like that forever At least for Linux based systems And differently if it's network connected Usually this is called over the air updates, but yeah, sometimes there are different mechanisms like with USB media that you plug in or something So that's why they use field updates here and almost always the Approach that is chosen is using an AB update. So having Two copies of the root fastest in the kernel device three and other supporting materials And swap between them and then if you you boot the new system if that doesn't work you fall back to the old one And tools exist for this so software update route mender and there are more So there is you could say, okay, this is a soft problem Because the the build systems integrate all these tools so all these three they exist in in both open embedded in in built routes So you can ask, okay, what what is it? Why why is this still a problem? Well in terms of integrating this there are still some some gaps the first one is that we Almost always when you build a system you have to distinguish between the The image that is used for manufacturing which is the complete image which has the the boat or which has a space for both partitions which has a bootloader that is going to To be able to to swap between them so is able to choose better to boot a or B And then you have the update image which contains just the which doesn't contain a bootloader We just contains one of the two systems Which possibly Well, which contains the the only device three kernel in root file system and which puts this in some kind of image format which corresponds to the to the update system that you use for instance for SW update it's a CPIO archive So the Basically what you need to do in your build system is to create both these images Of course, this is this is not rocket science. It's easy to do that. It's just something you Still have to do when you use the build system If it was just this I wouldn't make a presentation about it, but there's more There's also some things missing outside of the build systems For example in you boots You would does not actually directly support this use case basically what's what all these Update systems do is they they provide you would scripts to do the swapping or to choose the the A or the B Which basically means you have to either patch the default environment in your you would configuration or You have to have a custom environment And they also use the ubut environment to choose between a and B that part is fine now the problem with that is to having the script is that it's So much fragile and then when we come to verified boot for instance It means you're it's hard to protect your ubut environment for a verified boot Because the script is in there. So if you if you do the swapping between the two It's it's not signable And but the script which does the boot is in there. So yeah, you have a kind of difficult situation there Plus the ubut environment can be corrupted in that case you fall back to the default environment. So basically you have to make sure that this A be logic is in the default environment So again, there are solutions Without patching you would but it would be easier if this logic was directly in you boots and then there's no risk you Which I Which is semi solved also, but yeah, it needs thought by the developer again. That is that you wouldn't be of a itself Often also need to be updatable So in many cases I've seen that after a few years there is some use case for actually updating you would or updating TFA in the fields which is Annoying if you didn't foresee that when building the initial system On you we avoid the situation is better because there we can just Skip the bootloader entirely and boot kernel directly using the evice stop integration of the kernel and rock for instance, I haven't checked with the update, but rock and directly sits the evi boot order And boot next to basically implement the AB. And so you have nothing there that that interferes And there's also system deboot, which I'm not sure if it's suitable for embedded systems, but it's an option That can also be a choose it only works on you evi systems that can also choose between A and B based on a version number. So you just the file name Determines which one is going to be booted So now back to the Build systems. So yeah for software updates, okay, there is some Some friction there, but it's not too bad But it becomes worse if we take in persistence so persistence because we do this AB updates We can't simply have a writable root file system and put our Persistent data in there because then when you swap to the B partition, yeah, you lose everything which was in the old truth of this Which means there is a you need you need a separate volume for the persistent data a separate partition So that must be that must be created that must be mounted somewhere and it also must be populated so the Usually there are some initial directories that you need on there sometimes some initial files So yeah, there there is stuff to be done there again, it's not rocket science. There are a bunch of solutions for this I have three here and you can probably invent more So one solution is putting an overlay of this on on route itself Which is really easy because you can just act as if the thing is writable, but there are some dangers with that so it makes Roots writable, which means that if an attacker can somehow write to do something Then it can actually modify your root file system can modify any file It's a bit safer to have a limited scope of where modifications can be done Or it doesn't necessarily be have to be an attacker. It can also be accidental, of course In practice, you usually need an in-ear time of this to make this work. I mean you can Mount it directly from the kernel command line, but it's a bit involved in For instance with system D it's not possible because if you have any system D Confideration file in slide GTC It's not going to be read by system D If it's passed on Whatever so in practice it's often twice in interviews. I'm actually not 100% sure if it really always is the case You can also directly mount for instance Slash far and then make sure that anything that needs to be written is in slash far Now often you need some files in slide GTC to be writable For instance a machine ID if you use system D If you use network manager the network manager settings are inside GTC So there are a bunch of things in slide GTC that you probably need also to be writable So then you need bind mounts for those or you need to have sim links Yeah, so there's again stuff to be done there It's not like out of the box And then the the solution that's proposed by by Leonard buttering is to have a writable slash writable roots, but if user read only because if you have unified user concepts then Everything which is executable is under user. You're never going to execute anything anywhere else So the security thing from earlier is then solved by that way by having a read only user And you can write ETC and you can write Var and anything else if you need things like for something for instance to put Like docker images or whatever you can do that But that one definitely requires an interest to to make that work And then as I mentioned earlier, it has to be populated except for the overlay because in the overlay case you can Populate it as part of your the root file system image So you need some something that populates its first boot or when producing the image System D temp files can do this but there are some Limitations for instance, for example, it can't remove files Sometimes when you do an update there are some configuration files that are or or writable files that are no longer needed It's not possible to remove those With system D temp file, so it's it's always a bit tricky So what can Build systems do here it actually goes a bit beyond the build system But I think the build the build systems can be a driver of this It's basically standardizing how persistence is done. So we have all these options Maybe you should just like choose an option and always do that Similar to like we've kind of converge on doing a B updates We can do the same for persistence saying, okay, this is the approach that we're going to take And and really supports that approach And a build system can help a lot there because the out of the box configuration could just support that could just say, okay You can assume that your for instance your roots is with only and var is writable Still leave some things to be done for the developer like if var is writable Any sim links or bind mounts that have to be created in ETC But you know, it can it can help or it you can Okay, it takes it away a bit of freedom from developers But it makes things easier for developers as well because they know what to do Plus there are a lot of integrations considerations Regarding which parts are writable and which parts are Read only regarding this the bind mounting so you need an in-script or an System the units to do those bind mounts And and yeah, the build system is in a very good place It's like a distro basically it's in a very good place to to take into account those considerations So if you install this particular package the the logic to To apply the persistence that it needs Can go along with that because you know if you have a database for instance, yeah Persistence is going probably going to be needed for that database. Otherwise, there's usually not much point So the default installation of the database can make sure that it has a writable location in the persistent partition And then of course it ties in with the update system Not so much with the update system itself, but rather with this a be logic and the fact that I mean the partitioning The having an a a b in a persistent partition available so basically what I'm advocating here is that a build system instead of Generating an image which is the minimal image to be bootable on certain targets is to immediately generate an image which has an a and a b partition and which has a separate persistent partition. That's basically my my Minimum expectation And then related to persistence is factory resets So if factory is it isn't effectively simple. It's just wiping or reformatting the persistent partition But then we basically need to be able to repopulate it and That ties in with Populating that was to be done at first time So it basically suggests that we should do the population on first boot Not in in installer or something like that Because then we can reuse it for factory resets Another thing to take into account is recovery from a corrupted Persistent partition because this is writable. Even if you use something which is supposed to be power fail safe Things tend to go wrong at some points So you need to have a recovery mechanism for that That is typically something that if an individual developer has to take care of it They're not going to get around to do that. So that's I think we are having this as part of the build system can help a lot because then the build system can just make sure that so for instance a file system check is done and That if if the file system check fails and it's not recoverable, it's reformatted and okay You lose your data, but at least the system still works and What I especially want here is to be able to improve so that over time we see From use that's okay There are some use cases that are not covered and then we have a central place with it where it can be improved if everybody Develops their own solution. There is no learning there and you know Somebody falls a problem and nobody else can make use of that. Yeah, I I'm not sufficiently familiar with doctor to be sure but possibly But I don't think that it's also going to reformat in case the fastest and check is not recoverable but yeah, I mean it's it's definitely I mean There I mean we are not in We're already somewhere we don't have to start from zero and I think in these things in general Yachto goes further than built roots and of course I'm more familiar with built roots. So I'm Possibly sometimes a bit pessimistic about what I already exists. Okay Then we come to manufacturing I see I'm taking too much time as usual So I'll go a bit quicker So manufacturing is basically when you Have your board and you need to install an image on it There are again many ways that this can be done, but it always has to be done And so developers always reinvent how to do the manufacturing And so here again same message. I think that there is Opportunity there to have something common Which is probably should be something that is I mean it's not that tightly related to the build system But the nice thing about the build system is that it's a place where people already Converge where people already Collaborates and so it's a good place to to have the collaboration place already Again, Yachto is a bit has something there already the week format which The covers one use case where you have where you flash it to an EMMC or SD cards and it expands to take the whole The entire space Provisioning that is something where I have not seen any solution that Discommon at this point. So the idea is that when you manufacture a device an embedded device You typically need to put some information on there Some persistent info information, which is device specific So it can't be part of root file system because it's different for every device some of these are Well, you can just generate offer first boot like an SSH key That's easy And doesn't actually need to be part of provisioning However, there's some things which need to somehow come from a manufacturing beta database or needs to have a relationship with the outside world A serial number for instance a MAC address that needs to come from your set of allocated MAC addresses Password so that you have a unique password in every on every device, but you still know what the password is So, yeah, there are a bunch of things that either have to come from a manufacturing database or have to be stored in the manufacturing database So this is something that people have to reinvent all the time Both things actually one is the the fact that you need to store this somewhere. So you need to separate partition for it That you need to somehow link to the rest of the system And It cannot simply be the persistent partition because this has to persist even over factory reset You don't want to do a factory is it and then lose your serial number or lose your password or lose your MAC address so Yeah, it's there's They really need to needs to go so often to this Ideally also there would be some common way to communicate with the manufacturing database But I don't think we're there yet because yeah this manufacturing database is There's nothing at all that exists to To cover that so yeah, what can we do? Make sure that there is some common tooling and integrates in a in the build systems Yeah, so here it could be outside, but Yeah, the build systems are a nice place to discuss it And then the final point is verified boots in my slide code screwed up for some reason So basically this is something I don't really have experienced with myself So I've used devices using verified boot, but I never implemented it myself. So here my knowledge is just hearsay But the important thing is that it's complicated There is a bit of Standardization I mean there are two standards approaches for doing verified boots so just Verified boots is basically that's when the system is booted. There is some hardware that checks that the first stage bootloader is What you expect and then that bootloader is going to stay check the second stage bootloader And that one is going to check the kernel and then the kernel verifies the Signatures on modules that it loads and there is a chain That needs to be maintained So the first steps are a bit standardized. So the you you advise secure boot chain It's supported in some bootloaders. It's supported in the kernel Then arm trusted firmware on our trust platform Although there there are still some sock specific thing that has to be done on the very first stage So as soon as you go into arm trusted firmware is the same approach everywhere, but still there is no Standard I mean this this standardization is not really implemented in in build systems And Then there is still also the problem of the root if is itself this I'm going to skip completely Let's just say for the root if is there are plenty of different Well, not plenty of but there are a few different options and there's no one solution that is used by everybody and The options are also not ideal. For instance, it's hard to get working on UBI so hard to get working on non-flash So what what needs to be done there? It's the same thing again Some common tooling is needed and Although this is kind of outside of the scope of build systems its Build systems are a good place to Discuss it the common tooling here is Not so much in doing the bootchain itself because that is in in the bootloader in the kernel in etc It's rather in generating the images for it. For instance for the invariity you need to have an The verity partition I mean the the file system itself in a separate Checksome partition that has to be generated and there's that part that needs to be integrated in a build system and also linking them together. So in your in scripts making sure that the The verity is taken into account And why is commonality important here? It's to have some standard change that we know are trustable So that I mean it's like all security stuff. It's better if this is not in the open in there where the tools are Open and only the keys are secret And so although the implementations are in separate tools the integration It's can be part of the build system. So that's why I think it should be discussed there Plus of course, there's also an impact on partitioning if you use the invariity for instance. All right, that's Concludes what I wanted to cover in this talk So the the main takeaway is that Currently developers developers still have to reinvent the wheel They it's not really reinventing the wheel, but they have to put the pieces together themselves in and there's some not really gaps there, but there's some choices that they have to make which has bigger impact than that you would think at first sight and Build systems can help making the right choices there by maybe offering a few Alternatives but having some flows which are the supported flows Ideally I prefer to have the freedom to Do it differently But make it easy to do it the standard way And so I think that this stuff should be part if in the Yachter case should be part of open a bit at core and not in some external layer Because the the core is where you know, there is most exchange and most Commonality can be exploited But the build systems are not alone. We also need some support from upstream tools like bootloader for updates To to make it all work together. Thank you. Are there any remarks or further input or questions? I'm going to repeat for the recording And I'm not going to remember everything so I'm going to repeat now So the remark is that he was in a similar. He also had a product where you needed manufacturing SD cards that would install stuff But it's an SD card. There's annoying because it gets lost and it's can Break when you push it in And it can actually break the board if you put it in a bit too strongly It's actually mentioned in the slide so what he suggests is that an alternative approach instead of using an SD card and an installer approach is to Use a USB connection. Almost all Socks are able to boot over USB where you have some tool on the host On the PC that loads an image over USB in memory that image is an typically a bootloader But can actually be anything The the image is booted and then in that image you can do anything And for instance from you boot if you use you boot as an image and a specialized you boot You can have all the scripting in there to download another image either over USB or over Ethernet and Flash it to the emmc or not Thank you, were there any further questions. I'm not sure how we are for time I would not like to go So I would love to see Building blocks that I can easily enable One example So Lucas remark is that What he wants is to have the freedom to still Design the system that he likes and so what he wants is that the build system provides the tools the building blocks and even connects them together to some extent, but that there is still That the details in the little Decisions are still taken by the developer My own take on that is that I think that the developer should be free to do that However, I think the build system should have to the and the default of the build system should be something that just works out of the box And doesn't need further configuration But while still allowing further configuration, it's similar to how you have for instance a kernel configuration All the the build systems they allowed you to use the entry dev config But then extending the dev config with your own fragments so I think we should have something similar for All these things that there is something that works out of the box But with the possibility either to just override it and not use the out-of-the-box system Or to add something to add some plugins or hooks or whatever to slightly modify to your needs You were first I Can I can I repeat it already So this is a very good remark actually so I gave basically four points where some Stuff that developers need to do all the time There's actually a fifth point and that is debugging all developers need to do debugging now for debugging You need debugging tools on your target And the typically you don't want to ship a product that includes those Debugging tools so you need a way to have those tools in development and not in final product and solution that they chose was to To install it in an overlay But make sure that it's it needs to be an overlay because it really needs to be in the same place that it's expected like phalgrinds Expects it's libraries to be in a very specific location. Please continue Yeah, yeah, so that's a good remark again so by enabling a Debug tool in in in your configuration You actually have an effect which goes further down the chain. So there are dependencies that it pulls in for instance apparently Valkyrie Changes something in a bootloader as well So you basically you don't I mean if you have a configuration for your production and a configuration for debug The it's not that the debug shows some additional files So it's not so easy to make an overlay. So this is an assault problem basically. Yeah, okay I'm afraid we're out of time. So I can't take any more questions, but I will stay either here or in the neighborhood to discuss things further Thank you very much for your attention and I hope that I gave a similar talk ten years ago about software updates and Voila a few years later. There were a few tools for that. So I hope that in the same way this problem is going to be solved as well Thank you