PDA

Bekijk de volledige versie : ipkg wo usb



pripps
08-03-2008, 13:32
Hello

I wonder if it is possible to install ipkg wo using usb storage?

KR

raas
08-03-2008, 14:10
Hi,

I personally don't think it'll work.

For ipkg you need oleg's firmware.
The wl500gp has a compiled firmware of approx. 4mb in size.
Oleg has crammed a lot in it, and has done a great job in fitting all this in 4mb.

To install ipkg, you need space to store it on.

I believe the premium has a flash size of 8mb, so theoritically there should be 4mb left free. But I doubt if you can use it for ipkg.

But why would you want to do it without storage. ?
most packages require 'some' space to install, and space to load something to.
(I have some software installed, but my ipkg partition is a bit smaller than 500mb.. (granted mysql database use about 100mb of space)
.


BTW. if you're going to run packages you need more memory, hence a swap space (on usb storage.. pref. a hdd, usb-keys tend to wear out due to the heavy swap-writing)

HTH

pripps
08-03-2008, 18:27
Thanks again!

To answer on your question on USB storage I want some minimum modifications om my system to begin with. For instance new drivers for a webcam. Without ipkg I do not know how to do. I even do not understand where to save files as the only partition is read-only. Can I create a persistent rw partition on the rest of spase I have and how? Any link to the information would be great.
I also notices in your signature quite interesting link to your how-to. do you think I can use a 2GB USB flash for this purpose? I do not like USB HD for noise and power consumption.

KR

raas
09-03-2008, 01:07
Hi Pripps,


Sure, you can install it on a 2gb usb-stick,
but,

the how-to assumes you have 3 partitions.. (/opt, swap-space and /mnt)
So you have to create these on your usb-stick..

I assume you can do this without the swap, so 2 partitions should be ok.
but, also a but here. If you don't have swap space, you don't have enough memory to run al services which are installed in the how to.

There's always something to say about noise and power consumption.
but there are some very quite drives around, and you could also use hdd-spin-down, when nothing active is running..

power consumption. an external harddisk running 24/7 would draw 1 KW of power every 6-8-10 days, quitte the same as your router. If you've got some beefy pc running, you will draw this amount of power in 3-6 hours. (do a search on the board and you'll find some interesting discussions about this subject. )

personally I think being able to connect cheap storage devices to such a device which is also cheap and cheap to run and also is highly configurable is the biggest/main advantage of this device, but each to his own. :)

HTH

al37919
09-03-2008, 09:18
I'm not sure that you need ipkg to install driver for the webcam.

Briefly:

/tmp is a ramfs. It means it is rw, but lost after power off

/usr/local is so called flashfs. By issuing flashfs save && flashfs commit [&& flashfs enable] you save its content onto the built in flash. It is saved as tar.gz file, and the maximum size of this flashfs.tar.gz for Premium is 4.064 Mb. During runtime flashfs is expanded into the ram. It means it is lost unless saved, and it consumes as much space in ram as extracted content of flashfs.tar.gz

The above is true for the Oleg's fw.

Finally, the Oleg's firmware and ipkg packages in the standard repository (optware) are compiled using different toolchains. So, to keep the space requirements minimal it is the best to put in flashfs on the diskless system the binaries compiled using the same toolchain which is used for compilation of the firmware (then you'll not need to put there duplicates of the system libraries which are needed to run optware packages)

hugbug
09-03-2008, 09:45
You can use ipkg for small packages without usb-storage.

After loading of router:
mkdir /tmp/local/opt
mount /tmp/local/opt /opt

Then add the mounting to post-boot:

echo "#!/bin/sh" > /usr/local/sbin/post-boot
echo "mount /tmp/local/opt /opt" >> /usr/local/sbin/post-boot

After installing of packages or after editiing of any configs you need to save the modified files to flash:
flashfs save && flashfs commit && flashfs enable

Your packages must fill in 4MB on Premium (wl500gP). Since they are saved to flash in packed form it is pretty much and enough for example for updated uclibc, midnight commander, libxml2, etc. Many packages install "unneeded" stuff like man-pages, include-files, docs, which can be safely deleted before saving to the flash.

raas
09-03-2008, 12:14
Interesting you guys..

I've learned some more in how this system works.
(guess i'm still the linux noob, which is ok :) )

pripps
09-03-2008, 23:23
Thanks everybody!

Very useful advises and ideas and interesting point of views to consider. I will take it in considaration.

Thanks a lot again.

TBC