[Gta04-owner] QtMoko v49

Dr. H. Nikolaus Schaller hns at goldelico.com
Mon Nov 19 14:37:22 CET 2012


Hi,

Am 19.11.2012 um 14:08 schrieb Radek Polak:

> On Monday, November 19, 2012 11:35:03 AM Dr. H. Nikolaus Schaller wrote:
> 
>> Yes, I see that there are benefits and therefore it should not be simply
>> removed. But it makes booting more complex than it needs to be.
>> 
>> My impression is that most (new) owners of a GTA04 (at least initially)
>> just want to have an SD card with a single image to install on some SD and
>> put it into the GTA04. Then it should boot just that image.
> 
> Oki, i think i know how to make it work that way:
> 
> I can make the initramfs screen [1] display only if the first partition is FAT 
> and if the gta04-init directory is present. It can do straight boot into 
> partition that was specified by "root=/dev/xxx"
> 
> So it should behave like normal kernel without initramfs.
> 
> Users that want to use the advanced gta04-init features will have option to 
> format firts partition as FAT and make the gta04-init directory. Then they can 
> use it like now...
> 
> Does this sound good?

Yes, sounds good!

But I think others should also state their opinions if they need the gta04-init
features as part of QtMoko or a separate tool and how it should work.

> 
>> Or make it boot right through to QtMoko until someone enables it to have
>> more features?
> 
> Yes, with above ^^^ it should be possible.
> 
>> Hm. Can you swap p5&p6? This would make it easier to define the partition
>> size for media to use everything until end-of-disk.
> 
> Hmm maybe it would be best to get rid of swap at all. I have checked memory 
> under QtMoko - it's like 80MB used. If someone needs more then 400MB for 
> something he can setup swapfile...
> 
>> Ah, I see. But I think this may make the SD hang on second boot (unless
>> you have compiled the second partition into the kernel on the FAT
>> partition). Because the latest u-boot/boot.scr finds a kernel in FAT
>> but no bootargs.scr and tries to boot the NAND jffs.

Ah, this was incomplete.

* it defaults to root=NAND
* if it finds a kernel in a FAT partition, it does not change the root
* if it finds a kernel in an ext partition it changes to root=/dev/<same partition as kernel> and rootfstype=ext
* if it finds no kernel on SD it takes kernel from NAND

If an additional booargs.scr is found it *can* change that (but does not need to).

This means: a kernel in a FAT partition without bootargs.scr will try to take rootfs
from NAND (unless booargs are compiled into the kernel).

> 
> Ahh oki, so if i want to boot from FAT i need to provide both uImage and 
> bootargs.scr? I though it can work without bootargs.scr

The default bootargs.scr changes this to boot from ext partition 2 if the kernel
is found on FAT partition 1.

The best documentation is the full algorithm as found in line 109ff:

<http://git.goldelico.com/?p=gta04-uboot.git;a=blob;f=boot-scr/boot.txt;h=8b3bbad29ef91b0839d64f0a6a6864fd4e6b8b01;hb=HEAD>

and

<http://git.goldelico.com/?p=gta04-kernel.git;a=blob;f=bootargs.txt;h=dca06f3e750e7d8172a49d375a67e1aea08b6aa1;hb=HEAD>

BR,
Nikolaus


More information about the Gta04-owner mailing list