How to configure the OpenWRT development environment on Ubuntu 18.04 (physical machine)

How to configure the OpenWRT development environment on Ubuntu 18.04 (physical machine)

1. Install a virtual machine (physical machine)

You can install it on a virtual machine or a physical machine. It is recommended to install a virtual machine when you are just starting out. You can choose either version 16.04 or 18.04. The process of setting up the openwrt development environment is similar. You can choose according to your own situation. Please refer to other materials for installation tutorials, which will not be recorded here. Because I have been exposed to some Linux programs before, the blogger uses an Ubuntu 18.04 physical machine.

2. Change source

In order to avoid the difficulty of downloading some packages due to network environment restrictions, we first change the source:
①Open "Software & Update";
②Change the original "Chinese server" to "mirrors.aliyun.com";
③Enter password;
④ After the source change is completed, return to the terminal;

insert image description here

insert image description here
insert image description here
insert image description here
insert image description here

3. Ubuntu system related configuration

1. Open the terminal and enter the command to update the system:

sudo apt-get update 

insert image description here

2. Enter the command to install some libraries and necessary programs:
①Ubuntu 16.04 version

sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils libncurses5-dev ncurses-term zlib1g-dev gawk asciidoc libz-dev git-core uuid-dev libacl1-dev liblzo2-dev pkg-config libc6-dev curl libxml-parser-perl ocaml-nox

②Ubuntu 18.04 version

sudo apt-get install subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc zip 

insert image description here

4. Download and compile openwrt source code

1. Create a new folder named "openwrt" and cd to it to run the command to get the OpenWRT source code (the running time of this step depends on the network speed, it may take several hours or even crash, or as little as a few minutes):

git clone https://git.lede-project.org/source.git lede 

insert image description here

2. After the previous step of getting the OpenWRT source code is completed, you can see that a folder named "lede" is automatically generated in the "openwrt" folder. We cd to the folder and use the "ls" command to view the resources downloaded after running the OpenWRT source code;

insert image description here

3. cd to the "scripts" script directory and download the feeds tool:

cd openwrt/lede/scripts
./feeds update -a
./feeds install -a 

insert image description here
insert image description here

4. Return to the previous directory and run the command to enter the customization page:

 make menuconfig 

insert image description here

insert image description here

5. Continuing from the previous step, after entering the customization interface, press the space bar to select the corresponding model. The hardware used in this development is Raspberry Pi 3B (abbreviated as Raspberry Pi 3B), so:

① Select Broadcom BCM27XX series for Target System;
②Subtarget (main control chip) select BCM2710 boards (64 bit);
③Select Raspberry Pi 2B-1.2/3B/38+/3CM in Target Profile;
④ Select "exit" to the right and press Enter, and select "YES" in the pop-up box;

insert image description here

6. Next, execute the compilation instructions. Both instructions compile the packages globally and display detailed compilation information. After a longer wait than the third step, the downloaded content is about several GB:

make V=99 or make -j1 V=s 

insert image description here

7. To supplement the previous point, the compilation process is also the resource package download process. Many packages' download links are directly linked to the external network. When we download, we will be subject to some restrictions, so we often encounter the situation where the download fails to complete after a long time of loading. At this time, we can do the following:
① Press and hold the "Ctrl" key while clicking the resource package link. The link will automatically open in the browser and start downloading the resource package. At this time, we can press "Ctrl" + "C" to interrupt the compilation process in the terminal;

insert image description here

insert image description here

② Find the downloaded resource package and copy it to the "openwrt/lede/dl" directory;

insert image description here

③ Enter the terminal and restart the command to compile; if you encounter the same problem again, perform the same operation as above to solve the problem;

insert image description here

8. Compilation is completed and the OpenWRT environment is set up.

insert image description here

This is the end of this article on how to configure the OpenWRT development environment on Ubuntu 18.04 (physical machine). For more information about configuring the OpenWRT development environment on Ubuntu 18.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of setting up a Python development environment from scratch on Ubuntu
  • Configuring Ruby on Rails framework and RubyMine IDE development environment on Ubuntu
  • Install the Go language development environment and editor configuration in Ubuntu
  • Sharing the process of building a Nodejs development environment in Ubuntu
  • OpenWrt15.05 network connection settings in Vmware
  • Vmware installation OpenWrt15.05 virtual machine tutorial

<<:  React and Redux array processing explanation

>>:  JavaScript drag time drag case detailed explanation

Recommend

Three ways to communicate between Docker containers

We all know that Docker containers are isolated f...

How to create components in React

Table of contents Preface Component Introduction ...

Analysis of product status in interactive design that cannot be ignored in design

In the process of product design, designers always...

How to change the color of the entire row (tr) when the mouse stops in HTML

Use pure CSS to change the background color of a ...

Summary of some thoughts on binlog optimization in MYSQL

question Question 1: How to solve the performance...

MySQL decimal unsigned update negative numbers converted to 0

Today, when verifying the concurrency problem of ...

Detailed explanation of Vue element plus multi-language switching

Table of contents Preface How to switch between m...

Understanding and solutions of 1px line in mobile development

Reasons why the 1px line becomes thicker When wor...

Detailed explanation of rpm installation in mysql

View installation and uninstallation # View rpm -...

Implementation of Docker CPU Limit

1. --cpu=<value> 1) Specify how much availa...

How to use cookies to remember passwords for 7 days on the vue login page

Problem Description In the login page of the proj...

mysql 5.7.23 winx64 decompression version installation tutorial

Detailed installation tutorial of mysql-5.7.23-wi...

Tutorial on how to deploy LNMP and enable HTTPS service

What is LNMP: Linux+Nginx+Mysql+(php-fpm,php-mysq...