For the complete documentation index, see llms.txt. This page is also available as Markdown.

23.2 Using FreeBSD on Raspberry Pi

After installing FreeBSD on the Raspberry Pi, you need to complete SSH configuration, timezone correction, and firmware updates.

SSH Login Method

When using terminal emulation software such as XShell to log into the Raspberry Pi, the default username and password are both freebsd. To obtain root privileges, execute the su command after logging in and enter the root password.

Importance and Methods of Timezone Configuration

Timezone configuration is a necessary step in system initialization. An incorrect system timezone may affect the accuracy of timestamps, log analysis, and other operations.

Execute the following command to launch the timezone configuration tool:

# tzsetup

In the interactive configuration interface, sequentially select No (do not set the hardware clock to UTC) → AsiaChinaBeijing Time. When the system prompts "Is the above information correct?" or a similar confirmation message, select Yes to confirm the configuration.

NTP Service Configuration

After timezone configuration, you also need to configure the system time synchronization mechanism.

All Raspberry Pi models prior to the Raspberry Pi 5 lack an onboard Real Time Clock (RTC) hardware module, and the system time relies on the Network Time Protocol (NTP) service for time synchronization. The Raspberry Pi 5 is the first model in the series with a built-in RTC module, which can maintain clock operation after power loss by connecting an external battery via the onboard J5 battery connector.

Inaccurate system time may affect SSL/TLS certificate verification, log timestamp accuracy, and the normal operation of multiple network services.

Add the following configuration to the /etc/rc.conf file:

ntpd_enable="YES"               # Enable the NTP daemon

Use the ntpd service to synchronize the system time:

View the current system date and time:

Hostname Configuration

The hostname is the system's identifier in the network environment. Setting an easily recognizable hostname facilitates network management and device identification. Edit /etc/rc.conf, modify the hostname parameter, and replace generic in hostname="generic" with the actual desired hostname.

Frequency Scaling Configuration

Properly configuring the CPU dynamic frequency scaling mechanism can balance computing performance and power consumption. The adjustable frequency range is typically 600 MHz to 1500 MHz (Raspberry Pi 4) or 600 MHz to 2400 MHz (Raspberry Pi 5), depending on the hardware model. The actual maximum frequency depends on the powerd dynamic scaling policy and firmware limitations; sysctl output may show a lower maximum frequency (e.g., 2000 MHz).

Execute the following commands to enable and configure the powerd service:

Temperature Information Query Method

Continuously monitoring CPU temperature helps detect cooling anomalies in a timely manner. Execute the following command to list all system kernel parameters and filter entries containing temperature information:

If you need to view the temperature information of individual CPU cores, execute the following command:

CPU Frequency Levels and Current Frequency

Execute the following command to display the available frequency levels and current frequency of CPU core 0:

References

Last updated