guysoft / RealtimePi

An out-of-the-box raspebrrypi/raspbian distro with a realtime kernel
GNU General Public License v3.0
163 stars 25 forks source link

all buster builds (nightly) broken - usb and networking dont work #19

Closed sebastiannielsen closed 4 years ago

sebastiannielsen commented 5 years ago

Tried the buster builds, none of them work, usb and networking is broken. This on a rpi 2B. Guess its because it lacks bluetooth and wifi support and the build tried to activate that without support.

Since I can neither connect to ssh (due to broken networking) or connect a keyboard (due to broken usb) im unable to provide any form of logs or debugging info.

guysoft commented 5 years ago

Hey,

  1. please providfe the exact file name of the zip you are using. There is a recent build 2019-08-24_2019-07-10-realtimepi-buster-lite-0.4.0.zip that might solve your issue. Without you providing I have no idea what you are testing.
  2. The cmdline.txt has been changed in the nightly, please see: https://github.com/raspberrypi/linux/issues/2943#issuecomment-507039882 The Rpi2 should work if you just update the cmdline.txt to how it looks in stable builds, example of that here.
sebastiannielsen commented 5 years ago

Following filenames were tested and did NOT work:

2019-06-29_2019-06-20-realtimepi-buster-lite-0.4.0.zip 2019-08-24_2019-07-10-realtimepi-buster-lite-0.4.0.zip

I checked and the cmdline is already changed per the linked comment in those builds.

guysoft commented 5 years ago

Ok - did you try changing the cmdline.txt BACK as given in the example?

sebastiannielsen commented 5 years ago

Now I tried with dwc_otg.lpm_enable=0 but the problem is that the boot process then stalls at finding /boot, then it can't find root filesystem, and then it starts emegency shell, afterwards it tries to sync NTP time but it can't since neither network or USB is working.

dwc_otg.lpm_enable=1 works booting from, but then usb and network don't work.

guysoft commented 5 years ago

@sebastiannielsen Ok, this is a known bug, and you need to report it to: https://github.com/raspberrypi/linux/issues/2943#issuecomment-507039882

sebastiannielsen commented 5 years ago

Should I report it there when the latest official build (Raspbian Lite official 2019-07-10) does work flawlessly without any problems, and without any changes to cmdline?

Because the bug only comes when using your rt build.

guysoft commented 5 years ago

The thing is that the RT branch is in low priority and is maintained by @TiejunChina . The Rpi kernel developers are not really looking in to RT stuff. The usb-dwc_otg-fix which is suppose to make the system work both with USB and RT was writen by Oussama Ghorbel ghorbel@gmail.com which handle @oghorbel does not seem to be active. I am not sure who has the technical knowhow to fix this. We might need a kernel developer to step in and save the day.

sebastiannielsen commented 5 years ago

How comes it that networking becomes borked by this fix? I could live without USB if we could just get the networking to be happy.

or is the network card basically a USB network card "hardwired"`?

guysoft commented 5 years ago

The usb and ethernet share the same controller.

TiejunChina commented 5 years ago

Hi guys, I cannot understand why you don't open issue to https://github.com/raspberrypi/linux. Even I have no time to do something but rather than here, most developers are working on that official tree. If you're trying to maintain something else based on your CustomPiOS, you have to take the responsibilities to your repo. If you find something wrong with the official tree, please go there to open any issue. Even I don't take some necessary actions, more developers can see the issue and give you a feedback.

sebastiannielsen commented 5 years ago

@TiejunChina since the base repo (official raspberry repo) does not have any prebuilt RT binaries what I can see, I of course reported it here where the binaries where built. The reason I want RT is that I intend running a NTP server and want as high accuracy as possible.

guysoft commented 5 years ago

@sebastiannielsen A realtime kernel is not relevant for an NTP server. You need a hardware element for a realtime clock. So as much as I value your debuging help, know its the wrong technology for your project.

sebastiannielsen commented 5 years ago

@guysoft and thats what I have, I have a GPS board with PPS output, and I also use the PPS kernel discipline. To improve the accuracy of this input processing of the PPS signal, I would want to use a RT kernel.

guysoft commented 5 years ago

Ah, my bad then. Didn't you are going all the way down to the signal processing of the PPS signal. There is code that does this freely available?

sebastiannielsen commented 5 years ago

yes, there is a kernel module that is shipped with the rpi image, that does all this signal processing and then exposes this as a /dev/pps0 device.

guysoft commented 5 years ago

Can't find where that kernel module needs a realtime kernel though: https://www.worldtimesolutions.com/support/ntp/Debian_Lenny_Linux_PPS_support_for_ntpd.html

Will not this isn't related to the issue, just my general curiosity

sebastiannielsen commented 5 years ago

It doesnt NEED a realtime kernel, but it will of course perform better (ergo higher accuracy) by using a realtime kernel.

guysoft commented 5 years ago

I am not sure if it needs to specifically ask for non-preemptive scheduling inside the module. Unsure about that.

guysoft commented 4 years ago

Hey, this is news about this. The is a new fork that solves the USB FIQ issues https://github.com/raspberrypi/linux/pull/3336 I have built a nightly based on it and would appreciate people testing: http://unofficialpi.org/Distros/RealtimePi/nightly/2019-12-11_2019-09-26-realtimepi-buster-lite-0.4.0.zip

Might still not work in Pi4, but if it works on older versions it should not be an issue to add that.

guysoft commented 4 years ago

Has been solved in RC2 #20 thanks to https://github.com/raspberrypi/linux/pull/3336