BeagleBoard/DSP Howto - Helps are needed

Hello,

Please bear with me for the newbie questions.

I tried to use the DSP core on the BeagleBoard. I read the BeagleBoard/
DSP Howto from Felipe many many times. And I tried to find my
questions and solutions from this board without lucks. So I need
someone to give me a hand.

My host Linux system is Ubuntu 7.10 English Version running on VMware
6.02. I followed the BeagleBoard/DSP Howto.

1. git clone http://www.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
--> OK
2. cd linux-omap-2.6 --> OK
3. wget http://4869037.web.fc2.com/tidspbridge-20081021.tgz --> OK
4. tar xvzf tidspbridge-20081021.tgz --> OK
5. git am *.patch -> Failed, the error messages are
          Applying BRIDGE: Kconfig Entry
          error: patch failed: arch/arm/Kconfig:1237
          error: arch/arm/Kconfig: patch does not apply
          error: patch failed: drivers/Makefile:40
          error: drivers/Makefile: patch does not apply
          Patch failed at 0001.
          When you have resolved this problem run "git-am --resolved".
          If you would prefer to skip this patch, instead run "git-am
--skip".

I searched the board and google but can not find the solution. I
skipped this patch step and continue the BeagleBoard/DSP Howto. In
make menuconfig, I could not find the item of CONFIG_MPU_BRIDGE. I
added CONFIG_MPU_BRIDGE=m to .config by vi. Then I made a new uImage
which running on my BeagleBoard and showing
          Kernel release : Linux 2.6.29-rc8-omap1-05516-gf4223ec
          Kernel version : #1 Sun Mar 22 04:04:42 CET 2009

But ./ping.out failed. I am convinced the DSP doesn't work because the
patches were not done.

I looked back to the step of patching. Instead of git am *.patch, I
did git am 0002-BRIDGE-Header-files.patch and 0003-BRIDGE-Doff-image-
dynamic-loader.patch and they all worked without problems. But git am
0001-BRIDGE-Kconfig-Entry.patch still gave me the same error messages.

I apogize if this is a trivial problem. I would much appreciate if any
one can give me hand.

Best regards,

Paul

I am, more or less, having the same problem as Paul has, but I also
found a post by Hiroshi DOYU which says:

JFYI, the latest omap git repository has the "tidspbridge" branch.
This branch is updated periodically.
The old patchset may not work with the latst l-o.
You can find the branch by "git branch -r".

Hiroshi DOYU

So, I thought maybe the wiki page that Paul is referring to was old
and not up to date so I decided to check out that branch
(tidspbridge) .
So, I checked that branch out and tried to compile it, which it gave
me this error:

drivers/dsp/bridge/wmd/io_sm.c: In function 'WMD_IO_OnLoaded':
drivers/dsp/bridge/wmd/io_sm.c:816: error: implicit declaration of
function 'memzero'
make[2]: *** [drivers/dsp/bridge/wmd/io_sm.o] Error 1
make[1]: *** [drivers/dsp/bridge] Error 2
make: *** [drivers] Error 2

And, I found out that "memzero" isn't actually defined, and __memzero
is the right one so I changed it to __memzero and it started to
compile
again until it broke at:

drivers/dsp/bridge/rmgr/drv_interface.c:62:32: error: mach/
board-3430sdp.h: No such file or directory
drivers/dsp/bridge/rmgr/drv_interface.c:103:26: error: mach/omap-pm.h:
No such file or directory
make[2]: *** [drivers/dsp/bridge/rmgr/drv_interface.o] Error 1
make[1]: *** [drivers/dsp/bridge] Error 2

so, any help on this issue is highly appreciated.

Thanks,
--Faraz

Paul,

Try the tidspbridge branch of linux-omap-2.6 git in kernel.org

Here is the gitweb link

http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=shortlog;h=tidspbridge

regards

Jesslyn

Jesslyn,

Thank you very much for the reply. But I got errors when git the link
you provided. Bellow is the log

