自己动手编译软路由固件!基于immortalwrt 的编译教程,完全DIY定制自己的路由器固件


1.安装debian 准备好镜像
vmware设置好 开机安装
装完debian 发现系统内终端 无法粘贴 命令
我们用第三方的SSH客户端连接进行
首推 MobaXterm
https://mobaxterm.mobatek.net/
https://mobaxterm.mobatek.net/download-home-edition.html

至此 我们只能重装系统
记得不用桌面 只要SSH即可
来吧 关机 清理 重建
发现了用最简单的镜像反而比完全版DVD好用
直接网络版下载文件 这就比刚才坑爹的需要DVD才能安装 好多了 也是正常的

所以千万不要用完整版DVD 因为需要更换源
删除!

这里很关键 只选SSH server

终于进来了
总结
sudo: command not found 的解决方法
apt-get install sudo 一下就搞定了

ipconfig命令错误 用ifconfig!
提示找不到“ifconfig”,根据提示安装“net-tools”,运行命令“sudo apt install net-tools”即可安装。,然后再运行命令“ifconfig -a”就可以查看网络连接信息了
#https://www.31du.cn/blog/ubuntu-ifconfig.html

开启root登录
nano /etc/ssh/sshd_config(编辑文件)
PermitRootLogin yes
PasswordAuthentication yes

编辑好文件后,按下Ctrl + X退出编辑器。若文件有未保存的更改,Nano会提示是否保存:
按Y保存更改并退出

重启系统
sudo roboot

重启后 vmware用root登录
ifconfig -a 看ip
然后用 mobaxter软件连接用root登录!

替换源以及安装软件包
apt update -y
apt full-upgrade -y
apt install apt-transport-https ca-certificates

/etc/apt/sources.list
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib

apt update -y
apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache clang cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \
g++-multilib git gnutls-dev gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev \
libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses-dev libpython3-dev \
libreadline-dev libssl-dev libtool libyaml-dev libz-dev lld llvm lrzsz mkisofs msmtp nano \
ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip python3-ply python3-docutils \
python3-pyelftools qemu-utils re2c rsync scons squashfs-tools subversion swig texinfo uglifyjs \
upx-ucl unzip vim wget xmlto xxd zlib1g-dev zstd

 

su xc   (切换自己的非root用户名 )
cd
git clone -b v24.10.2 --single-branch --filter=blob:none https://github.com/immortalwrt/immortalwrt
#https://downloads.immortalwrt.org/ 查看版本号
cd immortalwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make download -j8 V=s
make -j24   (数字24自己随便换 代表CPU线程数 根据自己电脑配置来 尽量拉大)

 

 

 

软件包中英文对照:#https://www.31du.cn/open/immortalwrt.html

#https://www.right.com.cn/forum/thread-8387547-1-1.html

参考资料https://www.bilibili.com/video/BV1LWDoYHEfE

#https://www.geekxw.top/2053/

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。