TrollMafia / Easycwmp-Installation-for-x86

This repository has all the documentation on how to install easycwmp on OpenWRT. It is being used on a Virtual Machine
2 stars 0 forks source link

Easycwmp-Installation

This repository has all the documentation on how to install easycwmp on OpenWRT. It is being used on a Virtual Machine

Step 1: Install Ubuntu or Debian OS in VM

Install a fresh Ubuntu or Debian operating system in a virtual machine (you can refer this site https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox).

Step 2: Update and Install Dependencies

Run the following commands in the terminal to update the package list and install necessary dependencies:

sudo apt update
sudo apt install build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev \
python3-distutils rsync unzip zlib1g-dev file wget

Step 3: Clone OpenWrt Repository

Now after the installation of required dependencies you have to clone the OpenWrt repository using the following commands:

git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt

Step 4: Download easycwmp File

Download the easycwmp file. You can obtain it from the official source i.e. https://easycwmp.org/get/ and select the openwrt package.

image

Step 5: Extract and Copy easycwmp

Extract the easycwmp file and copy it to the /openwrt/package path. Since we have to build the easycwmp as a package we have to place it in the package folder

image

Step 6: Update Feeds and Install Packages

Run the following commands to update feeds and install packages:

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

image

image

Step 7: Handle libpam Error

If there is an error related to libpam, run the following command:

./scripts/feeds install libpam liblzma

image

Step 8: Handle libmicroxml Error

If there is an error related to libmicroxml, run the following commands:

cd package
wget https://easycwmp.org/download/libmicroxml.tar.gz
tar -xzvf libmicroxml.tar.gz

image

Step 9: Run make menuconfig

In the openwrt directory, run the following command:

make menuconfig

image

Step 10: Select easycwmp in menuconfig

In the Targets section select your target. I have selected x86_64 , select your target according to your preference.

Navigate to the Utilities section in menuconfig, select easycwmp by pressing 'Y'.

image

image

image

Now just press on exit two times and click on 'yes' when prompted and the configuration will be saved.

image

Step 11: Compile easycwmp

Run the following command to compile easycwmp:

make package/easycwmp/compile V=sc

image

V=sc is used for higher verbosity level to check what's going on with the building process.

If you are getting these errors try the below steps.

Step 12:

This error is showing due to we have not build the required dependencies i.e. tools and toolchain. These are required to make a package , we can do this by running these two commands :

make tools/install
make toolchain/install

image

image

This will build our toolchain

Step 13:

Now we just need to build one package that we downloaded i.e. libmicroxml by using this command :

make package/libmicroxml/compile

image

Step 14:

If there is some kind of Hash error it can solved by running these two commands :

make package/easycwmp/download PKG_HASH=skip V=s
make package/easycwmp/check FIXUP=1 V=s

Step 15:

Now just build the easycwmp package:

make package/easycwmp/compile

image

Step 16:

There are some required packages you need to install in order to install Easycwmp. I have included the main packages in the repository, if there are some packages missing like curl just install it with opkg.

You will get your .ipk file in the bin/packages/your_selected_target/base/easycwmp.ipk

image

PS : I am using x86 architecture since I am using Virtual Machine for OpenWRT. If you are building it for your router then head to Targets in menuconfig and select your device. I have also included the pre-build easycwmp package for x86 and also its image , you can use it to run easycwmp.