2. minifs
------------

This appears a mini-linux system that operates as a second stage bootloader or at least as a maintainance tool. It lives in the /dev/ mtd3 partition.

It is not clear if it contains its own kernel or shares the kernel with the real system.

Download: http://www.trendtac.nl/documents/Recovery_EPC700.zip (this includes also a certain version of a recovery.img for 4.)

I guess (since I could neither find code in U-Boot nor the Kernel - and one can't overwrite a rootfs while it is being used) the function of this minifs is to show the penguin picture, and check for F3 to flash a root-filesystem. And, boot the final system if F3 is not pressed.

To get this minifs into flash through U-Boot, one has to press fn +leftshift+rightshift and have minifs.img (this is a .jffs2) on a FAT-SD card (does not work on my broken device - or the kernel in flash does not work any more).

I have followed (mostly) the instructions at http://members.home.nl/janrinze/trendtac.html#Hacking_the_root_filing_system : and got an excerpt of the minifs.


Key findings:
* it is indeed a "Mini-Linux" rootfs
* without kernel (so it shares the kernel with the production system - which must e.g. support jffs2)
* uses busybox
* has a directory /wkw_sh which contains the recovery menus (which use clear, echo, read etc. to communicate with the user)
* it reads the Ethernet Mac address from the MAC partition
* it looks for a "Recovery*.img"
* recovery (reflashing) is handled by /wkw_sh/recovery.sh
* it optionally formats (eraseall) /dev/mtdnand (which must IMHO be provided by the kernel initialization?)
* it mounts /dev/nand to /mnt/target
* it does a tar jxf to /mnt/target
* I could not find a reference to the *.rec format for Letux 400 recovery (Note: the machine I have analysed appears to be older than the standard Letux 400) * a setup_system.sh script appears to wget the full system from some internet server * the server is identified through an obscure getserver command built into busybox * some scripts write to echo 0 > /proc/jz/numlock_led, echo 0 > /proc/ jz/capslock_led, echo 0 > /proc/jz/eth0_led, echo 1 > /proc/jz/ numlock_led etc. So we should provide them in the 2.6 kernel
* /etc/inittab is configured to run the /etc/init.d/start scropt on tty0

What does this mean for our Kernel 2.6?

1. we can't simply flash the kernel into NAND - we will most likely the recovery function (that may be the issue on my machine that I now have a 2.6 kernel without jffs2 support in the kernel partition)
2. we can either make the kernel compatible to the minifs or
3. develop our own minifs compatible to the kernel

BR,
Nikolaus



_______________________________________________
Mipsbook-devel mailing list
Mipsbook-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel

Reply via email to