All of lore.kernel.org
 help / color / mirror / Atom feed
* Problems installing a real time kernel.
@ 2022-06-07 13:24 Willett, Tony
  2022-06-07 17:35 ` Ahmed S. Darwish
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Willett, Tony @ 2022-06-07 13:24 UTC (permalink / raw)
  To: 'linux-rt-users@vger.kernel.org'

Hello.

I am trying to work with a Franka Emika Panda Robot Arm and to do so I need to run a real time kernel on my Linux PC.
This tutorial/walkthrough is my primary source of information-
https://frankaemika.github.io/docs/installation_linux.html#setting-up-the-real-time-kernel

I installed kernel 5.9.1 and added a rt patch which went fine but it did not seem to run when chosen from the grub menu the screen went blank and nothing seemed to happen.
I found that a rt patch existed for the current kernel 5.13. - uname -r returns 5.13.0-44-generic.
I remove the 5.9.1 files (possibly poorly as I failed to use --purge).
I then download and verify the new kernel and patch files.
Patch the kernel and set up .config file to choose Preemptable kernel (Real-Time).
Then I compile it, it produces linux-upstream files which I did not expect.
Making the kernel looked good and then fails with the following error-
Initially it gives the following warnings-

dpkg-source: warning: source directory 'linux-5.13' is not <sourcepackage>-<upstreamversion> 'linux-upstream-5.13.0-rt1'
dpkg-source: warning: .orig directory name linux-5.13.orig is not <package>-<upstreamversion> (wanted linux-upstream-5.13.0-rt1.orig)
dpkg-source: info: building linux-upstream using existing linux-upstream_5.13.0-rt1.orig.tar.gz
dpkg-source: info: building linux-upstream in linux-upstream_5.13.0-rt1-1.diff.gz
dpkg-source: warning: ignoring deletion of file .scmversion
dpkg-source: warning: the diff modifies the following upstream files:

and then fails-

make[2]: *** [debian/rules:7: build-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 2
make: *** [Makefile:1565: deb-pkg] Error 2

I re-did the command hoping it would just work, unsurprisingly it didn't and gave the following output-
mailto:lab@panda:~/linux-5.13$ make -j8 deb-pkg
make clean
  CLEAN   arch/x86/crypto
  CLEAN   arch/x86/entry/vdso
  CLEAN   arch/x86/purgatory
  CLEAN   arch/x86/realmode/rm
  CLEAN   arch/x86/kernel/cpu
  CLEAN   arch/x86/kernel
  CLEAN   certs
  CLEAN   kernel/debug/kdb
  CLEAN   kernel
  CLEAN   usr
  CLEAN   fs/unicode
  CLEAN   arch/x86/tools
  CLEAN    resolve_btfids
sh ./scripts/package/mkdebian
  TAR     linux-upstream.tar.gz
origversion=$(dpkg-parsechangelog -SVersion |sed 's/-[^-]*$//');\
        mv linux-upstream.tar.gz ../linux-upstream_${origversion}.orig.tar.gz
dpkg-buildpackage -r"fakeroot -u" -a$(cat debian/arch)  -i.git -us -uc
dpkg-buildpackage: info: source package linux-upstream
dpkg-buildpackage: info: source version 5.13.0-rt1-1
dpkg-buildpackage: info: source distribution focal
dpkg-buildpackage: info: source changed by lab <lab@panda>
dpkg-buildpackage: info: host architecture amd64
 dpkg-source -i.git --before-build .
 debian/rules clean
rm -rf debian/*tmp debian/files
make clean
 dpkg-source -i.git -b .
dpkg-source: info: using source format '1.0'
dpkg-source: warning: source directory 'linux-5.13' is not <sourcepackage>-<upstreamversion> 'linux-upstream-5.13.0-rt1'
dpkg-source: warning: .orig directory name linux-5.13.orig is not <package>-<upstreamversion> (wanted linux-upstream-5.13.0-rt1.orig)
dpkg-source: info: building linux-upstream using existing linux-upstream_5.13.0-rt1.orig.tar.gz
dpkg-source: info: building linux-upstream in linux-upstream_5.13.0-rt1-1.diff.gz
dpkg-source: error: cannot represent change to vmlinux-gdb.py:
dpkg-source: error:   new version is symlink to /home/lab/linux-5.13/scripts/gdb/vmlinux-gdb.py
dpkg-source: error:   old version is nonexistent
dpkg-source: warning: ignoring deletion of file .scmversion
dpkg-source: warning: the diff modifies the following upstream files:
 .clang-format
 .cocciconfig
 .config.old
 .get_maintainer.ignore
 .mailmap
 CREDITS
 MAINTAINERS
 README
dpkg-source: info: use the '3.0 (quilt)' format to have separate and documented changes to upstream files, see dpkg-source(1)
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -i.git -b . subprocess returned exit status 1
make[1]: *** [scripts/Makefile.package:77: deb-pkg] Error 1
make: *** [Makefile:1565: deb-pkg] Error 2

I suspect I am having problems because I am making another kernel which is similar/identical to the current default.
Any help would be gratefully received.
Kind regards
Tony


[THE]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems installing a real time kernel.
  2022-06-07 13:24 Problems installing a real time kernel Willett, Tony
@ 2022-06-07 17:35 ` Ahmed S. Darwish
  2022-06-07 19:47 ` Ralf Mardorf
  2022-06-14 10:35 ` Punit Agrawal
  2 siblings, 0 replies; 5+ messages in thread
From: Ahmed S. Darwish @ 2022-06-07 17:35 UTC (permalink / raw)
  To: Willett, Tony; +Cc: 'linux-rt-users@vger.kernel.org'

