Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

Preempt-rt on BeagleBone Black
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Preempt-rt on BeagleBone Black

by nikeshp51089 on Wed Sep 21, 2016 1:48 am

Help Please,

I am using beaglebone black platform and I want to port the real-time support in it.
I am trying to do it in yocto as well as standalone kernel+preempt-rt patch

Not able to build using yocto and standalone kernel.

nikeshp51089
 
Posts: 3
Joined: Wed Sep 21, 2016 1:37 am

Re: Preempt-rt on BeagleBone Black

by drewfustini on Thu Sep 22, 2016 12:18 am

There are Debian packages for the RT kernel if you use the Debian image for BeagleBone.

You can download the Debian images here:
http://beagleboard.org/latest-images

You can see in apt-cache search linux-image that there are 'rt' variants for most of the kernel versions.

The easiest way to build the kernel is to use this repo from Robert C. Nelson (who is the person that maintains Debian for BeagleBone):
https://github.com/RobertCNelson/bb-ker ... 3x-rt-v4.4

If you are interested specifically in using Yocto, then I'd suggest checking out this Free Electrons training material from their Yocto course:
http://free-electrons.com/training/yocto/

It is free to download and written for the BeagleBone.

Finally, you may also want to post to the primary mailing list for the BeagleBone/BeagleBoard community:
https://groups.google.com/forum/#!forum/beagleboard

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: Preempt-rt on BeagleBone Black

by nikeshp51089 on Mon Sep 26, 2016 1:55 am

Thank you drewfustini,

I built the Kernel image successfully. But the built image is zImage and uboot requires uImage.
So I am not able to boot the kernel on Beaglebone Black device.

Regards,
Nikesh

nikeshp51089
 
Posts: 3
Joined: Wed Sep 21, 2016 1:37 am

Re: Preempt-rt on BeagleBone Black

by drewfustini on Mon Sep 26, 2016 7:11 pm

How did you build the kernel?

If you use Robert C Nelson's build scripts then it should not be problem:
https://github.com/RobertCNelson/bb-kernel

For example, you should get something like this in "deploy" directory:
[pdp7@skylake bb-kernel]$ ls -la deploy/*4.4*
-rw-rw-r--. 1 pdp7 pdp7 334981 Aug 30 02:57 deploy/4.4.19-bone13-dtbs.tar.gz
-rw-rw-r--. 1 pdp7 pdp7 1230637 Aug 30 02:57 deploy/4.4.19-bone13-firmware.tar.gz
-rw-rw-r--. 1 pdp7 pdp7 25046637 Aug 30 02:56 deploy/4.4.19-bone13-modules.tar.gz
-rwxrwxr-x. 1 pdp7 pdp7 4767392 Aug 30 02:56 deploy/4.4.19-bone13.zImage
-rw-rw-r--. 1 pdp7 pdp7 99506 Aug 30 02:56 deploy/config-4.4.19-bone13


So on the Debian image, I would copy the kernel to the beaglebone as:
cp 4.4.19-bone13.zImage /boot/vmlinuz-4.4.19-bone13


However, if you use the Debian image, then you can install real-time kernel without having to compile:
debian@beaglebone:~$ apt-cache search linux-image |grep bone | fgrep -- -rt- |grep -v -- -dbg
linux-image-4.0.8-bone-rt-r8 - Linux kernel, version 4.0.8-bone-rt-r8
linux-image-4.1.10-bone-rt-r16 - Linux kernel, version 4.1.10-bone-rt-r16
<snip>
linux-image-4.6.7-bone-rt-r4 - Linux kernel, version 4.6.7-bone-rt-r4
debian@beaglebone:~$ cat /etc/debian_version
8.5
debian@beaglebone:~$ cat /etc/dogtag
BeagleBoard.org Debian Image 2016-06-05
debian@beaglebone:~$

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: Preempt-rt on BeagleBone Black

by nikeshp51089 on Tue Sep 27, 2016 6:43 am

Thank you very much drewfustini for answer.

Actaully I am building the kernel using yocto. I used meta-realtime layer for real time support(http://git.yoctoproject.org/cgit/cgit.cgi/meta-realtime) and built core-image-rt package. Prior to building of core-image-rt filesystem images, I build uboot and kernel using yocto.

Now the problem is that I could easily build zImage but its not working as uboot requires uImage.

I tried to build uImage in yocto but getting compilation errors and also tried to convert zImage to uImage using mkImage tool but still not working.

nikeshp51089
 
Posts: 3
Joined: Wed Sep 21, 2016 1:37 am

Re: Preempt-rt on BeagleBone Black

by drewfustini on Tue Sep 27, 2016 9:32 pm

Ah ok. I am not very familiar with Yocto. Debian GNU/Linux is really the only option that is officially supported for BeagleBone.

You may want to check out the Yocto training material from Free Electrons as they use BeagleBone Black for the labs:
http://free-electrons.com/training/yocto/

Practical labs
http://free-electrons.com/doc/training/ ... o-labs.pdf

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.