openwrt 编译

环境:Ubuntu 16.04

版本:compex openwrt18.04

sudo apt-get update
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync

git clone https://github.com/coolsnowwolf/lede.git
cd lede

./scripts/feeds clean

./scripts/feeds update -a && ./scripts/feeds install -a

make menuconfig

make -j8 download V=s
make -j1 V=s
# make -j$(($(nproc) + 1)) V=s

 

# 二次编译
cd lede                                                   # 进入LEDE目录

rm -rf ./tmp                                              # 清除缓存
# rm -rf .config                                          # 清除编译配置
# ./scripts/feeds clean                                   # 清除feeds
# make clean                                              # (清除bin下面的以前编译的成果)

git pull                                                  # 同步更新源码
./scripts/feeds update -a && ./scripts/feeds install -a   # 更新FEEDS

# make defconfig 
make menuconfig                                           # 进入编译配置菜单
# make -j8 download V=s                                   #  V=s参数,就是会显示比较详细的信息
make V=s -j$(nproc)                                       # 多线程编译
# make V=s -j2        

 

清理

# 清理feeds
./scripts/feeds clean
1
2
# 清理:封装 build_dir
make clean 

# 承上
# 清理:编译 staging_dir
make dirclean

# 承上
# 清理:源码 feeds
# 潜力:编译准备 package
make disclean

# 其他
选择cpu内核
make kernel_menuconfig
processor type and features > processor famlly

网卡选择
https://www.youtube.com/watch?v=X9v6Nd3wxkk
网卡驱动
kernel modules > network devices
无线驱动
kernel modules > wireless devices

posted @ 2022-07-20 11:12  江南王小帅  阅读(216)  评论(0)    收藏  举报