Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Mon Oct 07, 2019 4:49 pm

Code: Select all

CONFIG_PREEMPT_RT_BASE=y
CONFIG_PREEMPT_RT_FULL=y
CONFIG_RT_MUTEXES=y

Which RT stuff is missing?

all of the above.

Thanks, gene1934

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Mon Oct 07, 2019 5:25 pm

I take that back, the mutexes line is there, but 75k on down the file
Thanks, gene1934

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3463
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: New RT (Real Time) kernel branch

Mon Oct 07, 2019 5:45 pm

What does "git branch -vv" report?

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Mon Oct 07, 2019 8:46 pm

Good question, I've been cleaning house, pulling stuff from all over the planet trying to find a 4.19 or later kernel that even has an arch/arm/bcm2709_defconfig with the needed options listed, turned on, or off, to allow a fully preemptable kernel to be built. But right now the workspace on a 240Gig ssd has been cleaned out except for a uspace build of linuxcnc.

Subject of course to finding a recipe that works, for both the new video, and realtime. Someone has apparently ran guysoft to the hills, he's not updated that since early, slow video stretch.

So where does a working recipe live? Your own Documentation/linux/kernel/building file, 8 pages printed, doesn't appear to have the correct recipe's. git pulls are newer, and missing realtime even if I add the stuff, make strips it back out before even getting a start on the build.

I can generally follow directions. All I should need is a recipe that works. That Document named above isn't it. Even if I change the branch to add a -rt to it. For starters, it needs more version info so one can check the results and maybe see where it goes out in the puckerbrush.

And it seems the arm stuff is disappearing with each new announcement on the linux-rt list, with 5.2.14 not having a defconfig for a bcm2709, Pi3, or a bcm2711, pi4

Thanks

Gene1934.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3463
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: New RT (Real Time) kernel branch

Mon Oct 07, 2019 9:03 pm

The instructions worked just fine - for a 3B+:

Code: Select all

sudo apt-get install git bc bison flex libssl-dev
git clone --depth=1 --branch rpi-4.19.y-rt https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel7
make bcm2709_defconfig
make -j4 zImage modules dtbs
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
If this doesn't work for you, post some error messages.

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 12:51 am

this line is different from the Doc I was following
git clone --depth=1 --branch rpi-4.19.y-rt https://github.com/raspberrypi/linux
The git pull was 178 megs, where what I was doing only pulled 98 megs.

The make bcm2709_defconfig generated a good looking .config so I expect the rest if it will work too when I wake up in the middle of the night. I may as well gt some zz's while the pi3 is warming up doing the big make.

I'll advise in the morning as to success/failure, but its looking good right now.

Thanks, a bunch

Gene1934

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 5:01 am

