Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Cannot build a worling alsactl or alsamixer using buildroot
@ 2008-07-24  8:20 Dirk Vermaak
  0 siblings, 0 replies; 3+ messages in thread
From: Dirk Vermaak @ 2008-07-24  8:20 UTC (permalink / raw)
  To: buildroot

Hi,
For over a week now we have been trying to build alsa-utils to work on our 
sam9269-ek development board with a 2.6.24.4 kernel patched with the AT91 
patch, and the first experimental patch. We use the buildroot environment and 
have everything else working fine. I have scoured these lists and found a few 
threads that discuss having to change the make file for alsa-utils. So far 
nothing we do appears to change the behaviour.

with alsa lib and utils we have tried

1.0.14a 
1.014a with the  -mabi=aapcs-linux option
1.014a with the  -mabi=aapcs-linux and --with-versioned=no
(both of these changes I found here on the site)

Folllowing this I tried the latest Alsa stuff (1.0.16)  including patching 
both the lib and utils make files with the patch from Daniel Laird and Matt 
Dombroski. 

All of this appears to be of no avail. 

alsactl always returns : Cannot read control '2,0,0,Master Playback Volume,0': 
Inappropriate ioctl for device

alsamixer returns 

ioctl(3, USBDEVFS_IOCTL, 0xbeae7188)    = -1 ENOTTY (Inappropriate ioctl for 
device)
write(1, "\n", 1
)                       = 1
write(2, "alsamixer: function ", 20alsamixer: function )    = 20
write(2, "snd_mixer_load", 14snd_mixer_load)          = 14
write(2, " failed: ", 9 failed: )                = 9
write(2, "Inappropriate ioctl for device", 30Inappropriate ioctl for device) = 
30
write(2, "\n", 1

Does anyone have any ideas as to how to get a working build of Alsa. Any help 
would be greatly appreciated.

Thanks,

Dirk.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Cannot build a worling alsactl or alsamixer using buildroot
@ 2008-07-24 12:12 Dirk Vermaak
  2008-07-24 12:56 ` Daniel Laird
  0 siblings, 1 reply; 3+ messages in thread
From: Dirk Vermaak @ 2008-07-24 12:12 UTC (permalink / raw)
  To: buildroot

For the information of others, we have fixed this problem, or rather worked 
out the correct set of make values to make it work.

There are two values in the alsa-lib.mk file that need to be correct.

If you are an OABI built kernel, make sure you do not have -mabi=aapcs-linux 
set in your CFLAGS.

If you are an EABI built kernel, make sure you do have -mabi=aapcs-linux set 
in your CFLAGS.

Then in both cases, in the ./configure part make sure you add 

--with-versioned=no

We have tried this with 1.0.15 alsa-utils and alsa-lib and all is working, 
alsamixer, aplay etc. 

Thanks to the others who have posted about these problems. This is just a 
summary of their work.

Cheers,

Dirk

Working 1.0.15 alsa-lib.mk file (OABI Kernel)

#############################################################
#
# alsa-lib
#
#############################################################
ALSA_LIB_VERSION = 1.0.15
ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib
ALSA_LIB_AUTORECONF = NO
ALSA_LIB_INSTALL_STAGING = YES
ALSA_LIB_INSTALL_TARGET = YES
ALSA_LIB_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) 
LDFLAGS=-L$(STAGING_DIR)/usr/lib install
ALSA_LIB_CONF_ENV =
ALSA_LIB_CONF_OPT 
= --build=$(GNU_HOST_NAME) --with-versioned=no --enable-shared --enable-static --prefix=/usr --sysconfdir=/etc --disable-docs --disable-python 
$(DISABLE_NLS)
ALSA_LIB_DEPENDENCIES = uclibc

ifeq ($(BR2_arm),y)
ALSA_LIB_CONF_ENV += CFLAGS="$(TARGET_CFLAGS)"
endif

ifeq ($(BR2_SOFT_FLOAT),y)
	ALSA_LIB_CONF_OPT += --with-softfloat
	ALSA_LIB_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm"
endif

$(eval $(call AUTOTARGETS,package,alsa-lib))

$(ALSA_LIB_TARGET_INSTALL_TARGET): $(ALSA_LIB_TARGET_INSTALL_STAGING)
	$(call MESSAGE,"Installing to target")
	mkdir -p $(TARGET_DIR)/usr/share/alsa $(TARGET_DIR)/usr/lib/alsa-lib
	cp -dpf $(STAGING_DIR)/usr/lib/libasound.so* $(TARGET_DIR)/usr/lib/
	cp -rdpf $(STAGING_DIR)/usr/share/alsa/* $(TARGET_DIR)/usr/share/alsa/
	cp -rdpf $(STAGING_DIR)/usr/lib/alsa-lib/* $(TARGET_DIR)/usr/lib/alsa-lib/
	find $(TARGET_DIR)/usr/lib/alsa-lib/ -regextype 
posix-egrep -regex '.*((\.la)|(\.a))[~]{0,1}' -delete
	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libasound.so*
	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) 
$(TARGET_DIR)/usr/lib/alsa-lib/smixer/*.so
	$(Q)touch $@

$(ALSA_LIB_TARGET_UNINSTALL):
	$(call MESSAGE,"Uninstalling")
	-rm -f $(TARGET_DIR)/usr/lib/libasound*.so*
	-rm -rf $(TARGET_DIR)/usr/lib/alsa-lib/
	$(ALSA_LIB_MAKE_ENV) $(MAKE) $(ALSA_LIB_UNINSTALL_STAGING_OPT) -C 
$(@D)/$(ALSA_LIB_SUBDIR)
	$(Q)-rm $(@D)/$(ALSA_LIB_SUBDIR)/.stamp_target_installed
	$(Q)-rm $(@D)/$(ALSA_LIB_SUBDIR)/.stamp_staging_installed

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Cannot build a worling alsactl or alsamixer using buildroot
  2008-07-24 12:12 [Buildroot] Cannot build a worling alsactl or alsamixer using buildroot Dirk Vermaak
@ 2008-07-24 12:56 ` Daniel Laird
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Laird @ 2008-07-24 12:56 UTC (permalink / raw)
  To: buildroot




Dirk Vermaak wrote:
> 
> For the information of others, we have fixed this problem, or rather
> worked 
> out the correct set of make values to make it work.
> 
> There are two values in the alsa-lib.mk file that need to be correct.
> 
> If you are an OABI built kernel, make sure you do not have
> -mabi=aapcs-linux 
> set in your CFLAGS.
> 
> If you are an EABI built kernel, make sure you do have -mabi=aapcs-linux
> set 
> in your CFLAGS.
> 
> Then in both cases, in the ./configure part make sure you add 
> 
> --with-versioned=no
> 
> We have tried this with 1.0.15 alsa-utils and alsa-lib and all is working, 
> alsamixer, aplay etc. 
> 
> Thanks to the others who have posted about these problems. This is just a 
> summary of their work.
> 
> Cheers,
> 
> Dirk
> 
> Working 1.0.15 alsa-lib.mk file (OABI Kernel)
> 
> #############################################################
> #
> # alsa-lib
> #
> #############################################################
> ALSA_LIB_VERSION = 1.0.15
> ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2
> ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib
> ALSA_LIB_AUTORECONF = NO
> ALSA_LIB_INSTALL_STAGING = YES
> ALSA_LIB_INSTALL_TARGET = YES
> ALSA_LIB_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) 
> LDFLAGS=-L$(STAGING_DIR)/usr/lib install
> ALSA_LIB_CONF_ENV =
> ALSA_LIB_CONF_OPT 
> = --build=$(GNU_HOST_NAME) --with-versioned=no --enable-shared
> --enable-static --prefix=/usr --sysconfdir=/etc --disable-docs
> --disable-python 
> $(DISABLE_NLS)
> ALSA_LIB_DEPENDENCIES = uclibc
> 
> ifeq ($(BR2_arm),y)
> ALSA_LIB_CONF_ENV += CFLAGS="$(TARGET_CFLAGS)"
> endif
> 
> ifeq ($(BR2_SOFT_FLOAT),y)
> 	ALSA_LIB_CONF_OPT += --with-softfloat
> 	ALSA_LIB_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm"
> endif
> 
> $(eval $(call AUTOTARGETS,package,alsa-lib))
> 
> $(ALSA_LIB_TARGET_INSTALL_TARGET): $(ALSA_LIB_TARGET_INSTALL_STAGING)
> 	$(call MESSAGE,"Installing to target")
> 	mkdir -p $(TARGET_DIR)/usr/share/alsa $(TARGET_DIR)/usr/lib/alsa-lib
> 	cp -dpf $(STAGING_DIR)/usr/lib/libasound.so* $(TARGET_DIR)/usr/lib/
> 	cp -rdpf $(STAGING_DIR)/usr/share/alsa/* $(TARGET_DIR)/usr/share/alsa/
> 	cp -rdpf $(STAGING_DIR)/usr/lib/alsa-lib/*
> $(TARGET_DIR)/usr/lib/alsa-lib/
> 	find $(TARGET_DIR)/usr/lib/alsa-lib/ -regextype 
> posix-egrep -regex '.*((\.la)|(\.a))[~]{0,1}' -delete
> 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libasound.so*
> 	-$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) 
> $(TARGET_DIR)/usr/lib/alsa-lib/smixer/*.so
> 	$(Q)touch $@
> 
> $(ALSA_LIB_TARGET_UNINSTALL):
> 	$(call MESSAGE,"Uninstalling")
> 	-rm -f $(TARGET_DIR)/usr/lib/libasound*.so*
> 	-rm -rf $(TARGET_DIR)/usr/lib/alsa-lib/
> 	$(ALSA_LIB_MAKE_ENV) $(MAKE) $(ALSA_LIB_UNINSTALL_STAGING_OPT) -C 
> $(@D)/$(ALSA_LIB_SUBDIR)
> 	$(Q)-rm $(@D)/$(ALSA_LIB_SUBDIR)/.stamp_target_installed
> 	$(Q)-rm $(@D)/$(ALSA_LIB_SUBDIR)/.stamp_staging_installed
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
> 
> 

I have posted patches for ALSA-utils/lib 1.0.16 (see bug 4014) these look
like above.  What is the --with-versioned=no option.  I have not used it but
it all works for me with 1.0.16. 
Maybe you could take a look at the patches on 4014 and update if necessary.
That way we can close BUG ticket and update ALSA both of which are good :-)

Cheers
Dan

-- 
View this message in context: http://www.nabble.com/Cannot-build-a-worling-alsactl-or-alsamixer-using-buildroot-tp18630729p18631369.html
Sent from the BuildRoot mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-24 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 12:12 [Buildroot] Cannot build a worling alsactl or alsamixer using buildroot Dirk Vermaak
2008-07-24 12:56 ` Daniel Laird
  -- strict thread matches above, loose matches on Subject: below --
2008-07-24  8:20 Dirk Vermaak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox