<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wirelessafrica.meraka.org.za/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhay</id>
	<title>WirelessAfrica - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wirelessafrica.meraka.org.za/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jhay"/>
	<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php/Special:Contributions/Jhay"/>
	<updated>2026-04-16T20:34:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.7</generator>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4679</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4679"/>
		<updated>2009-06-08T17:23:33Z</updated>

		<summary type="html">&lt;p&gt;Jhay: This page has moved to wirelessdev&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
&lt;br /&gt;
This page has moved to http://wirelessdev.meraka.org.za/index.php/John&#039;s_research&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4620</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4620"/>
		<updated>2009-05-20T10:28:59Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Less commonly used/needed configs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
=== Commonly used configs ===&lt;br /&gt;
&lt;br /&gt;
If the box is the one that connect the network to the &amp;quot;internet&amp;quot;, you will have to set&lt;br /&gt;
 mesh_type=&amp;quot;gateway&amp;quot;&lt;br /&gt;
This will enable a lot of things as listed on the [[High_performance_node_page#Behavior_of_the_GateWay_node_in_a_mesh | HPN page]], for instance announce a default route, be a dns server for the network, be a ntp time server, be an update server, etc.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. If you go not have a gateway, you can use this. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. On the newer distros, you can configure the box as &amp;quot;green&amp;quot; (default) or &amp;quot;red&amp;quot;.&lt;br /&gt;
 mesh_node=&amp;quot;red&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On older boxes, you will have to do it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To force the box to hunt for channels on the next boot:&lt;br /&gt;
 mesh_hunt=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Less commonly used/needed configs ===&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
You can also just override the channel with:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_hspchan=&amp;quot;13&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to turn 4over6 off or change the prefix:&lt;br /&gt;
 auto4over6_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 auto4over6_prefix=&amp;quot;fec0:0:0:aaaa::&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to turn auto updates off or change the extension:&lt;br /&gt;
 autoupgrade_enable=&amp;quot;NO&amp;quot;&lt;br /&gt;
 autoupgrade_url=&amp;quot;ftp://mesh-updates/&amp;quot;&lt;br /&gt;
 autoupgrade_suffix=&amp;quot;.mesh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
&lt;br /&gt;
 site_type=&amp;quot;auto|host|node|repeater|hotspot|quad&amp;quot;&lt;br /&gt;
 rtadvd_enable=&amp;quot;YES|NO&amp;quot;&lt;br /&gt;
 olsrd_enable=&amp;quot;YES|NO&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
&lt;br /&gt;
Disk split in 2 partitions. Upgrade the one that is not active.&lt;br /&gt;
&lt;br /&gt;
Auto script run from cron to check for updates.&lt;br /&gt;
&lt;br /&gt;
/upgrade tool used for manual updates and by the auto script to do the actual updating.&lt;br /&gt;
&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;br /&gt;
* Robust addressing scheme for big networks that need to cooperate.&lt;br /&gt;
* What else?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4619</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4619"/>
		<updated>2009-05-20T10:13:50Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* What is there to tweak */ Start to flesh out our new stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
=== Commonly used configs ===&lt;br /&gt;
&lt;br /&gt;
If the box is the one that connect the network to the &amp;quot;internet&amp;quot;, you will have to set&lt;br /&gt;
 mesh_type=&amp;quot;gateway&amp;quot;&lt;br /&gt;
This will enable a lot of things as listed on the [[High_performance_node_page#Behavior_of_the_GateWay_node_in_a_mesh | HPN page]], for instance announce a default route, be a dns server for the network, be a ntp time server, be an update server, etc.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. If you go not have a gateway, you can use this. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. On the newer distros, you can configure the box as &amp;quot;green&amp;quot; (default) or &amp;quot;red&amp;quot;.&lt;br /&gt;
 mesh_node=&amp;quot;red&amp;quot;&lt;br /&gt;
&lt;br /&gt;
On older boxes, you will have to do it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To force the box to hunt for channels on the next boot:&lt;br /&gt;
 mesh_hunt=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Less commonly used/needed configs ===&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
&lt;br /&gt;
Disk split in 2 partitions. Upgrade the one that is not active.&lt;br /&gt;
&lt;br /&gt;
Auto script run from cron to check for updates.&lt;br /&gt;
&lt;br /&gt;
/upgrade tool used for manual updates and by the auto script to do the actual updating.&lt;br /&gt;
&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;br /&gt;
* Robust addressing scheme for big networks that need to cooperate.&lt;br /&gt;
* What else?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4618</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4618"/>
		<updated>2009-05-20T03:47:06Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Todo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
&lt;br /&gt;
Disk split in 2 partitions. Upgrade the one that is not active.&lt;br /&gt;
&lt;br /&gt;
Auto script run from cron to check for updates.&lt;br /&gt;
&lt;br /&gt;
/upgrade tool used for manual updates and by the auto script to do the actual updating.&lt;br /&gt;
&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;br /&gt;
* Robust addressing scheme for big networks that need to cooperate.&lt;br /&gt;
* What else?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4505</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4505"/>
		<updated>2009-03-13T06:22:40Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Todo */ Add something&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
&lt;br /&gt;
Disk split in 2 partitions. Upgrade the one that is not active.&lt;br /&gt;
&lt;br /&gt;
Auto script run from cron to check for updates.&lt;br /&gt;
&lt;br /&gt;
/upgrade tool used for manual updates and by the auto script to do the actual updating.&lt;br /&gt;
&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;br /&gt;
* Robust addressing scheme for big networks that need to cooperate.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4009</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=4009"/>
		<updated>2008-08-14T20:04:39Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Upgrades and Automagic upgrades */ Still need lots of work&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
&lt;br /&gt;
Disk split in 2 partitions. Upgrade the one that is not active.&lt;br /&gt;
&lt;br /&gt;
Auto script run from cron to check for updates.&lt;br /&gt;
&lt;br /&gt;
/upgrade tool used for manual updates and by the auto script to do the actual updating.&lt;br /&gt;
&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3979</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3979"/>
		<updated>2008-08-14T06:02:34Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* What is there to tweak */ Add the requirement to remount /&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades. Remember that the CF is normally read-only, so has to be made read-write before editing the file with&lt;br /&gt;
 mount -u -w /&lt;br /&gt;
And made read-only again afterwards with&lt;br /&gt;
 mount -u -r /&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3978</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3978"/>
		<updated>2008-08-14T05:59:47Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* 4over6 Automatic tunnels */ First stab at it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
An idea to tunnel IPv4 packets over our IPv6 mesh networks without having to configure each tunnel. Think of it as a kind of one to many tunnel. So only one need to be configured on a host.&lt;br /&gt;
&lt;br /&gt;
====Assumptions====&lt;br /&gt;
The IPv6 part will use OLSR or some routing protocol where static routes can be injected. The host doing the tunneling needs to be dual stacked. The edges will have IPv4 subnets from the 10.0.0.0/8 network in addition to the IPv6 subnets.&lt;br /&gt;
&lt;br /&gt;
====The way it works====&lt;br /&gt;
An IPv6 subnet address (/64) is chosen that will be used as the tunnel prefix throughout the network. Each tunnel box must be configured in the following way:&lt;br /&gt;
* Its &amp;quot;local&amp;quot; interface(s) is/are configured with a 10.0.0.0 subnet(s).&lt;br /&gt;
* A virtual tunnel interface (tunX?) is created.&lt;br /&gt;
* An IPv4 static route for the whole 10.0.0.0/8 subnet is added into this interface. (XXX Maybe default route?)&lt;br /&gt;
* An IPv6 static route is calculated from the chosen IPv6 tunnel prefix plus the local IPv4 subnet(s) (fdfd:efef:abab:cdcd::10.1.2.0/120)&lt;br /&gt;
* This static route is also given to the routing protocol to announce.&lt;br /&gt;
* The 4over6 tunnel daemon [*] is attached to the tunnel interface. It is configured with the IPv6 tunnel prefix.&lt;br /&gt;
&lt;br /&gt;
====The 4over6 tunnel daemon====&lt;br /&gt;
The configuration it needs is the IPv6 tunnel prefix. It receives IPv4 packets (from the local interface(s)) convert the header to IPv6 using the IPv6 tunnel prefix and sends it out again. It receives IPv6 packets, convert the IPv6 addresses back to IPv4 and sends it out again.&lt;br /&gt;
&lt;br /&gt;
    |------------------|                         |------------------|&lt;br /&gt;
    |       host1      |                         |       host2      |&lt;br /&gt;
    |                  |                         |                  |&lt;br /&gt;
    |       |---|      |                         |       |---|      |&lt;br /&gt;
    |       | B |      |                         |       | E |      |&lt;br /&gt;
    |------------------|     /\/\/\/\/\/\/\      |------------------|&lt;br /&gt;
        A |       | C       /     IPv6     \         D |       | F&lt;br /&gt;
 ---------|       |--------&amp;lt; Routed Network &amp;gt;----------|       |----------&lt;br /&gt;
                            \              /&lt;br /&gt;
                             \/\/\/\/\/\/\/&lt;br /&gt;
&lt;br /&gt;
Host1 and host2 are connected via an IPv6 routed network. (No native IPv4) prefix used for 4over6 fd9c:6829:597c:fefe/64&lt;br /&gt;
&lt;br /&gt;
 host1&lt;br /&gt;
 A - 10.1.1.1/24&lt;br /&gt;
 B - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.1.1.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.2.2.0/120 pointing in host2&#039;s direction.&lt;br /&gt;
 C - IPv6-only address. &lt;br /&gt;
&lt;br /&gt;
 host2&lt;br /&gt;
 D - IPv6-only address.&lt;br /&gt;
 E - virtual (tun) interface. Static routes 10.0.0.0/8 and&lt;br /&gt;
     fd9c:6829:597c:fefe::10.2.2.0/120 pointing into interface.&lt;br /&gt;
     A route fd9c:6829:597c:fefe::10.1.1.0/120 pointing in host1&#039;s direction.&lt;br /&gt;
 F - 10.2.2.1/24&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3977</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3977"/>
		<updated>2008-08-14T05:50:58Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* New Install */ tweak case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the ARM boards, you will need a tftp server loaded with boot2 and an ARM kernel with nfs booting compiled in. You will also need a nfs server setup with an extracted FreeBSD ARM tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3976</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3976"/>
		<updated>2008-08-14T05:48:56Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Upgrade */ add root requirement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type (as root):&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3975</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3975"/>
		<updated>2008-08-13T20:42:36Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Todo */ wacky update idea&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;br /&gt;
* A wacky idea for updating even in the face of incompatible routing protocols. Have every box run a tcp relay to an update box. So every box can connect to a neighbor&#039;s relay for updates. This will not solve  the problem of incompatible links, eg. adding wep or changing ssids.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3974</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3974"/>
		<updated>2008-08-13T19:57:35Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Put the start stuff under an intro heading&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
==Intro==&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3973</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3973"/>
		<updated>2008-08-13T19:52:08Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Todo */ Should distros be signed?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;br /&gt;
* Should updates be signed so that the auto update will only update to a signed distro file?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3972</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3972"/>
		<updated>2008-08-13T18:56:07Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* How the config files on our distro fit together */ Praise FreeBSD a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
FreeBSD is a lovely operating system and the standard startup scripts already cater diskless systems, read-only filesystems, network boot with a nfs root, etc. The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible.&lt;br /&gt;
&lt;br /&gt;
This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3971</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3971"/>
		<updated>2008-08-13T18:51:57Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Add a &amp;quot;how bits and pieces work&amp;quot; section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==How bits and pieces work==&lt;br /&gt;
===Upgrades and Automagic upgrades===&lt;br /&gt;
===4over6 Automatic tunnels===&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3970</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3970"/>
		<updated>2008-08-13T18:48:26Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Building a distro */ A gypo stab at building a distro&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
This one is easy. If you have root on my box, you go to /home/jhay/small and type:&lt;br /&gt;
 ./build_chroot small-7-arm.cfg&lt;br /&gt;
to get an ARM distro or&lt;br /&gt;
 ./build_chroot small-7.cfg&lt;br /&gt;
for an i386 distro. A tiny distro that can fit on half of a 64M CF can be built with:&lt;br /&gt;
 ./build_chroot small-7-32m.cfg&lt;br /&gt;
&lt;br /&gt;
The trick is to get root on my box or to get me to document more. :-)&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3969</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3969"/>
		<updated>2008-08-13T18:43:31Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Installing a distro */ Firts stab, lots more needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
===Upgrade===&lt;br /&gt;
Well if it is only an upgrade, ie. the box is already running an older version, just make sure it is connected to the network and type:&lt;br /&gt;
 /upgrade ftp://crypton/disk-arm-7-20080813.tgz&lt;br /&gt;
Substitute the file name for the correct one. The upgrade script understand ftp, http, ssh and a local file:&lt;br /&gt;
 /upgrade &amp;lt;user@host:file&amp;gt;&lt;br /&gt;
 /upgrade &amp;lt;ftp://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;http://[user[:password]@]host[:port]/path/file&amp;gt;&amp;quot;&lt;br /&gt;
 /upgrade &amp;lt;/path/file&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===New Install===&lt;br /&gt;
This is a bit more involved.&lt;br /&gt;
* For the Arm boards, you will need a tftp server loaded with boot2 and a Arm kernel with nfs booting compiled in. You will also need a&lt;br /&gt;
nfs server setup with an extracted FreeBSD Arm tree.&lt;br /&gt;
* For the i386 based boards, you will need a dhcp server that can handle PXE (for the soekris), with a tftp server and a nfs server.&lt;br /&gt;
&lt;br /&gt;
The basic idea is then to nfs boot the board into single user mode and then run the writedisk script which will prepare the disk and install the distro on it.&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3968</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3968"/>
		<updated>2008-08-13T18:18:23Z</updated>

		<summary type="html">&lt;p&gt;Jhay: List the boards we use&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers. Currently they are a mix of Soekris net4501, net4526, net4801, Wrap 2C, 1E, Gateworks Avila and ADI Metro Pronghorn boards.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3967</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3967"/>
		<updated>2008-08-13T18:07:38Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* ADI Pronghorn Metro boards */ Clarify a bit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
 &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
 &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
 &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
 &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* Now write it to flash.&lt;br /&gt;
 &amp;gt; fis create boot2&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
  &amp;gt; fis free&lt;br /&gt;
  &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* Now go and configure RedBoot to automatically run boot2 on startup.&lt;br /&gt;
 &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
 fis load boot2&lt;br /&gt;
 go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
 &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt. It should list all the distros available. Choose the correct one for your architecture.&lt;br /&gt;
 &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
 &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3966</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3966"/>
		<updated>2008-08-13T17:59:48Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Add todo section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;br /&gt;
&lt;br /&gt;
==Todo==&lt;br /&gt;
&lt;br /&gt;
Ideas that might get implemented.&lt;br /&gt;
* Handle extra hna{4|6} entries from rc.conf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3965</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3965"/>
		<updated>2008-08-13T17:56:36Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* What is there to tweak */ First stab at it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
In theory we want to end up tweaking / configuring nothing, but we are not there yet. :-)&lt;br /&gt;
&lt;br /&gt;
These configs go in /conf/default/etc/rc.conf.local unless otherwise specified. You can look in rc.conf.mesh to see what the defaults are, but do not change it there. That will break upgrades.&lt;br /&gt;
&lt;br /&gt;
A network needs one box that is the dns server. On that box you will need to set&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
One thing that is often needed is to swap channels on the BackBone links. You can change it with lines like this:&lt;br /&gt;
 mesh_bbchana=&amp;quot;140&amp;quot;&lt;br /&gt;
 mesh_bbchanb=&amp;quot;136&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you want to give the box a name:&lt;br /&gt;
 hostname=&amp;quot;ajay-rtr.cids.org.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override everything for an interface:&lt;br /&gt;
 ifconfig_ath0=&amp;quot;mode 11a mediaopt adhoc channel 165 ssid ptabb&amp;quot;&lt;br /&gt;
&lt;br /&gt;
A specific prefix for an interface:&lt;br /&gt;
 ipv6_prefix_ath0=&amp;quot;fd9c:6829:597c:10&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you need to override the ipv4 address:&lt;br /&gt;
 ipv4_addrs_npe0=&amp;quot;10.3.2.1/24&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Common files that also might need to be tweaked are:&lt;br /&gt;
 /conf/default/usr.local.etc/olsrd.conf&lt;br /&gt;
 /conf/default/usr.local.etc/dnsmasq.conf&lt;br /&gt;
Although, if you need to, tell me so that we can see if it can be handled automagically by a script.&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3964</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3964"/>
		<updated>2008-08-13T17:28:52Z</updated>

		<summary type="html">&lt;p&gt;Jhay: invite help&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild. Anybody with better writing or organizational skills, feel free to tweak. If there are stuff missing, either add or tell me.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3963</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3963"/>
		<updated>2008-08-13T17:26:42Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* How the config files on our distro fit together */ Clarify rc.conf content&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order. These files just contain shell variables for example:&lt;br /&gt;
&lt;br /&gt;
 hostname=&amp;quot;arm-tst.mesh&amp;quot;&lt;br /&gt;
 mesh_dns_enable=&amp;quot;YES&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3962</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3962"/>
		<updated>2008-08-13T17:19:41Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* How the config files on our distro fit together */ Flesh out some more&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order.&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
So the most important config files are:&lt;br /&gt;
* rc.conf - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
* rc.conf.mesh - included early by rc.conf with defaults for the mesh&lt;br /&gt;
* rc.conf.local - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
The config directories:&lt;br /&gt;
* /etc - ramdisk with end results, everything is lost on a reboot&lt;br /&gt;
* /conf/base/etc - original FreeBSD stuff&lt;br /&gt;
* /conf/default/etc - changed files, our and packages&lt;br /&gt;
* /usr/local/etc - a symlink to /etc/usr.local.etc&lt;br /&gt;
&lt;br /&gt;
The basic idea is that config overrides that are done manually, have to be done in /conf/default/etc/rc.conf.local because it is read last and so overrides previous settings.&lt;br /&gt;
&lt;br /&gt;
The startup scripts will create the ramdisk /etc, then recursively copy /conf/base/etc into it and then /conf/default/etc. The real /etc needs diskless, rc, fstab and rc.initdiskless in it for this to &lt;br /&gt;
work.&lt;br /&gt;
&lt;br /&gt;
Files that will need to be twiddled by scripts on startup:&lt;br /&gt;
* /etc/rc.conf                    - interface conf&lt;br /&gt;
* /usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
* /usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
* /etc/resolv.conf                - ?&lt;br /&gt;
* /usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
There are probably more.&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3961</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3961"/>
		<updated>2008-08-13T16:35:36Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Some more from my docs and part one of describing how the configs fit in&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Calling this research is probably a bit wild.&lt;br /&gt;
&lt;br /&gt;
Here I&#039;ll try to capture the work done with our FreeBSD based wireless routers.&lt;br /&gt;
&lt;br /&gt;
==How the config files on our distro fit together==&lt;br /&gt;
The idea was to try and leverage as much of FreeBSD&#039;s startup scripts and procedures as possible. This makes for less work and more testing, at least for the common parts. The standard FreeBSD startup scripts already cater for a diskless case, where /etc and /var are ramdisks and the rest can be read-only. That fits well with our case where we want the Compact Flash (CF) mostly read-only for reliability, but still needs things in /etc and /var to change during and after bootup. So we force this by creating the file /etc/diskless.&lt;br /&gt;
&lt;br /&gt;
So maybe a description of the boot process is in order. I&#039;ll skip some detail that I think is not important to understand this. The kernel will at some stage get bored configuring RAM and probe for devices and look for something else to do. It will then load and run /sbin/init. Init will do some things and then run the /etc/rc script. And this is where the interesting stuff begins.&lt;br /&gt;
&lt;br /&gt;
rc will try to determine if it is the diskless case. If so it will run /etc/rc.initdiskless, which will create a ramdisk over /etc and populate it from /conf/base/etc and then from /conf/default/etc. The idea being that you can have a standard /etc tree in /conf/base/ and your local changes in /conf/default/. So all the files that we change will be in /conf/default/. After that, rc.initdiskless will also create and populate a /var ramdisk. When finished, it will return to rc.&lt;br /&gt;
&lt;br /&gt;
FreeBSD startup scripts reside in /etc/rc.d/ and /usr/local/etc/rc.d/ for packages. Now rc will use rcorder on those  two directories to determine the dependencies and order they must be run in. /etc/rc.d/early.sh is one of the first to run. It will run /etc/rc.early if it exists. It does not exist by default.&lt;br /&gt;
&lt;br /&gt;
Most startup scripts in rc.d/ can be enabled/disabled in /etc/rc.conf. Maybe that is a bit too simple. They will use a function called load_rc_config to load /etc/defaults/rc.conf, /etc/rc.conf and /etc/rc.conf.local, in that order.&lt;br /&gt;
&lt;br /&gt;
So for our distro we install /etc/rc.early where the biggest chunk of our configuration will happen. A lot of it is just to put the right stuff in /etc/rc.conf and other app specific config files. Then the rest of the normal FreeBSD startup procedure, to run the startup scripts in rc.d/ will take care of the rest.&lt;br /&gt;
&lt;br /&gt;
rc.conf                 - edited by auto script if auto_update_enable and _url set&lt;br /&gt;
rc.conf.mesh            - included early by rc.conf with defaults for the mesh&lt;br /&gt;
rc.conf.local           - overrides with partly manual conf&lt;br /&gt;
&lt;br /&gt;
# conf directories&lt;br /&gt;
/etc                    - ramdisk with end results&lt;br /&gt;
/conf/base/etc          - original FreeBSD stuff&lt;br /&gt;
/conf/default/etc       - changed files, our and packages&lt;br /&gt;
/usr/local/etc          - a symlink to /etc/usr.local.etc&lt;br /&gt;
#&lt;br /&gt;
# The basic idea is that config overrides that is done manually, have&lt;br /&gt;
# to be done in /conf/default/etc/rc.conf.local because it is read last&lt;br /&gt;
# and so overrides previous settings.&lt;br /&gt;
#&lt;br /&gt;
# The startup scripts will create the ramdisk /etc, then recursively copy&lt;br /&gt;
# /conf/base/etc into it and then /conf/default/etc.&lt;br /&gt;
# The real /etc needs diskless rc fstab rc.initdiskless in it for this to&lt;br /&gt;
# work.&lt;br /&gt;
#&lt;br /&gt;
&lt;br /&gt;
### files that will need to be twiddled by scripts on startup:&lt;br /&gt;
/etc/rc.conf                    - interface conf&lt;br /&gt;
/usr/local/etc/olsrd.conf       - interface, dns&lt;br /&gt;
/usr/local/etc/dhcpd.conf       - dhcpd&lt;br /&gt;
/etc/resolv.conf                - ?&lt;br /&gt;
/usr/local/etc/dnsmasq.conf     - dhcp + dns ?&lt;br /&gt;
&lt;br /&gt;
==What is there to tweak==&lt;br /&gt;
&lt;br /&gt;
==Installing FreeBSD on a Avila/Pronghorn Metro ARM board==&lt;br /&gt;
&lt;br /&gt;
===Gateworks Avila boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
===ADI Pronghorn Metro boards===&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;br /&gt;
&lt;br /&gt;
==Installing a distro==&lt;br /&gt;
&lt;br /&gt;
==Building a distro==&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3960</id>
		<title>John&#039;s research</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=John%27s_research&amp;diff=3960"/>
		<updated>2008-08-13T14:20:40Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Start moving my docs to the wiki - Arm install&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Development Team Research Pages]]&lt;br /&gt;
