Reply
Thread Tools
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#21
OK, now I had time to look into the moslo file (in this case moslo-0.0.13.1-9.11.Nemo.Adaptation.N950.N9.armv7hl.rpm)

It seems to be so that the loader is actually a minimal linux kernel with an initrd that is set up to select the next stage and reboot the device with the selected OS. (I kind of think this is a bit overly complicated process, it makes the boot process a lot longer. On the other hand it really makes it a lot easier to tweak the boot process... )

On line 249 of the init script of the initrd there is the evkey selection for the bootable target. Now I know it is possible to use evtap with the selection process

There is propably just one thing to check yet before I can say for sure that evtap/sillyboot works with Nemo/Harmattan boot selection;
There is no "show_png" binary on the initrd image so I need to check that the Harmattan version /usr/bin/show_png is compatible with the initrd and does not require any unavailable linked libraries. This binary is required for displaying the images of the graphical login.

Last edited by juiceme; 2012-11-19 at 07:17. Reason: corrected typo in text
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#22
Using ldd-sb to compare the library dependencies of fb_text2screen from the loader and Harmattan /usr/bin/show_png I can see that propably the libraries needed for show_png already exist on the moslo initrd:

Code:
[sbox-HARMATTAN_ARMEL: ~] > 
[sbox-HARMATTAN_ARMEL: ~] > ldd-sb show_png
        => not found (0x00000000)
	 => not found (0x00000000)
	/lib/ld-linux.so.3 => /lib/ld-linux.so.3 (0x00000000)
[sbox-HARMATTAN_ARMEL: ~] > 
[sbox-HARMATTAN_ARMEL: ~] > ldd-sb fb_text2screen
	libpopt.so.0 => /lib/libpopt.so.0 (0x00000000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
	libc.so.6 => /lib/libc.so.6 (0x00000000)
	/lib/ld-linux.so.3 => /lib/ld-linux.so.3 (0x00000000)
[sbox-HARMATTAN_ARMEL: ~] > 
[sbox-HARMATTAN_ARMEL: ~] >
Thus I belive show_png should work also from the moslo initrd. To be tested
 

The Following User Says Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#23
OK. Now I have both good and bad news...

I modified the moslo initramfs so that I added both my evtap binary and the show_png binary from Harmattan.

This is the result when I try them in the moslo environment:

Code:
/ # 
/ # /usr/bin/evtap -t /dev/input/event1 -xy
626:326
/ # 
/ # /usr/bin/show_png
/usr/bin/show_png: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
/ # 
/ #
So evtap works out-of-the-box but show_png doesn't
I need to go library hunting to make it work...
 

The Following User Says Thank You to juiceme For This Useful Post:
farfary's Avatar
Posts: 147 | Thanked: 300 times | Joined on Mar 2012 @ ^^ IRAN ^^ - Tehran :D
#24
very good news juiceme I Love your Work
 

The Following User Says Thank You to farfary For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#25
Success

I managed to run show_png when I added the dependent libraries libpng12.so.0.42.0 and libz.so.1.2.3.4 to the initramfs.

Now that I palyed around with it a bit I noticed that I propably can make such a MOSLO that it can autodetect whether user has Harmattan+Nitdroid+Nemo installation or just Harmattan+Nemo, for example. Based on this info I can then display the correct icons on the selection screen.

This opens up nice possibilities indeed
 

The Following 4 Users Say Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#26
The modified MOSLO is now stored to my svn server at https://toosa.swagman.org/svn/sillykbd/TRUNK/moslo

The first version (@r32) is just the proof-of-concept. Loader has been modified so that no permanent modifications are done on the device. This release is just a demonstration that /usr/bin/evtap and /usr/bin/show_png work from the initramfs of MOSLO.

See the README in the repo. Feel free to experiment with it
 

The Following 3 Users Say Thank You to juiceme For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#27
Here is a short description of the MOSLO boot process as I have understood it. Please, if you have some things to add or correct, do not hesitate to do so.

On the first run of the MOSLO kernel&initramfs, it is started from flasher on the device which is partitioned normally as a Harmattan device. The initial partition structure is as follows:

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 16 1760511 1760496 56335872 c W95 FAT32 (LBA)
/dev/mmcblk0p2 1760512 1891583 131072 4194304 83 Linux
/dev/mmcblk0p3 1891584 1957119 65536 2097152 83 Linux
/dev/mmcblk0p4 0 - 0 0 0 Empty

Ths script determines that this device does not have Nemo installed yet, and enters autopartitioning where it will resize and split some partition to create the Nemo filesystem boot in.

Finally the device will offer the new partition to be mounted over USB to the host computer, letting user create filesystem on it and copy the needed files in.

On successive boots, the script will notice that there already exists a partition for Nemo, and instead of the partitioning stuff it will enter selection stage to ask user what to boot.

If Nemo is selected, it will load and execute new kernel in place using kexec.
If Harmattan is selected it will boot to that with /sbin/reboot2.

---------- Edit ----------

OK, I had to go away for a while so this was left a bit hanging.

So, as OP describes in the first post, the boot continues from the first selection, and if non-Nemo boot is selected, the device boots the Harmattan kernel and then again gets to another boot selection where user finally decides if Harmattan or Nitdroid is desired.

I think this is overly complicated solution.
What would be desirable, is to have just one boot selection screen (using evtap/sillyboot) that user selects the final target that is desired.

This is how I am thinking of solving it;
(Now here I don't talk about the installation part, this is the normal-boot-after-installation stage)
1.) First part is similar up to the point where user selects the target; Nemo/Harmattan/Nitdroid
2.) If Nemo is selected, continue as before
3.) If Harmattan or Nitdroid is selected, Instead of rebooting the device also the other kernel is loaded via kexec.

The difference in Harmattan / Nitdroid initialization is only made in the preinit phase, they are runnig same kernel. Thus, differentiation on which to boot can be done at least in 2 different ways:
- Either pass different init file as kernel parameter in kexec
- Or write a file in MOSLO stage to rootfs that the kernel reads later to see which preinit branch to go to.

Thoughts?

Last edited by juiceme; 2012-11-20 at 15:13. Reason: Added more information
 

The Following 4 Users Say Thank You to juiceme For This Useful Post:
farfary's Avatar
Posts: 147 | Thanked: 300 times | Joined on Mar 2012 @ ^^ IRAN ^^ - Tehran :D
#28
Good Work Bro.
but I do not understand the moslo like u-boot ?
or your edited moslo like u-boot for n900 ?
in installation page in mer project , they never flashed moslo to n9 , only load it
 

The Following 2 Users Say Thank You to farfary For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#29
Yes, now as I review the first posting, the MOSLO kernel is never flashed to the device. Also, the filesystem that is copied to the new partition, contained in "nemo-handset-armv7hl-n950-0.20121101.1.NEMO.2012-11-08.1.tar.bz2" does not contain similar init-with-evkey functionality that the MOSLO initramfs has.

So, how is the booting actually done after the installation? I mean, surely it is not done so that each time you want to boot the device you need to connect it to a computer USB port and boot it with flasher, no??
 

The Following User Says Thank You to juiceme For This Useful Post:
farfary's Avatar
Posts: 147 | Thanked: 300 times | Joined on Mar 2012 @ ^^ IRAN ^^ - Tehran :D
#30
yes of course
i think we need a bootloder that can we flash it like u-boot and with evtap or evkey for selecting
 

The Following User Says Thank You to farfary For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:02.