OpenWrt Forum Archive

Topic: qc-usb package for Kamikaze linux-2.4-brcm

The content of this topic has been archived on 4 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

Does anyone know of a pre-bulit package of qc-usb (Quickcam USB drivers) available for Kamikaze linux-2.4-brcm?  The Wiki page about webcams lists one for the same hardware and it installs fine, but it is for the wrong kernel version (2.4.30 instead of 2.4.34). 

Failing that, can anyone give me a clue as to how to compile it from the SVN?  I see that it is in the package directory, but it lists a 2.6 kernel as a dependency.  I tried hacking the Makefile and changing all 2.6->2.4, but this did not seem to work.  Has anyone successfully done this?

Thanks!
Ben

In the package/qc-usb/Makefile at line 42 there is your answer.

DEPENDS:=@LINUX_2_6 ...

But anyway. Who cares about 2.4 Kernels? 2.6 is the future smile

(Last edited by forum2006 on 18 Jul 2007, 11:52)

Thanks for for the suggestion, but that is actually what I meant when I said I had tried changing all instances of 2.6 to 2.4 in the Makefile.  It yields a build error looking like this:

make -C qc-usb compile
make[3]: Entering directory `/home/benwei/kamikaze_7.06/package/qc-usb'
/home/benwei/kamikaze_7.06/include/target.mk:23: warning: overriding commands for target `/home/benwei/kamikaze_7.06/tmp/.target.mk'
/home/benwei/kamikaze_7.06/include/target.mk:23: warning: ignoring old commands for target `/home/benwei/kamikaze_7.06/tmp/.target.mk'
make -C /home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/linux-2.4.34 PATH="/home/benwei/kamikaze_7.06/staging_dir_mipsel/usr/sbin:/home/benwei/kamikaze_7.06/staging_dir_mipsel/usr/bin:/home/benwei/kamikaze_7.06/staging_dir_mipsel/bin:/home/benwei/kamikaze_7.06/staging_dir_mipsel/usr/sbin:/home/benwei/kamikaze_7.06/staging_dir_mipsel/usr/bin:/home/benwei/kamikaze_7.06/staging_dir_mipsel/bin:/home/benwei/macah/macah/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games" KVER="2.4.34" KERNELRELEASE="2.4.34" KSRC="/home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/linux-2.4.34" SUBDIRS="/home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/qc-usb-0.6.5" KERNEL_DIR="" ARCH="mips" CROSS_COMPILE="mipsel-linux-uclibc-" modules
make[4]: Entering directory `/home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/linux-2.4.34'
make -C  /home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/qc-usb-0.6.5 CFLAGS="-D__KERNEL__ -I/home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/linux-2.4.34/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -fno-builtin-sprintf -fomit-frame-pointer   -funit-at-a-time -I /home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/linux-2.4.34/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe  -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap -DMODULE -mlong-calls -fno-common" MAKING_MODULES=1 modules
make[5]: Entering directory `/home/benwei/kamikaze_7.06/build_mipsel/linux-2.4-brcm/qc-usb-0.6.5'
make[5]: *** No rule to make target `modules'.  Stop.

And I completely agree about 2.6, but 2.4 still matters to those of us stuck with Broadcom chipsets for which there is no wireless support from the 2.6-based OpenWRT.  Learned that one the hard way by installing the 2.6-based image first.

OK - I finally figured out how to get this compiled.  Turns out qc-usb wasn't even the package I wanted (it was qc-usb-messenger for the Quickcam Messenger) and I basically had to completely rewrite the existing Makefile.  If anyone is interested I can elaborate and/or send you the compiled module.

Ben

benwei send your Makefile to vanyas@gmail.com please.

Deleted

(Last edited by misha680 on 24 Dec 2007, 07:21)

Sorry my old diff was a little wrong. Here is a Makefile that worked successfully for me on Kamikaze 7.09 for brcm 2.4. Enjoy!

#
# Copyright (C) 2006 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=qc-usb
PKG_VERSION:=0.6.5
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/qce-ga
PKG_MD5SUM:=6f6787e1dda11ca3b936ad434154f426

include $(INCLUDE_DIR)/package.mk

define Package/qc-usb/Default
  URL:=http://qce-ga.sourceforge.net/
endef

define Package/qc-usb-utils
$(call Package/qc-usb/Default)
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=Utility programs for the qc-usb kernel module
endef

define Package/qc-usb-utils/description
Utilities to tweak parameters of your QuickCam Express or similar webcam.
These programs are completely useless without a qc-usb-modules package.
endef

define KernelPackage/video-quickcam
$(call Package/qc-usb/Default)
  SUBMENU:=Video Support
  TITLE:=QuickCam Express USB webcam support
  DEPENDS:=@LINUX_2_4 @USB_SUPPORT @VIDEO_SUPPORT kmod-videodev
  FILES:=$(PKG_BUILD_DIR)/quickcam.$(LINUX_KMOD_SUFFIX)
  AUTOLOAD:=$(call AutoLoad,90,quickcam)