~$ git clone http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=shortlog;h=tidspbridge
Initialized empty Git repository in /home/jars/linux-omap-2.6/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?
~$ git-update-server-info
fatal: Not a git repository
~$ gitweb
bash: gitweb: command not found
~$ sudo apt-get gitweb
E: Invalid operation gitweb

I did git clone from kernel.org (http://www.kernel.org/pub/scm/linux/
kernel/git/tmlind/linux-omap-2.6.git). What is the difference between
the link in the Howto and your link? Any hint?

Best regards,

Paul

that still didn't work.

it pukes at:

drivers/dsp/bridge/wmd/io_sm.c: In function 'WMD_IO_OnLoaded':
drivers/dsp/bridge/wmd/io_sm.c:816: error: implicit declaration of
function 'memzero'
make[2]: *** [drivers/dsp/bridge/wmd/io_sm.o] Error 1
make[1]: *** [drivers/dsp/bridge] Error 2
make: *** [drivers] Error 2

any idea what's happening?

Op 24 mrt 2009, om 06:20 heeft paulchainkang@gmail.com het volgende geschreven:

Hello,

Please bear with me for the newbie questions.

I tried to use the DSP core on the BeagleBoard.

The image and kernel from http://www.angstrom-distribution.org/demo/beagleboard/untested/ have everything included to use the DSP for multimedia playback.

Steps needed:

1) install image
2) boot image with supplied kernel
3) cd /usr/share/ti-codec-combos
4) gst-launch filesrc location=/data/movies/BigBuckBunny_640x360.m4v ! qtdemux name=demux demux.video_00 ! TIViddec2 ! xvimagesink
5) observe error, ignore it, it's a bug in the XV driver (be it gstreamer or xf86-video-omapfb)
6) gst-launch filesrc location=/data/movies/BigBuckBunny_640x360.m4v ! qtdemux name=demux demux.video_00 ! TIViddec2 ! xvimagesink

Step 6 will give you something like this: http://www.youtube.com/watch?v=pcdaosTiWPI

This all done using the stuff from gstreamer.ti.com, hop in to #gst_ti at irc.freenode.net for realtime online support from knowledgable people.

Nota bene: the image is shipped with evaluation codecs, so video has a watermark in the top right corner (see youtube movie) and audio is altered as well. You can get production codecs from an omap3 dvsdk or from your friendly neighbourhood codec vendor.

regards,

Koen

It looks like I need to update those instructions.

I pushed my own repo to github:
http://github.com/felipec/linux-omap

There's a 'v2.6.28-tidspbridge' tag that has everything you might
need, including a defconfig that has the bridge configured.

Can you try that?

If it works I'll update the wiki with that information.

Hi Koen,

Thanks for providing an alternative. However, I don't have the
knowledge about gstreamer. Using multimedia codec for playback is not
my priority now. So I would save this for future to test after I gain
more knowledge about gstreamer and multimedia codec. Thank you any
way.

Best regards,

Paul

Hi Felipe,

Thank you for putting your repo to github:http://github.com/felipec/
linux-omap. I pulled down felipec-linux-
omap-8776d236773ca9372505a8d6104a97ba5b9205fe.tar.gz. Then,

1. tar zxvf felipec-linux-
omap-8776d236773ca9372505a8d6104a97ba5b9205fe.tar.gz
2. make omap3_beagle_defconfig
3. make menuconfig
    Finally, I found DSP Bridge driver which is the last item in
Device Drivers.
4. make CROSS_COMPILE=arm-none-linux-gnueabi- uImage

the new uImage is built without problems. I don't have the Beagle
Board on hand now, I'll test it tomorrow. I am optimistic and will
update after the test tomorrow.

Just curious, there were some messages like
/tmp/ccmFJB6V.s:11934: rdhi, rdlo and rm must all be different

I have no idea about them, and cross my fingers hoping these messages
will not cause problem. Will they?

Felipe, thanks again.

Best regards,

Paul

Hey,

