This section will cover Linux Kernel customizations for Gemstone development boards, including topics like activating new hardware drivers.
By the end of this section, you will have knowledge about:
  • Compiling Linux Kernel for Gemstone
  • Activating new hardware drivers
For Gemstone boards, the Linux kernel is compiled by Yocto, just like U-Boot. The meta-gemstone layer contains a recipe called linux-t3-gem-o1-rt_6.1.bb that uses the T3 Gemstone Linux Git repository. If you need to switch to an older or newer version, you can update the SRCREV variable in the recipe with the commit ID of the desired version and then run the following commands to start the compilation.
All commands below will be executed inside the distrobox. Therefore, you must first run the devbox shell —> task box commands. Additionally, to switch to the Yocto environment, you need to run the m:oeinit t3-gem-o1 command.
This section will use the T3-GEM-O1 board for explanation. If you are applying these steps for a different machine, change the machine name accordingly.
bitbake virtual/kernel
After completing the above steps, you can copy the Image file from the <sdk-directory>/build/t3-gem-o1/deploy-ti/images folder to the /boot folder on your board to perform tests.

Updating Configuration with Menuconfig

If you want to enable/disable various hardware drivers or modify kernel configuration (essentially changing features defined in Kconfig), you can use the menuconfig interface.

Modifying Source Code

Open the <sdk-directory>/build/tmp-musl/work-shared/t3-gem-o1/kernel-source folder in your text editor. After making the desired changes, compile the kernel using the following commands. To avoid losing your changes, you can create your own fork of the T3 Gemstone Linux repository and push your changes there.
bitbake virtual/kernel
After the compilation is complete, copy the generated files in the <sdk-directory>/build/t3-gem-o1/deploy-ti/images directory to the /boot directory on the SD card. If you have fixed an issue or added a new feature, you can create a pull request to the T3 Gemstone Linux repository so the community can benefit from it.