sudo apt-get install git bc bison flex libssl-dev
git clone --depth=1 --branch rpi-4.19.y-rt https://github.com/raspberrypi/linux
cd linux
KERNEL=kernel7
make bcm2709_defconfig
make -j4 zImage modules dtbs
sudo make modules_install
sudo cp arch/arm/boot/dts/*.dtb /boot/
sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/
sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/
sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
no reported errors, but
sudo reboot didn't, can't ping it, can't ssh -Y it.

scrolling back thru the shells history, i find this:
===============================
CC [M] drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.o
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c: In function ‘aes_cipher’:
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1504:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for (j = 0; j < 8; j++)
^~~
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1507:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c: In function ‘aes_decipher’:
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1878:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for (j = 0; j < 8; j++)
^~~
drivers/net/wireless/realtek/rtl8192cu/core/rtw_security.c:1881:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
payload_index = hdrlen + 8;
^~~~~~~~~~~~~
==============================
and this;
================================
CC [M] drivers/usb/gadget/function/f_hid.o
In file included from ./include/linux/irqflags.h:16:0,
from ./arch/arm/include/asm/bitops.h:28,
from ./include/linux/bitops.h:19,
from ./include/linux/kernel.h:11,
from ./include/linux/list.h:9,
from ./include/linux/kobject.h:19,
from ./include/linux/device.h:16,
from ./include/linux/usb/ch9.h:36,
from ./include/linux/usb.h:6,
from drivers/usb/host/dwc_otg/dwc_otg_hcd.c:43:
drivers/usb/host/dwc_otg/dwc_otg_hcd.c: In function ‘dwc_otg_hcd_disconnect_cb’:
./arch/arm/include/asm/irqflags.h:172:8: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
flags &= ~(1 << 6);
~~~~~~^~~~~~~~~~~~
drivers/usb/host/dwc_otg/dwc_otg_hcd.c:292:16: note: ‘flags’ was declared here
unsigned long flags;
^~~~~
=====================================

Are either of those show stoppers? I am not using the radio, its disabled. but it is being powered thru the otg port.

but I ran out of shell history (100000 lines) before I got back to an ls of /boot. I don't *think* "kernel7.img" is correct, I think its supposed to be just "kernel7", but I'll have to bring the card to a reader on this machine to verify that. in which case I'll rename it.

More when I know more

Thanks

Gene1934

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 2:07 pm

Is there someplace in your archives where I can acquire the /boot/fixup* stuff for a pi3?

In one of my earlier what should have been /boot/overlays cp's, in an earlier attempt, I almost filled the /boot partition, and my cleanup was a bit too enthusiastic.

Or, how do I mount a stretch .iso so I can copy stuff out of it? I've not used the -o loop option in 5 years or more.

Or would it be faster to burn that iso to this card, fixup all the screwups so my no dhcp static network just works, and then reinstall this again from the ssd I built it on. It takes a couple hours to get rid of things and get it configured for a host file based static network. Gotta nuke avahi-daemon and dhcpdc5? to be able to set the route correctly. otherwise no net beyond local because you can't otherwise get rid of the default route set to a 169.254.xx.xx address. Someone should file a nastygram bug over that but I've no clue how.

Thanks.

Gene1934

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3463
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 2:09 pm


Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 2:23 pm

That is for a pi4b, I need pi3b stuffs

Thanks

Gnene1934

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 3463
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 2:26 pm

Remove your blinkers and look again. You're starting to feel like a time waster, and you're polluting what is meant to be an informative topic. If you still want help start a new thread and try doing some of the leg work yourself.

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Tue Oct 08, 2019 2:34 pm

I found them in the master branch just now. Thanks. As for being a time waster, someday you'll be 85 yo.

Gene1934

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Wed Oct 09, 2019 5:12 pm

you asked what does git branch -vv report. After doing a git clone to get the rt branch of 4.14.y-rt so I could build the realtime version of the later stretch 4.14.y kernel. I get a neutered, no realtime options .config, and git branch -vv reports:
rpi-4.14.y-rt e46e9c282 [origin/rpi-4.14.y-rt] Backport BCM270X_DT: Rename Pi Zero W DT files.
setting KERNEL=kernel7, and doing a make bcm2709_defconfig, I get a .config that looks like this:
#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y

And that of course will not work.

What am I doing wrong? The 4.19.y-rt build and install, following that posted recipe exactly, hangs about halfway thru the boot trace.

Thanks.

Gene1934

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Sun Oct 13, 2019 2:36 am

two probs since the last post. I did finally get an installable kernel, and I think I can do that again. But building linuxcnc from src, and making a deb out of it led eventually to being locked out,while trying to locate and install substitutes for a whole list of missing python2 stuffs.
linuxcnc-uspace : Depends: python2.7-glade2
python-glade2
Depends: python-gtksourceview2
Depends: python-vte
Depends: python-gst0.10
Depends: python-xlib
Depends: python-gtkglext1
Depends: python-configobj
Recommends: hostmot2-firmware-all

I got that way by following the directions in /etc/sudoers to uncomment the last line, bringing /etc/sudoers.d into the picture. That now has me locked out totally from sudo. So I'll have to bring the card in to this machine and see if I can fix it in a card reader. There is no root pw, everything so far has been done with sudo, but that doesn't work for synaptic-pkexec

But, what do I put and in which file(s), to give the user pi, permissions to run synaptic-pkexec?.

Thanks

Gene1934
Posts: 56
Joined: Tue May 02, 2017 12:47 pm

Re: New RT (Real Time) kernel branch

Fri Oct 18, 2019 2:27 pm

>>But, what do I put and in which file(s), to give the user pi, permissions to run synaptic-pkexec?.

progress update, I have it all working on a pi4, including talking to the spi interface card, so the next somewhat warm day, I'll exchange the pi3b for the pi4b, where it lives means I have to open the garage door for access room to it. But the above question remains unanswered and I still am limited to using apt to update things. But apt wants to rip out my locally made realtime kernel.
How do I "pin" just that?

Thats twp questions I guess.

Thank you.

gene1934

Aydan
Posts: 734
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: New RT (Real Time) kernel branch

Fri Oct 18, 2019 2:44 pm

#1 you can get a root shell with "sudo -i", no need for a root pw.
#2 you can prevent package updates by "holding" a package via "apt-mark hold <package-name>"
the package in this case is "raspberrypi-kernel"

Regards
Aydan

BobKruse
Posts: 14
Joined: Thu May 21, 2015 6:26 pm

Re: New RT (Real Time) kernel branch

Mon Jul 06, 2020 3:34 pm

@gene1934
As you got it working on the PI4, would you have the time to write up how to do it?
Thanks,
Bob

Return to “Advanced users”