On Tue, Jun 07, 2022, Willett, Tony wrote:
> Hello.
>
> I am trying to work with a Franka Emika Panda Robot Arm and to do so I
> need to run a real time kernel on my Linux PC.
>
> This tutorial/walkthrough is my primary source of information-
> https://frankaemika.github.io/docs/installation_linux.html#setting-up-the-real-time-kernel
>

This is not the primary/official documentation. The primary
documentation is at:

    https://wiki.linuxfoundation.org/realtime/preempt_rt_versions

Please clone the linux-stable-rt git repo directly and switch to the
stable rt version you want, instead of manually applying the RT patch.

> Patch the kernel and set up .config file to choose Preemptable kernel (Real-Time).
> Then I compile it, it produces linux-upstream files which I did not expect.
> Making the kernel looked good and then fails with the following error-
> Initially it gives the following warnings-

Vendor patches or instructions cannot be supported here.

Please clone the repository earlier shown, switch to the stable rt
version you need (list of stable rt releases are in the aforementioned
link), mention the tag you've used, then show the exact build command
sequence you did.

Afterwards, hopefully I can provide some further help.

Good luck,

--
Ahmed S. Darwish
Linutronix GmbH

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems installing a real time kernel.
  2022-06-07 13:24 Problems installing a real time kernel Willett, Tony
  2022-06-07 17:35 ` Ahmed S. Darwish
@ 2022-06-07 19:47 ` Ralf Mardorf
  2022-06-08  8:54   ` Jeremy Jongepier
  2022-06-14 10:35 ` Punit Agrawal
  2 siblings, 1 reply; 5+ messages in thread
From: Ralf Mardorf @ 2022-06-07 19:47 UTC (permalink / raw)
  To: linux-rt-users; +Cc: Willett, Tony

On Tue, 7 Jun 2022 13:24:06 +0000, Willett, Tony wrote:
>mailto:lab@panda:~/linux-5.13$ make -j8 deb-pkg

Hi,

a long time ago I was used to build Debian rt patched kernels. When I
migrated to Ubuntu I continued building kernels the Debian way.
Referring to a script I wrote in 2013 to build an Ubuntu linux-rt
package the Debian way:

export CONCURRENCY_LEVEL=8
make-kpkg clean
make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers

I exported CONCURRENCY_LEVEL=2. Since you are using make with
the -j8 option, it probably should be CONCURRENCY_LEVEL=8 for you.
However, I don't know what changed within the years. I build at least
one kernel after that seemingly not using the script, but don't have
notes at hand. I remember that before or after that time something
related to fakeroot changed, but IIRC I always used make-kpkg to build
Debian and Ubuntu kernel packages. Probably with something else, but
the --rootcmd fakeroot option.

The package containing the command make-kpkg was removed in 2020, see
https://tracker.debian.org/pkg/kernel-package . But some Debian
rekleases might still provide it. Ubuntu 20.04LTS and earlier still
provide it, see
https://packages.ubuntu.com/search?suite=focal&searchon=names&keywords=kernel-package
, but later Ubuntu releases don't.

If your Debian release's repos should provide it, consider to test
using make-kpkg, if not consider to ask on a Debian user mailing list
how to build a Debian kernel package nowadays.

Alternatively you could build and install a kernel without building a
package at all.

Nowadays I build kernel packages for Arch Linux only. Arch does use a
completely different package management.

Regards,
Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems installing a real time kernel.
  2022-06-07 19:47 ` Ralf Mardorf
@ 2022-06-08  8:54   ` Jeremy Jongepier
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Jongepier @ 2022-06-08  8:54 UTC (permalink / raw)
  To: linux-rt-users


[-- Attachment #1.1: Type: text/plain, Size: 763 bytes --]

On 07-06-2022 21:47, Ralf Mardorf wrote:
> If your Debian release's repos should provide it, consider to test
> using make-kpkg, if not consider to ask on a Debian user mailing list
> how to build a Debian kernel package nowadays.

With `make deb-pkg`, see 
https://kernel-team.pages.debian.net/kernel-handbook/ch-common-tasks.html#s-common-building
make-kpkg was part of the kernel-package package which has been removed 
from Debian 2 years ago: 
https://tracker.debian.org/news/1143701/removed-13018nmu2-from-unstable/
In other words, it might be better to refrain from testing with 
make-kpkg, it complicates troubleshooting and is an unsupported way of 
building a custom kernel on Debian. The above also applies to Ubuntu.

Best,

Jeremy


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Problems installing a real time kernel.
  2022-06-07 13:24 Problems installing a real time kernel Willett, Tony
  2022-06-07 17:35 ` Ahmed S. Darwish
  2022-06-07 19:47 ` Ralf Mardorf
@ 2022-06-14 10:35 ` Punit Agrawal
  2 siblings, 0 replies; 5+ messages in thread
From: Punit Agrawal @ 2022-06-14 10:35 UTC (permalink / raw)
  To: Willett, Tony; +Cc: 'linux-rt-users@vger.kernel.org'

"Willett, Tony" <st20214513@outlook.cardiffmet.ac.uk> writes:

> Hello.
>
> I am trying to work with a Franka Emika Panda Robot Arm and to do so I need to run a real time kernel on my Linux PC.
> This tutorial/walkthrough is my primary source of information-
> https://frankaemika.github.io/docs/installation_linux.html#setting-up-the-real-time-kernel

Debian provides RT kernel images[0] - if you don't require any changes,
installing the packaged kernel maybe easier.

[0] https://packages.debian.org/search?keywords=linux-image-rt

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-14 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-07 13:24 Problems installing a real time kernel Willett, Tony
2022-06-07 17:35 ` Ahmed S. Darwish
2022-06-07 19:47 ` Ralf Mardorf
2022-06-08  8:54   ` Jeremy Jongepier
2022-06-14 10:35 ` Punit Agrawal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.