Posts

CUDA Kernel Launch

Image
 Hello All, In my previous post related to Introduction to GPU programming using NVIDA CUDA Tool Kit(link in comment section) I have explained about how to write a simple program(Performing addition of two arrays) using CUDA. In this post let us understand how the CUDA kernel will launch with provided block dimension and grid dimensions parameters. A GPU will follows a single instruction multiple thread(SIMT) architecture  it means that the multiple threads are issued for processing the same instruction. These threads are organized in to blocks and blocks are organized in to grids. Let us consider the example of CUDA Hello World Program where we launch the CUDA kernel with total number of threads in a block as 1 and there is 1 such block in a grid. HelloWorld.cu //Pre-processor directives #include <stdio.h> #include "cuda_runtime.h" #include "device_launch_parameters.h" //Device code __global__ void cuda_kernel() { printf("Hello World!"); } //Hos...

Adding libraries to our image using package groups in yocto project

Image
 Hello All, In my previous article we have seen that, how we can add the different libraries to our image using yocto project. previous article here: https://learnyoctowithme.blogspot.com/2022/06/adding-libraries-pciutilsusbutils-and.html In this article we are going to see how we can add multiple libraries(packages) at the same time using the concept of package groups in yocto project Before proceeding to this, you need to  be familiar with my previous articles , as it contains the necessary steps to create the build environment for qemux86-64 and steps to create our own layer. pre-requisite: https://www.blogger.com/blog/posts/8695339245532547417?tab=rj Adding libraries to our image using package groups in yocto project: step 1: switch to our own layer (meta-mylayer/recipes-kernel) $ cd poky/meta-mylayer/recipes-kernel/ step 2: inside recipes-kernel directory, create a folder called packagegroups $ mkdir -p packagegroups step 3: switch to packagegroups directory $ c...

Adding libraries (pciutils,usbutils and util-linux) to our image using yocto project

Image
 Hello All, In this article we are going to see how we can add libraries like pciutils,usbutils and util-linux to our image using yocto project. Before proceeding to this, you need to  be familiar with my previous articles , as it contains the necessary steps to create the build environment for qemux86-64 and steps to create our own layer. pre-requisite: https://www.blogger.com/blog/posts/8695339245532547417?tab=rj Adding libraries (pciutils,usbutils and util-linux) to our image using yocto project: step 1: switch to poky folder $ cd poky step 2: now switch to the directory build_x86/conf/ $ cd build_x86/conf step 3: open local.cong file $ vi local.conf and append the following lines as  IMAGE_INSTALL_append += "util-linux pciutils usbutils" and save it step 4: now compile the image as $ bitbake core-image-minimal  step 5: now boot the image using the command $ runqemu nographic and login as root user step 6: On terminal, enter the command as $ lsblk step 7: on ...

Adding custom python script(to findout system info) to rootfs using yocto project

Image
 Hello All, In this article, we are going to see how we can add our custom python script( python script to find out the system information) to our root filesystem using yocto project Before proceeding to this, you need to familiar with my previous articles, as it gives the overview about yocto build system and setup environment pre-requisite: https://www.blogger.com/blog/posts/8695339245532547417?tab=rj Adding custom python script (to findout system information) to rootfs using yocto: step 1: switch to meta-mylayer/recipes-kernel directory $ cd poky/meta-mylayer/recipes-kernel/ step 2 : create a folder called system_info $ mkdir system_info step 3: Inside system_info folder, create another folder called files $ mkdir files step 4: Inside files folder , create a file called sytem_info.py and edit as following $ touch system_info.py $ vi system_info.py and save and exit it step 5: now switch back to system_info folder $ cd .. step 6: create a bitbake recipe to add the system_inf...

Adding custom splash screen to yocto image

Image
 Hello All, In this article we are going to see how we can add custom splash screen to our yocto image. pre-requisite: you need to be familiar with my previous topics as it contains the necessary steps to setup the environment  and  build the image. link to my previous topic: https://learnyoctowithme.blogspot.com/2022/04/constructing-embedded-linux-image-for.html https://www.blogger.com/blog/posts/8695339245532547417?tab=rj Adding custom splash screen to yocto image:  lets check what is the default splash screen set to image. step 1: open local.conf file $ vi poky/build_x86/conf/local.conf  and append the following line to local.conf file as IMAGE_FEATURES += "splash" and build the image using below command $ bitbake core-image-minimal  after successful compilation of build , boot the image using below command $ runqemu you can observe the splash screen while booting of the image Now we will modify the custom splash screen with our image. step 2: Pspla...

Adding kernel module in to our image and installing in root file system using yocto project

Image
 Hello All, In this article we are going to see how we can create a basic kernel module (hello world) and adding it to our image and installing in root file system using yocto project. pre-requisite: you need to be familiar with my previous topics, as it contains the necessary steps to create the build environment for qemux86-64 and steps to create our own layer. link to my previous article: https://learnyoctowithme.blogspot.com/2022/04/constructing-embedded-linux-image-for.html https://learnyoctowithme.blogspot.com/2022/04/creating-our-own-meta-layer-creating.html  Adding kernel module in to our image and installing in to root file system: step 1:  Inside poky directory, we created our own layer directory called meta-mylayer , switch to meta-mylayer $ cd poky/meta-mylayer/ step 2: Inside meta-mylayer, create a directory called recipes-kernel $ mkdir recipes-kernel step 3: Inside recipes-kernel directory, create a new folder called hello-mod $ mkdir hello-mod step 4:...

Creating our own meta layer & creating a custom helloworld application and adding it to our project using yocto

Image
 Hello All, In my previous article we have seen that how to construct an embedded linux image for "qemux86-64" and verify its booting. In case if you have missed it, here is the link: https://learnyoctowithme.blogspot.com/2022/04/constructing-embedded-linux-image-for.html In this article we are going to see how we can create our own layer and adding it to our project using yocto pre-requisite: You need to be familiar with my previous article as it shows the image construction and setting up the build environment link : https://www.blogger.com/blog/posts/8695339245532547417?tab=rj what is a layer? Layer is nothing but a logical collection of related recipes Types of Layers: oe-core, BSP Layer, application layer Layer name starts with meta-, but this is not a technical restriction. Eg. meta-mylayer creating our own meta layer(meta-mylayer) using yocto project: step 1: source the environment  $  source ./oe-init-build-env build_x86 step 2: Inside build_x86 folder, ...