[Mipsbook-devel] Boot process analysed (please comment)
r_viets at hotmail.com
Tue Jun 8 19:05:23 CEST 2010
Update quickly posted here: http://projects.kwaak.net/twiki/bin/view/Epc700/KernelPort26Compiling
There is a more easy way to get yaffs working. Start from scratch and remove patches yaffs2 from v33.
Make manual changes or use commit scripts for below improvements
4) shutdown http://projects.goldelico.com/p/letux-400/source/commit/74581b4b47c43c181ede4451a0c92798857731b0/
5) touchpad mouse buttons http://projects.goldelico.com/p/letux-400/source/commit/6b9252d42c8342d3b98da6f46e3f833184af6007/
6) For sound copy below files to sound/oss
Still looking for a workaround of DMA/IRQ from MMC and AIC to get a stable kernel start from /dev/mmcblk0p2.
Any idea's ?
From: r_viets at hotmail.com
To: mipsbook-devel at linuxtogo.org
Subject: RE: [Mipsbook-devel] Boot process analysed (please comment)
Date: Sat, 22 May 2010 21:17:29 +0000
Yaffs2 give big issues as ard mentioned in the kernel sources we have patched so far based v33/34 from linuxtogo.org
Our current kernel will mess-up our nands.. oeps.
The yaffs2 stuff from qi-hardware is already patched to work in a better way.
qi hardware sources (trunk v809)
svn co http://projects.qi-hardware.com/svn/ingenic-linux-02os-linux-2-6-24-3/trunk
- copying the /include/linux/ and /fs/yaffs2 stuff to our sources. (I did not copy mtd.h otherwise I had some compiling errors)
- Needed to add some things to the yaffs2 setup in xconfig. Or just make oldconfig did add them by default.
- Afterwards yaffs2 and yaffs from nand works.
Now when use sound from a installed distro on nand, the 126.96.36.199 kernel does not get stuck anymore ;-)
Recompiling of the mmc driver (to change the dma order) did not workout yet .
It needs to be reconfigured in such a way that mmc is getting a dma addres after the i2s.
Then it may work fine when using a sd card.
> Date: Wed, 12 May 2010 19:06:29 +0200
> From: ard+mipsbook at kwaak.net
> To: mipsbook-devel at linuxtogo.org
> Subject: Re: [Mipsbook-devel] Boot process analysed (please comment)
> 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 at linuxtogo.org
Express yourself instantly with MSN Messenger! MSN Messenger
New Windows 7: Find the right PC for you. Learn more.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mipsbook-devel