mips64位下busybox编译

来源:互联网 发布:网络推广网站有哪些 编辑:程序博客网 时间:2024/06/10 04:24

1. 下载需要的文件
busybox-1.19.4.tar.bz2

2.解压,配置和编译

#tar -jxf busybox-1.19.4.tar.bz2

#cd busybox

3.修改makefile
ARCH ?= $(SUBARCH)
修改成了
ARCH ?= mips
CROSS_COMPILE ?=
修改为CROSS_COMPILE ?=/home/aa/work/trunk/cross_compiler/gcc-4.4-64-gnu/bin/mips64el-linux-

4.make menuconfig

Busybox Settings  --->
    Build Options  --->
        Cross Compiler prefix
       
        填入: /home/aa/work/trunk/cross_compiler/gcc-4.4-64-gnu/bin/mips64el-linux-

BusyBox installation prefix
       填入:  ../install

Busybox Settings  --->
   Build Options  --->
          [*] Build BusyBox as a static binary (no shared libs)
         
make -j8
make install

5.创建设备结点和目录

#cd ../install
#mkdir dev
#cd dev
#mknod console c 5 1
#mknod null c 3 1
#cd ../
#mkdir tmp root etc proc sys mnt lib
#echo "root::0:0:root:/bin/sh" > etc/passwd
#echo "root:x:0:" > etc/groups
#echo "::respawn:/sbin/getty 38400 tty1" > etc/inittab

#mkdir lib/modules
#mkdir lib/modules/3.0.4v1

#mkdir etc/init.d
#cd etc/init.d
#vim rcS
输入如下内容,保存
#!/bin/ash
mount -t proc proc /proc
mount -t sysfs sysfs /sys
echo "Welcome! Master!"
#chmod a+rwx rcS




0 0