Skip to contentSkip to conversation

ALSA for build root

Buildroot Rod Boyce 8 participants 28 messages May 25, 2007 – Jun 6, 2007 2 messages not in the archive Kbuild

lore
Share & tools
lore

Rod Boyce

author
#0 lore raw

All,

I have been adding ALSA to the build root package system I am only able to test on a x86 platform. Is anybody else interested in ALSA for build-root? I have also been adding libogg and libvorbis would it be OK if I submitted a combined patch or would you prefer 2 separate patches? Is anybody else working on this who would like an advanced copy to test out and or compare against?

This would include the following packages:
alsa-lib-1.0.14rc4
alsa-utils-1.0.14rc4
libogg-1.1.3
libvorbis-1.1.2

Regards,
Rod Boyce

#1 lore raw

We have added alsa for use on our projects so would like to see someone get this into mainline buildroot

Cheers
Daniel Laird

Quoted 25 lines · Rod Boyce-2 wrote:

All,

I have been adding ALSA to the build root package system I am only able to test on a x86 platform. Is anybody else interested in ALSA for build-root? I have also been adding libogg and libvorbis would it be OK if I submitted a combined patch or would you prefer 2 separate patches? Is anybody else working on this who would like an advanced copy to test out and or compare against?

This would include the following packages:
alsa-lib-1.0.14rc4
alsa-utils-1.0.14rc4
libogg-1.1.3
libvorbis-1.1.2

Regards,
Rod Boyce
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

Signature · 2 lines
View this message in context: http://www.nabble.com/ALSA-for-build-root-tf3816584.html#a10805002
Sent from the BuildRoot mailing list archive at Nabble.com.
#2 lore raw
In reply to Rod Boyce
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"RB" == Rod Boyce <[email protected]> writes:

Hi,

RB> All, I have been adding ALSA to the build root package system I am RB> only able to test on a x86 platform. Is anybody else interested RB> in ALSA for build-root?

Yes, please. I can test on powerpc.

RB> I have also been adding libogg and libvorbis would it be OK if I RB> submitted a combined patch or would you prefer 2 separate patches? RB> Is anybody else working on this who would like an advanced copy to RB> test out and or compare against?

Seperate patches please.

Thanks!

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

I'm doing ARM with a custom audio section that still needs a driver, but I'll try when I'm there.

-----Original Message-----
From: [email protected] [mailto:buildroot-bounces at uclibc.org] On Behalf Of Peter at busybox.net
Sent: Friday, May 25, 2007 2:57 PM
To: Rod Boyce
Cc: buildroot at uclibc.org
Subject: Re: [Buildroot] ALSA for build root

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"RB" == Rod Boyce <[email protected]> writes:

Hi,

RB> All, I have been adding ALSA to the build root package system I am RB> only able to test on a x86 platform. Is anybody else interested in RB> ALSA for build-root?

Yes, please. I can test on powerpc.

RB> I have also been adding libogg and libvorbis would it be OK if I RB> submitted a combined patch or would you prefer 2 separate patches? RB> Is anybody else working on this who would like an advanced copy to RB> test out and or compare against?

Seperate patches please.

Thanks!

Signature · 3 lines
Bye, Peter Korsgaard _______________________________________________
buildroot mailing list
buildroot at uclibc.org http://busybox.net/mailman/listinfo/buildroot
#4 lore raw

[Buildroot] Package selection question

In reply to Rod Boyce

Hello,

I just want to build the toolchain and the debugger on host: cygwin,
target: arm.

So, even after I unchecked busybox and all packages, it still builds gmp (and, unsuccessfully, mpfr). Why does it need it please and why is this an option then? Or am I doing something wrong here?

Thanks
Tom

#5 lore raw

[Buildroot] Package selection question

Tom,
All,

Quoted 3 lines · Tom

So, even after I unchecked busybox and all packages, it still builds gmp (and, unsuccessfully, mpfr). Why does it need it please and why is this an option then? Or am I doing something wrong here?

gmp and mpfr are needed to build gcc. They are to run on host, not on target. Can you post the build logs for mpfr (and gmp if it also fails)?

Regards,
Yann E. MORIN.

PS. gcc-4.1.x and earlier require neither gmp nor mpfr.
gcc-4.2.x require gmp and mpfr to build fortran (at least, may be others) gcc-4.3.x will require gmp and mpfr to build all frontends.
YEM.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< ?_? >==-- ?------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
?------------------------------?-------?------------------?--------------------?
#11 lore raw

[Buildroot] Package selection question

In reply to Tom
Quoted 9 lines · Tom

Hello,

I just want to build the toolchain and the debugger on host: cygwin,
target: arm.

So, even after I unchecked busybox and all packages, it still builds gmp (and, unsuccessfully, mpfr). Why does it need it please and why is this an option then? Or am I doing something wrong here?

gcc uses gmp/mpfr, you're doing nothing wrong. Please report build failures of gmp/mpfr to the respective lists.

