On Wed, May 12, 2010 at 06:07:24PM +0200, Dr. H. Nikolaus Schaller wrote: > With this information we may be able to write and install our own U- > Boot, our own recovery menus etc. Heh, don't touch the uboot! :-).
> Please respond if you find inaccuracies or ommissions. After discussion, > someone with write access to kwaak (I have to dig for my password) may > upload and nicely format the results. > > > > 0. NAND fash partitions > -------------------------------- > 0x00000000-0x00100000 : "bootloader partition" -- ok, this is u-boot > 0x00100000-0x00400000 : "kernel partition" -- ok, this is a kernel > 0x00400000-0x00500000 : "mac partition" -- this holds the MAC > address(es) > 0x00500000-0x00a00000 : "mini rootfs partition" > 0x00a00000-0x40000000 : "yaffs2 rootfs partition" > > cat /proc/mtd will list all partitions (incl. one for the second 1G > flash) > > See here how these partitions are mapped to /dev/mtd# and /dev/mtdblock# > > http://www.informit.com/articles/article.aspx?p=1187102&seqNum=6 > > > 1. U-Boot (1.1.6) > ---------------------- > > U-Boot is stored in partition "bootloader partition" (/dev/mtd0) > > The default boot args (and usually invisible console output) are > described here: > http://projects.kwaak.net/twiki/bin/view/Epc700/UbootStuff > > Source code: > http://projects.kwaak.net/twiki/pub/Epc700/UbootStuff/PC701-LX-u-boot-1.1.6.tar.bz2 > > The U-Boot has some patches in common/main.c and common/cmd_bootm.c to > detect several key combinations during boot. Depending on that, > different actions are taken (normal boot, flash uimage, flash minifs > etc.) > > There appear to be different versions of U-Boot installed in factory > since the recovery procedures and secret key combinations described are > not exactly the same and don't exactly match the U-Boot sources. > > And, older machines don't have tftp built in, but newer machines (1.1.6 > U-Boot) appear as if they can load/boot/flash through tftp by additional > key press combinations. Actually all versions have the same capabilities, but the action selected with the keys don't include tftp on the lesser systems. The part that select the specific bootscript and the bootscripts differ a little between the systems. > U-Boot can read flash images only from a SD card (not from USB memory > keys). It can indeed read vfat16 up to 32MB partitions on the sd-card. > Normal boot sequence boots a kernel from nandflash (i.e. the "kernel > partition") > > If that fails, the so called minifs is booted (by loading kernel & > minifs to RAM and doing a bootm). I think it boots a kernel from nandflash. That kernel will try to use the normal rootdevice. If that fails or if some key is pressed (that's the only reason why the bootup on 2.4.20 takes a long time), it mounts and start the minifs. > 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's just a maintenance tool. > 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. The pinguin picture is in the kernel. The F3 is also in the kernel. (hence the bootdelay). After that the recovery starts and gives you recovery options. > 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). That depends on the bootscript selection of uboot ;-). > 3. kernel > This is the real kernel (or is it shared with 2?). > > It is stored in NAND flash in partition "kernel partition" (/dev/mtd1) > > To flash a kernel, place a uImage (file search is not case sensitive) on > the FAT-SD and press Fn+LeftShift+F1 and power on. Again.. depending on... > If the kernel is not shared with 2. it could also be written by the > recovery procedure. The kernel can always be written :-). Either by the uboot, or from linux. Once the kernel is booted, the flash is "unused". > There appears to be a download of a kernel at > http://www.elonex.com/support/products/ONEt/mbrrecovery.shtm > 4. root filesystem > ----------------------- > > This can be flashed by placing a .tbz archive (with extension renamed to > .img) on the root of a SD card or USB stick and press F3 during boot. > This will open a recovery menu where one can choose where to load the > rootfs from. The recovery menu is not provided by U.Boot but ??? > > Finally, there is a newer .rec format which appears to replace the .img > format - but nothing specific is known (a yaffs raw image?). This is used > for the recovery file of the Letux 400. Since U-Boot can't handle complex > file formats I think it is responsibility of 2. to handle this. There is a big note: all 2.4.20 kernels do not use ecc. When Nils and I were working on 2.6, those gave is major problems because we didn't turn patch the ecc out (because it's insane to use flash without ecc). That can have nasty effects on the yaffs2 filesystem. I am not sure if that's fixed now. -- .signature not found _______________________________________________ Mipsbook-devel mailing list Mipsbook-devel@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/mipsbook-devel