Compile OpenWrt in Ubuntu 12.04 and test the result in VMWARE

Compile OpenWrt in Ubuntu 12.04 and test the result in VMWARE:
Environment: Ubuntu 12.04, VMware workstation 9

First update the ubuntu,
 sudo apt-get update
sudo apt-get upgrade

Then installed subversion and other related files
sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl

In the home directory, create a folder, and then use the svn command line to checkout the source code:
mkdir  ~ / openwrt
cd   ~ / openwrt
svn checkout svn :/ / / openwrt / trunk /
cd trunk

Update openwrt:
. / Scripts / feeds update -a

To install all the packages:
. / Scripts / feeds install -a

Then type

make menuconfig

In the kernel configuration interface:

1. Target System (x86) —> (*) x86

2 with the target file system to EXT4
[*] ext4″>Target Images —> [*] ext4
[*] Build VMware image files (VMDK)

To add web access Luci must be added, LuCI -> collection -> select luci

1) type make

The compile time may a little long. After that the finished vmdk file is in the bin/x86 directory.
2) copy the openwrt-x86-generic-combined-ext4.vmdk to WIN7 computer;

Run OpenWRT in Win7 VMWare:

Create a virtual machine

New –> Virtual Machine … –> NEXT–> linux 、ubuntu –“>Open VMware -> New -> Virtual Machine … ->  NEXT -> linux, ubuntu –
NEXT–> you can choose any path for the VM machine–> NEXT–> network -“Use bridged networking” –>  NEXT–> use an existing harddisk- “the one just build-openwrt-x86-generic-combined-ext4.vmdk”–> Finish.

2) Press run button you can start running OpenWRT.

Use your browse, enter, you can see in the openwrt web interface.

A. If your network is not in the 192.168.1.x segment, please change the IP as follows:

# vi/ etc / config / network
Appear as shown press i to modify
Modify the following diagram

After modification
Press [Esc]
Then enter to save and exit
: wq

Followed by restart network
# / etc / init.d / network restart

B. The bridge function in VMWARE is often not very stable. It is better to add a seperation network card to the WIN 7 for the bridge function. Remove all the protocol for the  card , leaving only the vmware bridge protocol. Then the bridge function would be very stable.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s