PTP on DietPI

Hi there,

I am trying to enable the linuxptp on latest version of DietPI with success. Because the kernel on RPI4 has not enabled the CONFIG_NETWORK_PHY_TIMESTAMPING and the CONFIG_PTP_1588_CLOCK I had to compile a new kernel following this guide

https://github.com/twteamware/raspberrypi-ptp/issues/10
(removed the 5.6.y)

Everything compiles normal,but after the reboot the RPI is not booting. I tried the same config on Raspbian and works without any issue.

The question is the DietPI has any alternate configuration to run?

Also is there any other way to enable the Timestamping and 1588 clock on the running kernel of DietPI?

I am a newbie on compiling kernels. Any help would be appreciated.

Regards. :smiley: :smiley:

Just to avoid a misunderstanding. DietPi is not and will not do any kernel development. If you are using a RPi device, the stock kernel provided by Raspberry OS is used. There is nothing changed from DietPi side. If you are missing anything on kernel features, it is already missing within the stock RPi kernel. Next to this, DietPi is not an own OS. It is a set of bash scripts on top of a Raspberry OS (in case of RPi device).

Thank you for your response. Now one question is answered. :slight_smile:

But why is not working on the DietPI image (probably something is broken) and working on raspbian image?

Any other way to enable this features on kernel? I have searched a lot on the web and only with compilation can be done.

Regards.

Indeed compiling the kernel might be the only way if it is a kernel feature. Usually compiling the kernel should work same way as DietPi is a Raspberry OS. Maybe attaching a screen to the device would give an indication on what happen during boot.

Yes I have attach a screen on RPI but I have only black screen nothing else showing. I am not using the RPI as headless, at least during the configuration.

try to remove the quiet flag from /boot/cmdline.txt

BTW: any indication on the red/green led during failed boot?

I have removed the quiet command and the same black screen. The green led when power up it shows some indication that is reading or writing from the sd card and then nothing. The red led is stable. None of the leds indicates that is problem or flashing.

MichaIng
maybe you can have a look on it. Not sure if we have any possibility as it is a self compiled kernel not booting.

It looks like you compiled an outdated non-LTS kernel version. Please always use official RPi sources, there are a lot of outdated and bad instructions floating around in the web :wink:.

Here official instructions: https://www.raspberrypi.com/documentation/computers/linux_kernel.html#building
As branch I recommend to always use an LTS version, the latest one is currently rpi-5.15.y: https://github.com/raspberrypi/linux/tree/rpi-5.15.y

When the required flags are still missing, you may want to ask the RPi devs whether they can enable it for the stable kernel packages: https://github.com/raspberrypi/linux/issues
I don’t know much about PTP, but sometimes things can be enabled as module or device tree overlay, so when there are others with this need (use the search function on the linked GitHub issues), you may have a chance they it gets enabled in a way.

Thank you for your answers. The problem is that already asked or RPI forum for enabling the flags or make an official release for this and they respond “build a kernel and try”. I haven’t made any questions on github but if I really can not afford of compile one and make it work I will do.

I will give one more shot and see. I will report back.

Best regards and thank you. :slight_smile:

Bad news the same it does when finish the compile (5.15.y) and copy the paths as mentioned all the steps on RPI docs, rebooted black screen.

Tested the same with Raspbian Lite image it works perfect.

I do not know maybe need some config to boot the new kernel on Diet PI image?

Regards.

this is strange as DietPi is build on Raspberry image. What happen if you build/ran the own kernel on a RPI lite image. Once done and all working, try using our PREP script to install DietPi on top. Curious what will happen…

https://dietpi.com/docs/hardware/#make-your-own-distribution

I have to try to build DietPI and see the results. I will report back. :slight_smile:

I have installed the DietPi conversion script and after reboot it does the same thing, black screen. Also I have noticed that it has uninstalled the custom made kernel (5.15.15) and installed the default one 5.10 . Also I have noticed that the linuxptp package that I use for PTP has uninstalled also all the configs I have done. In other words it was made like the official DietPI image and removed the custom made kernel and software installed. :frowning:


Probably something on the scripts working on default kernel and configuration and not with custom kernel.


Regards.

Edit.

If this can not be fixed (with custom kernel) I think it might be someway to patch the kernel or insert the flags for PTP with one of your automated scripts. I am telling this because on installation of DiePi i see that kernel .config is adjusted. Just an idea.

we don’t do anything on the kernel. We just install it as provided by RPi devs

Btw: there is an issue with latest kernel 5.10.92+ provided by RPI guys > System are not booting anymore

we already reported back to RPi devs

Also I have noticed that the linuxptp package that I use for PTP has uninstalled also all the configs I have done.

this is as expected

With the black screen ok I understand as I am seeing it is a bug.

And also something more when I installed the DietPI scripts why the custom kernel removed?

And an other question if the default kernel has the problem the custom that is newer than that after the reboot why not loading like on Raspbian Lite?

And the final question if you say that you do not do anything to the kernel or alter the image which is based on Raspbian Lite, why when using the Raspbian Image and compiling a new custom kernel it works flawless (I have tried also to compile kernel 5.4.y and working flawless) ?

Maybe something I do not understand or missing.

With these questions I do not want to judge the DietPI image or the team which are doing excellent job. I am trying to figure out what I am doing wrong or if it is a problem to help fixed.

Regards.

Edit.


I have also compiled custom kernel on Raspbian Lite 64bit working flawless no black screen no anything (branches 5.10.y 5.15.y and 5.16.y). Tried on DietPI image 64bit and the same black screen.

I guess this is working now as I assumed you joined the GitHub discussion for the failing kernel?

Yes correct I have joined GitHub. It is working without any issues. Build the custom kernel and booted normally. i hope the problem to be fixed quick from the rpi dev because a lot of people will feature this issue.


Continue the excellent work and make DietPI stronger.

I hope in the feature to make some scripts so to be automated the process of PTP installation on DietPI specially for CM4 which is almost ready the hardware timestamping.

Thank you again.

Regards. :slight_smile:

I guess still some investigation needed between RPI guys and our developer regarding the config file entry and if the boot behaviour is expected. As at the moment it is a specific value we set. Let’s what the guys will find out.

Of course it is not fix the problem completely but is working for now at least on systems that have the “black screen” issue, in case not need to reinstall everything from the beginning. I think it was made good for not getting upgrades until investigate what is going on.

:smiley: