tmpfs version

This version mostly used for typical routers with big Read-Only partition.

preserved files

tmpfs version have /sbin/flash script which can be used for loads/saves important files from/to raw MTD partition (/dev/mtdblock3).

Usage:

# /sbin/flash
Usage: /sbin/flash save | load [dst]

By default this script saves: /etc /usr/local /root. Edit /etc/midge.save for change defaults.

packages

In tmpfs version also supports ipkg packages. But for preserving files ipkg -d local should be used

Example:

# ipkg -d local update
Downloading http://midge.vlad.org.ua/ipkg/Packages ...
Connecting to midge.vlad.org.ua[212.1.120.85]:80
Packages             100% |*****************************| 11533       00:00 ETA
Done.
Updated list of available packages in /usr/lib/ipkg/lists/midge

# ipkg -d local install tc

Downloading http://midge.vlad.org.ua/ipkg/./tc_0_mipsel.ipk ...
Connecting to midge.vlad.org.ua[212.1.120.85]:80
tc_0_mipsel.ipk      100% |*****************************| 56732       00:00 ETA
Done.
Unpacking tc...Done.
Configuring tc...Done.


====== flash save ======
Normaly all changes you make at runtime to files on your router will be lost after next reboot. They become persistent if you type
<code>flash save

So you write to the flash only by hand and your flash will not be destroyed by frequently writes of the operation system. After reboot data from rom will be overwriten by data from last flash save.

The directories saved are defined in /etc/midge.save. They are saved into partition 4 on the flash behind bootloader (partition 1), kernel (partition 2) and squashfs (partition 3). See also details.

If you increase the size of the kernel or squashfs partition you decrease the size of the flash save partition.

If you write a new firmware with the same partition sizes as the last firmware into your router, the flash partition will not be destroyed and during boot process data from new firmware rom will be overwritten by data from old flash save. This is possibly not what you want. As workaround write another firmware with different partition sizes temporary to your router before you finaly write your own firmware.

# flash save Info: Saving to /tmp/flash.tar.gzip tar: Removing leading '/' from member names root/ … etc/midge.save 1+1 records in 1+1 records out </code>

ipkg

Midge uses ipkg as package manager. ipkg is debian apt-get like package manager written on shell, and uses tar or ar. Packages for midge you can find at http://midge.vlad.org.ua/ipkg/

Also you can use packages from OpenWRT project, for more information see Links/ipkg

some screen shots

update

midge# ipkg update
Downloading http://midge.vlad.org.ua/ipkg/Packages ...
Connecting to midge.vlad.org.ua[212.1.120.85]:80
Packages             100% |*****************************|  6880       00:00 ETA
Done.
Updated list of available packages in /usr/lib/ipkg/lists/midge

install package

midge# ipkg install strace
Downloading http://midge.vlad.org.ua/ipkg/./strace_0_mipsel.ipk ...
Connecting to midge.vlad.org.ua[212.1.120.85]:80
strace_0_mipsel.ipk  100% |*****************************| 77666       00:00 ETA
Done.
Unpacking strace...Done.
Configuring strace...Done.

midge# which strace
/ram/usr/bin/strace

<note tip> See /etc/ipkg.conf to enable another package sources </note>

<note tip> By default packages installed to the RAM, if you want install to the root filesystem use -d root switch

And see /etc/ipkg.conf </note>

tpkg

Midge also uses tpkg (tiny package) as package manager. tpkg is my own research for a simple and very light-weight debian apt-get like package manager, its written on shell, and uses tar.gz. Packages for midge you can find at http://midge.vlad.org.ua/packages/

examples

show package

midge2# tpkg show vtun
Name: vtun
Filename: vtun.tar.gz
Size package/installed: 41005/105234
Description: TUN/TAP virual tunnel http://vtun.sf.net "Easiest way to create Virtual Tunnels over TCP/IP networks"

install package

midge2# tpkg install tcpdump
Connecting to midge.vlad.org.ua[212.1.120.85]:80
tcpdump.control      100% |*****************************|   162       00:00 ETA
Package tcpdump installed
midge2# which tcpdump
/ram/sbin/tcpdump
midge2#
/var/lib/dokuwiki/data/pages/midge/tmpfs-version.txt · Последние изменения: 2014/02/17 23:05 (внешнее изменение)
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии: CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Run by Debian Driven by DokuWiki