Research is probably a bit wild.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installing FreeBSD on a Avila/Pronghorn Metro ARM board=&lt;br /&gt;
&lt;br /&gt;
==Gateworks Avila boards==&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards different from the labeled&lt;br /&gt;
order on the PC board. It detects it in this order: J3, J1, J4, J2&lt;br /&gt;
So the card in J3 will be ath0...&lt;br /&gt;
 &lt;br /&gt;
==ADI Pronghorn Metro boards==&lt;br /&gt;
Note! FreeBSD detects the mini-pci cards in reverse order from the&lt;br /&gt;
labeling on the PC board. So it will detect from PCI3, PCI2, PCI1&lt;br /&gt;
to PCI0. So the card in slot PCI3 will be ath0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redboot use 115200 baud, so use &lt;br /&gt;
* &amp;gt; cu -l /dev/your-serial-dev -s 115200&lt;br /&gt;
&lt;br /&gt;
* Break RedBoot with ^C where it says you can. :-)&lt;br /&gt;
* &amp;gt; ip -l 10.0.0.234/24 -h 10.0.0.1 # LAB C155&lt;br /&gt;
* &amp;gt; ip -l 146.64.5.234/24 -h 146.64.5.1 # JHAY-LAB&lt;br /&gt;
* &amp;gt; load boot2&lt;br /&gt;
&lt;br /&gt;
* On the ADI Pronghorn boards you might get an write error. They seem to lock the flash. Just unlock it. Look for the address in the error message and do something like this and do the fis create command again:&lt;br /&gt;
** &amp;gt; fis free&lt;br /&gt;
** &amp;gt; fis unlock -f 0x50060000 -l 0x20000&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fis create boot2&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; fconfig&lt;br /&gt;
* Change the &amp;quot;run script at boot&amp;quot; to true&lt;br /&gt;
* Change the startup script to:&lt;br /&gt;
** fis load boot2&lt;br /&gt;
** go&lt;br /&gt;
&lt;br /&gt;
* Change the timeout to 3.&lt;br /&gt;
* Change BOOTP enabled to false.&lt;br /&gt;
&lt;br /&gt;
* Enter a . on the next option to end fconfig. Choose y to save it.&lt;br /&gt;
&lt;br /&gt;
* &amp;gt; load -b 0x200000 kernel-avila&lt;br /&gt;
* &amp;gt; go&lt;br /&gt;
&lt;br /&gt;
* Type &amp;lt;enter&amp;gt; at the shell prompt.&lt;br /&gt;
* &amp;gt; ./writedisk disk-arm-7-20070315.tgz # Normally use the latest&lt;br /&gt;
* &amp;gt; reboot&lt;br /&gt;
&lt;br /&gt;
* Reboot to make sure everything is working.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3956</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3956"/>
		<updated>2008-08-13T13:53:03Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */ Add list of scripts and config files needed to build a &amp;quot;distro&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current FreeBSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php - This is not used at the moment pending what the GUI needs.&lt;br /&gt;
