[Gta04-owner] Updated gta04 init

Radek Polak psonek2 at seznam.cz
Tue Apr 10 12:49:05 CEST 2012


Hi,
i have updated the gta04-init [1]. It can now:

* boot from any partition
* boot from subdirectory on partition
* use kernel from /boot/uImage on the target partition
* display logo of booted distribution

Booting (or running init) is still controlled with boodev file. However the 
syntax has changed. Example content is:

/dev/mmcblk0p2 /distros/shr

The first part is partition followed by optional directory. If directory is not 
given it runs init from root. Otherwise it chroots and runs init from given 
directory.

This allows you to boot between number of distributions. You even dont need 
separate partitions for them.

I have also solved the problem with kernels. The gta04-init now checks 
/boot/uImage of target partition with uImage on SD card. If they match it runs 
init and normally boots. If they dont match it copies kernel from target dir 
to uImage on sd card and reboots. After reboot distro is booted with it's 
kernel.

Last thing - distributions which would like to display their logos when 
booting can provide /boot/logo.bmp file with their logo. It should be 32bit 
argb bitmap. For GUI consistency you should use sd.bmp and nand.bmp from here 
[2] as a base for your logos.

Btw it would be nice is other distros could adopt this initramfs. Switching 
distributions will work much better then. Now possible to boot from QtMoko to 
other distro, but not the opposite way since the other distro's kernel does 
not have this bootmenu.

For more info how to use gta04-init please check the README here [1] and you 
can also see how it's implemented in QtMoko's shutdown dialog [3].

You can watch demo video on youtube to see how it works in real:

	www.youtube.com/watch?v=mPgUlN3oy_k


Regards

Radek


[1] https://github.com/radekp/gta04-init
[2] https://github.com/radekp/gta04-init/tree/master/pic
[3] 
https://github.com/radekp/qtmoko/blob/master/src/server/ui/shutdown/shutdownimpl.cpp


More information about the Gta04-owner mailing list