Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

error with config the kernel

hi:

today,I build tools, kernel on Linux according to the manual on http://hungryhippo.jot.com/wikihome,but (http://hungryhippo.jot.com/wikihome,but) with some problems,please help me,my step:

1、tar jxf nios2gcc.tar.bz2 -C /

2、tar jxf nios2libs.tar.bz2 -C /

3、tar jxf nios2rootfs.tar.bz2

4、PATH=$PATH:/opt/nios2/bin

try out:nios2-linux-uclibc-gcc -v

It's no problem.

5、tar jxf uClinux-dist-test-20060511.tar.bz2

6、cd uClinux-dist-test

zcat uClinux-dist.diff.gz | patch -p0

7、cd ~/linux-2.6.x

make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- hwselect SYSPTF=your_system.ptf

8、make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- menuconfig

at this moment,appear the error :

arch/nios2nommu/kconfig: 239: can't open file "mm/kconfig"

when execut "make menuconfig",it's ok! But there is no "jtag uart" in "Device drivers-->charcter devices-->serial drivers-->"。

And there are so many errors when compie the kernel.

I'm so puzzling! it's driving me crazy!

How can I solve it? Thanks a lot.

6 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    step7 is wrong, don't cd ~/linux-2.6.x .

    The uClinux-dist build procedure is a little different from the buildroot guide.

    cd ~/uClinux-dist-test

    make menuconfig

    Kernel/Library/Defaults Selection --->

    (linux-2.6.x) Kernel Version

    (None) Libc Version

    [ ] Default all settings (lose changes)

    [*] Customize Kernel Settings

    [*] Customize Vendor/User Settings

    [ ] Update Default Vendor Settings

    Then <exit> <exit> <yes> .

    It will enter kernel config and apps config.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@May 27 2006, 09:17 AM

    step7 is wrong, don&#39;t cd ~/linux-2.6.x .

    the uclinux-dist build procedure is a little different from the buildroot guide.

    cd ~/uclinux-dist-test

    make menuconfig

    kernel/library/defaults selection --->

    (linux-2.6.x) kernel version

    (none) libc version

    [ ] default all settings (lose changes)

    [*] customize kernel settings

    [*] customize vendor/user settings

    [ ] update default vendor settings

    then <exit> <exit> <yes> .

    it will enter kernel config and apps config.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15612)

    --- quote end ---

    --- Quote End ---

    hi,hippo,

    thanks for your reply,i did what you said,but there are some errors all the same:

    [zhengkaike@localhost ~]$ cd uClinux-dist

    [zhengkaike@localhost uClinux-dist]$ ls

    autoconf.h config.arch Documentation include linux-2.4.x Makefile.orig README uClibc uclinux_test.old bin config.in freeswan lib linux-2.6.x Makefile.rej SOURCE uClinux-dist.diff.gz user config COPYING glibc linux-2.0.x Makefile openswan tools uclinux_test vendors

    [zhengkaike@localhost uClinux-dist]$ make menuconfig

    sh: /home/zhengkaike/uClinux-dist/tools/config.guess: &#27809;&#26377;&#37027;&#20010;&#25991;&#20214;&#25110;&#30446;&#24405;

    sh: /home/zhengkaike/uClinux-dist/tools/config.guess: &#27809;&#26377;&#37027;&#20010;&#25991;&#20214;&#25110;&#30446;&#24405;

    config/mkconfig > config.in

    make -C /home/zhengkaike/uClinux-dist/config/scripts/lxdialog all

    make[1]: Entering directory `/home/zhengkaike/uClinux-dist/config/scripts/lxdialog&#39;

    make[1]: Leaving directory `/home/zhengkaike/uClinux-dist/config/scripts/lxdialog&#39;

    Using defaults found in .config

    Preparing scripts: functions, parsing...done.

    Saving your kernel configuration...

    *** End of Linux kernel configuration.

    *** Check the top-level Makefile for additional configuration.

    *** Next, you must run &#39;make dep&#39;.

    sh: /home/zhengkaike/uClinux-dist/tools/config.guess: &#27809;&#26377;&#37027;&#20010;&#25991;&#20214;&#25110;&#30446;&#24405;

    sh: /home/zhengkaike/uClinux-dist/tools/config.guess: &#27809;&#26377;&#37027;&#20010;&#25991;&#20214;&#25110;&#30446;&#24405;

    make[1]: Entering directory `/home/zhengkaike/uClinux-dist&#39;

    make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- -C linux-2.6.x menuconfig

    /bin/sh: nios2-linux-uclibc-gcc: command not found

    make[2]: nios2-linux-uclibc-gcc&#65306;&#21629;&#20196;&#26410;&#25214;&#21040;

    make[2]: Entering directory `/home/zhengkaike/uClinux-dist/linux-2.6.x&#39;

    /bin/sh: nios2-linux-uclibc-gcc: command not found

    make[2]: nios2-linux-uclibc-gcc&#65306;&#21629;&#20196;&#26410;&#25214;&#21040;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:320: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“hwselect”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:141: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“hwselect”&#30340;&#26087;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:326: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“archclean”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:147: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“archclean”&#30340;&#26087;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:334: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“include/nios2_system.h”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:155: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“include/nios2_system.h”&#30340;&#26087;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:340: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“arch/nios2nommu/kernel/vmlinux.lds.S”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:161: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“arch/nios2nommu/kernel/vmlinux.lds.S”&#30340;&#26087;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:344: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“linuxsrec”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:165: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“linuxsrec”&#30340;&#26087;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:349: &#35686;&#21578;&#65306;&#35206;&#30422;&#20851;&#20110;&#30446;&#26631;“zImage”&#30340;&#21629;&#20196;

    /home/zhengkaike/uClinux-dist/linux-2.6.x/arch/nios2nommu/Makefile:170: &#35686;&#21578;&#65306;&#24573;&#30053;&#20851;&#20110;&#30446;&#26631;“zImage”&#30340;&#26087;&#21629;&#20196;

    scripts/kconfig/mconf arch/nios2nommu/Kconfig

    arch/nios2nommu/Kconfig:239: can&#39;t open file "mm/Kconfig"

    make[3]: *** [menuconfig] &#38169;&#35823; 1

    make[2]: *** [menuconfig] &#38169;&#35823; 2

    make[2]: Leaving directory `/home/zhengkaike/uClinux-dist/linux-2.6.x&#39;

    make[1]: *** [linux_menuconfig] &#38169;&#35823; 2

    make[1]: Leaving directory `/home/zhengkaike/uClinux-dist&#39;

    make: *** [menuconfig] &#38169;&#35823; 2

    [zhengkaike@localhost uClinux-dist]$

    please help me, thank you very much.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The hungryhippo.jot.com is obsolete.

    Please use the new nios wiki, http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)

    Please remove old uClinux-dist-test dir, then untar and patch again.

    The dir name is uClinux-dist-test, but not uClinux-dist.

    Try "echo $PATH" and "nios2-linux-uclibc-gcc -v" again.

    Did you add the PATH into file ~/.bash_profile ? (if you use bash)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hippo@May 28 2006, 09:05 AM

    the hungryhippo.jot.com is obsolete.

    please use the new nios wiki, http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)

    please remove old uclinux-dist-test dir, then untar and patch again.

    the dir name is uclinux-dist-test, but not uclinux-dist.

    try "echo $path" and "nios2-linux-uclibc-gcc -v" again.

    did you add the path into file ~/.bash_profile ? (if you use bash)

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=15626)

    --- quote end ---

    --- Quote End ---

    Sorry,I can&#39;t find the file ~/.bash_profile.

    I try out "nios2-linux-uclibc-gcc -v" after i did "PATH=$PATH:/opt/nios2/bin", it&#39;s ok.

    but restart the linux os, it&#39;s faild.

    Another question: what&#39;s mean "Then you can edit the build script, and restart from the middle"?

    Thank you !
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I update the wiki about .bash_profile, http://nioswiki.jot.com/wikihome/operating...binarytoolchain (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/binarytoolchain)

    About edit the build script, I mean you can comment out those had done successfully, just start from where it failed.

    But I don&#39;t use the build script approach now.

    If you are new to Nios2 uClinux, I would suggest you install the binary toolchain and follow the uClinux-dist approach. http://nioswiki.jot.com/wikihome/operating...nux/uclinuxdist (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/uclinuxdist)