20070627 uclinux make config
http://www.yippeesoft.com
 
 http://ftp.snapgear.org/pub/snapgear/tools/arm-linux/
 http://www.uclinux.org/pub/uClinux/dist/

首先MAKE XCONFIG
基本OK

 uClinux-dist]# make dep
make ARCH=arm CROSS_COMPILE=arm-linux- -C linux-2.6.x dep
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/home/sf/skyeyeuclinux/uClinux-dist/linux-2.6.x\’
tion) /sbin/installkernel or\’
  echo  \’                  install to $$(INSTALL_PATH) and run lilo\’*** Warning: make dep is unnecessary now.
make[1]: Leaving directory `/home/sf/skyeyeuclinux/uClinux-dist/linux-2.6.x\’

一定是arm-linux-gcc所在路径不在你的环境变量PATH里面,也就是说你的交叉编译环境没有配置好! 
  可以通过编辑/etc/profile,用pathmunge   /your/arm-linux-gcc/path   来添加!
  或者设置环境变量 
  export   
  PATH=$PATH:/usr/local/arm-linux

  重新解压ARM-LINUX。。 .TAR 重新解压到/USR/LOCAL
然后出现
  uClinux-dist]# make dep
make ARCH=arm CROSS_COMPILE=arm-linux- -C linux-2.6.x dep
make[1]: Entering directory `/home/sf/skyeyeuclinux/uClinux-dist/linux-2.6.x\’
*** Warning: make dep is unnecessary now.
make[1]: Leaving directory `/home/sf/skyeyeuclinux/uClinux-dist/linux-2.6.x\’

资料:
#make dep(此命令执行不成功,显示:*** warning:make dep is unnecessary now.,网上看到说2.6的不用这一步,不知道是不是真的???)
#make clean
#make bzImage(编译过程中会出现很多的警告信息,不过最后显示:kernel:arch/i386/boot/bzImage is ready(#1),,这样 编译应该是通过了吧??)
#make modules(编译过程中会出现很多的警告信息)
#make modules_install(不成功,显示信息:make:****没有规则可以创建目标modules_install,不知道是什么原因??)
6.#su -
# /sbin/depmod -a
#sudo mkinitrd /boot/initrd.img-2.6.15.1 2.6.15.1(信息:No dep file found for kernel 2.6.15.1,我估计是因为没有执行make dep的原因)

其实,2.6内核作了优化,不必显示的执行make dep 和make bzImage,只需要直接执行
make 就行,系统会自动完成make dep 和 make bzImage 所做的工作。
sudo mkinitrd /boot/initrd.img-2.6.15.1 2.6.15.1也不用,这个make install会自动作的,并且在grub中加入新内核的启动项。(我用的是FC6.0)。

于是就MAKE
结果

arch/arm/mm/proc-syms.c:38: error: `__cpu_clear_user_page\’ undeclared here (not in a function)
arch/arm/mm/proc-syms.c:38: warning: type defaults to `int\’ in declaration of `__cpu_clear_user_page\’
arch/arm/mm/proc-syms.c:39: error: `__cpu_copy_user_page\’ undeclared here (not in a function)
arch/arm/mm/proc-syms.c:39: warning: type defaults to `int\’ in declaration of `__cpu_copy_user_page\’

然后想用MAKE XCONFIG
结果图形界面下出错

然后用终端模式 出现
Application initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name "button"
    while executing
"button .ref"
    (file "config.tk" line 51)

    然后 MAKE CLEAN一下
    重新开始配置

    改为使用2.4核心,这次MAKE DEP OK了

    可是没有LUA PYTHON PERL
    又再次用2.6 结果
    drivers/built-in.o: In function `drm_lock_take\’:
bitmap.c:(.text+0×27e04): undefined reference to `cmpxchg\’

drivers/video/console/vgacon.c: In function `vgacon_startup\’:
drivers/video/console/vgacon.c:486: error: `PCIMEM_BASE\’ undeclared (first use in this function)
drivers/video/console/vgacon.c:486: error: (Each undeclared identifier is reported only once
drivers/video/console/vgacon.c:486: error: for each function it appears in.)
drivers/video/console/vgacon.c: In function `vgacon_do_font_op\’:
drivers/video/console/vgacon.c:1037: error: `PCIMEM_BASE\’ undeclared (first use in this function)
make[4]: *** [drivers/video/console/vgacon.o] Error 1
make[3]: *** [drivers/video/console] Error 2
make[2]: *** [drivers/video] Error 2

郁闷~~
大部分资料都是基于 2.4的
别人在fedora下用skyeye模拟开发板at91e40运行uclinux成功,我在ubuntu6.0下按照如下步骤
1.安装skyeye_1_2_2_Rel
2.建好 arm-elf开发工具链
3.解压uClinux-dist-20041215.tar.gz,编译(曾多次出现错误)
4.建skyeye.conf
5.运行

SkyEye is an Open Source Software Project (GPL Licence). Origin from GDB/Armulator, The goal of SkyEye is to provide an integrated simulation environment in Linux and Windows. SkyEye environment simulates typical Embedded Computer Systems (Now it supports a series ARM architecture based microprocessors and Blackfin DSP Processor). You can run some Embedded Operation System such as ARM Linux, uClinux, uc/OS-II (ucos-ii) etc. in SkyEye, and analysis or debug them at source level.

Instructions for compiling:

   1. Install a tool chain. If you are using a binary tool chain package then install that now. If you are building your own tool chain, then do that now.

   2. Un-archive the source package. It is a gziped tar image, so do:

              tar xvzf uClinux-dist-XXXXXXXX.tar.gz

      This will dump the source into a uClinux-dist directory. Typically you would do this somewhere in your local user directory. (Good practice dictactes that you don\’t build things like this as root :-)

   3. Cd into the source tree:

              cd uClinux-dist

   4. Configure the Linux kernel. Configure the build for your specific target. Do the following:

              make xconfig

      Or you can use the menuconfig or config make target if you are not running the X windows system on your development machine.

      The top level selection is strait forward if you know the vendor of the board you want to compile for. You can choose also to modify the underlying default kernel and application configuration if you want.

      At first I suggest using the default configuration for your vendors board. It will almost certainly work as is on your board.

   5. Build the dependencies (this step is not required if you choose to use the 2.6.x kernel):

              make dep

   6. Build the image:

              make

Thats it!

历史博文

标签:, , , , ,
三月 3, 2008 at 8:59 上午 by yippee 1,112 次
Category: Dev
Tags: , , , , ,