*** thttpd - Maybe change to mini_httpd because it can do ssl.&lt;br /&gt;
&lt;br /&gt;
** files with local changes&lt;br /&gt;
*** crontab fstab host.conf motd nsswitch.conf syslog.conf termcap ttys boot.config loader.conf localtime motd rc.conf snmpd.config beastie.4th early.sh .cshrc rc.d/var gateways zebra.conf.org ripd.conf.org ripngd.conf.org master.passwd group&lt;br /&gt;
&lt;br /&gt;
** local stuff&lt;br /&gt;
*** rc.early&lt;br /&gt;
*** rc.conf.mesh.{dbn|pta}&lt;br /&gt;
*** rc.subr.mesh&lt;br /&gt;
*** add-dd-dns&lt;br /&gt;
*** add-mesh-dns&lt;br /&gt;
*** dd-list&lt;br /&gt;
*** del-dead-dns&lt;br /&gt;
*** wlanwd&lt;br /&gt;
*** newupdate&lt;br /&gt;
*** dnsmasq.conf&lt;br /&gt;
*** dnsmasqaddrs&lt;br /&gt;
*** regdns&lt;br /&gt;
*** rssi&lt;br /&gt;
*** rc.d/4over6&lt;br /&gt;
*** 4over6&lt;br /&gt;
*** bsnmpd6&lt;br /&gt;
*** upgrade(2)&lt;br /&gt;
*** /root/.ssh/{id_dsa|id_dsa.pub|config}&lt;br /&gt;
*** /usr/local/etc/{olsrd.conf|rc.d/olsrd} start_olsrd&lt;br /&gt;
*** rc.d/ffproxy&lt;br /&gt;
*** udpr&lt;br /&gt;
*** pinger&lt;br /&gt;
*** namedb/*&lt;br /&gt;
&lt;br /&gt;
** Scripts and configs used to build all of this:&lt;br /&gt;
*** build_chroot, create_it, checkfiles&lt;br /&gt;
*** small-clean.cfg, small-7-arm.cfg, small-7.cfg, small-7-32m.cfg&lt;br /&gt;
*** small-file-list, small-file-curr-list.diff, small-file-named-list, small-file-noathstats-list&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3955</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3955"/>
		<updated>2008-08-13T13:42:31Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */ Add file list&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current FreeBSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php - This is not used at the moment pending what the GUI needs.&lt;br /&gt;
