Linux Device Driver Programming Lecture 13-Update new boot images and modules in SD card

  • Post author:
  • Post category:Blog

 

Update new boot images and modules in SD card

 

 

In our previous article, we successfully completed the compilation of the Linux kernel and generated both the new kernel image and kernel modules for the latest Linux kernel version.

Now, it’s time to those images and the kernel modules on the Beaglebone Black hardware. Let’s follow the steps below:

Step 1: Copy uImage to board and then update the boot partition of the SD card.

Step 2: Copy newly installed 5.10.90 folder to board’s /lib/modules/ folder.

Step 3: Reset the board(you should see BBB boots with newly updated kernel image).

Let’s proceed step by step.

 

Step 1: Update the Boot Image

  1. Connect your SD card to your host system.

  2. Navigate to the Linux source tree directory on your host system and access the arch/arm/boot directory.

  3. In this directory, you will find the new uImage (as shown in Figure 1). Copy this uImage to the SD card.
Figure 1. uImage in /arch/arm/boot/
Figure 1. uImage in /arch/arm/boot/

 

Before copying, open the boot partition of the SD card. If you find an older uImage file, rename it to 4.4.64 or any other appropriate name (as shown in Figure 2).

Figure 2. Renaming the uImage
Figure 2. Renaming the uImage

 

Now, copy uImage to media, your username, boot partition as shown in Figure 3. The path should be similar to /media/fastbit/BOOT/.

Update new boot images and modules in SD card
Figure 3. Copy the uImage into /media/fastbit/BOOT/

 

 

Step 2: Copy the Kernel Modules

Navigate to the /lib/modules/ directory on your host system. Here, you have to copy the 5.10.90 folder. Copy -a, select this folder, and copy this to media, your username, ROOTFS lib/modules/ You may have to use sudo here. Hit enter.

That gets copied and then run the command sync as shown in Figure 4.

Update new boot images and modules in SD card
Figure 4. Copying 5.10.90 folder into /media/fastbit/ROOTFS/lib/modules/

After copying, run the sync command to ensure all changes are saved.

 

Step 3: Verify the Update

Verify that the 5.10.90 folder is present in the /ROOTFS/lib/modules/ directory on the SD card (as shown in Figure 5).

Update new boot images and modules in SD card
Figure 5. Cross checking for the copied 5.10.90 into /ROOTFS/lib/modules/

 

Just unmount this. Remove the SD card, connect it to the Beaglebone, and boot again.

First, open minicom. Let’s power up the board, and it is booting. You got the login. Let’s login to debian, temp pwd. After that, run the command uname -r.

Update new boot images and modules in SD card
Figure 6. Kernel image updated to 5.10.90

 

You can see that the kernel image is updated to 5.10.90(as shown in Figure 6).

Complete up to here and in the next article, let’s see How to enable internet over USB.

 

Get the Linux device driver Full course Here.

FastBit Embedded Brain Academy Courses

 click here: https://fastbitlab.com/course1

 

FastBitLab

The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.

Leave a Reply