Before you report it to the mpfr folks, please paste the error here, since i suspect that it could have to do something with the binary/library name extensions, which (IIRC) we currently do not handle at all (there's a bug somewhere about this, if memory serves me right).

#6 lore raw

[Buildroot] Package selection question

In reply to Yann E. MORIN
Quoted 1 line · Yann E. MORIN

PS. gcc-4.1.x and earlier require neither gmp nor mpfr.

Is this true? IIRC the middle-end of 4.1 does use them, no?

Quoted 2 lines

gcc-4.2.x require gmp and mpfr to build fortran (at least, may be others) gcc-4.3.x will require gmp and mpfr to build all frontends.

#7 lore raw

[Buildroot] Package selection question

Bernhard,
All,

Quoted 3 lines · Bernhard Fischer
Quoted 1 line · Yann E. MORIN

PS. gcc-4.1.x and earlier require neither gmp nor mpfr.

Is this true? IIRC the middle-end of 4.1 does use them, no?

I don't have mpfr here and gcc-4.1.2 does build OK. I do have gmp, but gcc does not linked against it.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< ?_? >==-- ?------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
?------------------------------?-------?------------------?--------------------?
#12 lore raw

[Buildroot] Package selection question

In reply to Bernhard Fischer

Thanks.

I am working to isolate and find a workaround to my mpfr problem on cygwin. Once I do, I will post the results of all workarounds I had to do (or the error log should I not get it done). In a separate thread as requested.

Quoted 18 lines · Bernhard Fischer
Quoted 8 lines · Tom

Hello,

I just want to build the toolchain and the debugger on host: cygwin,
target: arm.

So, even after I unchecked busybox and all packages, it still builds gmp (and, unsuccessfully, mpfr). Why does it need it please and why is this an option then? Or am I doing something wrong here?

gcc uses gmp/mpfr, you're doing nothing wrong. Please report build failures of gmp/mpfr to the respective lists.

Before you report it to the mpfr folks, please paste the error here, since i suspect that it could have to do something with the binary/library name extensions, which (IIRC) we currently do not handle at all (there's a bug somewhere about this, if memory serves me right).

#8 lore raw

[Buildroot] Package selection question

In reply to Yann E. MORIN

I have selected "Buildroot toolchain" and in the toolchain->GCC option I have selected 4.1.2.

(HOSTCC I have tried both 3.4.4 and 4.2.0)

Why does it download and try to build mpfr if it is not used?

Quoted 14 lines · Yann E. MORIN

Bernhard,
All,

Quoted 3 lines · Bernhard Fischer
Quoted 1 line · Yann E. MORIN

PS. gcc-4.1.x and earlier require neither gmp nor mpfr.

Is this true? IIRC the middle-end of 4.1 does use them, no?

I don't have mpfr here and gcc-4.1.2 does build OK. I do have gmp, but gcc does not linked against it.

Regards,
Yann E. MORIN.

#9 lore raw

[Buildroot] Package selection question

In reply to Yann E. MORIN
Quoted 10 lines · Yann E. MORIN

Bernhard,
All,

Quoted 3 lines · Bernhard Fischer
Quoted 1 line · Yann E. MORIN

PS. gcc-4.1.x and earlier require neither gmp nor mpfr.

Is this true? IIRC the middle-end of 4.1 does use them, no?

I don't have mpfr here and gcc-4.1.2 does build OK. I do have gmp, but gcc does not linked against it.

Fair enough, in 4.1, only the fortran frontend needs it.

#17 lore raw

[Buildroot] mpfr error on cygwin for arm

In reply to a message not in the archive
Quoted 12 lines · Tom

Hi Bernhard and all,

sorry if this thread is a little out of sequence, had problems with text attachment.

Quoted 5 lines · Bernhard Fischer

Before you report it to the mpfr folks, please paste the error here, since i suspect that it could have to do something with the binary/library name extensions, which (IIRC) we currently do not handle at all (there's a bug somewhere about this, if memory serves me right).

Quoted 6 lines

You were right about extensions, below is the error as produced by buildroot-20050516 built, I just added -verbose for ld.
It can not resolve the depency to libgmp.so, because cygwin ld assumes libs to end in .a, .lib or .dll, and will append them to .so libs, which thus can never be found.
Can I help to add support for this?

Yes, you can.

Depending on the target, set
ifneq $($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=
LIBEXT:=.a
SHREXT:=.so
endif
ifneq $($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.pear
LIBEXT:=.dunno
SHREXT:=.dylib
endif
ifneq $($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.exe
LIBEXT:=.dunno
SHREXT:=.dll
endif
ifneq $($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.exe
LIBEXT:=.dunno
SHREXT:=.dll
endif

in the toplevel Makefile, before the
all: world
target, and use them accordingly.

While you're at it, it would be awesome if you could deal with this too:
We want to be able to select which flavour of lib is built (shared or static) with a single config-option.
So, instead of changing all ".so" blindly to $(SHREXT), change it to $(LIBTGTEXT) which is set either to

ifeq $($(BR2_DEFAULT_LIB_TARGET),shared)
LIBTGTEXT=$(SHREXT)
else
LIBTGTEXT=$(LIBEXT)
endif

below the newly added block i mentioned above.

TIA and cheers,

#13 lore raw

[Buildroot] Package selection question

In reply to Tom
Quoted 3 lines · Tom

Thanks.

I am working to isolate and find a workaround to my mpfr problem on

See this for a real fix instead:
http://buildroot.uclibc.org/lists/buildroot/2007-May/002801.html

Quoted 24 lines

cygwin. Once I do, I will post the results of all workarounds I had to do (or the error log should I not get it done). In a separate thread as requested.

Quoted 18 lines · Bernhard Fischer
Quoted 8 lines · Tom

Hello,

I just want to build the toolchain and the debugger on host: cygwin,
target: arm.

So, even after I unchecked busybox and all packages, it still builds gmp (and, unsuccessfully, mpfr). Why does it need it please and why is this an option then? Or am I doing something wrong here?

gcc uses gmp/mpfr, you're doing nothing wrong. Please report build failures of gmp/mpfr to the respective lists.

Before you report it to the mpfr folks, please paste the error here, since i suspect that it could have to do something with the binary/library name extensions, which (IIRC) we currently do not handle at all (there's a bug somewhere about this, if memory serves me right).

#10 lore raw

[Buildroot] Package selection question

In reply to Bernhard Fischer

Bernhard,
All,

Quoted 4 lines · Bernhard Fischer
Quoted 2 lines · Yann E. MORIN

I don't have mpfr here and gcc-4.1.2 does build OK. I do have gmp, but gcc does not linked against it.

Fair enough, in 4.1, only the fortran frontend needs it.

So gmp and mpfr are needed for Fortran from 4.1 onward. I thought only 4.2 would need them. I didn't stumble upon this as I don't do Fortran...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< ?_? >==-- ?------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
?------------------------------?-------?------------------?--------------------?
author
#23 lore raw
In reply to Rod Boyce
Quoted 16 lines · Rod Boyce

All,

I have been adding ALSA to the build root package system I am only able to test on a x86 platform. Is anybody else interested in ALSA for build-root? I have also been adding libogg and libvorbis would it be OK if I submitted a combined patch or would you prefer 2 separate patches? Is anybody else working on this who would like an advanced copy to test out and or compare against?

This would include the following packages:
alsa-lib-1.0.14rc4
alsa-utils-1.0.14rc4
libogg-1.1.3
libvorbis-1.1.2

Quoted 8 lines

Regards,
Rod Boyce
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot

All,

As promised attached is a patch to add ALSA packages to build root I have only tested on i386 but it seems to work for me. This patch is against the latest SVN repository No. 18694. I have not tested the alsa-tools well and in-fact because I am not using X or GTK most will not compile I have disabled all the the ac3dec by default. Also I am assuming the latest version of ALSA and a compatible kernel.

Regards,
Rod Boyce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa.patch
Type: text/x-patch
Size: 23409 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070526/0dee6bb5/attachment.bin

#24 lore raw
Quoted 1 line · Rod Boyce

Rod Boyce wrote:

<cut intro about alsa patches>

Quoted 6 lines

As promised attached is a patch to add ALSA packages to build root I have only tested on i386 but it seems to work for me. This patch is against the latest SVN repository No. 18694. I have not tested the alsa-tools well and in-fact because I am not using X or GTK most will not compile I have disabled all the the ac3dec by default. Also I am assuming the latest version of ALSA and a compatible kernel.

I am working on the exactly same package (alsa + alsa-util) for buildroot, so far testing on an AVR32 platform.

Quoted 32 lines

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-lib/alsa-lib.mk package/alsa-lib/alsa-lib.mk
--- ../trunk/package/alsa-lib/alsa-lib.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-lib/alsa-lib.mk 2007-05-26 08:17:42.849975524
+0100

(quoted diff) +10 -0
@@ -0,0 +1,135 @@
+#############################################################
+#
+# ALSA library
+#
+#############################################################
+
+ALSA-LIB_VERSION=1.0.14rc4
+ALSA-LIB_SOURCE=alsa-lib-$(ALSA-LIB_VERSION).tar.bz2
+ALSA-LIB_SITE=ftp://ftp.alsa-project.org/pub/lib/
+ALSA-LIB_DIR=$(BUILD_DIR)/${shell basename

$(ALSA-LIB_SOURCE) .tar.bz2}

(quoted diff) +9 -0
+ALSA-LIB_WORKDIR=$(BUILD_DIR)/alsa-lib-$(ALSA-LIB_VERSION)
+ALSA-LIB_CAT:=$(BZCAT)
+ALLNKSTRGS :=
+
+$(DL_DIR)/$(ALSA-LIB_SOURCE):
+       $(WGET) -P $(DL_DIR) $(ALSA-LIB_SITE)/$(ALSA-LIB_SOURCE)
+
+$(ALSA-LIB_DIR)/.unpacked: $(DL_DIR)/$(ALSA-LIB_SOURCE)
+       $(ALSA-LIB_CAT) $(DL_DIR)/$(ALSA-LIB_SOURCE) | tar -C

$(BUILD_DIR) $(TAR_OPTIONS) -

(quoted diff) +3 -0
+       touch $(ALSA-LIB_DIR)/.unpacked
+
+$(ALSA-LIB_DIR)/.configured: $(ALSA-LIB_DIR)/.unpacked

Review

Quoted 10 lines
(quoted diff) +10 -0
+       (cd $(ALSA-LIB_DIR); rm -rf config.cache; \
+               $(TARGET_CONFIGURE_OPTS) \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --prefix=/usr \
+               --exec-prefix=/usr \
+               --sysconfdir=/etc \
+               --libdir=/lib \

Why /lib? I prefer user libraries in /usr/lib.

AFAIK specifying --prefix=/usr should be more than enough.

Review

Quoted 6 lines
(quoted diff) +6 -0
+               --datarootdir=$(STAGING_DIR)/usr/share \
+               --datadir=/usr/share \
+               --exec-prefix=/usr/bin \
+               --includedir=$(STAGING_DIR)/include \
+               --disable-docs \
+               --with-debug=yes \

Make this optional at least, I do not need debug symbols when it is working.

Quoted 14 lines
(quoted diff) +9 -0
+               $(DISABLE_NLS) \
+       );
+       touch $(ALSA-LIB_DIR)/.configured
+
+$(ALSA-LIB_WORKDIR)/src/libasound.la: $(ALSA-LIB_DIR)/.configured
+       rm -f $@
+       $(MAKE) CFLAGS=-g CC=$(TARGET_CC) -C $(ALSA-LIB_WORKDIR)
+
+$(STAGING_DIR)/lib/libasound.so.2.0.0:

$(ALSA-LIB_WORKDIR)/src/libasound.la

(quoted diff) +4 -0
+       $(MAKE) prefix=$(STAGING_DIR) \
+           exec_prefix=$(STAGING_DIR) \
+           bindir=$(STAGING_DIR)/bin \
+           sbindir=$(STAGING_DIR)/sbin \

Review

Quoted 10 lines
(quoted diff) +10 -0
+           libexecdir=$(STAGING_DIR)/bin \
+           datadir=$(STAGING_DIR)/share \
+           sysconfdir=$(STAGING_DIR)/etc \
+           sharedstatedir=$(STAGING_DIR)/com \
+           localstatedir=$(STAGING_DIR)/var \
+           libdir=$(STAGING_DIR)/lib \
+           includedir=$(STAGING_DIR)/include \
+           oldincludedir=$(STAGING_DIR)/include \
+           infodir=$(STAGING_DIR)/info \
+           mandir=$(STAGING_DIR)/man \

All these dir can easily be replaced with DESTDIR=$(STAGING_DIR).

Quoted 15 lines
(quoted diff) +4 -0
+           -C $(ALSA-LIB_DIR) install;
+       @touch -c $@
+
+$(TARGET_DIR)/lib/libasound.so.2.0.0:

$(STAGING_DIR)/lib/libasound.so.2.0.0

(quoted diff) +4 -0
+       @mkdir -p $(TARGET_DIR)/usr/share/alsa
+       @mkdir -p $(TARGET_DIR)/usr/lib/alsa-lib/smixer
+       cp -dpf $(STAGING_DIR)/lib/libasound.so* $(TARGET_DIR)/lib
+       cp -rdpf $(STAGING_DIR)/share/alsa/*

$(TARGET_DIR)/usr/share/alsa/
+ cp -rdpf $(STAGING_DIR)/lib/alsa-lib/*
$(TARGET_DIR)/usr/lib/alsa-lib/

(quoted diff) +2 -0
+       -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libasound.so*
+       -$(STRIP) --strip-unneeded

$(TARGET_DIR)/usr/lib/alsa-lib/smixer/smixer-*.so

Review

Quoted 5 lines
(quoted diff) +5 -0
+       @touch -c $(TARGET_DIR)/lib/libasound.so.2.0.0
+
+$(TARGET_DIR)/dev/dsp:
+       @(cd $(dir $@) && ln -sf dsp0 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/dsp

This is handled by mdev in busybox. And when using tmpfs on /dev this is not even visible for the filesystem. If these symlinks are needed, I think they should added to target/ instead.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/adsp:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf adsp0 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/adsp

Same as above.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/sequencer2:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf music $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/sequencer2

Same as above.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/amidi:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf amidi0 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/amidi

Same as above.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/audio:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf audio0 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/audio

Same as above.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/midi:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf midi00 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/midi

Same as above.

Review

Quoted 3 lines

+$(TARGET_DIR)/dev/mixer:

(quoted diff) +2 -0
+       @(cd $(dir $@) && ln -sf mixer0 $(notdir $@))
+ALLNKSTRGS += $(TARGET_DIR)/dev/mixer

Same as above.

Quoted 47 lines

+$(TARGET_DIR)/usr/lib/libasound.la:
$(STAGING_DIR)/lib/libasound.so.2.0.0

(quoted diff) +4 -0
+       @mkdir -p $(TARGET_DIR)/usr/include/alsa/sound
+       @mkdir -p $(TARGET_DIR)/usr/include/sys
+       cp -rdpf $(STAGING_DIR)/include/alsa $(TARGET_DIR)/usr/include
+       cp -dpf $(STAGING_DIR)/include/sys/asoundlib.h

$(TARGET_DIR)/usr/include/sys/

(quoted diff) +28 -0
+       cp -dpf $(STAGING_DIR)/lib/libasound.la $(TARGET_DIR)/usr/lib/
+       @touch -c $(TARGET_DIR)/usr/lib/libasound.la
+
+alsa-lib-headers: $(TARGET_DIR)/usr/lib/libasound.la
+
+alsa-lib: linux26 $(TARGET_DIR)/lib/libasound.so.2.0.0 $(ALLNKSTRGS)
+
+alsa-lib-source: $(DL_DIR)/$(ALSA-LIB_SOURCE)
+
+alsa-lib-clean:
+       @if [ -d $(ALSA-LIB_WORKDIR)/Makefile ] ; then \
+               $(MAKE) -C $(ALSA-LIB_WORKDIR) clean ; \
+       fi;
+
+alsa-lib-dirclean:
+       rm -rf $(ALSA-LIB_DIR) $(ALSA-LIB_WORKDIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB)),y)
+TARGETS+=alsa-lib
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB_TARGET_HEADERS)),y)
+TARGETS+=alsa-lib-headers
+endif

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-lib/Config.in package/alsa-lib/Config.in
--- ../trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100
+++ package/alsa-lib/Config.in 2007-05-07 18:16:23.220365544 +0100

(quoted diff) +5 -0
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_ALSA-LIB
+       bool "alsa-lib"
+       default n
+       help
+         Advanced Linux Sound Architecture

Review line 15

Quoted 10 lines
(quoted diff) +10 -0
+
+         http://www.alsa-project.org/
+
+config BR2_PACKAGE_ALSA-LIB_TARGET_HEADERS
+       bool "alsa-lib headers in target"
+       default n
+       depends on BR2_PACKAGE_ALSA-LIB
+       help
+         Put headers files in the target.
+

<cut alsa-tools Makefile and Config.in>

Review line 3

Quoted 11 lines

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-utils/alsa-utils.mk package/alsa-utils/alsa-utils.mk
--- ../trunk/package/alsa-utils/alsa-utils.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-utils/alsa-utils.mk 2007-05-13 10:25:35.339532842
+0100

(quoted diff) +3 -0
@@ -0,0 +1,114 @@
+#############################################################
+#
+# ALSA Tools

Copy-paste (-:

Quoted 88 lines
(quoted diff) +6 -0
+#
+#############################################################
+ALSA-UTILS_VERSION=1.0.14rc4
+ALSA-UTILS_SOURCE=alsa-utils-$(ALSA-UTILS_VERSION).tar.bz2
+ALSA-UTILS_SITE=ftp://ftp.alsa-project.org/pub/utils/
+ALSA-UTILS_DIR=$(BUILD_DIR)/${shell basename

$(ALSA-UTILS_SOURCE) .tar.bz2}

(quoted diff) +42 -0
+ALSA-UTILS_WORKDIR=$(BUILD_DIR)/alsa-utils-$(ALSA-UTILS_VERSION)
+ALSA-UTILS_CAT:=$(BZCAT)
+
+AU_TOOLS :=
+AU_BIN := 
+AU_SBIN := 
+
+AUTOOLS += aplay/aplay
+AUTOOLS += aplay/arecord
+AUTOOLS += alsaconf/alsaconf
+AUTOOLS += alsactl/alsactl
+AUTOOLS += alsamixer/alsamixer
+AUTOOLS += amidi/amidi
+AUTOOLS += amixer/amixer
+AUTOOLS += seq/aplaymidi/arecordmidi
+AUTOOLS += seq/aseqdump/aseqdump
+AUTOOLS += seq/aseqnet/aseqnet
+AUTOOLS += iecset/iecset
+AUTOOLS += speaker-test/speaker-test
+
+AUBIN += aconnect
+AUBIN += alsamixer
+AUBIN += amidi
+AUBIN += amixer
+AUBIN += aplay
+AUBIN += aplaymidi
+AUBIN += arecord
+AUBIN += arecordmidi
+AUBIN += aseqdump
+AUBIN += aseqnet
+AUBIN += iecset
+AUBIN += speaker-test
+
+AUSBIN += alsaconf
+AUSBIN += alsactl
+
+
+$(DL_DIR)/$(ALSA-UTILS_SOURCE):
+       $(WGET) -P $(DL_DIR) $(ALSA-UTILS_SITE)/$(ALSA-UTILS_SOURCE)
+
+$(ALSA-UTILS_DIR)/.unpacked: $(DL_DIR)/$(ALSA-UTILS_SOURCE)
+       $(ALSA-UTILS_CAT) $(DL_DIR)/$(ALSA-UTILS_SOURCE) | tar -C

$(BUILD_DIR) $(TAR_OPTIONS) -

(quoted diff) +22 -0
+       touch $(ALSA-UTILS_DIR)/.unpacked
+
+$(ALSA-UTILS_DIR)/.configured: $(ALSA-UTILS_DIR)/.unpacked
+       (cd $(ALSA-UTILS_DIR); rm -rf config.cache; \
+               $(TARGET_CONFIGURE_OPTS) \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --disable-docs \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+        --disable-alsatest \
+               $(DISABLE_NLS) \
+               --exec-prefix=$(STAGING_DIR)/usr/bin \
+               --libdir=$(STAGING_DIR)/lib \
+               --includedir=$(STAGING_DIR)/include \
+               --datadir=$(STAGING_DIR)/usr/share \
+       );
+       touch $(ALSA-UTILS_DIR)/.configured
+
+$(addprefix $(ALSA-UTILS_WORKDIR)/,$(AUTOOLS)):

$(ALSA-UTILS_DIR)/.configured

(quoted diff) +4 -0
+       $(MAKE) CC=$(TARGET_CC) -C $(ALSA-UTILS_WORKDIR)
+
+
+$(addprefix $(STAGING_DIR)/,$(addprefix bin/,$(AUBIN)) $(addprefix

sbin/,$(AUSBIN))): $(addprefix $(ALSA-UTILS_WORKDIR)/,$(AUTOOLS))

(quoted diff) +3 -0
+       $(MAKE) prefix=$(STAGING_DIR) exec_prefix=$(STAGING_DIR) \
+           bindir=$(STAGING_DIR)/bin sbindir=$(STAGING_DIR)/sbin \
+           libexecdir=$(STAGING_DIR)/bin datadir=$(STAGING_DIR)/share

\
+ sysconfdir=$(STAGING_DIR)/etc sharedstatedir=
$(STAGING_DIR)/com \
+ localstatedir=$(STAGING_DIR)/var libdir=$(STAGING_DIR)/lib
\
+ includedir=$(STAGING_DIR)/include oldincludedir=
$(STAGING_DIR)/include \

Review

Quoted 2 lines
(quoted diff) +2 -0
+           infodir=$(STAGING_DIR)/info mandir=$(STAGING_DIR)/man \
+           -C $(ALSA-UTILS_DIR) install;

Use DESTDIR=$(STAGING_DIR) instead.

Quoted 70 lines
(quoted diff) +3 -0
+       touch -c $@
+
+$(addprefix $(TARGET_DIR)/,$(addprefix usr/bin/,$(AUBIN)) $(addprefix

usr/sbin/,$(AUSBIN))): $(addprefix $(STAGING_DIR)/,$(addprefix bin/, $(AUBIN)) $(addprefix sbin/,$(AUSBIN)))

(quoted diff) +3 -0
+       @mkdir -p $(TARGET_DIR)/usr/bin
+       @mkdir -p $(TARGET_DIR)/usr/sbin
+       cp -dpf $(filter $(STAGING_DIR)/bin/%, $^)

$(TARGET_DIR)/usr/bin/
+ cp -dpf $(filter $(STAGING_DIR)/sbin/%, $^)
$(TARGET_DIR)/usr/sbin/

(quoted diff) +5 -0
+       -$(STRIP) --strip-unneeded $@ > /dev/null 2>&1
+       touch -c $@
+
+
+alsa-utils: uclibc alsa-lib $(addprefix $(TARGET_DIR)/,$(addprefix

usr/bin/,$(AUBIN)) $(addprefix usr/sbin/,$(AUSBIN)))

(quoted diff) +17 -0
+
+alsa-utils-clean:
+       @if [ -d $(ALSA-UTILS_WORKDIR)/Makefile ] ; then \
+               $(MAKE) -C $(ALSA-UTILS_WORKDIR) clean ; \
+       fi;
+
+alsa-utils-dirclean:
+       rm -rf $(ALSA-UTILS_DIR) $(ALSA-UTILS_WORKDIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ALSA-UTILS)),y)
+TARGETS+=alsa-utils
+endif

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-utils/Config.in package/alsa-utils/Config.in
--- ../trunk/package/alsa-utils/Config.in 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-utils/Config.in 2007-05-07 22:13:02.134609691
+0100

(quoted diff) +8 -0
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_ALSA-UTILS
+       bool "alsa-utils"
+       default n
+       help
+         Utilities from Advanced Linux Sound Architecture
+
+         http://www.alsa-project.org/
+

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/Config.in package/Config.in

Config.in 2007-05-25 15:22:03.475398547 +0100 renamed from trunk/package/Config.in 2007-05-25 17:08:32.583594165 +0100 +3 -0
@@ -239,12 +239,15 @@
          Support for audio libraries and applications
 
 if BR2_AUDIO_SUPPORT
+source "package/alsa-lib/Config.in"
+source "package/alsa-tools/Config.in"
+source "package/alsa-utils/Config.in"
 source "package/asterisk/Config.in"
 source "package/libid3tag/Config.in"
 source "package/libmad/Config.in"
 source "package/libsndfile/Config.in"
 source "package/madplay/Config.in"
 source "package/mpg123/Config.in"
 endif
 
 menuconfig BR2_GRAPHIC_SUPPORT
Signature · 7 lines
With kind regards,

Hans-Christian Egtvedt, siv.ing. (M.Sc.)
Applications Engineer - AVR32 System Solutions - Atmel Norway
-- 
Mvh
Hans-Christian Egtvedt
#25 lore raw
Quoted 2 lines · Hans-Christian Egtvedt
Quoted 1 line · Rod Boyce

Rod Boyce wrote:

Rod, care t osend an updated patch taking Hans-Christian's comments (thanks for those!) into account?

TIA,

#28 lore raw
In reply to Hans-Christian Egtvedt
Quoted 26 lines · Hans-Christian Egtvedt
Quoted 1 line · Rod Boyce

Rod Boyce wrote:

<cut intro about alsa patches>

Quoted 6 lines

As promised attached is a patch to add ALSA packages to build root I have only tested on i386 but it seems to work for me. This patch is against the latest SVN repository No. 18694. I have not tested the alsa-tools well and in-fact because I am not using X or GTK most will not compile I have disabled all the the ac3dec by default. Also I am assuming the latest version of ALSA and a compatible kernel.

I am working on the exactly same package (alsa + alsa-util) for buildroot, so far testing on an AVR32 platform.

Quoted 11 lines

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-lib/alsa-lib.mk package/alsa-lib/alsa-lib.mk
--- ../trunk/package/alsa-lib/alsa-lib.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-lib/alsa-lib.mk 2007-05-26 08:17:42.849975524
+0100

(quoted diff) +3 -0
@@ -0,0 +1,135 @@
+#############################################################
+#
+# ALSA library
Quoted 8 lines
Quoted 8 lines
(quoted diff) +7 -0
+#
+#############################################################
+
+ALSA-LIB_VERSION=1.0.14rc4
+ALSA-LIB_SOURCE=alsa-lib-$(ALSA-LIB_VERSION).tar.bz2
+ALSA-LIB_SITE=ftp://ftp.alsa-project.org/pub/lib/
+ALSA-LIB_DIR=$(BUILD_DIR)/${shell basename

$(ALSA-LIB_SOURCE) .tar.bz2}

And please don't forget to strip this basename nonsense off.

thanks,

author
#29 lore raw
Quoted 43 lines · Bernhard Fischer
Quoted 30 lines · Hans-Christian Egtvedt
Quoted 2 lines · Rod Boyce

Rod Boyce wrote:

<cut intro about alsa patches>

Quoted 7 lines

As promised attached is a patch to add ALSA packages to build root I have only tested on i386 but it seems to work for me. This patch is against the latest SVN repository No. 18694. I have not tested the alsa-tools well and in-fact because I am not using X or GTK most will not compile I have disabled all the the ac3dec by default. Also I am assuming the latest version of ALSA and a compatible kernel.

I am working on the exactly same package (alsa + alsa-util) for buildroot, so far testing on an AVR32 platform.

Quoted 12 lines

diff -Nu --recursive --exclude=.svn --exclude=config --exclude=libogg --exclude=libvorbis ../trunk/package/alsa-lib/alsa-lib.mk package/alsa-lib/alsa-lib.mk
--- ../trunk/package/alsa-lib/alsa-lib.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-lib/alsa-lib.mk 2007-05-26 08:17:42.849975524
+0100

(quoted diff) +4 -0
@@ -0,0 +1,135 @@
+#############################################################
+#
+# ALSA library
+#
Quoted 8 lines
Quoted 8 lines
(quoted diff) +6 -0
+#############################################################
+
+ALSA-LIB_VERSION=1.0.14rc4
+ALSA-LIB_SOURCE=alsa-lib-$(ALSA-LIB_VERSION).tar.bz2
+ALSA-LIB_SITE=ftp://ftp.alsa-project.org/pub/lib/
+ALSA-LIB_DIR=$(BUILD_DIR)/${shell basename

$(ALSA-LIB_SOURCE) .tar.bz2}

And please don't forget to strip this basename nonsense off.

Quoted 3 lines

thanks,

All,

As usually happens when sending this stuff out I did not tidy it as much as I would have liked. I will be happy to make some of the changes. But firstly I started out using usr/lib for the libraries but noticed that some libraries had been flattened to just /lib so this is what I did for the ALSA stuff in the staging dir.

Also a comment about basename nonsense might make sense if you have been working with build-root for many months and know every part inside out. But I have been using build root at home in my spare time which consists of about the last 6-weekends so please explain what you mean by basename? I am happy to comply with a more modern standard if I know what it is. I think I might have used zlib as my starting point when I firstly started compiled to get the ALSA lib library integrated into build root. This might explain some of the interesting coding in the patch.

Regards,
Rod Boyce

#18 lore raw

[Buildroot] mpfr error on cygwin for arm

In reply to Bernhard Fischer

Hi Bernhard, All

Enclosed is cygwin-1.patch for buildroot-20050524.tar.bz2.

- requires cygwin 1.5.24 with development package

- configure buildroot for arm, arm-generic, eabi, "pc-cygwin", uclibc-0.9.29, buildroot toolchain with gcc 4.1.2

- FIRST do one build attempt (will fail, just to get and extract uclibc)

- apply cygwin-1.patch with p1 (it is at very bottom of this email)

- THEN do another build attempt, which will build gmp, mpfr, newlib and arm-linux-uclibcgnueabi-gcc-4.1.2.exe before failing (*).

Thanks
Tom

PS: if someone could take care of the apple part, that would be great. Also, the one fix belongs to uclibc and not to buildroot...

(*) it fails when cross compiling uclibc, maybe my UCLIBC options? Hints appreciated, need this to test on target.

make MAKE="make -j1" -C /tw/buildroot/toolchain_build_arm/uClibc-0.9.29

\
                 PREFIX= \
                 DEVEL_PREFIX=/ \
                 RUNTIME_PREFIX=/ \
                 HOSTCC="gcc" \
                 all

arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[1]: Entering directory /tw/buildroot/toolchain_build_arm/uClibc-0.9.29' arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[2]: conf' is up to date.
arm-linux-uclibcgnueabi-gcc: n: No such file or directory
CC ldso/ldso/ldso.oS
arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[1]: *** [ldso/ldso/ldso.oS] Error 1
make[1]: Leaving directory `/tw/buildroot/toolchain_build_arm/uClibc-0.9.29'
make: *** [/tw/buildroot/toolchain_build_arm/uClibc-0.9.29/lib/libc.a] Error 2

Quoted 60 lines · Bernhard Fischer
Quoted 11 lines · Tom

Hi Bernhard and all,

sorry if this thread is a little out of sequence, had problems with text attachment.

Quoted 5 lines · Bernhard Fischer

Before you report it to the mpfr folks, please paste the error here, since i suspect that it could have to do something with the binary/library name extensions, which (IIRC) we currently do not handle at all (there's a bug somewhere about this, if memory serves me right).

Quoted 6 lines

You were right about extensions, below is the error as produced by buildroot-20050516 built, I just added -verbose for ld.
It can not resolve the depency to libgmp.so, because cygwin ld assumes libs to end in .a, .lib or .dll, and will append them to .so libs, which thus can never be found.
Can I help to add support for this?

Yes, you can.

Depending on the target, set
ifneq $($(findstring linux,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=
LIBEXT:=.a
SHREXT:=.so
endif
ifneq $($(findstring apple,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.pear
LIBEXT:=.dunno
SHREXT:=.dylib
endif
ifneq $($(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.exe
LIBEXT:=.dunno
SHREXT:=.dll
endif
ifneq $($(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)),) EXEEXT:=.exe
LIBEXT:=.dunno
SHREXT:=.dll
endif

in the toplevel Makefile, before the
all: world
target, and use them accordingly.

While you're at it, it would be awesome if you could deal with this too:
We want to be able to select which flavour of lib is built (shared or static) with a single config-option.
So, instead of changing all ".so" blindly to $(SHREXT), change it to $(LIBTGTEXT) which is set either to

ifeq $($(BR2_DEFAULT_LIB_TARGET),shared)
LIBTGTEXT=$(SHREXT)
else
LIBTGTEXT=$(LIBEXT)
endif

Quoted 4 lines

below the newly added block i mentioned above.

TIA and cheers,

cygwin-1.patch:

Makefile +25 -0
@@ -66,7 +66,32 @@
  #
  #############################################################
 
+ifneq (,$(findstring linux,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=
+LIBEXT:=.a
+SHREXT:=.so
+endif
+ifneq (,$(findstring apple,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.pear
+LIBEXT:=.dunno
+SHREXT:=.dylib
+endif
+ifneq (,$(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.exe
+LIBEXT:=.lib
+SHREXT:=.dll
+endif
+ifneq (,$(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.exe
+LIBEXT:=.lib
+SHREXT:=.dll
+endif
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIBTGTEXT=$(LIBEXT)
+else
+LIBTGTEXT=$(SHREXT)
+endif
 
  all:   world
 
Config.in +13 -0
@@ -373,6 +373,19 @@
  	help
  	  This option hides outdated/obsolete versions of packages.
 
+config BR2_PREFER_STATIC_LIB
+	bool "prefer static libraries"
+	default n
+	help
+	  Where possible, use static libraries.
+	  This increases your code size a lot and should only be
+	  used with a good reason why not use the default, which
+	  is dynamic libraries.
+
+	  If unsure, say No.
+
+	  WARNING: This is highly experimental at the moment.
+
  endmenu
 
  source "toolchain/Config.in"
package/gmp/gmp.mk +16 -3
@@ -18,6 +18,18 @@
  GMP_BE:=no
  endif
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+GMP_LIB_FLAGS:=--enable-static --disable-shared
+else
+GMP_LIB_FLAGS:=--disable-static --enable-shared
+endif
+
+ifeq ($(EXEEXT),".exe")
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+else
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+endif
+
  $(DL_DIR)/$(GMP_SOURCE):
  	 $(WGET) -P $(DL_DIR) $(GMP_SITE)/$(GMP_SOURCE)
 
@@ -35,6 +47,7 @@
  		$(TARGET_CONFIGURE_OPTS) \
  		CFLAGS="$(TARGET_CFLAGS)" \
  		LDFLAGS="$(TARGET_LDFLAGS)" \
+		CPPFLAGS="$(GMP_CPP_FLAGS)" \
  		ac_cv_c_bigendian=$(GMP_BE) \
  		$(GMP_DIR)/configure \
  		--target=$(GNU_TARGET_NAME) \
@@ -52,7 +65,7 @@
  		--includedir=/include \
  		--mandir=/usr/man \
  		--infodir=/usr/info \
-		--enable-shared \
+		$(GMP_LIB_FLAGS) \
  		$(DISABLE_NLS) \
  	);
  	touch $@
@@ -105,12 +118,12 @@
  		CC_FOR_BUILD="$(HOSTCC)" \
  		CC="$(HOSTCC)" \
  		CFLAGS="$(HOST_CFLAGS)" \
+		CPPFLAGS="$(GMP_CPP_FLAGS)" \
  		$(GMP_DIR)/configure \
  		--prefix="$(GMP_HOST_DIR)" \
  		--build=$(GNU_HOST_NAME) \
  		--host=$(GNU_HOST_NAME) \
-		--enable-shared \
-		--enable-static \
+		$(GMP_LIB_FLAGS) \
  		$(DISABLE_NLS) \
  	);
  	touch $@

---
buildroot.orig/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile

2007-04-17 04:38:21.000000000 -0700
+++ buildroot/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile 
2007-05-29 19:34:47.200380600 -0700

@@ -21,7 +21,7 @@
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $< -o $@

$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
- $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $($@-objs) -o $@
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $($@-objs) -lintl -o $@

  $(host-cobjs): %.o: %.c
  	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@
#19 lore raw

[Buildroot] mpfr error on cygwin for arm

Quoted 3 lines · Tom

Hi Bernhard, All

Enclosed is cygwin-1.patch for buildroot-20050524.tar.bz2.

Thanks for doing this!

Quoted 43 lines

- requires cygwin 1.5.24 with development package

- configure buildroot for arm, arm-generic, eabi, "pc-cygwin", uclibc-0.9.29, buildroot toolchain with gcc 4.1.2

- FIRST do one build attempt (will fail, just to get and extract uclibc)

- apply cygwin-1.patch with p1 (it is at very bottom of this email)

- THEN do another build attempt, which will build gmp, mpfr, newlib and arm-linux-uclibcgnueabi-gcc-4.1.2.exe before failing (*).

Thanks
Tom

PS: if someone could take care of the apple part, that would be great. Also, the one fix belongs to uclibc and not to buildroot...

(*) it fails when cross compiling uclibc, maybe my UCLIBC options? Hints appreciated, need this to test on target.

make MAKE="make -j1" -C /tw/buildroot/toolchain_build_arm/uClibc-0.9.29

\
               PREFIX= \
               DEVEL_PREFIX=/ \
               RUNTIME_PREFIX=/ \
               HOSTCC="gcc" \
               all

arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[1]: Entering directory /tw/buildroot/toolchain_build_arm/uClibc-0.9.29' arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[2]: conf' is up to date.
arm-linux-uclibcgnueabi-gcc: n: No such file or directory
CC ldso/ldso/ldso.oS
arm-linux-uclibcgnueabi-gcc: n: No such file or directory make[1]: *** [ldso/ldso/ldso.oS] Error 1
make[1]: Leaving directory `/tw/buildroot/toolchain_build_arm/uClibc-0.9.29'
make: *** [/tw/buildroot/toolchain_build_arm/uClibc-0.9.29/lib/libc.a] Error 2

[snip]

Quoted 4 lines

cygwin-1.patch:

Makefile +0 -0

[snip]

package/gmp/gmp.mk line 25

Quoted 12 lines

source "toolchain/Config.in"

package/gmp/gmp.mk +0 -0
@@ -18,6 +18,18 @@

GMP_BE:=no
endif

package/gmp/gmp.mk +5 -0
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+GMP_LIB_FLAGS:=--enable-static --disable-shared
+else
+GMP_LIB_FLAGS:=--disable-static --enable-shared
+endif

Better put this into the toolchain/Makefile.in, like:
+ifeq ($(BR2_PREFER_STATIC_LIB),y) +BR2_SHARED_LIBS:=--enable-static --disable-shared +else
+BR2_SHARED_LIBS:=--disable-static --enable-shared +endif
and use ./configure $(BR2_SHARED_LIBS) ...

package/gmp/gmp.mk line 31

Quoted 6 lines
package/gmp/gmp.mk +6 -0
+
+ifeq ($(EXEEXT),".exe")
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+else
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+endif

This can't be right.
[snip]

Quoted 12 lines

buildroot.orig/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile

2007-04-17 04:38:21.000000000 -0700
+++ buildroot/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile 
2007-05-29 19:34:47.200380600 -0700
package/gmp/gmp.mk +0 -0
@@ -21,7 +21,7 @@
 	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) 

$(HOST_LOADLIBES) $< -o $@

$(host-cmulti): %: $(host-cobjs) $(host-cshlib)

package/gmp/gmp.mk +0 -1
-	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) 

$(HOST_LOADLIBES) $($@-objs) -o $@

package/gmp/gmp.mk +1 -0
+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) 
Quoted 1 line

$(HOST_LOADLIBES) $($@-objs) -lintl -o $@

Shouldn't this libintel rather go into HOST_LOADLIBES for windows?

#20 lore raw

[Buildroot] mpfr error on cygwin for arm

Hi Bernhard,

will do changes below.

Quoted 7 lines · Bernhard Fischer

Better put this into the toolchain/Makefile.in, like:

Makefile +5 -0
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+BR2_SHARED_LIBS:=--enable-static --disable-shared
+else
+BR2_SHARED_LIBS:=--disable-static --enable-shared
+endif

and use ./configure $(BR2_SHARED_LIBS) ...

will try this.

Quoted 9 lines

package/gmp/gmp.mk line 31

Quoted 7 lines
package/gmp/gmp.mk +6 -0
+
+ifeq ($(EXEEXT),".exe")
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+else
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+endif

This can't be right.

True. The non-.exe case should be empty, sorry.

Quoted 10 lines

[snip]

Quoted 8 lines

buildroot.orig/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile

2007-04-17 04:38:21.000000000 -0700
+++ buildroot/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile
2007-05-29 19:34:47.200380600 -0700
(quoted diff) +0 -0
@@ -21,7 +21,7 @@
 	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)

$(HOST_LOADLIBES) $< -o $@

Quoted 7 lines
Quoted 5 lines

$(host-cmulti): %: $(host-cobjs) $(host-cshlib)

(quoted diff) +0 -1
-	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)

$(HOST_LOADLIBES) $($@-objs) -o $@

(quoted diff) +1 -0
+	$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)

$(HOST_LOADLIBES) $($@-objs) -lintl -o $@

Shouldn't this libintel rather go into HOST_LOADLIBES for windows?

It seems there is an issue with the sequence. (Just moving this -lintl before the $($@-objs) caused it to fail.)

author
#26 lore raw

[Buildroot] ALSA for build root Part 2

In reply to Bernhard Fischer
Quoted 4 lines · Bernhard Fischer
Quoted 2 lines · Hans-Christian Egtvedt

On Sat, 2007-05-26 at 15:45 +0100, Rod Boyce wrote:

Quoted 9 lines
Quoted 2 lines
Quoted 2 lines

Rod Boyce wrote:

Rod, care t osend an updated patch taking Hans-Christian's comments (thanks for those!) into account?

TIA,

All,

Attached is an updated patch that does not offend the sensibilities of other ALSA people working on build root. This is just alsa-lib and alsa-utils I will send out a patch for more alsa stuff latter. This outputs to $(STAGING_DIR)/usr/lib which on my build happens to be a link back to $(STAGING_DIR)/lib. I have also removed the device links that I was putting in the dev directory I had not removed this since I switched over to udev. Just --prefix=/usr did not fix all paths all of the time although I think that I have the minimum custom options for configure and install targets for both utilities and library makefile fragments now. I also figured out what the "basename nonsense" was and while I approve of the intent I used a more makefile way of doing the same thing.

Hopefully this is a more acceptable patch, if anybody has some more suggestions then perhaps they would like to contribute their own ALSA patch's so we can either pick the best or merge and get the best of both worlds and produce a better build-root system.

Regards,
Rod Boyce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa.patch
Type: text/x-patch
Size: 8564 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070530/bcc6f0ad/attachment.bin

#21 lore raw

[Buildroot] mpfr error on cygwin for arm

In reply to Bernhard Fischer

Hi Bernhard,

Below is cygwin-2.patch, which takes your recommendations into account, proceedings for cygwin-1.patch still apply.

Another issue I ran into now is the following for building the host gdb.exe, let me know if this is worth a separate thread:

make[1]: Leaving directory `/tw/buildroot/toolchain_build_arm/gdbhost-6.6'
strip /tw/buildroot/toolchain_build_arm/gdbhost-6.6/gdb/gdb
strip: /tw/buildroot/toolchain_build_arm/gdbhost-6.6/gdb/gdb: No such file or directory
make: *** [/tw/buildroot/toolchain_build_arm/gdbhost-6.6/gdb/gdb] Error 1

The problem is that gdbhost-6.6/gdb/gdb does not exist. gdbhost-6.6/gdb/gdb.exe does exist (and works fine) and should not be stripped. Where should the cygwin exclusion for this happen?

Thanks
Tom

cygwin-2.patch
--------------

Makefile +25 -0
@@ -66,7 +66,32 @@
  #
  #############################################################
 
+ifneq (,$(findstring linux,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=
+LIBEXT:=.a
+SHREXT:=.so
+endif
+ifneq (,$(findstring apple,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.pear
+LIBEXT:=.dunno
+SHREXT:=.dylib
+endif
+ifneq (,$(findstring cygwin,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.exe
+LIBEXT:=.lib
+SHREXT:=.dll
+endif
+ifneq (,$(findstring mingw,$(BR2_GNU_BUILD_SUFFIX)))
+EXEEXT:=.exe
+LIBEXT:=.lib
+SHREXT:=.dll
+endif
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+LIBTGTEXT=$(LIBEXT)
+else
+LIBTGTEXT=$(SHREXT)
+endif
 
  all:   world
 
Config.in +13 -0
@@ -373,6 +373,19 @@
  	help
  	  This option hides outdated/obsolete versions of packages.
 
+config BR2_PREFER_STATIC_LIB
+	bool "prefer static libraries"
+	default n
+	help
+	  Where possible, use static libraries.
+	  This increases your code size a lot and should only be
+	  used with a good reason why not use the default, which
+	  is dynamic libraries.
+
+	  If unsure, say No.
+
+	  WARNING: This is highly experimental at the moment.
+
  endmenu
 
  source "toolchain/Config.in"

--- buildroot.orig/toolchain/Makefile.in 2007-05-24
00:15:08.000000000 -0700
+++ buildroot/toolchain/Makefile.in 2007-05-30 19:30:26.858173300
-0700
@@ -10,6 +10,12 @@
MULTILIB:=--disable-multilib
endif

+ifeq ($(BR2_PREFER_STATIC_LIB),y) +PREFERRED_LIB_FLAGS:=--enable-static --disable-shared +else
+PREFERRED_LIB_FLAGS:=--disable-static --enable-shared +endif
+

# FIXME -- this is temporary
OPTIMIZE_FOR_CPU=$(ARCH)
---
buildroot.orig/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile

2007-04-17 04:38:21.000000000 -0700
+++ buildroot/toolchain_build_arm/uClibc-0.9.29/extra/config/Makefile
2007-05-29 19:34:47.200380600 -0700

@@ -21,7 +21,7 @@
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $< -o $@

$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
- $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $($@-objs) -o $@
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@)
$(HOST_LOADLIBES) $($@-objs) -lintl -o $@

$(host-cobjs): %.o: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c
$< -o $@
--- buildroot.orig/package/gmp/gmp.mk 2007-05-24 00:15:24.000000000
-0700
+++ buildroot/package/gmp/gmp.mk 2007-05-30 20:56:55.313191500
-0700
@@ -18,6 +18,14 @@
GMP_BE:=no
endif

+# this is a workaround for a bug in GMP, please see
+# http://gmplib.org/list-archives/gmp-devel/2006-April/000618.html
+ifeq ($(EXEEXT),.exe)
+GMP_CPP_FLAGS:=-DDLL_EXPORT
+else
+GMP_CPP_FLAGS:=
+endif
+
$(DL_DIR)/$(GMP_SOURCE):
$(WGET) -P $(DL_DIR) $(GMP_SITE)/$(GMP_SOURCE)

@@ -35,6 +43,7 @@
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
+ CPPFLAGS="$(GMP_CPP_FLAGS)" \
ac_cv_c_bigendian=$(GMP_BE) \
$(GMP_DIR)/configure \
--target=$(GNU_TARGET_NAME) \
@@ -52,7 +61,7 @@
--includedir=/include \
--mandir=/usr/man \
--infodir=/usr/info \
- --enable-shared \
+ $(PREFERRED_LIB_FLAGS) \
$(DISABLE_NLS) \
);
touch $@
@@ -105,12 +114,12 @@
CC_FOR_BUILD="$(HOSTCC)" \
CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
+ CPPFLAGS="$(GMP_CPP_FLAGS)" \
$(GMP_DIR)/configure \
--prefix="$(GMP_HOST_DIR)" \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
- --enable-shared \
- --enable-static \
+ $(PREFERRED_LIB_FLAGS) \
$(DISABLE_NLS) \
);
touch $@

#27 lore raw

[Buildroot] ALSA for build root Part 2

In reply to Rod Boyce
Quoted 2 lines · Rod Boyce
Quoted 1 line · Bernhard Fischer

On Tue, May 29, 2007 at 09:03:12AM +0200, Hans-Christian Egtvedt wrote:

<cut>

Quoted 5 lines

Attached is an updated patch that does not offend the sensibilities of other ALSA people working on build root. This is just alsa-lib and alsa-utils I will send out a patch for more alsa stuff latter. This outputs to $(STAGING_DIR)/usr/lib which on my build happens to be a link back to $(STAGING_DIR)/lib.

Same here, AFAIK it is supposed to be that way.

Quoted 6 lines

I have also removed the device links that I
was putting in the dev directory I had not removed this since I switched over to udev. Just --prefix=/usr did not fix all paths all of the time although I think that I have the minimum custom options for configure and install targets for both utilities and library makefile fragments now.

Weird, what prefixes are not correct? I only have to give --prefix=/usr and --sysconfdir=/etc .

Quoted 7 lines

I also figured out what the "basename nonsense" was and while I approve of the intent I used a more makefile way of doing the same thing.

Hopefully this is a more acceptable patch, if anybody has some more suggestions then perhaps they would like to contribute their own ALSA patch's so we can either pick the best or merge and get the best of both worlds and produce a better build-root system.

Comments below.

Quoted 7 lines

diff -uN --recursive ../trunk/package/alsa-lib/alsa-lib.mk package/alsa-lib/alsa-lib.mk
--- ../trunk/package/alsa-lib/alsa-lib.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-lib/alsa-lib.mk 2007-05-30 22:58:14.604803783
+0100

Review line 7

Quoted 7 lines
(quoted diff) +7 -0
@@ -0,0 +1,95 @@
+#############################################################
+#
+# ALSA library
+#
+#############################################################
+
+ALSA-LIB_VERSION := 1.0.14rc4

Same as for alsa-tools, I prefer the ALSA_LIB_VERSION, all underscores.

Review line 10

Quoted 3 lines
(quoted diff) +3 -0
+ALSA-LIB_SOURCE := alsa-lib-$(ALSA-LIB_VERSION).tar.bz2
+ALSA-LIB_SITE := ftp://ftp.alsa-project.org/pub/lib/
+ALSA-LIB_DIR := $(BUILD_DIR)/$(patsubst %.tar.bz2,%,$(ALSA-LIB_SOURCE))

Again, I prefer the all written approach, to easier see what the variable is.

Review line 12

Quoted 2 lines
(quoted diff) +2 -0
+ALSA-LIB_CAT := $(BZCAT)
+ALSA-LIB_PATH := /usr/lib

usr/lib, skip leading /

Review line 16

Quoted 4 lines
(quoted diff) +4 -0
+ALSA-LIB_DEBUG := yes
+ifneq ($(BR2_PACKAGE_ALSA-LIB_DEBUG_ENABLE),y)
+ALSA-LIB_DEBUG := no
+endif

Nice, but better to set them as "--with-debug" or "--without-debug" and append them to the ./configure.

Quoted 8 lines
(quoted diff) +5 -0
+$(DL_DIR)/$(ALSA-LIB_SOURCE):
+       $(WGET) -P $(DL_DIR) $(ALSA-LIB_SITE)/$(ALSA-LIB_SOURCE)
+
+$(ALSA-LIB_DIR)/.unpacked: $(DL_DIR)/$(ALSA-LIB_SOURCE)
+       $(ALSA-LIB_CAT) $(DL_DIR)/$(ALSA-LIB_SOURCE) | tar -C

$(BUILD_DIR) $(TAR_OPTIONS) -

(quoted diff) +2 -0
+       touch $@
+

Review

Quoted 10 lines
(quoted diff) +10 -0
+$(ALSA-LIB_DIR)/.configured: $(ALSA-LIB_DIR)/.unpacked
+       (cd $(ALSA-LIB_DIR); rm -rf config.cache; \
+               $(TARGET_CONFIGURE_OPTS) \
+               ./configure \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+               --libdir=$(ALSA-LIB_PATH) \

This should be set with the prefix, not needed.

Add the ALSA-LIB_DEBUG variable.

Review

Quoted 9 lines
(quoted diff) +9 -0
+               --disable-docs \
+               --with-debug=$(ALSA-LIB_DEBUG) \
+               $(DISABLE_NLS) \
+       );
+       touch $@
+
+$(ALSA-LIB_DIR)/src/libasound.la: $(ALSA-LIB_DIR)/.configured
+       rm -f $@
+       $(MAKE) CFLAGS=-g CC=$(TARGET_CC) -C $(ALSA-LIB_DIR)

Only append -g if you actually are making debug target, see comment on debug option further up.

Review

Quoted 12 lines

+$(STAGING_DIR)$(ALSA-LIB_PATH)/libasound.so.2.0.0:
$(ALSA-LIB_DIR)/src/libasound.la

(quoted diff) +7 -0
+       $(MAKE) prefix=$(STAGING_DIR) \
+           exec_prefix=$(STAGING_DIR) \
+           libdir=$(STAGING_DIR)$(ALSA-LIB_PATH) \
+           -C $(ALSA-LIB_DIR) install;
+       @touch -c $@
+
+$(TARGET_DIR)$(ALSA-LIB_PATH)/libasound.so.2.0.0:

$(STAGING_DIR)$(ALSA-LIB_PATH)/libasound.so.2.0.0

(quoted diff) +2 -0
+       @mkdir -p $(TARGET_DIR)/usr/share/alsa
+       @mkdir -p $(TARGET_DIR)$(ALSA-LIB_PATH)/alsa-lib/smixer

$(TARGET_DIR)/$(ALSA-LIB_PATH) (add a / in between).

Quoted 1 line

+ cp -dpf $(STAGING_DIR)/lib/libasound.so* $(TARGET_DIR)/lib

exchange /lib/ with /$(ALSA-LIB_PATH)/ on both sides.

Review

Quoted 2 lines
(quoted diff) +2 -0
+       cp -rdpf $(STAGING_DIR)/share/alsa/* $(TARGET_DIR)/usr/share/alsa/
+       cp -rdpf $(STAGING_DIR)$(ALSA-LIB_PATH)/alsa-lib/* $(TARGET_DIR)$(ALSA-LIB_PATH)/alsa-lib/

$(TARGET_DIR)/$(ALSA-LIB_PATH) (add a / in between).

Quoted 1 line

+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libasound.so*

exchange /lib/ with /$(ALSA-LIB_PATH)/

Quoted 1 line

+ -$(STRIP) --strip-unneeded $(TARGET_DIR)$(ALSA-LIB_PATH)/alsa-lib/smixer/smixer-*.so

$(TARGET_DIR)/$(ALSA-LIB_PATH) (add a / in between).

Review

Quoted 9 lines
(quoted diff) +9 -0
+       @touch -c $@
+
+
+$(TARGET_DIR)$(ALSA-LIB_PATH)/libasound.la: $(STAGING_DIR)$(ALSA-LIB_PATH)/libasound.so.2.0.0
+       @mkdir -p $(TARGET_DIR)/usr/include/alsa/sound
+       @mkdir -p $(TARGET_DIR)/usr/include/sys
+       cp -rdpf $(STAGING_DIR)/include/alsa $(TARGET_DIR)/usr/include
+       cp -dpf $(STAGING_DIR)/include/sys/asoundlib.h $(TARGET_DIR)/usr/include/sys/
+       cp -dpf $(STAGING_DIR)/lib/libasound.la $(TARGET_DIR)$(ALSA-LIB_PATH)

$(TARGET_DIR)/$(ALSA-LIB_PATH) (add a / in between).

Review

Quoted 3 lines
(quoted diff) +3 -0
+       @touch -c $@
+
+alsa-lib-headers: $(TARGET_DIR)$(ALSA-LIB_PATH)/libasound.la

$(TARGET_DIR)/$(ALSA-LIB_PATH) (add a / in between).

Quoted 39 lines
(quoted diff) +24 -0
+
+alsa-lib: linux26 uclibc $(TARGET_DIR)$(ALSA-LIB_PATH)/libasound.so.2.0.0
+
+alsa-lib-source: $(DL_DIR)/$(ALSA-LIB_SOURCE)
+
+alsa-lib-clean:
+       @if [ -d $(ALSA-LIB_DIR)/Makefile ] ; then \
+               $(MAKE) -C $(ALSA-LIB_DIR) clean ; \
+       fi;
+
+alsa-lib-dirclean:
+       rm -rf $(ALSA-LIB_DIR) $(ALSA-LIB_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB)),y)
+TARGETS+=alsa-lib
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_ALSA-LIB_TARGET_HEADERS)),y)
+TARGETS+=alsa-lib-headers
+endif

diff -uN --recursive ../trunk/package/alsa-lib/Config.in package/alsa-lib/Config.in

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +11 -0
@@ -0,0 +1,23 @@
+config BR2_PACKAGE_ALSA-LIB
+       bool "alsa-lib"
+       default n
+       help
+         Advanced Linux Sound Architecture
+
+         http://www.alsa-project.org/
+
+config BR2_PACKAGE_ALSA-LIB_DEBUG_ENABLE
+       bool "Build alsa-lib with debug"
+       default y

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 21

Quoted 10 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +10 -0
+       depends on BR2_PACKAGE_ALSA-LIB
+       help
+         Build libraries with debug turned on see alsa-lib/NOTES
+
+config BR2_PACKAGE_ALSA-LIB_TARGET_HEADERS
+       bool "alsa-lib headers in target"
+       default n
+       depends on BR2_PACKAGE_ALSA-LIB
+       help
+         Put headers files in the target.

Other than that, alsa-lib looks good.

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 6

Quoted 13 lines

diff -uN --recursive ../trunk/package/alsa-utils/alsa-utils.mk package/alsa-utils/alsa-utils.mk
--- ../trunk/package/alsa-utils/alsa-utils.mk 1970-01-01
01:00:00.000000000 +0100
+++ package/alsa-utils/alsa-utils.mk 2007-05-30 22:57:20.186203681
+0100

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +6 -0
@@ -0,0 +1,105 @@
+#############################################################
+#
+# ALSA Utils
+#
+#############################################################
+ALSA-UTILS_VERSION := 1.0.14rc4

Same comment about underscores in variables.

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 9

Quoted 3 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +3 -0
+ALSA-UTILS_SOURCE := alsa-utils-$(ALSA-UTILS_VERSION).tar.bz2
+ALSA-UTILS_SITE := ftp://ftp.alsa-project.org/pub/utils/
+ALSA-UTILS_DIR := $(BUILD_DIR)/$(patsubst %.tar.bz2,%,$(ALSA-UTILS_SOURCE))

Again, I prefer the all written approach, to easier see what the variable is.

Quoted 25 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +25 -0
+ALSA-UTILS_CAT := $(BZCAT)
+
+AUTOOLS :=
+AUBIN := 
+AUSBIN := 
+
+AUTOOLS += aplay/aplay
+AUTOOLS += aplay/arecord
+AUTOOLS += alsaconf/alsaconf
+AUTOOLS += alsactl/alsactl
+AUTOOLS += alsamixer/alsamixer
+AUTOOLS += amidi/amidi
+AUTOOLS += amixer/amixer
+AUTOOLS += seq/aplaymidi/arecordmidi
+AUTOOLS += seq/aseqdump/aseqdump
+AUTOOLS += seq/aseqnet/aseqnet
+AUTOOLS += seq/aconnect/aconnect
+AUTOOLS += iecset/iecset
+AUTOOLS += speaker-test/speaker-test
+
+AUBIN += aconnect
+AUBIN += alsamixer
+AUBIN += amidi
+AUBIN += amixer
+AUBIN += aplay

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 44

Quoted 10 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +10 -0
+AUBIN += aplaymidi
+AUBIN += arecord
+AUBIN += arecordmidi
+AUBIN += aseqdump
+AUBIN += aseqnet
+AUBIN += iecset
+AUBIN += speaker-test
+
+AUSBIN += alsaconf
+AUSBIN += alsactl

Make all this configurable in Kconfig, will save some space on targets where you only need alsactl and a mixer.

Same approach as the tools:

LSA_UTILS_TARGETS_ :=
ALSA_UTILS_TARGETS_y :=

ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORD) += usr/bin/arecord
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI) += usr/bin/arecordmidi
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test

Quoted 11 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +11 -0
+$(DL_DIR)/$(ALSA-UTILS_SOURCE):
+       $(WGET) -P $(DL_DIR) $(ALSA-UTILS_SITE)/$(ALSA-UTILS_SOURCE)
+
+$(ALSA-UTILS_DIR)/.unpacked: $(DL_DIR)/$(ALSA-UTILS_SOURCE)
+       $(ALSA-UTILS_CAT) $(DL_DIR)/$(ALSA-UTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       touch $(ALSA-UTILS_DIR)/.unpacked
+
+$(ALSA-UTILS_DIR)/.configured: $(ALSA-UTILS_DIR)/.unpacked
+       (cd $(ALSA-UTILS_DIR); rm -rf config.cache; \
+               $(TARGET_CONFIGURE_OPTS) \
+               ./configure \

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 65

Quoted 10 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +10 -0
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --disable-docs \
+               --prefix=/usr \
+               --sysconfdir=/etc \
+        --disable-alsatest \
+               $(DISABLE_NLS) \
+       );
+       touch $@

@ out the touches, I may have overseen some of them.

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 73

Quoted 8 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +8 -0
+$(ALSA-UTILS_DIR)/aplay/aplay: $(ALSA-UTILS_DIR)/.configured
+       $(MAKE) CC=$(TARGET_CC) -C $(ALSA-UTILS_DIR)
+
+
+$(STAGING_DIR)/usr/bin/aplay: $(ALSA-UTILS_DIR)/aplay/aplay
+       $(MAKE) prefix=$(STAGING_DIR)/usr \
+               exec_prefix=$(STAGING_DIR)/usr \
+           -C $(ALSA-UTILS_DIR) install;

Use DESTDIR=$(STAGING_DIR) instead.

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 80

Quoted 7 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +7 -0
+$(TARGET_DIR)/usr/bin/aplay: $(STAGING_DIR)/usr/bin/aplay
+       @mkdir -p $(TARGET_DIR)/usr/bin
+       @mkdir -p $(TARGET_DIR)/usr/sbin
+       cp -dpf $(addprefix $(STAGING_DIR)/usr/bin/,$(AUBIN)) $(TARGET_DIR)/usr/bin/
+       cp -dpf $(addprefix $(STAGING_DIR)/usr/sbin/,$(AUSBIN)) $(TARGET_DIR)/usr/sbin/
+       for i in $(addprefix $(STAGING_DIR)/usr/bin/,$(AUBIN)) $(addprefix $(STAGING_DIR)/usr/sbin/,$(AUSBIN)); \
+       do $(STRIP) --strip-unneeded $$i > /dev/null 2>&1; done

Replace install procedure with something like:

	@mkdir -p $(TARGET_DIR)/usr/bin
	@mkdir -p $(TARGET_DIR)/usr/sbin
	for file in $(ALSA_UTILS_TARGETS_y) ; do \
		cp -dpf $(STAGING_DIR)/$$file $(TARGET_DIR)/$$file; \
		$(STRIP) --strip-unneeded $(STAGING_DIR)/$$file; \
	done
	@if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ] ; then \
		mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
		mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
		cp -rdpf $(STAGING_DIR)/usr/share/alsa/speaker-test/* $(TARGET_DIR)/usr/share/alsa/speaker-test/; \
		cp -rdpf $(STAGING_DIR)/usr/share/sounds/alsa/* $(TARGET_DIR)/usr/share/sounds/alsa/; \
	fi;

alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 line 82

Quoted 2 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +2 -0
+
+alsa-utils: uclibc alsa-lib $(TARGET_DIR)/usr/bin/aplay

IMHO alsactl is the "main" util.

Quoted 21 lines
alsa-lib/Config.in 2007-05-30 18:58:51.493711408 +0100 renamed from trunk/package/alsa-lib/Config.in 1970-01-01 01:00:00.000000000 +0100 +17 -0
+
+alsa-utils-clean:
+       @if [ -d $(ALSA-UTILS_DIR)/Makefile ] ; then \
+               $(MAKE) -C $(ALSA-UTILS_DIR) clean ; \
+       fi;
+
+alsa-utils-dirclean:
+       rm -rf $(ALSA-UTILS_DIR) $(ALSA-UTILS_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_ALSA-UTILS)),y)
+TARGETS+=alsa-utils
+endif

diff -uN --recursive ../trunk/package/alsa-utils/Config.in package/alsa-utils/Config.in

alsa-utils/Config.in 2007-05-07 22:13:02.134609691 +0100 line 7

Quoted 7 lines
alsa-utils/Config.in 2007-05-07 22:13:02.134609691 +0100 renamed from trunk/package/alsa-utils/Config.in 1970-01-01 01:00:00.000000000 +0100 +7 -0
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_ALSA-UTILS
+       bool "alsa-utils"
+       default n
+       help
+         Utilities from Advanced Linux Sound Architecture
+
+         http://www.alsa-project.org/

And add the configuration options:
menu "ALSA utils selection"
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ALSACONF
bool "alsaconf"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ALSACTL
bool "alsactl"
default y
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER
bool "alsamixer"
default y
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_AMIDI
bool "amidi"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_AMIXER
bool "amixer"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_APLAY
bool "aplay"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ARECORD
bool "arecord"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_IECSET
bool "iecset"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ACONNECT
bool "aconnect"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
bool "aplaymidi"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI
bool "arecordmidi"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP
bool "aseqdump"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_ASEQNET
bool "aseqnet"
default n
depends on BR2_PACKAGE_ALSA_UTILS

config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST
bool "speaker-test"
default n
depends on BR2_PACKAGE_ALSA_UTILS

endmenu

Quoted 8 lines

diff -uN --recursive ../trunk/package/Config.in package/Config.in

Config.in 2007-05-28 18:53:59.880317482 +0100 renamed from trunk/package/Config.in 2007-05-30 23:10:52.748747759 +0100 +1 -0
@@ -239,12 +239,14 @@
          Support for audio libraries and applications
 
 if BR2_AUDIO_SUPPORT
+source "package/alsa-lib/Config.in"

Config.in 2007-05-28 18:53:59.880317482 +0100 line 252

Quoted 10 lines
Config.in 2007-05-28 18:53:59.880317482 +0100 renamed from trunk/package/Config.in 2007-05-30 23:10:52.748747759 +0100 +1 -0
+source "package/alsa-utils/Config.in"
 source "package/asterisk/Config.in"
 source "package/libid3tag/Config.in"
 source "package/libmad/Config.in"
 source "package/libsndfile/Config.in"
 source "package/madplay/Config.in"
 source "package/mpg123/Config.in"
 endif
 
 menuconfig BR2_GRAPHIC_SUPPORT

Again, looks nice, will be good to have full alsa support i Buildroot.

Signature · 2 lines
Mvh
Hans-Christian Egtvedt