Sign inSign up

yanyeek/compile_for_openwrt

By yanyeek

•Updated over 3 years ago

基于ubuntu22.04配置的官方openwrt编译环境,用来编译任何路由器或平台的固件

Image
0

45

yanyeek/compile_for_openwrt repository overview

⁠使用方法

安装docker

https://www.docker.com/⁠

https://docs.docker.com/desktop/install/windows-install/⁠

创建容器

docker run --name openwrt -dti yanyeek/compile_for_openwrt:latest /bin/bash

查看运行中的容器

docker ps

通过容器ID进入容器

docker exec -it 替换你的容器ID bash

⁠不能使用root用户编译 会报错

使用yan用户 root与yan用户的密码都是yan 进入openwrt目录

su yan
cd ~/openwrt

选择平台与配置

不会选择与配置看教程

【老湿基】OpenWRT 高级编译总览、编译插件|第一弹_哔哩哔哩_bilibili⁠

# 在openwrt文件夹下
git pull
./scripts/feeds update -a
./scripts/feeds install -a
rm -rf ./tmp && rm -rf .config
make munuconfig
# 在openwrt文件夹下
start=`date '+%s'`
make download -j8
make V=s -j1
end=`date '+%s'` && take=$(( end - start )) && date -d @$take +OpenWrt编译使用了%M分%s秒

⁠获得镜像

# 替换b0ba0b为你的容器id 替换D:\A_My_Document\openwrt4docker为你的win10本地路径 不要有空格与中文 如果有请用英文双引号包裹路径 "D:\A_My_Document"
docker cp b0ba0b:/home/yan/openwrt/bin D:\A_My_Document\openwrt4docker

Tag summary

Content type

Image

Digest

sha256:22ae9688b…

Size

6.3 GB

Last updated

over 3 years ago

docker pull yanyeek/compile_for_openwrt:0.2