How to configure DNS and timezone in imx8mp BSP

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to configure DNS and timezone in imx8mp BSP

273件の閲覧回数
krsuresh
Contributor III

Hi Team,

Need help for the following issues,

Using yocto imx8mp board with kirkstone code base.

Issue 1) The steps I used to configure the timezone,

1. Added ntp protocol to sync server time, this works, but updates UTC time rather than local time
2. In order to fix this issue, I added tzdata to the Yocto build, but I still see UTC alone in zoneinfo

ls /usr/share/zone
ls: cannot access '/usr/share/zone': no such file or directory

#timedatectl list-timezones  
UTC

Issue 2) DNS configuration

During booting, I am using shell scripts to configure /etc/resolv.conf, but the file is getting refreshed. Could you tell me how to fix this? 

0 件の賞賛
1 返信

246件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Add below code into /etc/profile, you need set hwclock.

TZ=CST
export TZ
hwclock -w

 

DNS configuration, please refer systemd-resolved, the /etc/resolv.conf is linked to /run/systemd/resolve/resolv.conf

# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

 

0 件の賞賛