? echo "making dir : home root boot" ? mkdir home root boot
? echo "done"
在你想要建立根文件系统的地方,运行上面建立的脚本:? $ ./mkroot creatint rootfs dir...... making dir : bin dev etc lib proc sbin sys usr making dir : mnt tmp var making dir : home root boot done $ cd rootfs/dev/ $ su 口令: # mknod -m 600 console c 5 1;mknod -m 666 null c 1 3;exit Exit
(2)配置busybox $ tar -xjvf busybox-1.9.1.tar.bz2 修改Makefile kwrite Makefile
......(第174行附近) #ARCH ?= $(SUBARCH) #CROSS_COMPILE ?= ......(修改为) ARCH = arm CROSS_COMPILE = arm-linux- 使用menuconfig配置 $ make menuconfig
vi-style line editing commands ? ? (15) History size ? ?
History saving ? ?
Tab completion? ?
Username completion ?
?
Fancy shell prompts
Linux System Utilities --->? ?
mdev //(3) ?
Support /etc/mdev.conf ?
Support command execution at device addition/removal Linux Module Utilities ---> ? ? [N] Support version 2.2.x to 2.4.x Linux kernels? Shells --->? ? --- Ash Shell Options 下的选项全选
编译安装 .1]$ make ...... ?Library crypt is needed ?Library m is needed Final link with: crypt m $ make install
linux-2.6.19 -- make menuconfig File systems ---> ? Pseudo filesystems --->? ?
sysfs file system support ? ?
Virtual memory file system support (former shm fs)? ?
Tmpfs POSIX Access Control Lists
常见问题 (1)因为busybox主要应用于对空间要求非常严格的嵌入式系统,所以它推荐使用uclibc而不鼓励使用glibc,如果你没有安装uclibc,而且在 build Options也选择了Build BusyBox as a static binary(no shared libs), Busybox Settings ---> ? Build Options ---> ?
build busybox as a static binary (no share libs) 那肯定无法编译通过的,当然如果你之前build Options选择的是动态编译的话就不会有这样的问题出现了。假设你是第一种情况,编译的时候将会遇到下面问题: applets/applets.c:20:2: error: #warning Static linking against glibc produces buggy executables applets/applets.c:21:2: error: #warning (glibc does not cope well with ld --gc-sections). applets/applets.c:22:2: error: #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 applets/applets.c:23:2: error: #warning Note that glibc is unsuitable for static linking anyway. applets/applets.c:24:2: error: #warning If you still want to do it, remove -Wl,--gc-sections applets/applets.c:25:2: error: #warning from top-level Makefile and remove this warning. make[1]: *** [applets/applets.o] Error 1
# vi applets/applets.c /* #if ENABLE_STATIC && defined(__GLIBC__) && !defined(__UCLIBC__) #warning Static linking against glibc produces buggy executables #warning (glibc does not cope well with ld --gc-sections). #warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400 #warning Note that glibc is unsuitable for static linking anyway. #warning If you still want to do it, remove -Wl,--gc-sections #warning from top-level Makefile and remove this warning. #error Aborting compilation. #endif */ 该情况在使用1.10.4版本时未出现
文章评论(0条评论)
登录后参与讨论