|
刚刚看了 https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=135975 感觉很有意思,闲的无事搞了一下,结论是在X86 BB上成功,在X86 CC上不成功(CC的gstreamer位置变了,gmediarender找不到他,好事者可以试试。)。
作者git地址。https://github.com/hzeller/gmrender-resurrect。最近跟新日期是2014年3月2日。
制作方法(本文所提源码非本人原创,只修改了下makefile)。
1、在bb/feeds/oldpackages/multimedia目录下建立gmediarender目录
2、讲makefile文件复制进去。makefile文件源码如下。
- #
- # Copyright (C) 2013 OpenWrt.org
- #
- # This is free software, licensed under the GNU General Public License v2.
- # See /LICENSE for more information.
- #
- include $(TOPDIR)/rules.mk
- PKG_NAME:=gmediarender
- PKG_VERSION:=2014-03-02
- PKG_RELEASE=1
- PKG_SOURCE_PROTO:=git
- PKG_SOURCE_URL:=https://github.com/hzeller/gmrender-resurrect.git
- PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_FIXUP:=autoreconf
- PKG_INSTALL=1
- PKG_REMOVE_FILES:=autogen.sh aclocal.m4
- include $(INCLUDE_DIR)/package.mk
- include $(INCLUDE_DIR)/nls.mk
- define Package/gmediarender
- SECTION:=multimedia
- CATEGORY:=Multimedia
- DEPENDS:= +gstreamer +glib2 +libupnp
- TITLE:=A Headless UPnP Renderer
- endef
- define Package/gmediarender/description
- gmediarender implements the server component that provides UPnP
- controllers a means to render media content (audio, video and images)
- from a UPnP media server.
- endef
- CONFIGURE_ARGS+= \
- --with-build-cc="$(HOSTCC)" \
- --prefix="\usr"
- define Package/gmediarender/install
- $(INSTALL_DIR) $(1)/usr/sbin
- $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/sbin/
- $(INSTALL_DIR) $(1)/etc/init.d
- $(CP) $(PKG_BUILD_DIR)/scripts/init.d/$(PKG_NAME)er $(1)/etc/init.d/$(PKG_NAME)
- endef
- $(eval $(call BuildPackage,gmediarender))
复制代码 3、在gmediarender目录下建立patches目录,目录内建一个文件:000-add-std-c99-option.patch,该文件源码如下:
- --- a/configure.ac
- +++ b/configure.ac
- @@ -20,7 +20,7 @@ EXTRA_GCC_DEBUG_CXXFLAGS=""
- if test -n "$GCC"; then
- EXTRA_GCC_DEBUG_CFLAGS="$CFLAGS"
- EXTRA_GCC_DEBUG_CXXFLAGS="$CXXFLAGS"
- - CFLAGS="-Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings"
- + CFLAGS="-Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings -std=c99"
- CXXFLAGS="-Wall -Wpointer-arith"
- fi
-
复制代码 4、执行 ./scripts/feeds update -a
5、执行./scripts/feeds install -a
6、执行make menuconfig
7、在多媒体内选择gmediarender。以及声卡、alsa-utils3个选项,usb声卡的话最好在选择一个usbutils,看USB设备挂载情况。
8、执行 make V=99 -j4
现在主流机器的声卡都是HDA了,menuconfig里默认没有配置,虽然内核里有配置。这里转发一个论坛lean明月的HDA配置。
把下面的代码贴到package/kernel/linux/modules/sound.mk(此地址和内核版本有关系,这里是BB的地址,lean的地址不带红色部分)最后就可以了,无需更新,在menuconfig-kernel-sound里可以看到。
- define KernelPackage/snd-hda-intel
- TITLE:=Intel HD Audio
- KCONFIG:=CONFIG_SND_HDA_INTEL \
- CONFIG_SND_HDA_INPUT_BEEP \
- CONFIG_SND_HDA_INPUT_JACK
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko \
- $(LINUX_DIR)/sound/pci/hda/snd-hda-codec.ko
- AUTOLOAD:=$(call AutoLoad,65,snd-hda-codec snd-hda-intel)
- #DEPENDS:=
- $(call AddDepends/sound)
- endef
- define KernelPackage/snd-hda-intel/description
- Support for Intel "High Definition Audio" (Azalia) and its compatible devices.
- endef
- $(eval $(call KernelPackage,snd-hda-intel))
- define KernelPackage/snd-hda-codec-realtek
- TITLE:=Build Realtek HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_REALTEK
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-realtek.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-realtek)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-realtek))
- define KernelPackage/snd-hda-codec-analog
- TITLE:=Build Analog Device HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_ANALOG
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-analog.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-analog)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-analog))
- define KernelPackage/snd-hda-codec-idt
- TITLE:=Build IDT/Sigmatel HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_SIGMATEL
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-idt.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-idt)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-idt))
- define KernelPackage/snd-hda-codec-via
- TITLE:=Build VIA HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_VIA
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-via.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-via)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-via))
- define KernelPackage/snd-hda-codec-hdmi
- TITLE:=Build HDMI/DisplayPort HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_HDMI
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-hdmi.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-hdmi)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-hdmi))
- define KernelPackage/snd-hda-codec-cirrus
- TITLE:=Build Cirrus Logic codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_CIRRUS
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cirrus)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-cirrus))
- define KernelPackage/snd-hda-codec-cirrus
- TITLE:=Build Cirrus Logic codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_CIRRUS
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cirrus)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-cirrus))
- define KernelPackage/snd-hda-codec-conexant
- TITLE:=Build Conexant HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_CONEXANT
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-conexant.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-conexant)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-conexant))
- define KernelPackage/snd-hda-codec-ca0110
- TITLE:=Build Creative CA0110-IBG HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_CA0110
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0110.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-ca0110)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-ca0110))
- define KernelPackage/snd-hda-codec-cmedia
- TITLE:=Build C-Media HD-audio codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_CMEDIA
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cmedia.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cmedia)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-cmedia))
- define KernelPackage/snd-hda-codec-si3054
- TITLE:=Build Silicon Labs 3054 HD-modem codec support
- KCONFIG:=CONFIG_SND_HDA_CODEC_SI3054
- FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-si3054.ko
- AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-si3054)
- DEPENDS:=+kmod-snd-hda-intel
- $(call AddDepends/sound)
- endef
- $(eval $(call KernelPackage,snd-hda-codec-si3054))
复制代码
最后要说的是,这玩意怎么玩呀。。。。。。。。。谁写个教程,我提供程序。
|
|