[lkml]   [2007]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subject2.6.23-rc6-mm1 - Mostly working, with a kbuild oddity
    On Tue, 18 Sep 2007 01:18:41 PDT, Andrew Morton said:

    % uname -a
    Linux 2.6.23-rc6-mm1 #1 SMP PREEMPT Tue Sep 18 12:32:13 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
    % uptime
    15:11:48 up 36 min, 1 user, load average: 0.05, 0.11, 0.09

    Had a few issues, all self-inflicted (the biggie was 2 iptables modules that
    needed fixing for the net namespace changes in git-net.patch - stuck an
    &init_net in the right 2 places, a new #include line, and all was good).

    I *did* have an odd issue with an out-of-tree GPL driver for a webcam.
    (It's from if anybody cares).

    The Makefile does this:

    make -C /lib/modules/`uname -r`/build SUBDIRS=/home/valdis/src/gspcav1-20070508 CC=cc modules

    and has this sort of stuff in it:


    In -rc4-mm1, $DEFINES got added to the compile command - in -rc6-mm1, I
    had to namually add a 'CFLAGS += $(DEFINES)' or GSPCA_VERSION came up undefined.

    The actual problematic code in the Makefile:

    -- begin Makefile snippet
    ifneq ($(KERNELRELEASE),) # We were called by kbuild
    obj-m += gspca.o
    gspca-objs := gspca_core.o decoder/gspcadecoder.o

    else # We were called from command line

    KERNEL_VERSION = `uname -r`
    KERNELDIR := /lib/modules/$(KERNEL_VERSION)/build
    PWD := $(shell pwd)
    MODULE_INSTALLDIR = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/usb/media/
    MODULE_INSTALLDIR2 = /lib/modules/$(KERNEL_VERSION)/kernel/drivers/media/video/

    $(MAKE) -C $(KERNELDIR) SUBDIRS=$(PWD) CC=$(CC) modules

    mkdir -p $(MODULE_INSTALLDIR)
    rm -f $(MODULE_INSTALLDIR)spca5xx.ko
    rm -f $(MODULE_INSTALLDIR2)gspca.ko
    install -c -m 0644 gspca.ko $(MODULE_INSTALLDIR)
    /sbin/depmod -ae

    rm -f $(MODULE_INSTALLDIR)gspca.ko
    /sbin/depmod -aq

    --- end Makefile snippet

    The Make definitely falls into the 'else' part (verified by adding an 'echo'
    to the default: target). Adding the CFLAGS += to the else, or moving the line
    above the if, makes it work.
    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2007-09-18 21:35    [W:0.021 / U:1.008 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site