flatcar / Flatcar

Flatcar project repository for issue tracking, project documentation, etc.

Home Page:https://www.flatcar.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RFE] Enable CONFIG_PPS_CLIENT_GPIO in kernel

space55 opened this issue · comments

Current situation

Currently, CONFIG_PPS_CLIENT_GPIO is not set, which causes PPS services to be unavailable.

Impact

I am in progress with trying to make a GPS-disciplined network clock on a Raspberry Pi, using chronyd and gpsd. This requires a PPS device to be created in /dev, which gpsd can then use to synchronize with a serial device. I am unable to load the module pps-gpio which exists on Raspbian.

Ideal future situation

Ideally, I would be able to create a /dev/pps0 device that can be used by gpsd to control chrony & set the RTC accurately.

Implementation options

The primary method I can think of is to change the kernel build config setting to set CONFIG_PPS_CLIENT_GPIO=y

Additional information

$ modprobe pps-gpio
libkmod: kmod_config_parse: /etc/modprobe.d/gpio.conf line 1: ignoring bad line starting with 'pps_gpio'
modprobe: FATAL: Module pps-gpio not found in directory /lib/modules/6.1.85-flatcar

System info:

$ cat /etc/os-release
NAME="Flatcar Container Linux by Kinvolk"
ID=flatcar
ID_LIKE=coreos
VERSION=3815.2.2
VERSION_ID=3815.2.2
BUILD_ID=2024-04-13-1325
SYSEXT_LEVEL=1.0
PRETTY_NAME="Flatcar Container Linux by Kinvolk 3815.2.2 (Oklo)"
ANSI_COLOR="38;5;75"
HOME_URL="https://flatcar.org/"
BUG_REPORT_URL="https://issues.flatcar.org"
FLATCAR_BOARD="arm64-usr"
CPE_NAME="cpe:2.3:o:flatcar-linux:flatcar_linux:3815.2.2:*:*:*:*:*:*:*"

If there are any questions, or anything I can do/test, please let me know!

The file to enable this would be sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/commonconfig-6.6 or sdk_container/src/third_party/coreos-overlay/sys-kernel/coreos-modules/files/arm64_defconfig-6.6 in the scripts repo.
Before being able to merge such a change we need to keep an eye on the filesystem usage of the boot partition (The CI for the scripts repo produces an image report artifact which reports size changes).

Hello, on my Orange PI, this is the size of the module - should be fine size-wise, but we need to cross check:

ls -liath /lib/modules/5.10.160-rockchip/kernel/drivers/pps/clients/pps-gpio.ko
284324 -rw-r--r-- 1 root root 13K Mar 21 15:57 /lib/modules/5.10.160-rockchip/kernel/drivers/pps/clients/pps-gpio.ko

Thanks, if it's just a module it won't be in the initrd and things are good.