|
|
地址
https://github.com/hanwckf/immortalwrt-mt798x
要求
To build with this project, Ubuntu 20.04 LTS is preferred. And you need use the CPU based on AMD64 architecture, with at least 4GB RAM and 25 GB available disk space. Make sure the Internet is accessible.
我用VMware虚拟机安装ubuntu 服务器版(虚拟机设置成双核4线程,8g内存50g硬盘)进行编译的。第一次编译提示gcc报错,查了下说是版本太老,20.04换成22.04版本顺利解决。第二次报错提示空间不够,文件在/home分区下,发现所分配的30g空间不够用。所以虚拟机的硬盘要足够大,安装ubuntu系统时最好手动分区,把编译文件所在的分区设置足够大,最好50g以上。
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache clang clangd cmake cpio curl device-tree-compiler ecj fastjar flex gawk gettext gcc-multilib \ g++-multilib git gperf haveged help2man intltool lib32gcc-s1 libc6-dev-i386 libelf-dev libglib2.0-dev \ libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5 libncursesw5-dev libreadline-dev \ libssl-dev libtool lld lldb lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 \ python3 python3-pip python3-ply python-docutils qemu-utils re2c rsync scons squashfs-tools subversion swig \ texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
20.04版本上述操作一切正常,换成22.04时python-docutils会报错,需要把其改成python3-docutils。最后使用make -j$(nproc)编译会报错,改成 make V=s -j1 最终顺利编译成功。总结一下 1 使用ubuntu 22.04版本 2 硬盘空间要足够 3不要用root用户 4 python-docutils改成python3-docutils 5第一次编译用单线程make V=s -j1,二次编译可以用make -j$(nproc)。当然这些问题只针对本人遇到的情况,不保证都通用。希望大家完美避坑,顺利编译成功。
|
|