mirror of
https://github.com/outbackdingo/openwrt-builder.git
synced 2026-01-27 18:19:53 +00:00
Add Dockerfile; add information into README file
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM fedora:35
|
||||
|
||||
RUN yum update -y
|
||||
|
||||
RUN dnf -y groupinstall 'Development Tools'
|
||||
|
||||
RUN dnf -y install bash-completion bzip2 gcc gcc-c++ git make ncurses-devel patch \
|
||||
rsync tar unzip wget which diffutils python2 python3 perl-base \
|
||||
perl-Data-Dumper perl-File-Compare perl-File-Copy perl-FindBin \
|
||||
perl-Thread-Queue vim
|
||||
|
||||
RUN useradd -m user && \
|
||||
echo 'user ALL=NOPASSWD: ALL' > /etc/sudoers.d/user
|
||||
|
||||
USER user
|
||||
WORKDIR /home/user
|
||||
|
||||
# set dummy git config
|
||||
RUN git config --global user.name "user" && git \
|
||||
config --global user.email "user@example.com"
|
||||
72
README.md
72
README.md
@@ -1,2 +1,70 @@
|
||||
# openwrt-builder
|
||||
Build openWRT system image
|
||||
# Openwrt
|
||||
Build OpenWRT system image
|
||||
|
||||
## How to
|
||||
|
||||
Container image to build Openwrt image based on https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem
|
||||
To build own container image:
|
||||
|
||||
```shell
|
||||
sudo yum install -y git podman
|
||||
git clone https://github.com/danpawlik/openwrt-builder
|
||||
cd openwrt-builder
|
||||
podman build -t openwrt-builder -f Dockerfile
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
how to use:
|
||||
```
|
||||
mkdir -p openwrt-builder
|
||||
podman run -it -u user -v $(pwd)/openwrt-builder/:/home/user:z,rw quay.io/dpawlik/openwrt:fedora35 /bin/bash
|
||||
```
|
||||
|
||||
Then inside the container (from https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem):
|
||||
|
||||
```shell
|
||||
git clone https://git.openwrt.org/openwrt/openwrt.git
|
||||
cd openwrt
|
||||
git pull
|
||||
```
|
||||
|
||||
Select a specific code revision:
|
||||
|
||||
```shell
|
||||
git branch -a
|
||||
git tag
|
||||
git checkout v21.02.1
|
||||
```
|
||||
|
||||
Update the feeds:
|
||||
|
||||
```shell
|
||||
./scripts/feeds update -a
|
||||
./scripts/feeds install -a
|
||||
```
|
||||
|
||||
Configure the firmware image and the kernel:
|
||||
|
||||
```shell
|
||||
make menuconfig
|
||||
```
|
||||
|
||||
If you have own config file, replace it. For example:
|
||||
|
||||
```shell
|
||||
curl -SL https://downloads.openwrt.org/snapshots/targets/ath79/mikrotik/config.buildinfo > .config
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
```shell
|
||||
# make kernel_menuconfig
|
||||
make -j4 kernel_menuconfig
|
||||
```
|
||||
|
||||
Build the firmware image:
|
||||
|
||||
```shell
|
||||
make -j $(nproc) defconfig download clean world
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user