ubuntu22.04 交叉编译openwrt
作者:互联网
国内源
vi /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
安装所需工具
sudo apt install build-essential libncurses5-dev zlib1g-dev
sudo apt install gawk gcc-multilib flex git gettext libssl-dev
sudo apt install python3-distutils
更新所需的库
进入openwrt-21.02.3
./scripts/feeds update -a
./scripts/feeds install -a
配置所需的模块 Target image选 iso(virtualbox 的vdi会报错)
make menuconfig
#编译:显示编译信息,-j2 使用2核编译
make V=s -j2
生成镜像的目录 openwrt-21.02.3/bin/targets/x86/64
应用helloword 编写
生成的ipk目录 openwrt-21.02.3/bin/packages/x86_64/base
标签:cn,mirrors,restricted,ubuntu22.04,编译,https,edu,main,openwrt 来源: https://www.cnblogs.com/sanmubai/p/16290935.html