Re: Linux RT patch for Pandaboard Omap 4 kernel 3.0.0-1205 error when compiling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you Jiri and Sankara.

With your help I have successful compiled rt patch for Ubuntu on Pandaboard.

I found that the ti omap kernel I downloaded with the command:
 sudo apt-get source linux-image-$(uname -r)

( tar file : linux-ti-omap4_3.0.0-1205.10.tar.gz )
is kernel version 3.0.4 despite it numbered: 3.0.0-1205.

And it is the main reason why so many errors occurred when I try to
patch patch-3.0-rt6 with this kernel.

So I downloaded an earlier package :3.0.0-1201.5 at
https://launchpad.net/ubuntu/+source/linux-ti-omap4/3.0.0-1201.5 and
patch with patch-3.0.1-rt11 .

Then I only have to patch 03 errors to finish compiling.
My process (compiling on Panaboard running Ubuntu 11.10) is a little
bit different from yours, since i compile to generate .deb files.
Basically it is :

(1) tar xfv  linux-ti-omap4_3.0.0-1205.10.tar.gz
(2) cd to the folder extracted.

(3) Edit file patch-3.0.1-rt11.patch to delete this part :

Index: linux-2.6/localversion-rt
===================================================================
--- /dev/null
+++ linux-2.6/localversion-rt
@@ -0,0 +1 @@
+-rt11


because it will make the compiler confuses between the local version
omap4 and omap4-rt11 ( I am not sure this patch is correct or not,
but without it I will have this error :

"run-parts: executing debian/tests/check-aliases

Checking for dupe aliases in omap4...
Could not open /usr/src/ubuntu-oneiric/debian/linux-image-3.0.0-1201-omap4/lib/modules/3.0.0-1201-omap4/modules.alias
at debian/tests/check-aliases line 10."


(4) patch -p1 < ./patch-3.0.1-rt11.patch
At this step, I have 1 unsuccessful patch with file /init/main.c
I follow the .rej file and patch it manually. I think it is because of
the omap4 kernel has some changes in main.c makes the patch does not
match.

(5) Edit file ubuntu-oneiric/ubuntu/aufs/mtx.h : change: lock->owner
to: lock->lock.owner
according to this patch :
http://aufs.git.sourceforge.net/git/gitweb.cgi?p=aufs/aufs2-standalone.git;a=patch;h=624d0435b28be8bce48ea30cf00c52f4e5623621


(6) Add  #include <linux/cache.h> to file
ubuntu-oneiric/security/apparmor/sid.c because of this error :

usr/src/linux-ti-omap4-3.0.0/security/apparmor/sid.c: In function
‘aa_alloc_sid’:
/usr/src/linux-ti-omap4-3.0.0/security/apparmor/sid.c:42:2: error:
‘sid_lock’ undeclared (first use in this function)

(7) fakeroot debian/rules editconfigs

I left everything default except:
# Kernel Features -> Preemption Model -> Fully Preemptible Kernel (RT)
# Kernel hacking -> Kernel Debugging = n
# System type -> TI Omap Common Feature -> Use 32KHz timer =n

(8) I apply your patch you provided for high resolution timer and also
applied this patch from

http://www.mail-archive.com/linux-omap@xxxxxxxxxxxxxxx/msg49148.html

( i am not sure the above patch needed or not, I attached the patch here)

(9) fakeroot debian/rules clean
skipabi=true skipmodule=true dpkg-buildpackage -B -uc -us

(wait 2 hours)

(10)
sudo dpkg -i linux-headers-3.0.0-1201_3.0.0-1201.5_armel.deb
sudo dpkg -i linux-headers-3.0.0-1201-omap4_3.0.0-1201.5_armel.deb
sudo dpkg -i linux-image-3.0.0-1201-omap4_3.0.0-1201.5_armel.deb

sudo flash-kernel 3.0.1-1201-omap4

After reboot, i have the realtime 3.0.1 omap4 running. The cyclictest
shows an acceptable result, with no load the maximum latency is around
30usec, with load it is ~150usec.

One good thing is I don;t have any problem when booting the new kernel.

However, I have that problem when compile generic kernel and applied
on minimal fs linux, instead of ubuntu, the same as you described, it
only boots after 5-10 resets.

The ubuntu kernel boots normally, but sometimes it hangs after boot,
when i try to do run tasks, Firefox for example.

========================================================

I have a question about the minimal systems, it may be ridiculous but
i don;t know how to get and run cyclictest, since I don;t have apt-get
package, also no git. As I understand, I will have to compile it on
pandaboard, but I found it hard to do it on the minimal fs.

And second question, when you cross compile with make ARCH=arm
CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage and get the uImage,
your pandaboard is running Ubuntu or minimal fs ?

Thank you very much for your support, it really helps me after 2 weeks
of compilation again and again.

Hung Bui

Attachment: sankara.patch
Description: Binary data


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux