HeXiLeD
"I also had some problems installing packages. For example opkg search fdisk or any other *fdisk* keyword failed to display available packages.
The same problem occurred when using Luci to search but when i used luci to install fdisk; it worked."
Before you run "opkg list *fdisk* (I don't know if 'search' works), you need to run "opkg update". The updated list of packages gets cleared after a reboot. I think this is intentional design, to keep space available on the overlay. This is what I get using 10.03.1 br47xx:
root@OpenWrt:~# opkg list *fdisk*
cfdisk - 2.13.0.1-4 - This package contains a utility for managing disk partition tables.
fdisk - 2.13.0.1-4 - This package contains a utility for managing disk partition tables.
mtd-utils-docfdisk - 20090227-1.1 - MTD docfdisk
sfdisk - 2.13.0.1-4 - This package contains a utility for managing disk partition tables using command-line only.
"How much space do you have on your router after flash ?
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 1.9M 1.9M 0 100% /rom
tmpfs 6.5M 56.0K 6.5M 1% /tmp
tmpfs 512.0K 0 512.0K 0% /dev
/dev/mtdblock3 960.0K 320.0K 640.0K 33% /overlay
mini_fo:/overlay 1.9M 1.9M 0 100% /
Correct me if i am wrong but it seems only to display 2 MB flash when it should be 4MB. What am i missing here?"
When you read <http://wiki.openwrt.org/doc/techref/filesystems>, there are no instructions on how to easily view how much flash you are using up (using df -h), but this is what I think from working with it.
!) The two important lines to watch are the mount points of /rom (/dev/root) and /overlay (/dev/mtdblock3)
a. The /rom is actually the size of the image (or .bin or .trx) that you flashed to the router, which is using SquashFS. It is read-only, and that's why /rom will always show Use% 100%. However, the Size column will vary depending on the .trx or .bin size that you've flashed to the router. I've had some /rom mount points vary between 1.4 MB to I (if I recall correctly) 2.4 MB.
b. The /overlay entry is the JFFS2 partition. This is read-write, and this is where all changes since the initial flashing get stored.
So, the larger the .bin/.trx under /rom is, the less space will be allocated to /overlay. I don't know the exact formula that openwrt uses to build the two filesystems, but if you add /rom and /overlay, you will come in just under 4 MB (assuming you are using 4MB flash sizes).
The Use% column under /overlay is the entry I keep an I on. This will grow as you 'opkg update', and then add packages. Most of my builds start off with 16% to 45%, then climb as high as 94% if I 'opkg install luci luci-app-qos' and a couple more packages (luci is one of the largest packages, while luci-app-qos is pretty big too).
I found that studying <http://wiki.openwrt.org/doc/techref/flash.layout> really helped me understand how the SquashFS and JFFS2 worked (in particular the diagram of the sample flash layout).
"I just got a new router (wrt54g v2.2) which i flashed with brcm47xx (2.6 kernel) and removed a couple unneeded packages related to ppp/pppoe."
When removing packages AFTER flashing does not save you any space, as the /rom size is still the same. If you're concerned with space, then ppp/pppoe needs to be removed BEFORE the flashing.
Using Image Generator for Backfire 10.03.1/br47xx, in about 5 minutes, I built this image :
2.5M Mar 11 16:57 openwrt-brcm47xx-squashfs.trx
with this command:
make image PROFILE=Broadcom-b43 PACKAGES="-ppp -ppp-mod-pppoe -iptables -firewall batmand kmod-batman-adv"
I don't know anything about batman, so I am making an assumption that for your purposes you need batmand & kmod-batman-adv packages. There is no luci, no usb support. At 2.5 MB, that should be small enough to work comfortably on a 4MB flash-router (and that should be pretty close to the same size that will show up on the /rom entry using df -h once flashed on the router).
What I've been doing is keeping a working 'make image' command, then tweak it as I go (cut and paste). I have all my routers pick up an IP address via DHCP, and manage them on the main router, so I include custom "FILES=" switch at the end of the command, and one /etc/config/network files works for all the routers to switch to DHCP instead of the traditional static '192.168.1.1'. This has saved me lots of time, as after every new flash, the new router is visible immediately on the network: that is, I don't mess around with changing desktop IPs, unplugging/replugging network cables, telnet/ssh into the new routers, changing ips...
For you purposes, if you decide to switch to ImageGenerator, once you an image that you want to flash to all of your routers (with all of your custom /etc/config/...) files, you could make one flash per router. The only change for each router image would be the editing of /etc/config/network file (using any text editor) for the specific ip you want that router to be visible at. This would also give you a benefit in that if the router gets a hard reset (think the /overlay-jffs2 gets wiped out, and goes back to what was initially on the /rom-squashfs), you will still be able to find your router on the network, without going through the whole 192.168.1.1 dance.
"Code:
CONFIG_PACKAGE_kmodswitch:
This package contains switch drivers for ADM6996L and BCM53XX RoboSwitc
Is this package needed for BCM53 chips or is it an extra."
I'm not sure what this package is used for. Unless you installing luci on all of your routers, I think you won't have any issue with flash. To check on your ram use the 'free' command, and you will see output like this:
total used free shared buffers
Mem: 13388 10264 3124 0 584
Swap: 0 0 0
Total: 13388 10264 3124
I hope this is readable. I don't post to forums that often, so I haven't taken the time yet to figure out how to give cleaner formatting; with the time that I have, I think I would offer you more content, then a pretty post. I just hope you don't get a headache reading.
Could you let me know how you make out when start working on your Asus WL520gu routers? I would like to stick with the br47xx images, but I also need wireless working. Do you know the difference between the kmod-b43 and kmod-b43legacy modules/packages? Before I start playing with brcm2.4 images, I think I will try to find out which drivers are being used (and thus making my wl520gu lock up, when the wrt54gl is working fine)