busybox移植:全能脚本版

因为有个ssh的问题要分析,所以移植busybox。因为干净,避免其他的问题的干扰。本篇文章将初始化需要创建的内容全都放到了一个脚本文件中,极大的简化了根文件系统的创建过程。

相关文章:

zlib交叉编译:C语言化的脚本-CSDN博客

openssl移植:精致的脚本版-CSDN博客

openssh移植:精致的脚本版-CSDN博客

源码下载 

官网:

https://busybox.net/

下载最新的版本:

wget https://busybox.net/downloads/busybox-1.36.1.tar.bz2

解压文件:

tar jxvf busybox-1.36.1.tar.bz2 

编译脚本 build.sh

 脚本完成功能

1 编译busybox的默认配置

2 移植VSFTP,参考vsftpd移植:全配置脚本-CSDN博客

3 移植openssh,参考openssh移植:精致的脚本版-CSDN博客

生成的根文件系统的ssh可使用 -- 用户root,密码root登录

生成的根文件系统的ftp可使用 -- 用户root,密码root登录

#!/bin/bash
set -e

export PATH=/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin:$PATH
ARM_BIN_PATH="/usr/local/arm/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin"
MAKE="make ARCH=arm CROSS_COMPILE=${ARM_BIN_PATH}/arm-linux-gnueabihf-"

install_path=`pwd`/myrootfs
rootpath=`pwd`
nfspath="/home/lkmao/nfsroot"
rootfspath="${nfspath}/myrootfs"

function build_busybox {
    if [ ! -z "$1" ] && [ -f ".config" ];then
	    echo "delete .config"
	    # rm .config
        read -p "do you wan to delete .config file? (y/n):" response
        echo "$response"
        case "$response" in  
            [yY][eE][sS]|[yY])  

                if rm .confi
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千册

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值