Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27
I'm trying to install a driver for a Jetway ADPE4S Daughterboard on Ubuntu 10.04 but coming up against some problems. When I use 'make', I get this error: make ARCH=x86_64 ...
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    14

    Error Installing a Driver

    I'm trying to install a driver for a Jetway ADPE4S Daughterboard on Ubuntu 10.04 but coming up against some problems.

    When I use 'make', I get this error:
    make ARCH=x86_64 CC=cc LD=ld CROSS_COMPILE= V= -C /usr/src/linux-source-2.6.32 M=`pwd` modules
    make[1]: Entering directory `/usr/src/linux-source-2.6.32'

    ERROR: Kernel configuration is invalid.
    include/linux/autoconf.h or include/config/auto.conf are missing.
    Run 'make oldconfig && make prepare' on kernel src to fix it.

    make[1]: *** No rule to make target `code'. Stop.
    make[1]: Leaving directory `/usr/src/linux-source-2.6.32'
    make: *** [all] Error 2
    Any ideas on how to fix this?
    Not knowing what to do, I've been playing around with it, and copied the files autoconf.h and auto.conf from a folder '/usr/src/linux-headers-2.6.32-25-generic', but that didn't help, it still says "No rule to make target `code'. Stop."

    Thanks for any help.

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    In a traditional *NIX install admin unpacked kernel sources into /usr/src, configured, built and installed kernel. This left behind sources with header files and Makefile. Adding a new driver was simple, additional module was built against same kernel sources.

    Nowadays generic kernels are pre-built and come with distro. Thus you do not have prepared kernel sources and get all those errors.
    I'm still using traditional method myself hence cannot tell you how exactly to proceed, installing kernel sources seems like good idea. Maybe they come with Makefile and are ready for your module build.

  3. #3
    Just Joined!
    Join Date
    Oct 2010
    Posts
    14
    It's true that my Ubuntu install didn't come with the kernel source. It did have a folder called '/usr/src/linux-headers-2.6.32-25-generic', which didn't work. I then downloaded the source and put in in a folder '/usr/src/linux-source-2.6.32'.

    It still doesn't work. Giving me the above error.

  4. #4
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    Well, the thing here is it has to be exactly the source that was used to build your kernel. I suspect there might be a procedure in Ubuntu to get correct sources.
    Digging in Ubuntu docs may help.

  5. #5
    Just Joined!
    Join Date
    Oct 2010
    Posts
    14
    I don't know if there's any other way, but I'm doing it on the source downloaded using
    'apt-get install linux-source' which apparently gets the "Linux kernel source with Ubuntu patches"

  6. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    Well, sounds like right thing. Too bad I have no Ubuntu around to check it out, but if you run make prepare on sources as suggested in error message you got ... would it fix it?

  7. #7
    Just Joined!
    Join Date
    Oct 2010
    Posts
    14
    Sorry, I should have mentioned.

    I just deleted and redownloaded the source, just to make sure. I tried running the make command on it and I get this error:

    $ sudo make oldconfig && make prepare
    HOSTCC scripts/basic/fixdep
    HOSTCC scripts/basic/docproc
    HOSTCC scripts/basic/hash
    HOSTCC scripts/kconfig/conf.o
    scripts/kconfig/conf.c: In function âconf_askvalueâ:
    scripts/kconfig/conf.c:105: warning: ignoring return value of âfgetsâ, declared with attribute warn_unused_result
    scripts/kconfig/conf.c: In function âconf_choiceâ:
    scripts/kconfig/conf.c:307: warning: ignoring return value of âfgetsâ, declared with attribute warn_unused_result
    HOSTCC scripts/kconfig/kxgettext.o
    SHIPPED scripts/kconfig/zconf.tab.c
    SHIPPED scripts/kconfig/lex.zconf.c
    SHIPPED scripts/kconfig/zconf.hash.c
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    scripts/kconfig/conf -o arch/x86/Kconfig
    #
    # using defaults found in /boot/config-2.6.32-25-generic
    #
    #
    # configuration written to .config
    #
    scripts/kconfig/conf -s arch/x86/Kconfig

    *** Error during update of the kernel configuration.

    make[2]: *** [silentoldconfig] Error 1
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
    Clearly somethings wrong here :/ I just don't know how to fix it.

    How does one normally install a driver such as this for Ubuntu? I've never done it before and would like to actually know what is supposed to happen.

  8. #8
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    Look, && will run the second command only if first one didn't error, as you did it make prepare was never run.

    Operators

  9. #9
    Just Joined!
    Join Date
    Oct 2010
    Posts
    14
    Duh, just ran them as sudo separately and it seemed to work

    $ sudo make prepare
    scripts/kconfig/conf -s arch/x86/Kconfig
    CHK include/linux/version.h
    UPD include/linux/version.h
    CHK include/linux/utsrelease.h
    UPD include/linux/utsrelease.h
    SYMLINK include/asm -> include/asm-x86
    CC kernel/bounds.s
    GEN include/linux/bounds.h
    CC arch/x86/kernel/asm-offsets.s
    GEN include/asm/asm-offsets.h
    CALL scripts/checksyscalls.sh
    $ sudo make oldconfig
    scripts/kconfig/conf -o arch/x86/Kconfig
    #
    # configuration written to .config
    #
    Thought I'd tried that before, but it seems to have worked now, yes?

  10. #10
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    855
    Will your driver build now?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...