OpenWrt Forum Archive

Topic: Custom x86 Image (NO LONGER MAINTAINED)

The content of this topic has been archived between 6 Sep 2015 and 6 May 2018. Unfortunately there are posts – most likely complete pages – missing.

I was wondering if we can get NCID compiled as well.  I was thinking of putting a simple USB modem on the router and using it to reject international calls as it could be a very cost effective and flexible way to deal with the amount of nuisance calls we have been getting.  Dedicated hardware do this is surprisingly expensive and inflexible.

I had originally wanted to use a PBX to screen calls as well as allow using the landline using VoIP, but I have been unable to figure out what cheap hardware would be compatible to interface POTS with a PC.  Some modems supposedly work but you can't find ones with specific chipsets to buy.  I couldn't seem to get the PBX I tried to login to my VoIP accounts either, so I gave up.  I will however have a look at freeswitch as I never noticed that one before, perhaps its easier.

Alex Atkin UK wrote:

I was wondering if we can get NCID compiled as well.

It looks like there was a package submitted but no-one followed on on a re-submission.  I'm going to take a quick look at updating the patch for use, but I don't have any test equipment for the package.  Mind giving it a shot and maybe submitting a few fixes if there is anything more that needs to be done once it's built?

http://patchwork.openwrt.org/patch/2622/

Edit 1: Looks like the patch I found wasn't as mangled as it seemed.  I'm going to prep and run a build on my lunch break at work, hopefully this goes smoothly.

(Last edited by mcrosson on 29 May 2013, 16:35)

Managed to get NCID built and published based on a patch submitted to OpenWRT that was not followed up on by the original author to get it accepted into mainline.  The new package should show up within the current builds.

https://nusku.net/openwrt/rad52d6d15606 … .1_x86.ipk

Did you ever figure out a way to upgrade in-place rather than having to constantly install on a spare USB stick, copy the configuration over, boot the new stick, install all the packages, etc?

Failing that, is there any way to stick my new USB stick into the router and get it to pre-install the packages on the new stick based on what I have currently installed on the router?  That way it can transfer the configuration over and pre-configure everything, then I just power down the router, unplug the old stick and boot up, job done.

Alex Atkin UK wrote:

Did you ever figure out a way to upgrade in-place rather than having to constantly install on a spare USB stick, copy the configuration over, boot the new stick, install all the packages, etc?

Failing that, is there any way to stick my new USB stick into the router and get it to pre-install the packages on the new stick based on what I have currently installed on the router?  That way it can transfer the configuration over and pre-configure everything, then I just power down the router, unplug the old stick and boot up, job done.

The best I came up with was abusing btrfs snapshots and rsync to achieve an "upgrade in place", but it still required some amount of manual intervention for re-installing the packages and configs.  I should really take a closer look at ipkg and some of the upgrade tools and see if I can hack something together...

You could possibly dd the disk image over to a new usb disk, chroot it and do the install's and config from the chroot.  From there it would likely be possible to pop out the original usb stick and reboot into the one you just prepped.  I've not tried anything along those lines as yet though.  My router has an internal disk drive...

That's one of the reasons why upgrading is less than optimal too, I would prefer to stick an internal drive in the router freeing up a USB port but as long as upgrading involves completely overwriting the partitions, its not really practical.

How are you dealing with it on your router?  Just configuring from scratch each time?

The procedure I used to upgrade this time was  to dd to my spare stick then stick it in the router and run:

