 Hi, I'm Rudi Streif. I'm the director of embedded solutions for the Linux Foundation, and today I'll give you a little sneak peek into our other four or five training class on building embedded Linux systems with the Yoctoproject. The Yoctoproject is a very cool tool set actually that allows you to build Linux distributions from scratch for your hardware. And what we are going to do today is maybe the most exciting part of this class is actually where the rubber hits the road, or maybe more like where the Linux kernel image hits the silicon. We're going to build a board support package with the Yoctoproject for our little demo hardware, which is the Beaglebone from Texas Instruments. All right, let's get started. A little intro into our target development board. It's the Beaglebone from Texas Instruments. It has a Texas Instruments AM3359 CPU, 256 megabytes of RAM, a 10-hundred megabit-based T-Ethernet port, USB host port, USB-0, USB JTAG, and a connector for a flash memory chip and a couple of expansion connectors where you can do some breadboarding and additional experiment with it. First of all, we need to connect our board. We need to set our board up so that we can talk from our host computer with our board. For this, we use the Minicom program. So if you have Minicom already installed on your system, then fine. If not, you can easily install it by typing on an Ubuntu distribution sudo apt-get install minicom, and then it will install Minicom on your system. After that, you want to plug in your Beaglebone board into your system with the USB cable that is provided. And this little board has a serial port to USB converter on it, so we'll have to find out which serial port actually to use. To do that, you type Dmessage on your console, and it will eventually tell you that there are a couple of serial ports now, new serial port devices initialized. And one of them is the serial port for this board. In our case, it's slash def slash ttyusb1. Accessing serial devices under Linux is normally restricted to certain user groups. So access to slash def slash ttyusb1 would be restricted normally to the user group or to a special user group that's called dialout. So you have two options, actually, what you can do to get access to the serial port. So either you change the permissions on that serial port, simply by typing sudo changemod 0666 slash def slash ttyusb1, or you can simply add yourself to that special user group by typing sudo user mod minus a minus capital G dialout. And for this class, actually, we're using the student user, but if you have on your system a different user, you would use your username. So we call it student in this case. Now we're pretty much ready to go to actually connect to our Beaglebone board for the first time. So first, we need to launch a minicom in setup mode so that we can actually set the right communication parameters. We do this with sudo minicom minus s. This goes into setup mode. You will have to enter your super user password or root password. You get a little menu there, and you scroll down there to serial port setup, set your serial device, and also set your communications parameters, 115,200 bits per second, eight data bits, no parity, and one stop it. Press Enter. Press Enter again and save this as your default configuration and exit for minicom. Now we're going to start minicom again, this time in user mode so that we can actually communicate with the Beaglebone board. For this, you type minicom minus o minus w. We're now connected to our Beaglebone board through our minicom terminal. We won't see much yet because we do not have a SD chip inserted into the Beaglebone with an operating system. So all the Beaglebone does right now send back to our minicom terminal is an endless string of capital C letters. But we're ready to go and go to the next step. As the next step, we need to get our SD chip ready, and we need to partition and format it for use with the Beaglebone and with Linux. For that, we have our chip inserted into a USB card reader, and we use the Dmessage program to find out which device the Linux operating system on our host has assigned to this chip. We type Dmessage, and we see that this chip has been assigned to this device slash DEV slash def slash SDC. And to partition and format this chip, I've prepared a little script, and we run this script as a super user by typing sudo bbonash. And you provide the name of the device, slash def slash SDC. Then the script asks us, if you're sure that we want to format this device, we enter with yes. And now it's partitioning the SD chip and also formatting the SD chip. That takes a couple of seconds. All right, our little script is now done partitioning and formatting our microSD chip. Now we want to try out if it has actually worked. For that, we need to create mount points so that we can mount these partitions to our host system. And for that, we type sudo mkdir. These mount points are simple directory notes on our host's file system. And we mount those three partitions on the media as media big root, big boot, media big root 1, and media big root 2. Then we need to edit our file system table. That's the file in slash ATC flash SF tab. And into that file, we insert three entries for the three partitions. So first, you load this file into your favorite editor. Mine in this case would be just a simple text editor vi. And to the end of this file, simply add three lines. And these lines are slash def slash SDC 1 slash media slash big root auto, user no auto, and 0 0 for the file system checks. And we repeat that for the root partitions, big root 1 and big root 2. And in the final step, we actually see if our file system's mount. So we simply type mount media big boot. Now our host system picks the mount point and the mount parameters up from our file system table and mounts it to the host system. So everything seems to be working. So we're ready for the next step. So now let's look first into the theory of Yocto Project Board Support Packages. So you go a little bit through, explain the concepts of Yocto BSPs. We explore Yocto BSP on several methods for building a BSP and the Yocto BSP script that makes it actually easy for you to create a BSP. And then we actually are building a BSP for the Beaglebone board. In general, a BSP is a collection of information that defines how software platform actually supports a hardware platform, a particular hardware platform, such as a device or a family of devices that have similar characteristics. And then the BSP will typically find documentation, hardware features, configuration data, software patches for source code, and binary files. Yocto Project BSPs do not include a build system or any tools, and that makes them different, maybe from other board support packages. Because all the tooling is really provided by the Yocto Project itself. The Yocto Project BSP is simply a layer on top of what Yocto Project already provides. And that is actually a very powerful concept because it makes it easy for you to swap out a BSP for another BSP and simply build the exact same Linux operating system stack for a different piece of hardware. If you want to find out everything in detail about Yocto Project BSPs, look at the Yocto Project Board Support Package Developers Guide. And you can find that at www.yachtoproject.org slash docs slash current slash BSP dash guide. And there you find all the details about it. Yocto Project BSP layers follow a certain naming convention. As any Yocto layer, they actually start with a prefix meta, and then a dash, and then a BSP name. Do you have to follow that convention? No, not necessarily, but it is just a good convention and best practices. And then you have to include your BSP layer into your Yocto Project and build environment like you do with any other Yocto Project layer. And you do that by editing the bblayers variable in your layers.conf file. Multiple BSP layers actually may be nested inside of a container layer. And this is very common practice with silicon vendors who provide BSPs for entire families of chipsets and bundle them together in one big Yocto BSP container layer. This graphic shows the basic layout of a Yocto BSP. Yocto BSPs follow a certain layout structure. Actually BSPs may differ from this structure by adding or removing some of the directories. But in general, there are certain directories that always have to be there for Yocto BSP to be considered Yocto Project compliant. Like any Yocto metadata layer, BSP layers include a concept directory in which you will find the layer configuration, as well as the machine configuration. The machine configuration is actually settings that define how the Yocto Project actually builds the source code for your particular hardware. And you will also find recipes to build certain packages for your hardware. These can be new recipes for the BSP, or those can be extensions to recipes that already exist in the Yocto Project. The best way of learning about Yocto Project BSPs and how they're built is looking at existing BSPs. And you find those in the Yocto Project's Git repository. And you can simply check those out from there using the Git command. So you type git clone, git colon slash slash git dot Yocto project dot org. And in this case, we use the meta Intel container BSP, which contains a lot of BSPs for different Intel chipsets. So meta dash Intel. And then Git will clone that repository and check it out. Then you can browse through the different directories and learn about how this is structured. There are several ways, methods of building Yocto BSPs. And these BSP layers, you can do this manually from scratch by creating the directory structure on your host system by hand. You can, of course, copy an existing BSP layer and modify it to your hardware. Or the third method is using the Yocto Project BSP Screts. Copying makes a lot of sense if you have hardware that is very similar to hardware for which the Yocto Project already provides a BSP. And using the BSP scripts is actually very comfortable, because you can use those to configure the Yocto Project Linux kernel for your BSP and do many more things rather comfortably in an interactive environment. In our class, we will be showing you how to use the Yocto BSP scripts to create a BSP, to adapt it to the Beaglebone board, to create a bootloader, to create the Linux kernel, and to create a root file system image and put all of those onto your SD card and then boot the Beaglebone board. And when you finally see your board boot the first time into the Linux kernel and into the root file system, that is a great feeling. And to get this feeling, we invite you to take our class. If you're interested in more details about this training class and other training classes the Linux Foundation has to offer, go to our website. We're looking forward to seeing you in one of our classes very soon. Thank you very much.