Announcement

Collapse
No announcement yet.

Kernel/Recompile/Fnfxd

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kernel/Recompile/Fnfxd

    How do i recompile the kernel so i can use fnfxd with my toshiba laptop?

    #2
    Re: Kernel/Recompile/Fnfxd

    I read your earlier thread.

    First you need to check that the modules you want arn't allready compiled as modules, and just not loaded. The easy way is to try to load the module you want
    Code:
    sudo modprobe toshiba_acpi
    If this doesn't work then more indepth stuff is involved. This is the quick dirty hack version, known to work for me in the past, sometimes. But fear not because you won't be wasing all of your time if it doesn't work.

    Use apt-get/synaptic/whatever to get the linux-tree for your running kernel (use uname -a if your are unsure to the version)
    Extract the archive in /usr/src (linux-2.6.13.tar.bz2 or whatever)
    Open a terminal and navigate to the source folder
    Code:
    cd /usr/src/linux-2.6.16
    Now, this bit can be hit and miss
    Code:
    sudo make oldconfig
    This should copy the config from your running kernel to the .config file in the source directory (the file that tells make to build with regards to kernel support and modules)

    NOTE: you may need extra packages to run make config, as you will to compile any source. My problem here is that I do a lot of from source stuff and can never remember what packages are needed, it's something I do on install, once, and forget about. Off the top of my head I know I always install make, gcc, autoconf , g++ and build-essential, plus ncurses devel for 'make menuconfig'. These are in the dev section in synaptic IIRC

    If make oldconfig worked, then run
    Code:
    sudo make menuconfig
    navigate to Power Managment Options>>ACPI>>Toshiba Laptop Extras and press m (must be a module for my dirty hack to work)
    Exit and save the config
    Code:
    sudo make
    Let it run through, then find and copy toshiba_acpi.ko (find ./ -iname toshiba*) into your running kernel module tree (/lib/modules/<current-kernel>/misc/), then try to modprobe it.

    This is a very very dirty hack, but if it works your home free. If not they you are most of the way to compiling a custom kernel anyhow, find a wiki guide and follow the steps they have there, you will have done most of it allready.

    Comment


      #3
      Re: Kernel/Recompile/Fnfxd

      i got up to the point of using sudo make oldconfig, but i got this error. i also havent bene able to find any guides, soryyy im really not good at this

      /usr/src/linux-headers-2.6.15-26$ sudo make oldconfig
      HOSTCC scripts/basic/fixdep
      scripts/basic/fixdep.c:105:23: error: sys/types.h: No such file or directory
      scripts/basic/fixdep.c:106:22: error: sys/stat.h: No such file or directory
      scripts/basic/fixdep.c:107:22: error: sys/mman.h: No such file or directory
      scripts/basic/fixdep.c:108:20: error: unistd.h: No such file or directory
      scripts/basic/fixdep.c:109:19: error: fcntl.h: No such file or directory
      scripts/basic/fixdep.c:110:20: error: string.h: No such file or directory
      scripts/basic/fixdep.c:111:20: error: stdlib.h: No such file or directory
      scripts/basic/fixdep.c:112:19: error: stdio.h: No such file or directory
      In file included from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/syslimits.h:7,
      from /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:11,
      from scripts/basic/fixdep.c:113:
      /usr/lib/gcc/i486-linux-gnu/4.0.3/include/limits.h:122:61: error: limits.h: No s
      uch file or directory
      scripts/basic/fixdep.c:114:19: error: ctype.h: No such file or directory
      scripts/basic/fixdep.c:115:23: error: arpa/inet.h: No such file or directory
      scripts/basic/fixdep.c: In function ‘usage’:
      scripts/basic/fixdep.c:129: warning: implicit declaration of function ‘fprintf’
      scripts/basic/fixdep.c:129: warning: incompatible implicit declaration of built-
      in function ‘fprintf’
      scripts/basic/fixdep.c:129: error: ‘stderr’ undeclared (first use in this functi
      on)
      scripts/basic/fixdep.c:129: error: (Each undeclared identifier is reported only
      once
      scripts/basic/fixdep.c:129: error: for each function it appears in.)
      scripts/basic/fixdep.c:130: warning: implicit declaration of function ‘exit’
      scripts/basic/fixdep.c:130: warning: incompatible implicit declaration of built-
      in function ‘exit’
      scripts/basic/fixdep.c: In function ‘print_cmdline’:
      scripts/basic/fixdep.c:135: warning: implicit declaration of function ‘printf’
      scripts/basic/fixdep.c:135: warning: incompatible implicit declaration of built-
      in function ‘printf’
      scripts/basic/fixdep.c: At top level:
      scripts/basic/fixdep.c:138: error: ‘NULL’ undeclared here (not in a function)
      scripts/basic/fixdep.c: In function ‘grow_config’:
      scripts/basic/fixdep.c:151: warning: implicit declaration of function ‘realloc’
      scripts/basic/fixdep.c:151: warning: assignment makes pointer from integer witho
      ut a cast
      scripts/basic/fixdep.c:153: warning: implicit declaration of function ‘perror’
      scripts/basic/fixdep.c:153: warning: incompatible implicit declaration of built-
      in function ‘exit’
      scripts/basic/fixdep.c: In function ‘is_defined_config’:
      scripts/basic/fixdep.c:169: warning: implicit declaration of function ‘memcmp’
      scripts/basic/fixdep.c: In function ‘define_config’:
      scripts/basic/fixdep.c:182: warning: implicit declaration of function ‘memcpy’
      scripts/basic/fixdep.c:182: warning: incompatible implicit declaration of built-
      in function ‘memcpy’
      scripts/basic/fixdep.c: In function ‘use_config’:
      scripts/basic/fixdep.c:201: error: ‘PATH_MAX’ undeclared (first use in this func
      tion)
      scripts/basic/fixdep.c:209: warning: incompatible implicit declaration of built-
      in function ‘memcpy’
      scripts/basic/fixdep.c:215: warning: implicit declaration of function ‘tolower’
      scripts/basic/fixdep.c:217: warning: incompatible implicit declaration of built-
      in function ‘printf’
      scripts/basic/fixdep.c:201: warning: unused variable ‘s’
      scripts/basic/fixdep.c: At top level:
      scripts/basic/fixdep.c:220: error: syntax error before ‘size_t’
      scripts/basic/fixdep.c:221: warning: function declaration isn’t a prototype
      scripts/basic/fixdep.c: In function ‘parse_config_file’:
      scripts/basic/fixdep.c:222: error: ‘map’ undeclared (first use in this function)
      scripts/basic/fixdep.c:222: error: ‘len’ undeclared (first use in this function)
      scripts/basic/fixdep.c:228: warning: implicit declaration of function ‘ntohl’
      scripts/basic/fixdep.c:239: warning: implicit declaration of function ‘isalnum’
      scripts/basic/fixdep.c: In function ‘strrcmp’:
      scripts/basic/fixdep.c:252: warning: implicit declaration of function ‘strlen’
      scripts/basic/fixdep.c:252: warning: incompatible implicit declaration of built-
      in function ‘strlen’
      scripts/basic/fixdep.c: In function ‘do_config_file’:
      scripts/basic/fixdep.c:263: error: storage size of ‘st’ isn’t known
      scripts/basic/fixdep.c:267: warning: implicit declaration of function ‘open’
      scripts/basic/fixdep.c:267: error: ‘O_RDONLY’ undeclared (first use in this func
      tion)
      scripts/basic/fixdep.c:269: warning: incompatible implicit declaration of built-
      in function ‘fprintf’
      scripts/basic/fixdep.c:269: error: ‘stderr’ undeclared (first use in this functi
      on)
      scripts/basic/fixdep.c:271: warning: incompatible implicit declaration of built-
      in function ‘exit’
      scripts/basic/fixdep.c:273: warning: implicit declaration of function ‘fstat’
      scripts/basic/fixdep.c:275: warning: implicit declaration of function ‘close’
      scripts/basic/fixdep.c:278: warning: implicit declaration of function ‘mmap’
      scripts/basic/fixdep.c:278: error: ‘PROT_READ’ undeclared (first use in this fun
      ction)
      scripts/basic/fixdep.c:278: error: ‘MAP_PRIVATE’ undeclared (first use in this f
      unction)
      scripts/basic/fixdep.c:278: warning: assignment makes pointer from integer witho
      ut a cast
      scripts/basic/fixdep.c:287: warning: implicit declaration of function ‘munmap’
      scripts/basic/fixdep.c:263: warning: unused variable ‘st’
      scripts/basic/fixdep.c: At top level:
      scripts/basic/fixdep.c:292: error: syntax error before ‘size_t’
      scripts/basic/fixdep.c:293: warning: function declaration isn’t a prototype
      scripts/basic/fixdep.c: In function ‘parse_dep_file’:
      scripts/basic/fixdep.c:294: error: ‘map’ undeclared (first use in this function)
      scripts/basic/fixdep.c:295: error: ‘len’ undeclared (first use in this function)
      scripts/basic/fixdep.c:297: error: ‘PATH_MAX’ undeclared (first use in this func
      tion)
      scripts/basic/fixdep.c:299: warning: implicit declaration of function ‘strchr’
      scripts/basic/fixdep.c:299: warning: incompatible implicit declaration of built-
      in function ‘strchr’
      scripts/basic/fixdep.c:301: warning: incompatible implicit declaration of built-
      in function ‘fprintf’
      scripts/basic/fixdep.c:301: error: ‘stderr’ undeclared (first use in this functi
      on)
      scripts/basic/fixdep.c:302: warning: incompatible implicit declaration of built-
      in function ‘exit’
      scripts/basic/fixdep.c:304: warning: incompatible implicit declaration of built-
      in function ‘memcpy’
      scripts/basic/fixdep.c:305: warning: incompatible implicit declaration of built-
      in function ‘printf’
      scripts/basic/fixdep.c:297: warning: unused variable ‘s’
      scripts/basic/fixdep.c: In function ‘print_deps’:
      scripts/basic/fixdep.c:334: error: storage size of ‘st’ isn’t known
      scripts/basic/fixdep.c:338: error: ‘O_RDONLY’ undeclared (first use in this func
      tion)
      scripts/basic/fixdep.c:340: warning: incompatible implicit declaration of built-
      in function ‘fprintf’
      scripts/basic/fixdep.c:340: error: ‘stderr’ undeclared (first use in this functi on)
      scripts/basic/fixdep.c:342: warning: incompatible implicit declaration of built- in function ‘exit’
      scripts/basic/fixdep.c:346: warning: incompatible implicit declaration of built- in function ‘fprintf’
      scripts/basic/fixdep.c:350: error: ‘PROT_READ’ undeclared (first use in this fun ction)
      scripts/basic/fixdep.c:350: error: ‘MAP_PRIVATE’ undeclared (first use in this f unction)
      scripts/basic/fixdep.c:350: warning: assignment makes pointer from integer witho ut a cast
      scripts/basic/fixdep.c:334: warning: unused variable ‘st’
      scripts/basic/fixdep.c: In function ‘traps’:
      scripts/basic/fixdep.c:369: warning: incompatible implicit declaration of built- in function ‘fprintf’
      scripts/basic/fixdep.c:369: error: ‘stderr’ undeclared (first use in this functi on)
      scripts/basic/fixdep.c:371: warning: incompatible implicit declaration of built- in function ‘exit’
      make[1]: *** [scripts/basic/fixdep] Error 1
      make: *** [scripts_basic] Error 2

      Comment


        #4
        Re: Kernel/Recompile/Fnfxd

        Code:
        nticompass@nticompass-laptop:/usr/src/linux-source-2.6.17$ sudo make menuconfig
         HOSTLD scripts/kconfig/mconf
         HOSTCC scripts/kconfig/lxdialog/checklist.o
        In file included from scripts/kconfig/lxdialog/checklist.c:24:
        scripts/kconfig/lxdialog/dialog.h:31:20: error: curses.h: No such file or directory
        In file included from scripts/kconfig/lxdialog/checklist.c:24:
        scripts/kconfig/lxdialog/dialog.h:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_colors’
        scripts/kconfig/lxdialog/dialog.h:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_shadow’
        scripts/kconfig/lxdialog/dialog.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘attributes’
        scripts/kconfig/lxdialog/dialog.h:143: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/dialog.h:146: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/dialog.h:147: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/dialog.h:148: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/dialog.h:149: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/dialog.h:151: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/checklist.c:31: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/checklist.c:59: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/checklist.c:95: error: expected ‘)’ before ‘*’ token
        scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’:
        scripts/kconfig/lxdialog/checklist.c:117: error: ‘WINDOW’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:117: error: (Each undeclared identifier is reported only once
        scripts/kconfig/lxdialog/checklist.c:117: error: for each function it appears in.)
        scripts/kconfig/lxdialog/checklist.c:117: error: ‘dialog’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:117: error: ‘list’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:117: warning: left-hand operand of comma expression has no effect
        scripts/kconfig/lxdialog/checklist.c:117: warning: statement with no effect
        scripts/kconfig/lxdialog/checklist.c:121: warning: implicit declaration of function ‘endwin’
        scripts/kconfig/lxdialog/checklist.c:122: warning: implicit declaration of function ‘fprintf’
        scripts/kconfig/lxdialog/checklist.c:122: warning: incompatible implicit declaration of built-in function ‘fprintf’
        scripts/kconfig/lxdialog/checklist.c:122: error: ‘stderr’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:140: error: ‘COLS’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:141: error: ‘LINES’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function ‘draw_shadow’
        scripts/kconfig/lxdialog/checklist.c:143: error: ‘stdscr’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function ‘newwin’
        scripts/kconfig/lxdialog/checklist.c:146: warning: implicit declaration of function ‘keypad’
        scripts/kconfig/lxdialog/checklist.c:146: error: ‘TRUE’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function ‘draw_box’
        scripts/kconfig/lxdialog/checklist.c:148: error: ‘attributes’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:149: warning: implicit declaration of function ‘wattrset’
        scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function ‘mvwaddch’
        scripts/kconfig/lxdialog/checklist.c:152: warning: implicit declaration of function ‘waddch’
        scripts/kconfig/lxdialog/checklist.c:156: warning: implicit declaration of function ‘print_title’
        scripts/kconfig/lxdialog/checklist.c:159: warning: implicit declaration of function ‘print_autowrap’
        scripts/kconfig/lxdialog/checklist.c:166: warning: implicit declaration of function ‘subwin’
        scripts/kconfig/lxdialog/checklist.c:190: warning: implicit declaration of function ‘print_item’
        scripts/kconfig/lxdialog/checklist.c:194: warning: implicit declaration of function ‘print_arrows’
        scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function ‘print_buttons’
        scripts/kconfig/lxdialog/checklist.c:199: warning: implicit declaration of function ‘wnoutrefresh’
        scripts/kconfig/lxdialog/checklist.c:201: warning: implicit declaration of function ‘doupdate’
        scripts/kconfig/lxdialog/checklist.c:204: warning: implicit declaration of function ‘wgetch’
        scripts/kconfig/lxdialog/checklist.c:211: error: ‘KEY_UP’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:211: error: ‘KEY_DOWN’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:221: error: ‘FALSE’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:222: warning: implicit declaration of function ‘scrollok’
        scripts/kconfig/lxdialog/checklist.c:223: warning: implicit declaration of function ‘wscrl’
        scripts/kconfig/lxdialog/checklist.c:232: warning: implicit declaration of function ‘wrefresh’
        scripts/kconfig/lxdialog/checklist.c:282: warning: incompatible implicit declaration of built-in function ‘fprintf’
        scripts/kconfig/lxdialog/checklist.c:283: warning: implicit declaration of function ‘delwin’
        scripts/kconfig/lxdialog/checklist.c:287: error: ‘KEY_LEFT’ undeclared (first use in this function)
        scripts/kconfig/lxdialog/checklist.c:288: error: ‘KEY_RIGHT’ undeclared (first use in this function)
        make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
        make[1]: *** [menuconfig] Error 2
        make: *** [menuconfig] Error 2
        And also:
        Code:
        nticompass@nticompass-laptop:~$ sudo modprobe toshiba_acpi
        FATAL: Error inserting toshiba_acpi (/lib/modules/2.6.17-10-386/kernel/drivers/acpi/toshiba_acpi.ko): No such device

        Help, what do I do now?

        Comment


          #5
          Re: Kernel/Recompile/Fnfxd

          I just thought this might be some good reading while you are working on your project.

          http://www.kroah.com/lkn/

          at the bottom of the page is the book that you can download for free. http://www.kernel.org/pub/linux/kern...kn_pdf.tar.bz2

          Comment


            #6
            Re: Kernel/Recompile/Fnfxd

            Is there any tutorial of how to do this in Edgy?

            Comment


              #7
              Re: Kernel/Recompile/Fnfxd

              *bump, how do I get my Toshiba's Fn Keys to work in Kubuntu edgy?

              Comment

              Working...
              X