The clock shifts when connecting the LAN on an embedded Linux system.

Asked 2 years ago, Updated 2 years ago, 38 views

I use YOCTO to build an embedded Linux system.

I'm having trouble dealing with this problem because I have a clock shift when I connect the LAN connection.
The reason why the internal clock is out of alignment is because the system is running on a UTC basis and this is forced to change to Japan time.

There are two factors that can occur:
①An NTP server is found on the LAN and NTP moves the internal clock (RTC).At this time, the internal RTC is also changed.
②If there is a DHCP server, it will match the server time.There will be no RTC changes here.

In the case of の, I think the ntp client daemon is working normally, but I can't find such a thing in the daemon that I'm starting.
psax | grep ntp does not get stuck)
Which software is used in YOCTO?
Also, what should I do to stop this?
In order to avoid finding NTP servers, we are thinking of stopping avahi.

In the same way, も does not get stuck in psax|grep dhcp and does not know which software is the client of dhcp.
In the same way, which software is running?
And what should I do to stop this?

Below is the psax content.

root@**********:~#psax
  PID TTY STAT TIME COMMAND
    1 ? Ss 0:01 init [5]
    2?S 0:00 [kthreaded]
    3?S 0:00 [ksoftirqd/0]
    4?S 0:00 [kworker/0:0]
    5?S<0:00 [kworker/0:0H]
    6?S 0:00 [kworker/u4:0]
    7?S 0:00 [migration/0]
    8?S 0:00 [rcu_preempt]
    9?S 0:00 [rcu_bh]
   10?S 0:00 [rcu_sched]
   11?S 0:00 [migration/1]
   12?S 0:00 [ksoftirqd/1]
   13?S 0:00 [kworker/1:0]
   14?S<0:00 [kworker/1:0H]
   15?S<0:00 [khelper]
   16?S 0:00 [kdevtmpfs]
   17?S 0:00 [kworker/0:1]
   18?S 0:00 [kworker/1:1]
   19?S<0:00 [writeback]
   20?S<0:00 [bioset]
   21?S<0:00 [kblockd]
   22?S<0:00 [ata_sff]
   23?S 0:00 [khubd]
   24?S 0:00 [kworker/u4:1]
   35?S 0:00 [ipu1_task]
   36?S 0:00 [ipu1_task]
   37?S 0:00 [ipu2_task]
   38?S 0:00 [ipu2_task]
   39?S<0:00 [cfg80211]
   40?S<0:00 [rpciod]
   41?S 0:00 [kswapd0]
   42?S 0:00 [fsnotify_mark]
   43?S<0:00 [nfsiod]
   44?S<0:00 [crypto]
   80?S 0:00 [kworker/0:2]
   81?S 0:00 [scsi_eh_0]
   82?S 0:00 [spi32766]
   83?S 0:00 [kworker/u4:2]
   86?S 0:00 [spi32765]
   89?S 0:00 [ciotg thread]
   90?S 0:00 [irq/352-2190000]
   91-S 0:00 [irq/353-2198000]
   92?S 0:00 [mmcqd/1]
   93?S<0:00 [galcore workque]
   94?S 0:00 [Vivante Kernel]
   95?S 0:00 [galcore daemon]
   96?S 0:00 [galcore daemon]
   97?S 0:00 [galcore daemon]
   98?S<0:00 [vpu_wq]
   99?S 0:00 [mmcqd/2]
  100?S 0:00 [mmcqd/2boot0]
  101?S 0:00 [mmcqd/2boot1]
  102?S 0:00 [mmcqd/2rpmb]
  145?S<0:00 [krfcommd]
  146?S<0:00 [deferwq]
  147?S 0:00 [kinteractiveup]
  148?S<0:00 [kworker/0:1H]
  149?S 0:00 [kjournald]
  176?Ss 0:00/lib/udev/udevd-d
  208?S<0:00 [kworker/1:1H]
  573?S 0:00 [jbd2/mmcblk1p1-]
  575?S<0:00 [ext4-dio-unwrite]
  633?Ss 0:00/usr/sbin/rpcbind
  649?S 0:00/bin/sh/etc/rc5.d/S01xserver-nodm start background
  672?S 0:00 xinit/etc/X11/Xsession --/usr/bin/Xorg-br-pn-noc
  673?Ss 0:00/usr/bin/dbus-daemon --system
  675?S<s 0:01/usr/bin/Xorg:0-br-pn-nocursor
  677?Ss 0:00/usr/sbin/connmand
  682?ss0:00/usr/sbin/dropbear-r/etc/dropbear/dropbear_rsa_host
  702?S 0:00/lib/udev/udevd-d
  704?S 0:00/lib/udev/udevd-d
  712?S 0:00/sbin/syslogd-n-O/var/log/messages
  715?S 0:00/sbin/klogd-n
  721?S 0:00 avahi-daemon: running [********.local]
  722?S 0:00 avahi-daemon: chroot helper
  733?Ss0:00/usr/sbin/ofonod
  738?S 0:00/usr/bin/oprofile-server
  743?S 0:00 autohdmi
  754?Ss 0:00/bin/bash/etc/init.d/rc_mxc.S
  755tty1Ss+0:00/sbin/getty38400tty1
  758ttymxc1Ss+0:00/sbin/getty-Lttymxc1 115200vt100
  760?S 0:00/bin/sh/etc/matchbox/session
  764?S 0:00/usr/bin/dbus-launch --auto-syntax --exit-with-sessio
  765?Ss 0:00/usr/bin/dbus-daemon --fork --print-pid5 --print-add
  783?S 0:00 connman-applet
  803?S 0:00/usr/lib/gconf/gconfd-2
  814?S 0:00/usr/bin/settings-daemon
  854?Ss0:00/usr/sbin/dropbear-r/etc/dropbear/dropbear_rsa_host
  855pts / 0Ss 0:00-sh
  856pts / 0R + 0:00psax

I'm sorry, but I appreciate your cooperation.

linux

2022-09-29 20:28

1 Answers

Now that I have solved myself, I will report the results.
● DHCP timed with kernel integration.
I was able to handle the following settings in ● menuconfig.
->Networking support(NET[=y])
->Networking options
->TCP/IP networking (INET[=y])
IP:kernel level autoconfiguration
IP—DHCP support

 - > Networking support (NET[=y])
- > Networking options
<*> Packet socket

I also had to turn off the Packet Socket.


2022-09-29 20:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.