*** thttpd - Maybe change to mini_httpd because it can do ssl.&lt;br /&gt;
&lt;br /&gt;
** files with local changes&lt;br /&gt;
*** crontab fstab host.conf motd nsswitch.conf syslog.conf termcap ttys boot.config loader.conf localtime motd rc.conf snmpd.config beastie.4th early.sh .cshrc rc.d/var gateways zebra.conf.org ripd.conf.org ripngd.conf.org master.passwd group&lt;br /&gt;
&lt;br /&gt;
** local stuff&lt;br /&gt;
*** rc.early&lt;br /&gt;
*** rc.conf.mesh.{dbn|pta}&lt;br /&gt;
*** rc.subr.mesh&lt;br /&gt;
*** add-dd-dns&lt;br /&gt;
*** add-mesh-dns&lt;br /&gt;
*** dd-list&lt;br /&gt;
*** del-dead-dns&lt;br /&gt;
*** wlanwd&lt;br /&gt;
*** newupdate&lt;br /&gt;
*** dnsmasq.conf&lt;br /&gt;
*** dnsmasqaddrs&lt;br /&gt;
*** regdns&lt;br /&gt;
*** rssi&lt;br /&gt;
*** rc.d/4over6&lt;br /&gt;
*** 4over6&lt;br /&gt;
*** bsnmpd6&lt;br /&gt;
*** upgrade(2)&lt;br /&gt;
*** /root/.ssh/{id_dsa|id_dsa.pub|config}&lt;br /&gt;
*** /usr/local/etc/{olsrd.conf|rc.d/olsrd} start_olsrd&lt;br /&gt;
*** rc.d/ffproxy&lt;br /&gt;
*** udpr&lt;br /&gt;
*** pinger&lt;br /&gt;
*** namedb/*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3949</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3949"/>
		<updated>2008-08-13T12:59:17Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current FreeBSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php - This is not used at the moment pending what the GUI needs.&lt;br /&gt;
*** thttpd - Maybe change to mini_httpd because it can do ssl.&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3941</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3941"/>
		<updated>2008-08-13T10:09:27Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current free BSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php - This is not used at the moment pending what the GUI needs.&lt;br /&gt;
*** thttpd - Maybe change to mini_httpd because it can do ssl.&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3940</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3940"/>
		<updated>2008-08-13T10:02:02Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current free BSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php&lt;br /&gt;
*** thttpd - Maybe change to mini_httpd because it can do ssl.&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3939</id>
		<title>High Performance Node - Specification</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=High_Performance_Node_-_Specification&amp;diff=3939"/>
		<updated>2008-08-13T09:56:24Z</updated>

		<summary type="html">&lt;p&gt;Jhay: /* Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; */ Add some packages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: High Performance Node]]&lt;br /&gt;
