请教BusyBox编译文件系统后要求模块化载入的问题

编译打包和其他
回复
vergilcj
帖子: 3
注册时间: 2008-11-28 21:59

请教BusyBox编译文件系统后要求模块化载入的问题

#1

帖子 vergilcj » 2009-03-24 13:25

刚开始接触ubuntu,各位大侠多指教

学校的设计要求是用BusyBox编译一个新的文件系统,用insmod载入,我只做到BusyBox编译完后,并mkdir其他ubuntu目录树中应有的几个文件夹,之后使用mkyaffsimage编译为yaffs.img镜像,但是这个应该是作为根文件系统在系统启动时被加载,并不能做为模块被insmod调用。

请教各位该怎样生成可调用的模块?
:em20 :em20
头像
wangdu2002
帖子: 13284
注册时间: 2008-12-13 19:39
来自: 物华天宝人杰地灵

Re: 请教BusyBox编译文件系统后要求模块化载入的问题

#2

帖子 wangdu2002 » 2009-03-24 13:38

暂时不会,正在学习中,帮你顶下! :em03
行到水穷处,坐看云起时。
海内生明月,天涯共此夕。
--------------------吾本独!
xiaoweicau
帖子: 8
注册时间: 2007-11-30 20:35

Re: 请教BusyBox编译文件系统后要求模块化载入的问题

#3

帖子 xiaoweicau » 2009-03-27 18:11

#请教为什么make menuconfig设置完后,进行make时编译不过去,

将BusyBox-1.2.0.tar.bz2释放到/opt/EmbedSky,make menuconfig设置完后,进行make时编译不过去,

naoc@naoc-desktop:/opt/EmbedSky/BusyBox-1.2.0$ sudo gedit /etc/bash.bashrc

naoc@naoc-desktop:/opt/EmbedSky/BusyBox-1.2.0$ source /etc/profile

naoc@naoc-desktop:/opt/EmbedSky/BusyBox-1.2.0$ arm-linux-gcc -v
Reading specs from /opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3/lib/gcc/arm-linux/3.4.1/specs
Configured with: /opt/crosstool/crosstool-0.28/build/arm-linux/gcc-3.4.1-glibc-2.3.3/gcc-3.4.1/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3 --with-float=soft --with-headers=/opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3/arm-linux/include --with-local-prefix=/opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.1

naoc@naoc-desktop:/opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3/bin$ ls -l
总用量 82748
-rwxr-xr-x 1 500 500 1802837 2008-01-01 12:41 arm-linux-addr2line
-rwxr-xr-x 2 500 500 1859823 2008-01-01 12:41 arm-linux-ar
-rwxr-xr-x 2 500 500 3239558 2008-01-01 12:41 arm-linux-as
-rwxr-xr-x 2 500 500 286992 2008-01-01 13:09 arm-linux-c++
-rwxr-xr-x 1 500 500 1758596 2008-01-01 12:41 arm-linux-c++filt
-rwxr-xr-x 1 500 500 286091 2008-01-01 13:09 arm-linux-cpp
-rwxr-xr-x 1 root root 27415488 2008-06-03 18:32 arm-linux-ddd
-rwxr-xr-x 2 500 500 286992 2008-01-01 13:09 arm-linux-g++
-rwxr-xr-x 2 500 500 284868 2008-01-01 13:09 arm-linux-gcc
-rwxr-xr-x 2 500 500 284868 2008-01-01 13:09 arm-linux-gcc-3.4.1
-rwxr-xr-x 1 500 500 16214 2008-01-01 13:09 arm-linux-gccbug
-rwxr-xr-x 1 500 500 103066 2008-01-01 13:09 arm-linux-gcov
-rwxr-xr-x 1 root root 12656380 2008-06-03 21:02 arm-linux-gdb
-rwxr-xr-x 1 root root 12656413 2008-06-03 21:02 arm-linux-gdbtui
-rwxr-xr-x 1 500 500 2281603 2008-01-01 12:41 arm-linux-gprof
-rwxr-xr-x 2 500 500 2529396 2008-01-01 12:41 arm-linux-ld
-rwxr-xr-x 2 500 500 1836066 2008-01-01 12:41 arm-linux-nm
-rwxr-xr-x 1 500 500 2339956 2008-01-01 12:41 arm-linux-objcopy
-rwxr-xr-x 1 500 500 2483380 2008-01-01 12:41 arm-linux-objdump
-rwxr-xr-x 2 500 500 1859822 2008-01-01 12:41 arm-linux-ranlib
-rwxr-xr-x 1 500 500 384088 2008-01-01 12:41 arm-linux-readelf
-rwxr-xr-x 1 root root 2128817 2008-06-03 21:02 arm-linux-run
-rwxr-xr-x 1 500 500 1709094 2008-01-01 12:41 arm-linux-size
-rwxr-xr-x 1 500 500 1683764 2008-01-01 12:41 arm-linux-strings
-rwxr-xr-x 2 500 500 2339951 2008-01-01 12:41 arm-linux-strip
naoc@naoc-desktop:/opt/EmbedSky/crosstools_3.4.1_softfloat/arm-linux/gcc-3.4.1-glibc-2.3.3/bin$

naoc@naoc-desktop:/opt/EmbedSky/BusyBox-1.2.0$ sudo make menuconfig
#
# using defaults found in .config
#

*** End of BusyBox configuration.

naoc@naoc-desktop:/opt/EmbedSky/BusyBox-1.2.0$ sudo make
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-ar: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-ar: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-ar: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-gcc: not found
/bin/sh: arm-linux-ar: not found
GEN include/bbconfigopts.h
GEN .depend
/opt/EmbedSky/BusyBox-1.2.0/include/bbconfigopts.h:13 hmm, unterminated
make[1]: *** [.depend] 错误 1
make: *** [_all] 错误 2
vergilcj
帖子: 3
注册时间: 2008-11-28 21:59

Re: 请教BusyBox编译文件系统后要求模块化载入的问题

#4

帖子 vergilcj » 2009-03-31 13:24

menuconfig里设置交叉编译为arm-linux-后保存退出
make ARCH=arm CROSS_COMPILE=arm-linux-
make ARCH=arm CROSS_COMPILE=arm-linux- install
提示找不到arm-linux-gcc的话。设置一下arm-linux-的环境变量
回复