Hello and welcome to today's video. I am
Peter, your coding chef from the flavorful land of South Africa. Join me today in the
Yocto Kitchen where lines of code sizzle and recipes are refined. We are about to whip up
a Linux distribution using the Yocto Project, a state-of-the-art kitchen for cooking
up custom Linux images. [Music] Today we will be obtaining the relevant board
support package layers, which will serve as the foundation for our recipe. We will also
be making a meta-flutter mix, which we will add to the batter just to give a modern tang to
this traditional recipe. The next step will be to BitBake our Linux distribution until it has
a perfect crust. And obviously we have to test it afterwards just to make sure that it hits the
spot. But first let me give you a rundown of the hardware we will be dealing with today. Here
we have a Toradex Verdin IMX8M+ quad module installed in a Talia carrier board. The carrier
board provides us with access to the features of the Verdin module, while the Verdin module
supplies us with computing power. I will include links to the product pages of these down in the
description. On the module we have a 64-bit ARM processor with a GPU and 4GB of RAM. The module
also features flash memory, Ethernet, Wi-Fi and Bluetooth. A grateful chirp to Toradex for sending
us this hardware. As you can see, we have a touch display connected to the board using HDMI and USB
for touch. You might have noticed that this setup is suffering from black screen syndrome. Fear
not, this Verdin is only in a deep slumber, and it should be flattering by the end of the video. As
mentioned earlier our first step is to obtain the relevant board support package layers. Luckily
Toradex provides us with good documentation on this topic. A board support package is a
software bundle that makes sure an operating system works smoothly on our specific hardware by
providing essential drivers and configurations. I'll include the link in the description
for you to check out. So, prerequisites, make sure you have a decent machine to build
on and also a decent internet connection goes a long way. And make sure you are running one of the
supported Linux distributions. Here's a list, you can read all that yourself, also the Yocto build
dependencies. But after you've got all that set up, the next step is to install the Git and Repo
tools. I'm not going to be getting into these, you can find the instructions here. I already have it
installed. The next step is to run these commands. Here we can run this one. And here we go. And the
next step is to do Repo sync. So, the next step. Okay, there we go. Now it is time to start working
on our fragrant meta-flutter mix. As you can see here, we've got a couple of directories, and we
want to add meta-flutter to the layers directory. So, in order to do that, we need to clone it into
the correct directory. If we go to... And see here that now here we have meta-flutter along with
everything else that the Repo tool has downloaded. If you want to, you can modify the source code of
the initial Git repository that I showed you to download this meta-flutter layer as well. But
that would be for your own personal project, and we won't be doing that here today. Now is
also a good time to point out that meta-flutter does have some breaking changes from time to time.
And if you do run into them, just report them to the maintainers on GitHub. And also look through
the issues maybe it's already being worked on or already solved. Our next step is to head over to
this directory just to stir out a few lumps. So, in this directory here we're going to have a few
files. The first one is this bbakelayers.conf and we want to go ahead and edit this one.
I'm going to go to the bottom and then I'm going to add a line here. I have it on copy,
so this is going to add the meta-flutter layer which we just cloned. And will tell Yocto
to include this. So, let's go here, yes and there we go. And the next file we want to edit
is this local.conf, there we go. So, I'm going to go all the way to the bottom and then I also
have this on copy here. And here we go so I just added this part. First off, it's a very good
idea to use a fixed flutter SDK tag. Make sure to match this to what you have on your host machine.
Otherwise, you'll get an error. But whatever you want to use here, put that in. And then the next
part is to have all this. I'm just going to do the flutter gallery here and also, I'm going to
be using flutter-pi. Feel free to use any of the other embedders available with meta-flutter. And
then here at the bottom it's always a good idea to include this, just so when the display isn't
working at least you can debug it. So now we have this configured and let's go ahead and save it.
Yes, and there we go. Back to the Toradex Yocto documentation. I believe this is where we left
off. I see we have to make another modification to the local.conf file. We need to set the machine.
So, we're using the Verdin IMX8M+ that is the one we are using. Yes, seems to be correct. So let us
save this, yes, and now we should be good to go. Yeah, here we are back. Just make sure we run this
again. You can run this .export at any time in the base directory just to make sure and it will take
you to the build directory. And then you should be ready to build an image. Okay so here we have
the reference minimal image. I believe that is the one we want to be building. So, what we are
going to do is put bitbake and then let us find the "tdx-reference-minimal-image" is what we want.
And there we go. Oh dear, we seem to have yet a bump in the road. We have a warning and an error
message. Let's go read them first to see how bad the situation is. Oh, that's easy, we forgot to
accept the end user license agreement. That was actually covered in the Toradex documentation. We
go have a look here, we can see, ah here it is, yes, that's exactly the error we have.
Let's copy this and make this bigger again. What was it called again? I think it's "conf"?
I think maybe it's in this one. Ah here it is, then we gotta edit it. We need to actually edit
ourselves, but I do have it on copy I believe. There we go. So, we have added that and yes, there
we go. And also, I'm going to restart the bitbake procedure, but this time I'm going to use the
"k" flag. This adds a bit of resilience and tells Yocto to continue building, even if there's an
error. So, this I can leave overnight. Now we're going to build again, this time we shouldn't
get the error. And I am back. It seems bitbake worked its baking brilliance. Unfortunately, I
closed the terminal that I was using to bake the distribution. So here we go again. The nice thing
about bitbake is that it remembers where it left off, so it should realize that it doesn't have any
work left to do. So, it's done, everything worked. This Linux distribution is looking good. And
we've got one warning message we can have a look at here. Something about gstreamer, we won't be
using gstreamer today. So not a worry for today, but maybe in the future we could have a look
at that. We seem to have got lucky. Our Linux distribution is perfectly cooked. But hey, if
you are not so fortunate as we were today and it's coming out a little bit undercooked or overly
crispy, then reach out in the comment section. We are here to turn your coding conundrums into
victories. So, drop a message. Okay so now it's time to see if we can wake up our snoozing
Verdin with the enticing aroma of a meta-flutter infused Linux distribution. So sometimes even the
boldest of chefs need to take a little shortcut. And that is why we will be using the Toradex
Easy installer today. You can find the link in the description for Toradex Easy installer, but I
already have it installed on the board. It comes like that from the factory. So, if I turn it on,
okay, that's looking good. Now the next step is to find the image and put it on a USB stick and it
gets in bold and deploy images. Ah, here it is, 74 items. Okay, Toradex Easy installer, let's
search for it. There we go, this is the one. So, I'm going to put this on copy and then, oh, let
me plug in a USB stick. So now we put it on the plate. I mean USB stick, but I hope you get the
joke. Let's see if it extracts. It says it's done, so I think we might as well just... Okay, there
we go. It's ejected now. The light has stopped flashing. I need to find a place to plug it in and
there we go. I'm going to select the image that we just created and then we will install. Yes, we
do want to install and accept. There we go. Don't sell your soul to evil entities, eh? Just press
accept. Like me. Yeah, it says reboot. Go with reboot. You'll need a serial console. I'm going
to plug in in order to connect to the board or you could use SSH if you want to and then I'm going
to start up boot term. You can use any serial console, but this is just my serial console of
choice. Okay, there we go, and it has connected. Let's just reboot here. There we go. Okay, so
this is wonderful news. It's booting. Yeah, okay. So, you can remove the drive. Login should
be root. Okay. Go into the root directory. So now we need to find the Flutter gallery app that
will depend on where meta-flutter has placed it. This is the directory we were looking for. So
now we're going to point Flutter-pi towards this directory. Then we just say this is the folder
that contains the gallery app and look at that, our Verdin seems to be fluttering and this is all
the normal stuff. This is Flutter gallery. If you haven't played around with it, feel free to do
so. But yeah, this could be your app running here. And there you have it, my fellow coding
chefs and cooks. For those hungry for more, I do have a recommendation. Set up SSH on this
board and check out our video showing how to do hot reload with an embedded device. I'll put a
link to that down in the description. So, I hope you have savored every moment of today's video.
Remember, we are always open for questions. So, drop your thoughts down in the comment section
below. If you found this video satisfying, don't hold back, like, subscribe and share.
Your support is the secret sauce that keeps this channel going. I bid you farewell with a smile
and a promise for more videos. Tutsis! [music]