The default Ubuntu image does not include the built-in thermal driver, which reports back the CPU temperature.
To enable it, a few steps are needed to build the proper image.
- Install Docker and obtain the latest Ubuntu image.
- Start Docker and create a new container.
- Replace the sunplus_thermal.c file inside the container.
- Enable the driver using the kconfig menu.
-
Create the new image and download the file.
Setting Up Docker
If you are unfamiliar with Docker, we recommend using Docker Desktop, which provides a graphical user interface instead of a command line interface. We have some guides on this topic which can be found here:
LTPP3(G2) - Tutorial (Ubuntu) - Setting Up Docker Desktop – Tibbo Technology Help Center
Starting a New Container and Connecting to It
The easiest way to to connect to a Docker container is to connect via SSH connection. For information on how to start and connect to a Docker container, please see the article below:
LTPP3(G2) Tutorial (Ubuntu) - Setting up Docker for SSH Access – Tibbo Technology Help Center
Normally, you will need a program such as WinSCP to interact with the filesystem and another terminal program to access the command line interface. If you are looking for a program that can handle both, consider using VS Code with Docker and Dev Container extensions.
Replacing the Thermal Driver File
first, please replace the sunplus_thermal.c file with the one found in this article. The file is located at:
root/SP7021/linux/kernel/drivers/thermal
In ther terminal, navigate to the SP7021 directory and issue:
make kconfig
The configuration menu will start. The driver to turn on is under Device Drivers > Thermal Drivers > Sunplus Thermal drivers. Please make sure that it is selected as "built-in" and not "module".
Once you save and exit, simply issue make to create the new image, which will be located in the rppt/SP7021/out folder.
Installation and Checking.
Please install the new image that you have generated. If you are not sure how, please refer to this article for more information:
FAQ – How Do I Upgrade the LTPP3(G2) Firmware? – Tibbo Technology Help Center
After successfully installing the new image. The thermal driver should have been installed. To check if the temperature driver is working correctly, you can issue the following command:
cat /sys/class/thermal/thermal_zone0/temp
The readout is five digits with three places after the decimal point. So, 56540 would actually be 56.540 ℃.
Comments
0 comments
Please sign in to leave a comment.