maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid (https://talk.maemo.org/showthread.php?t=83189)

juiceme 2013-01-02 07:46

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Quote:

Originally Posted by Sazpaimon (Post 1309862)
Out of curiosity have you looked into booting nemo via a chroot ala nitdroid? I briefly tried to get it to work that way, but at the time I was trying to make a single kernel that booted both Nitdroid and Nemo, but ran into some issues and lost interest. Your way of actually separating the kernels is a lot better, and I think not having to sacrifice a partition on the EMMC would be a better solution to running Nemo. You could basically add something like a real_root argument to the kernel command line, and the preinit script could take that and use it to determine where to chroot before running init.

Mmmm. not a bad idea really. I have to try that.

Actually there is no need to add extra parameters to the kernel cmdline, it can be done the way I currently handle it;
I have separate preinit files for my kernels, like "/sbin/preinit_harmattan", "/sbin/preinit_nitdroid" and I just give that as the "init=xx" parameter when I boot off the selected kernel.
That way I can make all the selection&preparation stuff in the 1st-stage boot.

juiceme 2013-01-02 08:01

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Quote:

Originally Posted by Akkumaru (Post 1309903)
By nemo kernel you mean the harmattan update kernel right? Isn't it still incomplete? I guess it should be complete for stability reasons and for 'new people' to use.

Yes, by Nemo kernel I mean the Nemo/Mer core kernel which itself is update (but not compatible) to the Nokia "PR1.3 vanilla kernel" kernel_2.6.32-20121301+0m8

The Nemo kernel I am using is "mer-n9-2.6.32-20121301" kernel which is a bit dated. (but of a lot newer than the Nokia PR1.3 kernel...)
I tried the latest Nemo kernel on github, the version 3.5.3 but that did not compile cleanly so I did not invest that much effort on it.

Actually as this is just the 1st stage loader kernel, which launches the actual "use-kernel" it does much matter if it is older or newer... the important thing is just that it can mount the needed devices and execute the next stage loader (which does not work correctly on Nokia kernels).

juiceme 2013-01-02 08:08

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Quote:

Originally Posted by Sazpaimon (Post 1309830)
There have been some semi-successful efforts in the past from Android users on getting a Kexec module running. Theoretically, if we can compile this module for the Harmattan kernel, we could possiby boot any kernel with any arbitrary command line arguments from the default Harmattan kernel at the preinit stage. That way, no flashing would be required. I'll try looking into it.

Actually now that I had time to think about this I guess it is intentional that Nokia kernels do not work correctly with kexec().

See, if it was possible (or easy :D) to write a kernel module for the stock aegis-enabled kernel to load up next-stage kernel at will, that would be a serious security breach. That would enable user to load up anything she likes and as far as system knows the device would still stay in closed mode, with all R/W access to CAL enabled.

Hurrian 2013-01-03 04:29

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
This sure is interesting.

juiceme, mind including an entry to export the eMMC over USB for repartitioning?

Code:

modprobe g_file_storage stall=0 luns=2 ro=0 removable
echo /dev/mmcblk0  > /sys/devices/platform/musb_hdrc/gadget/gadget-lun0/file

And on a side note, you may want to add ubi0:var (mounted to /boot) to /etc/fstab for convenience.

juiceme 2013-01-03 09:08

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Actually, what I am now thinking of doing is instead of repartitioning mmcblk to use partition 4 as the Nemo partition, I am trying to install the Nemo filesystem on /home/nemo on partition 1 and chroot to that on startup. (as suggested by Sazpaimon)

That way there is no need to resize partitions, which makes it a lot friendly to install on a freshly flashed device.
I am trying to create the correct bootscripts for it now.

Hurrian 2013-01-19 07:03

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
juiceme, I found this, in case Harmattan really didn't like booting off kexec for some reason.

It's explained here, although it may need board-specific configuration.

www.rzr.online.fr 2013-01-19 10:11

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
wouldnt this thread be documented on wiki ?

juiceme 2013-01-19 16:30

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Quote:

Originally Posted by Hurrian (Post 1315816)
juiceme, I found this, in case Harmattan really didn't like booting off kexec for some reason.

It's explained here, although it may need board-specific configuration.

Thanks, that looks promising. I belive the problems I have with regular kexec() have something to do with the fact that HW state is somewhat "half-initialized" when switching to the 2nd level kernel.

juiceme 2013-02-04 11:41

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Ohh, it's been a while since I did something with this, and now just today I when I played with it again I suddenly realized what's been the problem all the time!

I feel a bit embarassed even, the solution is so simple :D

The problem I had, was that I used incorrect way of shutting down the watchdog when I did the kexec() to the 2nd level kernel! Now why did I ever make such a novice mistake :eek:

Well, I can happily report now that I can reliably boot at least Harmattan, Nemo and Nitdroid fully up from multiboot touch menu, without being anywhere near a computer :p

byteninja2 2013-03-02 08:19

Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
 
Does this work with sillyboot v2?


All times are GMT. The time now is 11:04.

vBulletin® Version 3.8.8