I just tried Felipe's above kernel. I checked out the branch called
"tidspbridge-stable".
It compiles just fine. I built the uImage, and the modules and
installed them on the SD which had previously Angstrom on it.
However, when installed on the beagleboard and after booting the
serial console is filled up with below
error messages:

<3>omapfb omapfb: irq error status 4000
omapfb omapfb: irq error status 4000
<3>omapfb omapfb: irq error status 4022
omapfb omapfb: irq error status 4022
<3>omapfb omapfb: irq error status 4000
omapfb omapfb: irq error status 4000
<4>Spurious irq 95: 0xffffffdf, please flush posted write for irq 25
Spurious irq 95: 0xffffffdf, please flush posted write for irq 25
<4>__ratelimit: 332923 callbacks suppressed
__ratelimit: 332923 callbacks suppressed
<3>omapfb omapfb: irq error status 4022
omapfb omapfb: irq error status 4022
<3>omapfb omapfb: irq error status 4000
omapfb omapfb: irq error status 4000

and it keeps printing these forever. any idea what's wrong and how it
can be fixed?
BTW, it may help to know that my beagleboard is revision B5.

Regards,
--Faraz

Are you running X?

Hi Felipe,

The error messages that I mentioned below appear on the screen a few
seconds after
kernel images gets loaded, and before mounting the root file system.
So, I think it has nothing to do with running X or not. I'd appreciate
it if you have any hints.
Also I'd be interested to get Paul's feedback as well.

Thanks,
--Faraz

Hi Felipe,

I have a good news and a bad news.

The good news is the new built uImage works on the BeagleBoard. The
bad news is that I still can not have DSP work.

With the new uImage, I couldn't wait to test what you said in the
howto.

ping test
If you want to test the DSP you can try the simple ping test provided
in this package(dspbridge_binaries.tar.bz2).

Just: ./ping.out

I downloaed dspbridge_binaries.tar.bz2 and tried ./ping.out. I got an
error as

[root@beagleboard mmc]# cd dspbridge_binaries/
[root@beagleboard dspbridge_binaries]# ./ping.out
./ping.out: error while loading shared libraries: libbridge.so.2:
cannot open shared object file: No such file or directory

I can not find libbri.so.2 in my file system which is a RAM-DISK file
system (from rd-ext.bin).

OK. I back one step. I got TI's OpenMAX IL package
(tiopenmax-0.3.tar.gz). I untared it and ran -OMX-Sample-Firmware-0.3-
Linux-x86-Install in my host Ubuntu. The installation ended without
errors.

Next, in the howto, it said "You would end up with a bunch of binaries
in lib/dsp, copy them to your root filesystem at the same location (/
lib/dsp)." I think what it mean is to copy lib/dsp from the host
Ubuntu to the /lib/dsp of the BeagleBoard file system.

But I found the root of the BeagleBoard file system is almost full.

[root@beagleboard /]# df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 7931 7930 1 100% /
/dev/root 7931 7930 1 100% /
mdev 63240 0 63240 0% /dev
none 63240 0 63240 0% /tmp
/dev/mmcblk0p1 1004068 25692 978376 3% /mnt/mmc

[root@beagleboard tiopenmax-0.3]# cp -r lib/dsp /lib/dsp
cp: write error: No space left on device

I knew may be I should try Angstrom Linux and the file system, but I
still can not fix the the partition problem.

I am embrassing to ask. But what is the next step I should do? I don't
find libbridge.so.2 in /lib/dsp either, where to have it?

Can you provide your BeagleBoard file system along with your uImage? A
package of uImage and file system would make the beginners' lives
easier.

Appreciate all your works and helps.

Best regards,

Paul

hi,farazv

you said the error only occur after image be loaded, and before the rootfs be mounted.

can you boot the image if ignoring this error message, and can you test DSP running?

favor

Hi tang,

Those errors prevents the kernel from booting properly, it keeps
printing those error messages over and over and it doesn't go anywhere
after that stage.
Once it happens it doesn't even mount the root file system.
And I didn't make any changes to the configuration except enabling
the DSP bridge. Let me know if you need my .config file.