#!/bin/sh
#
# Get list of packages installed and create a script to reinstall them all in new install
opkg list-installed  | awk 'BEGIN { printf "opkg update; opkg install " } { printf "%s ",$1; }' > /new_install/root/packages.sh
# Patch the ppp connection script so it works on Origin
sed -i 's/maxfail 1/maxfail 0 holdoff 2/g' /new_install/lib/netifd/proto/ppp.sh
# Copy all custom root scripts to new install
cp -rf /root /new_install/
# Copy all custom files from www to new install
rsync -avR --exclude="cgi-bin/" --exclude="luci-static/" /www /new_install/
# Copy the crontabs to new install
cp -f /etc/crontabs/root /new_install/etc/crontabs/
# Copy over IMQ QoS support
cp -f /usr/bin/qos-* /new_install/usr/bin/
cp -f /usr/lib/qos/* /new_install/usr/lib/qos/
cp /usr/lib/iptables/libxt_IMQ.so /new_install/usr/lib/iptables/
# Get a list of modified config files and copy them to the new install
opkg list-changed-conffiles | awk '{ printf "cp -f %s /new_install%s\n",$1,$1}' | eval
# Copy over other config files that might not get reported as changed above
cp -f /etc/config/wireless /new_install/etc/config/
cp -r /etc/ppp/ip-down.d /new_install/etc/ppp/
cp -r /etc/ppp/ip-up.d /new_install/etc/ppp/

Then boot the new stick and run /root/packages.sh so that opkg puts any missing software back.

It seems to have worked except IMQ isn't tagging traffic like it should be.  Then again I'm not sure how effective QoS is on this 100Mbit connection anyway, it certainly doesn't seem to be as noticeable as it was on 5Mbit. wink

Alex Atkin UK wrote:

That's one of the reasons why upgrading is less than optimal too, I would prefer to stick an internal drive in the router freeing up a USB port but as long as upgrading involves completely overwriting the partitions, its not really practical.

How are you dealing with it on your router?  Just configuring from scratch each time?

I normally reboot into an Ubuntu live cd (usb boot, but same thing) and then run a btrfs snapshot.  From there I extract the new release to a releases dir and then do an rsync -aPr --delete-after to copy the new root into place.  After that I rsync config back over (from the snapshot) and go about re-installing any missing packages.

Usually I miss something that I don't notice until after a reboot and go about cleaning things up at that point.

It's been a bit since I last upgraded my boxes and I'll likely document the procedure fully the next time through.

The same principle as what I have been doing all along then except I have snapshots the old fashioned way, on different physical USB sticks.

Oh well, I guess I will continue this method for now, it has the least down time for the router.

IMQ seems fine btw, it just needed restarting as I had forgotten that OpenWRT brings up the QoS scripts too soon and it doesn't seem to kick in unless I restart it AFTER PPP has come up due to the fact its trying to bind to the pppoe-wan device before it exists.  I had factored that into my /etc/ppp/ip-up.d/ scripts but as they hadn't copied over properly they never got run. wink

Alex Atkin UK wrote:

The same principle as what I have been doing all along then except I have snapshots the old fashioned way, on different physical USB sticks.

Oh well, I guess I will continue this method for now, it has the least down time for the router.

On the plus side python and a few other scripting languages are available.  Hopefully I'll have some free time at some point (no idea when that would be currently) where I can sit down and script the process.

This last upgrade was lot less painful than I expected, it "just worked".  So its certainly not urgent.

Hi there, guys.

I recently switched ISPs, and have been considering OpenWRT for x86 for a number of reasons, including possible power issues with my TP-1043ND router (it's still working side-by-side with my new ISP-issued 4G router, until the old ISP disconnects me for good and I think about which 4G modem to get, since the current Alcatel Y800Z 4G router is the worst router I have EVER seen).

I do, however, have a few questions I'd like to have answered, before I take the plunge, and I figured this thread could be the best one for it.

1) I'm thinking of re-purposing an Acer Aspire Revo 3610 (NVIDIA Ion, Atom 330, 4GB of RAM), with an Atheros-based 150Mbps TP-Link USB dongle (or even its internal wireless card, but I'm guessing it won't be N-class, or even if it is, it's probably Broadcom-based, hence no AP support from OpenWRT x86, right?). Should I expect any problems with OpenWRT, especially when it comes to the Ethernet connection?

2) What's the best way to handle installation? Dedicated USB drive for it, with the HDD used for storage only (I'm planning on running transmission), or direct HDD install?

3) Any known issues with regards to 4G/LTE USB modems? This is one of the reasons I'm considering x86, my 1043ND is known for not putting out enough power through the USB port, which might require a very weird setup, because of the added powered USB hub.

4) Are any VPN packages available? What kind of performance should I expect from a VPN (probably OpenVPN) connection, considering my connection is a 20Mb/2Mb one?

5) While in the context of VPNs, how hard would it be to restrict VPN usage for certain kinds of sites/IP ranges (my ISP is applying TS mostly to international IP addresses)?

6) Anything else I might be missing?

Lastly, how would OpenWRT work differently from something like pfSense (which I believe also has Wireless AP support)?

Thank you very much in advance for any help you might give me, and thank you for the work you put on this firmware smile

Miguel

__Miguel_ wrote:

Hi there, guys.

Hi, sorry for the delay in responding, it appears I didn't get a thread notice e-mail for your post.  Below you'll find some answers to your questions.

__Miguel_ wrote:

1) I'm thinking of re-purposing an Acer Aspire Revo 3610 (NVIDIA Ion, Atom 330, 4GB of RAM), with an Atheros-based 150Mbps TP-Link USB dongle (or even its internal wireless card, but I'm guessing it won't be N-class, or even if it is, it's probably Broadcom-based, hence no AP support from OpenWRT x86, right?). Should I expect any problems with OpenWRT, especially when it comes to the Ethernet connection?

I've run Atheros Wi-Fi adapters with my build of OpenWRT x86 previously with out issue.  You should have no problems with anything wired.  Before taking the full plunge you should be able to boot an Ubuntu Live CD (you can also boot the live CD's from a usb stick, there are instructions on google) to check the TP-Link adapter's chipset and driver.  Once you know what the TP-Link chipset it you should be able to find info on using it with OpenWRT.  Also, booting an Ubuntu live environment will give you some insights on whether or not it will work.

__Miguel_ wrote:

2) What's the best way to handle installation? Dedicated USB drive for it, with the HDD used for storage only (I'm planning on running transmission), or direct HDD install?

If you're going to run transmission you'll definitely want to use a usb drive or an sd card for the OS install.  It will also make upgrades of the x86 OpenWRT much less painful.  (Upgrades are a re-install process currently, see my and Alex's comments earlier in the thread)

__Miguel_ wrote:

3) Any known issues with regards to 4G/LTE USB modems? This is one of the reasons I'm considering x86, my 1043ND is known for not putting out enough power through the USB port, which might require a very weird setup, because of the added powered USB hub.

No idea, I know my build of OpenWRT is somewhat lacking for 3/4g modem support.  If you like I can work with you some on getting the necessary support added to my builds if you want to run them. I'd start with the official OpenWRT x86 releases to verify drivers first.  I'm always taking requests for improving my build.

__Miguel_ wrote:

4) Are any VPN packages available? What kind of performance should I expect from a VPN (probably OpenVPN) connection, considering my connection is a 20Mb/2Mb one?

The official OpenWRT builds have OpenVPN and StrongSwan as well as guides for setup.  I'm currently working on adding StrongSwan support to my builds.

__Miguel_ wrote:

5) While in the context of VPNs, how hard would it be to restrict VPN usage for certain kinds of sites/IP ranges (my ISP is applying TS mostly to international IP addresses)?

Not sure, you'd likely want to dig through the OpenWRT docs/wiki/forums to see if someone is doing something similar and take it from there.

__Miguel_ wrote:

6) Anything else I might be missing?

I tried to answer the above in the context of both my custom build of OpenWRT (which this thread is primarily about) but also in the context of the official builds.  I'd recommend giving the official builds a quick spin as they are well vetted and supported.  Using the official build will be a better way of determining if hardware is or is not supported.  I've tried to include as much as possible in my build but I've also disabled some stuff because I cannot properly test every scenario.  If the official builds work for your purposes but you'd like some of the enhancements I've made (kernel / etc) and find problems with my builds, please don't hesitate to post back.  I welcome suggestions and help getting more features added.

__Miguel_ wrote:

Lastly, how would OpenWRT work differently from something like pfSense (which I believe also has Wireless AP support)?

For starts pfSense is FreeBSD kernel + userland.  OpenWRT is Linux.  Because of this OpenWRT tends to have better driver support by default.  I've personally used FreeBSD and Linux over the years and I always seem to fall back to Linux as my primary OS environment.  Don't get me wrong, FreeBSD is great, but for some reason I end up back on Linux before too long.  You specifically mention Wireless AP support.  The reason I moved to OpenWRT was because of the lacking WiFi AP support in pfSense.  I also wanted to run Zabbix, nut and a few other packages on my router which was difficult at the time I was running pfSense.  Looking back over the pfSense site, it looks like it is still a solid competitor to OpenWRT. 

I would strongly suggest trying each out and basing your decisions on overall experience / available software / etc.  You don't need to do a full setup, but check the various config areas, what software is available, what the how-to's look like and similar items at least minimally to ensure that the final choice should generally support what you are trying to accomplish. (Note I'm a bit biased towards OpenWRT, I tried to be fair to pfSense)

I've just finished an updated build that includes the StrongSwan packages.  It is currently being uploaded to the primary mirror (nusku.net) and should be available shortly.  I'll update this post and the OP once it is fully mirrored to the primary and secondary mirrors.

Edit 1: Updated build is mirrored with the StrongSwan packages enabled.  No new build number, just new packages.

(Last edited by mcrosson on 21 Jun 2013, 22:18)

mcrosson wrote:

No idea, I know my build of OpenWRT is somewhat lacking for 3/4g modem support.  If you like I can work with you some on getting the necessary support added to my builds if you want to run them. I'd start with the official OpenWRT x86 releases to verify drivers first.  I'm always taking requests for improving my build.

AFAIK, Pfsense is not capable of utilising the "DirectIP" capabilities of moden LTE modems, being restricted to traditional PPP and thus 25 mbit/sec throughput.

Concerning 4G/LTE on x86 platforms, I know the developer (dairyman) driving http://ofmodemsandmen.com/ (a version of OpenWRT with modern LTE modem support called ROOter) wants a x86 flavour but had issues getting it to build withg openvpn. (Perhaps those scripts are of use to you, though openwrt has "DirectIP" support itself even if a little "buried"?).  ROOter dev is active on whirpool forum noted on the above site.

OK, for some reason I was also not notified of replies to this thread... Odd...

@ryts: I've tried the ROOter firmware on my 1043ND. It didn't go very well, it kept loosing connection. Probably because I was trying to use the modem directly on the router's USB port, and it kept dropping the connection. I'll probably try again with a powered hub, but something smells fishy.

@mcrosson: IPFire was a bust, it didn't even recognize the modem, much less dial out, and I don't know how to handle that. I'm probably too much of a noob to be messing with that, or maybe, just maybe, it should be able to be in place since the DOS-like setup...

As ryts said, 4G on pfsense is iffy at best, and I've managed to come across some unfortunate information about pfsense and my modem (Huawei E392), as in, you apparently need to hack FreeBSD some before being able to run the modem, which, again, I'm too much of a noob to handle.

So, this leaves me with going with OpenWRT for x86 (your package) or switching over to a Windows-based router, which I can actually fix myself, though at the rather severe loss of centralized management via an HTTP GUI.

Right now, I'd like to try OpenWRT for x86. How should I go about it? Which image, combined or rootfs? Also, do I image it to a 1GB flash drive, and then install it to an 8GB SD card I have (the Revo has a card reader which you can boot from), or is it best to flash it directly to the SD card?

I've had a bit of experience with OpenWRT before, so I should be able to use it as a wireless client, and add support for LTE (I'm assuming it would only consist of adding a few packages, if not I'm screwed) before migrating it over to full router duties. Sounds OK, do you have any other ideas, or should I just give up and try my best with Windows?

Thanks again for your time!

I just installed OpenWRT X86 ext4 built to a PC with Intel 82574L and 82579LM NIC. The 82574L is supported out of the box but not the 82579LM. How can I add back the driver? I am new to linux & OpenWRT.

edit: I found the driver source from intel on below link but I don’t know how to compile and integrate it to OpenWRT:

https://downloadcenter.intel.com/Detail … pe=Drivers

(Last edited by palmfans on 22 Jun 2013, 02:01)

__Miguel_ wrote:

Right now, I'd like to try OpenWRT for x86. How should I go about it? Which image, combined or rootfs? Also, do I image it to a 1GB flash drive, and then install it to an 8GB SD card I have (the Revo has a card reader which you can boot from), or is it best to flash it directly to the SD card?

To install OpenWRT, you just image the combined img file to the disk/sd card you want to boot from and you should be good to go.

__Miguel_ wrote:

I've had a bit of experience with OpenWRT before, so I should be able to use it as a wireless client, and add support for LTE (I'm assuming it would only consist of adding a few packages, if not I'm screwed) before migrating it over to full router duties. Sounds OK, do you have any other ideas, or should I just give up and try my best with Windows?

If you know of missing packages or need something custom looked into for the kernel build I can run some experimental builds for you.  You may also try the main build of OpenWRT just to ensure all drivers / packages are available in the upstream too.  If upstream works but not my builds I should be able to add in anything that is missing.

palmfans wrote:

I just installed OpenWRT X86 ext4 built to a PC with Intel 82574L and 82579LM NIC. The 82574L is supported out of the box but not the 82579LM. How can I add back the driver? I am new to linux & OpenWRT.

edit: I found the driver source from intel on below link but I don’t know how to compile and integrate it to OpenWRT:

https://downloadcenter.intel.com/Detail … pe=Drivers

I have a note in my to-do list to look into getting the 82579LM drivers added to my build.  I'll report back once I've had a chance to look into it more closely.

mcrosson wrote:
palmfans wrote:

I just installed OpenWRT X86 ext4 built to a PC with Intel 82574L and 82579LM NIC. The 82574L is supported out of the box but not the 82579LM. How can I add back the driver? I am new to linux & OpenWRT.

edit: I found the driver source from intel on below link but I don’t know how to compile and integrate it to OpenWRT:

https://downloadcenter.intel.com/Detail … pe=Drivers

I have a note in my to-do list to look into getting the 82579LM drivers added to my be  I'll report back once I've had a chance to look into it more closely.

I figured out the problem. I swapped the cables so that it was not working. The 82579LM is supported out of the box. Thank you.

palmfans wrote:

I figured out the problem. I swapped the cables so that it was not working. The 82579LM is supported out of the box. Thank you.

I'm glad to hear it.  I was just about to respond saying the e1000e driver is included in my build and it should "just work" so to speak...

Let me know if you run into anything further with the build.

Hi Mcrosson,
Thanks for your time and jobs.
Now i use yours openwrt image.
Everything is okay but memory.
Our system is Intel Atom D525 and has 4 GB memory.
Can you support 4GB memory?

Thans a lot.

mcrosson wrote:
palmfans wrote:

I figured out the problem. I swapped the cables so that it was not working. The 82579LM is supported out of the box. Thank you.

I'm glad to hear it.  I was just about to respond saying the e1000e driver is included in my build and it should "just work" so to speak...

Let me know if you run into anything further with the build.

I use your May 23 build but I see there is a Jun21. I already installed some package such as triggerhappy, some fs support and SMB. Do you know how to update the old build to the new build without installing and setting up everything from the start. I see your previous discussion above but not really know how to do it. I use another USB disk for new build and mounted to /mnt/sdb1.

Thanks in advance.

(Last edited by palmfans on 1 Jul 2013, 09:48)

remzi.akyuz wrote:

Hi Mcrosson,
Thanks for your time and jobs.
Now i use yours openwrt image.
Everything is okay but memory.
Our system is Intel Atom D525 and has 4 GB memory.
Can you support 4GB memory?

Thans a lot.

The build currently should work with up to 4Gb RAM.  Can you post the contents of /proc/meminfo?

palmfans wrote:

I use your May 23 build but I see there is a Jun21. I already installed some package such as triggerhappy, some fs support and SMB. Do you know how to update the old build to the new build without installing and setting up everything from the start. I see your previous discussion above but not really know how to do it. I use another USB disk for new build and mounted to /mnt/sdb1.

Thanks in advance.

Unfortunately you're stuck installing on a new usb device and setting up everything again.  Currently there is not a way to upgrade in-place on x86 builds of OpenWRT.

You can save a lot of your configuration by using Luci to run a backup and a restore, but you'll still need to re-install packages.

mcrosson wrote:
palmfans wrote:

I use your May 23 build but I see there is a Jun21. I already installed some package such as triggerhappy, some fs support and SMB. Do you know how to update the old build to the new build without installing and setting up everything from the start. I see your previous discussion above but not really know how to do it. I use another USB disk for new build and mounted to /mnt/sdb1.

Thanks in advance.

Unfortunately you're stuck installing on a new usb device and setting up everything again.  Currently there is not a way to upgrade in-place on x86 builds of OpenWRT.

You can save a lot of your configuration by using Luci to run a backup and a restore, but you'll still need to re-install packages.

OK, I follow your suggestion to save the configuration by using Luci and now upgrade to your latest build.

BTW, could you help generate the package for exfat FS as I see it on the following:
https://github.com/rxrz/exfat-nofuse