Fenix Build. Kernel modules not available in image (+PPS GPIO config)

Which system do you use? Android, Ubuntu, OOWOW or others?

ubuntu 22.04 server from fenix 1.0.11

Hey there. I try to build in the pps modules but can not manage to get this working.
CONFIG_PPS=y
CONFIG_PPS_DEBUG=y

CONFIG_PPS_CLIENT_KTIMER=m
CONFIG_PPS_CLIENT_GPIO=m

kernel builds and modules are within fenix/build/linux/drivers/pps/clients/pps-ktimer.ko

However when I build an image it will not be present.
/usr/lib/modules/5.4.125/kernel/drivers/ does not contain a pps folder

modules.builtin is also not aware of these modules (just copy from build folder to /usr/lib does not help)

What do I have to do to have them available? Iā€™d assume having them in the kernel config and build the image was enough, but it is not.

You need make kernel-deb to generate new debian package if you added new configurations.

After running kernel-deb and building the image I have the modules available, just to understand:
Is ā€˜make kernel-debā€™ not run when running ā€˜makeā€™ or ā€˜make allā€™?

Who is interessted or finds this topic when searching for pps.
This is what i added to my kvim4.dts file (fenix/build/linux/arch/arm64/boot/dts/amlogic) to have a dedicated gpio for pps (GPIOT_19, IO5, Pin 37 on GPIO Header):

pps {
	pinctrl-names = "default";
	gpios = <&gpio GPIOT_19 GPIO_ACTIVE_HIGH>;
	assert-falling-edge;
	status="okay";
	compatible = "pps-gpio";
};
2 Likes

Where did you add

CONFIG_PPS=y
CONFIG_PPS_DEBUG=y

CONFIG_PPS_CLIENT_KTIMER=m
CONFIG_PPS_CLIENT_GPIO=m

and is it necessary? Trying to build the same, I see the correct files in fenix/build/linux/drivers/pps/clients/pps-ktimer.ko but adding

pps {
	pinctrl-names = "default";
	gpios = <&gpio GPIOT_19 GPIO_ACTIVE_HIGH>;
	assert-falling-edge;
	status="okay";
	compatible = "pps-gpio";
};

returns an error

Error: arch/arm64/boot/dts/amlogic/kvim4.dts:2111.1-4 syntax error
FATAL ERROR: Unable to parse input tree

FYI, this is all a guess based upon other issues I found when compiling device trees for other other boards.

If you have an #include like gpio/gpio.h for example you will have to link to the linux kernel to get those for the file and hope it is a file in the kernel and not a missing ā€œmissing.hā€ file. The other issue is when you have an #include you will have to preprocess using cpp. Then use dtc for the final .dtbo.

Post your .dts because I donā€™t have it. I am assuming that is the base devicetree, if not include the base and mux info.

1 Like