&lt;br /&gt;
== High Performance Node Development &amp;amp; Test Network ==&lt;br /&gt;
&#039;&#039;&#039;(Note)&#039;&#039;&#039; This is not the proper page for this discussion, will move it later. Keeping it here as much of the discussions currently happening, is around topics on this page&lt;br /&gt;
&lt;br /&gt;
*Development &lt;br /&gt;
** Lab development platforms&lt;br /&gt;
&lt;br /&gt;
*Locally deployed Test network&lt;br /&gt;
** Installation of a 10 node network on the CSIR campus&lt;br /&gt;
** Tx power set on minimum and attenuators used to minimise transmission distance&lt;br /&gt;
** Sites on the campus need to be selected&lt;br /&gt;
** Equipment for test network needs to be procured - suppliers?&lt;br /&gt;
***Enclosures - Poynting Antennas&lt;br /&gt;
***Gateworks boards - &lt;br /&gt;
***Dual WiFi cards - &lt;br /&gt;
***Power over Ethernet(poE)injectors -&lt;br /&gt;
&lt;br /&gt;
*Demo nodes &lt;br /&gt;
**The thinking is around something the size of a linksys, using a small patch antenna ( This can use used when the demo needs to travel).&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
[[Image:Bokkie_Router_Pic.png|right|thumb|80px|Current Bokkie router]]&lt;br /&gt;
&#039;&#039;&#039;HPN based on current “Bokkie” router, to become “Bokkie v2”&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Block Diagram of HPN ===&lt;br /&gt;
[[Image:HPN_Block Diagram_v2.png|left|thumb|300px|Block diagram of HPN]]&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enclosure ===&lt;br /&gt;
* Based on Poynting Enclosure ([http://www.poynting.co.za/productdisplay.php?id=186&amp;amp;cat_id=3 Product code:WLAN-A0033])&lt;br /&gt;
* Modification: swap 1x 2.4 GHz omni-directional antenna for 1x 5.8 GHz omni-directional antenna&lt;br /&gt;
&lt;br /&gt;
=== Electronics ===&lt;br /&gt;
* 1x Gateworks [http://www.gateworks.com/products/avila/gw2348-4.php Avila GW2348-4] Network Platform&lt;br /&gt;
* 3x 802.11a/b/g mini PCI Atheros based WiFi cards - [http://www.miro.co.za/detail.aspx?pid=208&amp;amp;p=2&amp;amp;sp=&amp;amp;spp= CX-WLM54AG23 Complex High Power dual-band Mini PCI Card] (It maybe worthwhile to search and evaluate some of the new cards on the market, but our current &amp;quot;bokkie&amp;quot; routers use this one from Miro)&lt;br /&gt;
** 2x configured at 5.8 GHz&lt;br /&gt;
** 1x configured at 2.4 GHz &lt;br /&gt;
* 1x 1GB compact flash card&lt;br /&gt;
* 3x [http://en.wikipedia.org/wiki/U.FL U.FL to SMA connectors]&lt;br /&gt;
&lt;br /&gt;
=== Enclosure - Other ===&lt;br /&gt;
* 1x External weatherproof Ethernet connector with Ethernet pigtail for POE (install on left side – looking at bokkie – keeping with current standard)&lt;br /&gt;
* 4x Gateworks board mounting standoffs&lt;br /&gt;
* External Mounting bracket&lt;br /&gt;
&lt;br /&gt;
=== Accessories ===&lt;br /&gt;
* Powered 48V power-over-Ethernet injector&lt;br /&gt;
*Ethernet Cables&lt;br /&gt;
** 1x UV resistant outdoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** 1x indoor CATV cable [have different lengths available (5m, 10m, 20m)]&lt;br /&gt;
** Need for longer cables, custom make ?&lt;br /&gt;
* Some type of surge protection on the power side. &lt;br /&gt;
**Thinking of a product from http://www.clearline.co.za/. Still need to investigate&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* Wall mounting bracket (different types depending on type of wall - specification)&lt;br /&gt;
* Mounting pole (different types - spec)&lt;br /&gt;
* M10\M12 Coach Screws and fisher plugs (# depending on wall mounting bracket)&lt;br /&gt;
* 10x pack Cable ties&lt;br /&gt;
* Earthing kit Webb Industries have earthing kits that can be used. see http://www.webb.co.za/index.php?nav=news&amp;amp;ID=50&lt;br /&gt;
**Clamp\lug on one end of earthing cable for attachment onto wireless installation mounting bracket&lt;br /&gt;
**Earthing cable: Length (?), Gauge (?) - 10-15mm diameter&lt;br /&gt;
**Clamp on spike for other end of earthing cable for attachment onto earthing spike&lt;br /&gt;
**Earthing spike - 1m (driven into the ground at base of wall of the wireless installation)&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
=== Firmware: &amp;quot;bokkie1 mesh distribution&amp;quot; ===&lt;br /&gt;
This software specification is based on the current free BSD version of the firmware. I have named it &amp;quot;bokkie1 mesh distribution&amp;quot; as a working title (for want of a better name - please provide a nice snazzy one)&lt;br /&gt;
&lt;br /&gt;
* A script is used to build the current firmware build based on the platform. Please insert the list of packages\utilites\etc used to make this build.&lt;br /&gt;
** packages installed&lt;br /&gt;
*** dnsmasq&lt;br /&gt;
*** ffproxy&lt;br /&gt;
*** olsrd&lt;br /&gt;
*** php&lt;br /&gt;
*** thttpd&lt;br /&gt;
&lt;br /&gt;
* Additional&lt;br /&gt;
** IPv4 over IPv6&lt;br /&gt;
*** Allows for automatic configuration of the tunnels&lt;br /&gt;
*** Automatic DHCP of IPv4&lt;br /&gt;
** Supports HTTPS and HTTP&lt;br /&gt;
** Runs mini_httpd web server&lt;br /&gt;
&lt;br /&gt;
=== GUI ===&lt;br /&gt;
The GUI has two main links, Status and Administration(basic). The Status link is unencrypted, however, the Administrion link(s) are encrypted and authenticated.&lt;br /&gt;
*Status link provides for the user to view:&lt;br /&gt;
**The configuration status of the Node&lt;br /&gt;
**The routing table &lt;br /&gt;
**The link/signal strength with respect to other nodes in the vicinity&lt;br /&gt;
*Administration&lt;br /&gt;
**Change hostname&lt;br /&gt;
**Set the NTP server (remote/local)&lt;br /&gt;
**Set DNS server (remote/local)&lt;br /&gt;
**Create a cluster&lt;br /&gt;
**Command line interafce&lt;br /&gt;
&lt;br /&gt;
=== Remote upgradeable ===&lt;br /&gt;
*What current functionality exists?&lt;br /&gt;
&lt;br /&gt;
*What further development is needed?&lt;br /&gt;
&lt;br /&gt;
*What limitations exits?&lt;br /&gt;
** Cannot be remotely upgraded if there is a protocol change&lt;br /&gt;
&lt;br /&gt;
=== Further development to functionality ===&lt;br /&gt;
* GSM modem to the development network and first nodes in the field&lt;br /&gt;
&lt;br /&gt;
* Watchdog&lt;br /&gt;
**Problem with native watchdog on Gateworks Avila board&lt;br /&gt;
***Boot failure resuscitation&lt;br /&gt;
**Specific to Gateworks Avila Board &lt;br /&gt;
**PCB to be developed that plugs into the JTag connector&lt;br /&gt;
&lt;br /&gt;
* WEP security&lt;br /&gt;
&lt;br /&gt;
* Mechanism to get the GPS co-ord configured in the HPN. This can later be used in the visualisation tool on the gateway with a Google plot of the nodes.&lt;br /&gt;
&lt;br /&gt;
[[Image:Indicator_v2.png|right|thumb|150px|LED type indicator system]]&lt;br /&gt;
* Indicator: &lt;br /&gt;
**Visual: Example of indicator system (using LEDs mounted at the bottom of the enclosure) for alignment, type of box (ie. red or green, which is an indication of the channel being used), power to box&lt;br /&gt;
***1 - Left most LED can be either RED or GREEN, showing type of box - this can be configured in the setup and commissioning of the router(indication of the channel being used), ie. this is either a red box or a green box&lt;br /&gt;
***1 - Right most LED shows power&lt;br /&gt;
***2 - 5 Used as 4 point scale for signal strength&lt;br /&gt;
**Audible: with a buzzer used for alignment&lt;br /&gt;
** Check the power consumption (especially for multiple LEDs), and how to start/stop the beeping mode (may also be used for LEDs)&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=2411</id>
		<title>User:Jhay</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=2411"/>
		<updated>2007-05-30T07:31:05Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Add a link to edit the sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lets see if I can include a picture.&lt;br /&gt;
&lt;br /&gt;
[[Image:John_Hay.jpg]]&lt;br /&gt;
&lt;br /&gt;
Jip, it seems to work... or is that play?&lt;br /&gt;
&lt;br /&gt;
So do I get email upon changes now?&lt;br /&gt;
Seems not yet?&lt;br /&gt;
&lt;br /&gt;
This link should take you to the place where you can edit the sidebar.&lt;br /&gt;
[[MediaWiki:Sidebar]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Main_Page&amp;diff=2163</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Main_Page&amp;diff=2163"/>
		<updated>2006-06-26T12:51:32Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Whitespace to get it to update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [[Image: Meraka.jpg]] Wireless Africa / COIN Wiki ==&lt;br /&gt;
 &#039;&#039;Removing the barriers to enable bottom-up creation of access infrastructure&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
[[Image: Cantenna-peebles-small.jpg]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[NEW:  Quick getting started guide for setting up an outdoor mesh node]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please use the discussion tag above to comment and provide suggestions!&lt;br /&gt;
&lt;br /&gt;
Please Email wa-admin(at)meraka.org.za if you wish to contribute or for further information.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Main_Page&amp;diff=2162</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Main_Page&amp;diff=2162"/>
		<updated>2006-06-26T05:45:17Z</updated>

		<summary type="html">&lt;p&gt;Jhay: white space&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== [[Image: Meraka.jpg]] Wireless Africa / COIN Wiki ==&lt;br /&gt;
 &#039;&#039;Removing the barriers to enable bottom-up creation of access infrastructure&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
[[Image: Cantenna-peebles-small.jpg]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== [[NEW: Quick getting started guide for setting up an outdoor mesh node]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please use the discussion tag above to comment and provide suggestions!&lt;br /&gt;
&lt;br /&gt;
Please Email wa-admin(at)meraka.org.za if you wish to contribute or for further information.&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1941</id>
		<title>Downloads</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1941"/>
		<updated>2006-01-30T11:39:17Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Remove more whitespace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Firmware=&lt;br /&gt;
==WRT54G==&lt;br /&gt;
===OpenWRT===&lt;br /&gt;
===Freifunk===&lt;br /&gt;
[[Media:Openwrt-g-freifunk-1point1.pdf|Freifunk 1.1, please rename extension to .bin]]&lt;br /&gt;
&lt;br /&gt;
===DD-WRT===&lt;br /&gt;
===SveaSoft===&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[[Media:Circular waveguide optimise.xls|Spreadsheet for Optimising Cantennae]]&lt;br /&gt;
&lt;br /&gt;
=Documents=&lt;br /&gt;
[[Media:Wndw-ebook.pdf|Wireless Networking in the Developing World]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1940</id>
		<title>Downloads</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1940"/>
		<updated>2006-01-30T11:38:39Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Remove some whitespace&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Firmware=&lt;br /&gt;
==WRT54G==&lt;br /&gt;
===OpenWRT===&lt;br /&gt;
===Freifunk===&lt;br /&gt;
[[Media:Openwrt-g-freifunk-1point1.pdf|Freifunk 1.1, please rename extension to .bin]]&lt;br /&gt;
&lt;br /&gt;
===DD-WRT===&lt;br /&gt;
===SveaSoft===&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[[Media:Circular waveguide optimise.xls|Spreadsheet for Optimising Cantennae]]&lt;br /&gt;
	 &lt;br /&gt;
=Documents=&lt;br /&gt;
[[Media:Wndw-ebook.pdf|Wireless Networking in the Developing World]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1939</id>
		<title>Downloads</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1939"/>
		<updated>2006-01-30T11:37:29Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Part two&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Firmware=&lt;br /&gt;
==WRT54G==&lt;br /&gt;
===OpenWRT===&lt;br /&gt;
===Freifunk===&lt;br /&gt;
[[Media:Openwrt-g-freifunk-1point1.pdf|Freifunk 1.1, please rename extension to .bin]]&lt;br /&gt;
&lt;br /&gt;
===DD-WRT===&lt;br /&gt;
===SveaSoft===&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[[Media:Circular waveguide optimise.xls|Spreadsheet for Optimising Cantennae]]&lt;br /&gt;
	 &lt;br /&gt;
=Documents=	 &lt;br /&gt;
[[Media:Wndw-ebook.pdf|Wireless Networking in the Developing World]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1938</id>
		<title>Downloads</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1938"/>
		<updated>2006-01-30T11:35:32Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Remove Ronel and my booboo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Firmware=&lt;br /&gt;
==WRT54G==&lt;br /&gt;
===OpenWRT===&lt;br /&gt;
===Freifunk===&lt;br /&gt;
[[Media:Openwrt-g-freifunk-1point1.pdf|Freifunk 1.1, please rename extension to .bin]]&lt;br /&gt;
&lt;br /&gt;
===DD-WRT===&lt;br /&gt;
===SveaSoft===&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[[Media:Circular waveguide optimise.xls|Spreadsheet for Optimising Cantennae]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1937</id>
		<title>Downloads</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Downloads&amp;diff=1937"/>
		<updated>2006-01-30T11:32:28Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Firmware=&lt;br /&gt;
==WRT54G==&lt;br /&gt;
===OpenWRT===&lt;br /&gt;
===Freifunk===&lt;br /&gt;
[[Media:Openwrt-g-freifunk-1point1.pdf|Freifunk 1.1, please rename extension to .bin]]&lt;br /&gt;
&lt;br /&gt;
===DD-WRT===&lt;br /&gt;
===SveaSoft===&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
[[Media:Circular waveguide optimise.xls|Spreadsheet for Optimising Cantennae]]&lt;br /&gt;
&lt;br /&gt;
=Documents=&lt;br /&gt;
[[Media:Women in ICT research outline v2.doc|Women in ICT Research Outline]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1693</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1693"/>
		<updated>2005-11-22T08:03:54Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage&lt;br /&gt;
** portal-url|portal&lt;br /&gt;
** currentevents-url|currentevents&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help&lt;br /&gt;
** HowTos|HowTos&lt;br /&gt;
** Links|Links&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1667</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1667"/>
		<updated>2005-11-21T18:30:33Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage&lt;br /&gt;
** portal-url|portal&lt;br /&gt;
** currentevents-url|currentevents&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help&lt;br /&gt;
** HowTos|HowTos&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1666</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=MediaWiki:Sidebar&amp;diff=1666"/>
		<updated>2005-11-21T18:29:08Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage&lt;br /&gt;
** portal-url|portal&lt;br /&gt;
** currentevents-url|currentevents&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help&lt;br /&gt;
** howtos-url|howtos&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1591</id>
		<title>User:Jhay</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1591"/>
		<updated>2005-11-21T10:12:02Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lets see if I can include a picture.&lt;br /&gt;
&lt;br /&gt;
[[Image:John_Hay.jpg]]&lt;br /&gt;
&lt;br /&gt;
Jip, it seems to work... or is that play?&lt;br /&gt;
&lt;br /&gt;
So do I get email upon changes now?&lt;br /&gt;
Seems not yet?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1590</id>
		<title>User:Jhay</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1590"/>
		<updated>2005-11-21T10:09:57Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lets see if I can include a picture.&lt;br /&gt;
&lt;br /&gt;
[[Image:John_Hay.jpg]]&lt;br /&gt;
&lt;br /&gt;
Jip, it seems to work... or is that play?&lt;br /&gt;
&lt;br /&gt;
So do I get email upon changes now?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Logo_wa.jpg&amp;diff=1528</id>
		<title>File:Logo wa.jpg</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:Logo_wa.jpg&amp;diff=1528"/>
		<updated>2005-11-18T14:03:32Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Logo done by Yusuf&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Logo done by Yusuf&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1281</id>
		<title>User:Jhay</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1281"/>
		<updated>2005-11-08T06:45:51Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lets see if I can include a picture.&lt;br /&gt;
&lt;br /&gt;
[[Image:John_Hay.jpg]]&lt;br /&gt;
&lt;br /&gt;
Jip, it seems to work... or is that play?&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1280</id>
		<title>User:Jhay</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=User:Jhay&amp;diff=1280"/>
		<updated>2005-11-08T06:08:59Z</updated>

		<summary type="html">&lt;p&gt;Jhay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Lets see if I can include a picture.&lt;br /&gt;
&lt;br /&gt;
[[Image:John_Hay.jpg]]&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
	<entry>
		<id>http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:John_Hay.jpg&amp;diff=1279</id>
		<title>File:John Hay.jpg</title>
		<link rel="alternate" type="text/html" href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=File:John_Hay.jpg&amp;diff=1279"/>
		<updated>2005-11-08T06:07:30Z</updated>

		<summary type="html">&lt;p&gt;Jhay: Family + Cruiser&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Family + Cruiser&lt;/div&gt;</summary>
		<author><name>Jhay</name></author>
	</entry>
</feed>