mips64位下busybox编译

本文详细介绍如何使用BusyBox 1.19.4版本进行静态编译的过程,包括配置交叉编译器、选择编译选项及安装目标平台的基础文件系统。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值