endef

define KernelPackage/video-quickcam/description
Kernel support for Logitech's QuickCam Express webcam and other webcams
with similar chipsets.
endef

ifeq ($(KERNEL),2.4)
  ifeq ($(LINUX_KARCH),i386)
    KERNEL_C_OPTS:= -Os -mpreferred-stack-boundary=2 -march=i486 -fno-unit-at-a-time
  endif
  ifeq ($(LINUX_KARCH),mips)
    KERNEL_C_OPTS:= -Os -G 0 -mlong-calls -mno-abicalls -fno-pic -finline-limit=100000 -mabi=32 -march=mips32 -Wa,-32 -Wa,-march=mips32 -Wa,-mips32 -Wa,--trap
  endif
endif
ifeq ($(LINUX_KARCH),i386)
  KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-i386/mach-generic -I$(LINUX_DIR)/include/asm-i386/mach-default
endif
ifeq ($(LINUX_KARCH),mips)
  KERNEL_C_INCS:= -I$(LINUX_DIR)/include/asm-mips/mach-generic
endif

ifneq ($(CONFIG_PACKAGE_kmod-video-quickcam),)
  define Build/Compile/kmod
    $(MAKE) -C $(PKG_BUILD_DIR) \
        ARCH="$(LINUX_KARCH)" \
        CC="$(TARGET_CC)" \
        LD="$(TARGET_CC) -nodefaultlibs -nostartfiles" \
        LINUX_DIR="$(LINUX_DIR)" \
        CROSS_COMPILE="$(TARGET_CROSS)" \
                USER_OPT="$(KERNEL_C_OPTS)" \
        quickcam.$(LINUX_KMOD_SUFFIX)
  endef
endif

define Build/Compile
    $(call Build/Compile/kmod)
    $(MAKE) -C $(PKG_BUILD_DIR) \
        CFLAGS="$(TARGET_CFLAGS)" \
        qcset
endef

define Package/qc-usb-utils/install
    $(INSTALL_DIR) $(1)/usr/bin
    $(INSTALL_BIN) $(PKG_BUILD_DIR)/qcset $(1)/usr/bin/
endef

$(eval $(call BuildPackage,qc-usb-utils))
$(eval $(call KernelPackage,video-quickcam))

(Last edited by misha680 on 25 Dec 2007, 23:16)

Can't compile sad

vanyas@desktop ~/openwrt/kamikaze_7.09 $ make package/qc-usb-prepare V=99
make -C package qc-usb-prepare
make[1]: Entering directory `/home/vanyas/openwrt/kamikaze_7.09/package'
make -j1 -C qc-usb prepare
make[2]: Entering directory `/home/vanyas/openwrt/kamikaze_7.09/package/qc-usb'
Makefile:86: *** missing separator.  Stop.
make[2]: Leaving directory `/home/vanyas/openwrt/kamikaze_7.09/package/qc-usb'
make[1]: *** [qc-usb-prepare] Error 2
make[1]: Leaving directory `/home/vanyas/openwrt/kamikaze_7.09/package'
make: *** [package/qc-usb-prepare] Ошибка 2

line 86: $(eval $(call BuildPackage,qc-usb-utils))

(Last edited by vanyas on 25 Dec 2007, 05:57)

vanyas wrote:

Can't compile sad

vanyas@desktop ~/openwrt/kamikaze_7.09 $ make package/qc-usb-prepare V=99
make -C package qc-usb-prepare
make[1]: Entering directory `/home/vanyas/openwrt/kamikaze_7.09/package'
make -j1 -C qc-usb prepare
make[2]: Entering directory `/home/vanyas/openwrt/kamikaze_7.09/package/qc-usb'
Makefile:86: *** missing separator.  Stop.
make[2]: Leaving directory `/home/vanyas/openwrt/kamikaze_7.09/package/qc-usb'
make[1]: *** [qc-usb-prepare] Error 2
make[1]: Leaving directory `/home/vanyas/openwrt/kamikaze_7.09/package'
make: *** [package/qc-usb-prepare] Ошибка 2

line 86: $(eval $(call BuildPackage,qc-usb-utils))

I just did a make in the openwrt/kamikaze_7.09 directory rather than a make package/qc-usb-prepare, I am not
sure exactly what that does. Make sure to get the patches from the trunk too (in package/qc-usb/patches). I can send you a
.ipk as I have tested it and it works great on my wl500g premium with broadcom.

Misha

Thanks for ipk, but I need qc-usb-messenger driver, not qc-usb express, you can download it here: http://in.solit.us/archives/show/91566
This driver source structure same as original qc-usb driver. Can you compile this driver for me? I have wl500pg too.

(Last edited by vanyas on 25 Dec 2007, 07:30)

I've copilled qc-usb-messenger driver width your e-mail attached Makefile, thanks.

The discussion might have continued from here.