Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[ uclibc / tinygentoo ] base-layout vs. alsa-*
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
varname
n00b
n00b


Joined: 03 Feb 2005
Posts: 19

PostPosted: Tue Mar 28, 2006 3:43 pm    Post subject: [ uclibc / tinygentoo ] base-layout vs. alsa-* Reply with quote

hi all,

I've been following the howto at http://gentoo-wiki.com/TinyGentoo to try and make a small (< 16MB) rootfs for a x86 board. The thing has an onboard ESS1888, so I wanted to get ALSA going (mp3 playing).

In following the howto, at the step where you emerge anything you'd like to be on your new system (link), I asked emerge to:

Code:
ROOT=/tmp/tinygentoo emerge -va alsa-utils


which then wants the following:

Code:

[ebuild  N    ] media-sound/alsa-headers-1.0.10  2,143 kB
[ebuild  N    ] media-libs/alsa-lib-1.0.10  -doc -jack 690 kB
[ebuild  N    ] media-sound/alsa-headers-1.0.10  to /tmp/tinygentoo/ 0 kB
[ebuild  N    ] sys-devel/make-3.80-r4  to /tmp/tinygentoo/ -build (-nls) -static 0 kB
[ebuild  N    ] app-shells/bash-3.0-r12  to /tmp/tinygentoo/ -bashlogger -build (-nls) 0 kB
[ebuild  N    ] sys-libs/readline-5.1_p2  to /tmp/tinygentoo/ 0 kB
[ebuild  N    ] sys-apps/sysvinit-2.86-r3  to /tmp/tinygentoo/ -bootstrap -build -ibm (-selinux) -static 0 kB
[ebuild  N    ] sys-apps/coreutils-5.2.1-r7  to /tmp/tinygentoo/ -acl -build (-nls) (-selinux) -static 0 kB
[ebuild  N    ] sys-apps/baselayout-1.11.14-r6  to /tmp/tinygentoo/ -bootstrap -build -static -unicode 0 kB
[ebuild  N    ] sys-apps/hotplug-base-20040401  to /tmp/tinygentoo/ 0 kB
[ebuild  N    ] sys-fs/udev-079-r1  to /tmp/tinygentoo/ (-selinux) 0 kB
[ebuild  N    ] sys-kernel/gentoo-sources-2.6.15-r1  to /tmp/tinygentoo/ -build -doc -symlink (-ultra1) 0 kB
[ebuild  N    ] media-libs/alsa-lib-1.0.10  to /tmp/tinygentoo/ -doc -jack 0 kB
[ebuild  N    ] dev-util/dialog-1.0.20050206  to /tmp/tinygentoo/ -unicode 0 kB
[ebuild  N    ] media-sound/alsa-utils-1.0.10  to /tmp/tinygentoo/ (-nls) 968 kB


It is my understanding that I don't need (nor want) the baselayout stuff. And as I already have busybox, aren't bash and coreutils unnecessary ?

I've looked at other posts regarding ALSA and uClibc but none really talked about this. I did find some posts (through google) on other fora / mailinglists about alsa needing patches for it to compile with uclibc, but I couldn't really understand them.

How do I go about avoiding the emerging of the above 'unnecessary' stuff ?

thanks

PS: I've posted this here because I'm using uclibc, I'm hoping that was a correct decision.
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Wed Mar 29, 2006 1:43 am    Post subject: Reply with quote

You considered using --nodeps and just picking the bits and pieces you need?
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
varname
n00b
n00b


Joined: 03 Feb 2005
Posts: 19

PostPosted: Thu Mar 30, 2006 2:32 pm    Post subject: Reply with quote

no I hadn't and thank you for suggesting it.

I've been able to squeeze the entire thing (kernel, compressed rootfs) in under 7MB; it's not working yet, alsa complains about 'symbol wordexp cannot be resolved' although I did specify that useflag for uclibc.

Investigating further :]
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Thu Mar 30, 2006 3:36 pm    Post subject: Reply with quote

If your host environment is glibc-based, then my guess is that the uclibc USE flag is disabled in use.mask. A couple of ways around this:

(1) unmask the USE flag: add "-uclibc" to /etc/portage/profile/use.mask

or

(2) set up a µClibc-based chroot environment.

I'd be inclined to do the latter, since it'll make cross-compilation much easier, however, the former is a quick fix. :-)
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
varname
n00b
n00b


Joined: 03 Feb 2005
Posts: 19

PostPosted: Thu Mar 30, 2006 5:18 pm    Post subject: Reply with quote

I have done exactly that; setup a uclibc based chroot (as per the howto; used the embedded stage 3).

alsa wouldn't even compile without the wordexp, so I googled and found a solution that seemed to work (add 'sys-libs/uclibc wordexp' to package.use), but it's complaining when I run the image on the target system.

first gonna get u-boot on it, the continuing boot->halt->write_image->boot cycle is starting to annoy me :]

btw; is there a simpler way to test alsa instead of using the alsaplayer (eg: cat file.txt > /dev/snd) ?
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Fri Mar 31, 2006 12:14 am    Post subject: Reply with quote

Why not just use OSS programs with snd-pcm-oss loaded?

As far as I know though, you can't just cat a sound file in... with either system. Much of the control is handled by ioctl's, not special chars in the data stream.
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
varname
n00b
n00b


Joined: 03 Feb 2005
Posts: 19

PostPosted: Sun Apr 09, 2006 1:53 pm    Post subject: Reply with quote

Quote:
Why not just use OSS programs with snd-pcm-oss loaded?

As far as I know though, you can't just cat a sound file in... with either system. Much of the control is handled by ioctl's, not special chars in the data stream.


Found some time to continue with this; I've compiled everything into the kernel now. I remembered reading somewhere that it is possible to cat a .au to /dev/dsp, but the article might've been outdated.

I first thought I just couldn't get ALSA to work, but using the same procedure on my desktop machine did give me sound. I suspected it had something to do with the nodes in /dev/ not being there (no /dev/sound for instance), so I copied a static /dev/ tree from another machine. Alsamixer now works (it was complaining about not being able to find a device) and mpg321 (just for test) now goes as far as this:

Quote:
Playing MPEG stream from test.mp3 ...
MPEG 1.0, Layer: III, Freq: 44100, mode: Stereo, modext: 0, BPF : 2560
Channels: 2, copyright: Yes, original: Yes, CRC: No, emphasis: 0.
Bitrate: 128Kbits/s, Extension value: 0
Audio: 1:1 conversion, rate: 44100, encoding: signed 16 bit, channels: 2
ALSA snd_pcm_sw_params error: Invalid argument].
Frame# 16 [ 5887 ], Time: 00:00.41 [02:33.78],
[0:00] Decoding of test.mp3 finished.


Not really sure what to make of this; I can't really find anything that helps me on the net.

/proc/asound has all the necessary bits (as far as I know).

anyone any idea ?
Back to top
View user's profile Send private message
varname
n00b
n00b


Joined: 03 Feb 2005
Posts: 19

PostPosted: Fri Apr 14, 2006 1:42 pm    Post subject: Reply with quote

no one ?

I've done a quick search of the alsa cvs sources, but found no reference to the mentioned errormessage.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum