您的位置:首页 > 产品设计 > UI/UE

Building Openwrt for X86 on Compact Flash

2010-01-09 14:51 477 查看

Building Openwrt for X86 on Compact Flash



by gatekeeper » Sat Jan 12, 2008 2:14 am
Hi Rebels,

I am not going to write these instructions from scratch, but since they are short and to the point, I will plagerize them from http://vivekian2.wordpress.com/2007/05/24/porting-openwrt-to-a-wrap-board/

I did a few mods for what I was trying to do so here are my steps:

1. Set up a directory for openwrt
2. Change to the directory where you will check out the required files from svn
3. Checkout the latest branch using svn — svn co https://svn.openwrt.org/openwrt/trunk
4. Get the latest packages using svn - svn co https://svn.openwrt.org/openwrt/packages
5. Link the packages to the package directory in trunk. cd /trunk/package then ln -s ../../ packages/*/* .
6. Add Webif^2 to the package directory using svn - svn co http://svn.berlios.de/svnroot/repos/xwr ... kage/webif
7. Configure by changing directory into trunk and running make menuconfig
8. Choose Target System as x86 [2.6]
9. Multiple target images can be created, but I stuck to choosing ext2 filesystem. Also , you can decide the size of your partitions as per the size of the compact flash drive which you are using.
10. Customize as per your liking.
11. Once the configuration has been saved, go ahead and make . This takes time so be patient.
12. Next your image should be ready in /trunk/bin directory — openwrt-x86-2.6-ext2.image
13. You can transfer this to your CF card using the dd utility e.g. dd if=/home/test/trunk/bin/openwrt-x86-2.6-ext2.image of=/dev/sdc where /dev/sdc was the CF card.

This works except for one hiccup. There is a device.map file missing which GRUB needs to map BIOS devices to OS devices. So you can mount your CF disk and create a new device.map file in the /boot/grub/ directory. The file is a single line :

(hd0) /dev/hda

Now when you boot, OpenWRT should work fine.

So you should have a really nice setup for running on an old pc or whatever x86 device you like.

Happy compiling...
Gatekeeper

gatekeeper Site Admin Posts: 3 Joined: Mon Apr 13, 2009 6:47 pm
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: