ts-7000
[Top] [All Lists]

[ts-7000] Re: How to compile alsa on TS-7400 [solved] But how to use it?

To:
Subject: [ts-7000] Re: How to compile alsa on TS-7400 [solved] But how to use it?
From: "Andrea Martino" <>
Date: Mon, 08 Jan 2007 22:45:05 -0000
Hi all,
I finally managed to compile ALSA (1.0.4) for the official TS kernel
2.4.26. Here is what I did:

* I donwloaded the alsa-drivers-1.0.4 from cirrus:

http://arm.cirrus.com/files/index.php?path=linux%2Fpackages/

* I modified alsa-drivers-1.0.4/acore/adriver.h commenting out all the
code from lines 453 to line 469:

453: //struct work_struct {
454: //    void (*func)(void *);
455: //    void *data;
456: //};
457: //#define INIT_WORK(_work, _func, _data)    \
458: //    do {                    \
459: //        (_work)->func = _func;        \
460: //        (_work)->data = _data;        \
461: //    } while (0)
462: //#define __WORK_INITIALIZER(n, f, d) {    \
463: //    .func = (f),                \
464: //    .data = (d),                \
465: //    }
466: //#define DECLARE_WORK(n, f, d)        \
467: //    struct work_struct n = __WORK_INITIALIZER(n, f, d)
468: //int snd_compat_schedule_work(struct work_struct *work);
469: //#define schedule_work(w) snd_compat_schedule_work(w)

* I replaced line 225 of alsa-drivers-1.0.4/acore/misc.c from:

225:    works->func(works->data);

to

225:    works->routine(works->data);


In this way it compiles with no errors and no warnings! I don't know
if it really works, but at least it compiles cleanly ;-)

I tried to boot the new kernel with the new modules using bootload,
but after bootload finished, the console on the ttyAM0 hung with a
dead console. Could someone explain to me how boot the new kernel?

Here is what I did:
mount 192.168.0.1:/nfsroot /mnt/root
insmod bootloader
bootload -c "console=ttyAM0,115200 root=/dev/ram" -r
/mnt/root/ramdisk.gz /mnt/root/zImage
(then the console freezes)

I got the ramdisk.gz from the cirrus website and the zImage comes from
the kernel I compiled using crosstool-chain (with "make && make zImage");

What is wrong? Should I look for a new ramdisk? Instead of using the
ramdisk, could I boot using the SD/USB/NFS parition?

Thanks a lot
Andrea

--- In  "Andrea Martino" <> wrote:
>
> Hi all,
> I know this topic has been posted already many times, but I could not
> find any clean answer to it. I'm trying to compile alsa-drivers for
> the official TS kernel 2.4.26-ts11, but without any success.
> 
> I tried to compile different alsa versions (from 1.0.4 up to 1.0.13),
> and each of them needed some tune-up (for example, as already
> explained in the TS-7000 group, the malloc.c sometimes must be fixed
> manually). Anyway, every version complains of a "redefinition of
> `struct tq_struct'". This seems strange to me, since the struct is
> never redefined in the alsa-driver sources...
> 
> Here are the steps I used to (try to) compile the alsa-drivers:
> 
> tar xfvj alsa-driver-1.0.13.tar.bz2
> cd alsa-driver-1.0.13
> ./configure --with-cards=usb-audio --with-isapnp=no --with-oss=no
> --with-kernel=/root/linux24
> --with-cross=/opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-
> make dep
> (at this step, some manual fixes are needed)
> make
> 
> This is the error I get:
> 
> ===
> 
> make[1]: Entering directory `/root/alsa-driver-1.0.13/acore'
> /opt/crosstool/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-gcc  -D__KERNEL__
> -DMODULE=1 -I/root/alsa-driver-1.0.13/include  -I/root/linux24/include
> -O2  -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer
> -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD
> -nostdinc -iwithprefix include   -DEXPORT_SYMTAB -c hwdep.c
> In file included from
/root/alsa-driver-1.0.13/include/sound/driver.h:42,
>                  from hwdep.c:22:
> /root/alsa-driver-1.0.13/include/adriver.h:550: error: redefinition of
> `struct tq_struct'
> In file included from
/root/alsa-driver-1.0.13/include/sound/driver.h:42,
>                  from hwdep.c:22:
> /root/alsa-driver-1.0.13/include/adriver.h:558:1: warning: "INIT_WORK"
> redefined
> In file included from /root/linux24/include/linux/jffs2_fs_sb.h:8,
>                  from /root/linux24/include/linux/fs.h:735,
>                  from /root/linux24/include/linux/capability.h:17,
>                  from /root/linux24/include/linux/binfmts.h:5,
>                  from /root/linux24/include/linux/sched.h:9,
>                  from /root/linux24/include/linux/mm.h:4,
>                  from /root/linux24/include/asm/pci.h:6,
>                  from /root/linux24/include/linux/pci.h:685,
>                  from /root/alsa-driver-1.0.13/include/adriver.h:78,
>                  from
/root/alsa-driver-1.0.13/include/sound/driver.h:42,
>                  from hwdep.c:22:
> /root/linux24/include/linux/workqueue.h:18:1: warning: this is the
> location of the previous definition
> In file included from
/root/alsa-driver-1.0.13/include/sound/driver.h:42,
>                  from hwdep.c:22:
> /root/alsa-driver-1.0.13/include/adriver.h:571:1: warning:
> "schedule_work" redefined
> In file included from /root/linux24/include/linux/jffs2_fs_sb.h:8,
>                  from /root/linux24/include/linux/fs.h:735,
>                  from /root/linux24/include/linux/capability.h:17,
>                  from /root/linux24/include/linux/binfmts.h:5,
>                  from /root/linux24/include/linux/sched.h:9,
>                  from /root/linux24/include/linux/mm.h:4,
>                  from /root/linux24/include/asm/pci.h:6,
>                  from /root/linux24/include/linux/pci.h:685,
>                  from /root/alsa-driver-1.0.13/include/adriver.h:78,
>                  from
/root/alsa-driver-1.0.13/include/sound/driver.h:42,
>                  from hwdep.c:22:
> /root/linux24/include/linux/workqueue.h:16:1: warning: this is the
> location of the previous definition
> make[1]: *** [hwdep.o] Error 1
> make[1]: Leaving directory `/root/alsa-driver-1.0.13/acore'
> make: *** [compile] Error 1
> 
> ===
> 
> Could someone give me any hint? Any comment is really appreciated,
> since I have tried everything I could... :-S
> 
> Thanks a lot
> Andrea
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU