SGX Problems on Ubuntu 11.10 (Oneiric) Demo Image - Kernel panic

Hello all,

Since a couple of days now I'm trying to get SGX running on my
Beagleboard Rev C4 with Ubuntu 11.10. I followed the Instructions on
http://elinux.org/BeagleBoardUbuntu#Oneiric_11.10 exactly:

- I downloaded ubuntu-11.10-r3-minimal-armel.tar.xz
- executed the script setup_sdcard.sh on an Ubuntu x86 Host as
follows:
  sudo ./setup_sdcard.sh --mmc /dev/sdc --uboot beagle_cx
- I installed the lastest Kernel Image following the instructions on
http://elinux.org/BeagleBoardUbuntu#Install_Latest_Kernel_Image
- I made an apt-get install xfce4 gdm xserver-xorg-video-omap3 (and
maybe something more)
- I installed the SGX package I created on the x68 Host (following
http://elinux.org/BeagleBoardUbuntu#SGX_Video_Acceleration)

the first run of run-SGX.sh after install worked and after each boot
all SGX modules are loaded (see dmesg on http://paste.ubuntu.com/792534/)

Then I tested the SGX acceleration with the EvilSkull demo as user
ubuntu (root makes no difference) with the immediate result in a
kernel panic (see http://paste.ubuntu.com/792545/).

Doing a pvr restart after reboot also leads to panic (see
http://paste.ubuntu.com/792540/).

Here's my Xorg.log: http://paste.ubuntu.com/792565/

This try was my last try after many attempts with ubuntu 11.04, I also
tried pre installed Ubuntu Images from https://wiki.ubuntu.com/ARM/OMAP
doing "sudo apt-get install libegl1-sgx-omap3 libgles1-sgx-omap3
libgles2-sgx-omap3", that didn't work either.

Does anyone has an idea?

Regards,
Simon

Hi Don,

It's been quite awhile since i tested the SGX drivers on my C4, can
you post a tracking 'issue' here:

https://github.com/RobertCNelson/stable-kernel/issues

It'll take some time to pull a c4 out of production and reset for
testing, but i think i know what's causing this in 3.1.x, it was one
of the hwmod changes in 3.1, can you please retest with an earlier
kernel such as:

http://rcn-ee.net/deb/oneiric/v3.0.8-x3/install-me.sh

Regards,

Hi Robert,

Thank you for your reply. I'll try your older kernel tomorrow. Today I
tried the Ubuntu way with the "ubuntu-11.10-preinstalled-desktop-armel
+omap.img.gz" image from http://cdimage.ubuntu.com/releases/11.10/release/.

This again did not work, maybe it gives some hints:

I did as suggested an apt-get install libegl1-sgx-omap3 libgles1-sgx-
omap3 libgles2-sgx-omap3 and got the following error:

(...)
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.0.0-12-omap /
boot/vmlinuz-3.0.0-12-omap
Error! Bad return status for module build on kernel: 3.0.0-12-omap
(armv7l)
Consult /var/lib/dkms/powervr-omap3/4.00.00.01/build/make.log for more
information.

The file /var/lib/dkms/powervr-omap3/4.00.00.01/build/make.log I
pasted here: http://paste.ubuntu.com/792841/

Then I updated to Kernel 3.0.0-14-omap and got the same error doing
dpkg-reconfigure powervr-omap3-dkms.

That's enough for today,

Regards
Simon

Hi Robert,

Thank you for your reply. I'll try your older kernel tomorrow. Today I
tried the Ubuntu way with the "ubuntu-11.10-preinstalled-desktop-armel
+omap.img.gz" image from http://cdimage.ubuntu.com/releases/11.10/release/.

Yeah, sorry, i can't help you with canocial's sgx setup, i helped them
intially a few years back but haven't looked at what they are doing
now..

This again did not work, maybe it gives some hints:

I did as suggested an apt-get install libegl1-sgx-omap3 libgles1-sgx-
omap3 libgles2-sgx-omap3 and got the following error:

(...)
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.0.0-12-omap /
boot/vmlinuz-3.0.0-12-omap
Error! Bad return status for module build on kernel: 3.0.0-12-omap
(armv7l)
Consult /var/lib/dkms/powervr-omap3/4.00.00.01/build/make.log for more
information.

The file /var/lib/dkms/powervr-omap3/4.00.00.01/build/make.log I
pasted here: http://paste.ubuntu.com/792841/

Then I updated to Kernel 3.0.0-14-omap and got the same error doing
dpkg-reconfigure powervr-omap3-dkms.

Looks like ubuntu is a little behind, in there kernel patchset for sgx..

take a look at:
https://github.com/RobertCNelson/stable-kernel/blob/master/patches/sgx/0001-OMAP3-SGX-TI-4.03.00.02-2.6.40-display.h-to-omapdss..patch

and then patch:
/var/lib/dkms/powervr-omap3/4.00.00.01/build/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c

Regards,

I tried going the same way. Probably some things are not included in
the Ubuntu stock kernel configuration. Some headers are missing.

-Ustun

Hi Robert,

I tried your Kernel v3.0.8-x3 and it works fine! Thank you! After all,
it seems there is no need for Canonicals Kernels any more.

Regards,
Simon

Hi Don,

How did apply the steps above as you said with using Kernel v3.0.8-x3. Beacause, if steps is applied normally, it install Latest Kernel (3.2.24) to the system. How did you do that?

Thanks in advance.

You download and install it manually via:

wget http://rcn-ee.net/deb/oneiric/v3.0.8-x3/install-me.sh
/bin/bash install-me.sh

Regards,