--Faraz

hi. faraz
Actually, I was confused on his issue as you. I wanna enable Beagleboard’s DSP for a long time.
and I search many documents, all its content is somehow out of date, I can’t follow it successfully.
I found some sites :
[1] http://elinux.org/BeagleBoard/DSP_Howto
[2] https://gstreamer.ti.com/gf/project/gstreamer_ti/wiki/?pagename=HowTo
And another found, the latest OE can build gstreamer-ti plugins as well, and maybe this is the easyest
way than any other. I didn’t try it yet,'Cause I don’t have much time recently.
if you have done this successful, please tell me.

Hi Tang,

Here is my experience:
The DSP_Howto page (http://elinux.org/BeagleBoard/DSP_Howto) is out
dated, and the patches mentioned on that page won't apply
to the kernel it's referring to. Then I learned that the latest omap
git repository has a DSP branch (called: tidspbridge) which doesn't
require
those patches. As I stated in the previous email, it doesn't build and
it gives you compile error (see previous emails) when you try to make
it.

Then I tried the link that Koen mentioned with regards to pre-built
untested Angstrom (http://www.angstrom-distribution.org/demo/
beagleboard/untested/ )
It also didn't have the DSP support, or at least I couldn't find the
dspbridge kernel module in there.

Then Felipe was nice enough to point us to his kernel, which has a
tidspbridge in it, it compiles nicely but then when I tried it gave me
the errors and refused to
boot, which I mentioned. Well that's the story so far :slight_smile:
I really need to get the DSP working properly on Beagleboard and I'd
appreciate the help.

Thanks,
--Faraz

Are you doing omap3_beagle_defconfig? Can you share your config?

Is your rootfs available somewhere?

Hey Felipe,

Yes I took all those steps:

make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm
omap3_beagle_defconfig
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm menuconfig
# to make sure DSP brdige is enabled
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm uImage
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules_install
# I've already set the INSTALL_MOD_PATH

Then I install the uImage and the modules on the SD card, the root
filesystem is basically the latest Angstrom installation on 2nd
parition of
the SD card formatted with ext3.

here is my uboot params:

setenv bootargs 'console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw
rootdelay=1'
setenv bootcmd 'mmcinit;fatload mmc 0 80300000 uImage;bootm 80300000'

I also tried it with:

setenv bootargs 'console=ttyS2,115200n8 console=tty0 root=/dev/
mmcblk0p2 rw rootfstype=ext3 rootwait
omapfb.video_mode=1024x768MR-16@60'
setenv bootcmd 'mmcinit; fatload mmc 0 0x80300000 uImage; bootm
0x80300000'

with no difference.

Here is my .config:

Hi Farazv,

I believe you walk further than I do on this issue. I am a novice
about Linux, Beagle Board and DSP.

I only did the first steps, (I didn't use ARCH=arm in the makes)
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-none-linux-gnueabi- menuconfig
# to make sure DSP brdige is enabled
make CROSS_COMPILE=arm-none-linux-gnueabi- uImage

Before reading your reply, I never knew I needed to do the following
below.
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules
make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm modules_install

I tried them but got errors like
make: *** No rule to make target `modules'. Stop.
make: *** No rule to make target `modules_install'. Stop.

I am not sure if I need do what you siad.
# I've already set the INSTALL_MOD_PATH
And I don't know how to do it.

Then I install the uImage and the modules on the SD card, the root
filesystem is basically the latest Angstrom installation on 2nd
parition of
the SD card formatted with ext3.

I would like to know more information about your "install"
1. Install the uImage means copy the built uImage to the first FAT32
partition of SD card, right?
2. What do you mean about installing the modules on the SD card? What
directories/files should I copy (or install) to what partition/
directories/files of the SD card? Any enviroment variables need to set
in the host or the BeagleBoard?

And, do you know how to fix the problem of missing "libbridge.so.2"?

Best regards,

Paul