![]() |
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
(NOTE: ubi.mtd kernel parameter sets the mtd device to pass to ubiattach; it must always be "var". ubi0:$x (where $x is the UBIFS label) can be anything. However, again, for naming's sake, let's keep it names var.) Quote:
OH, and this will not use an initramfs! It's not a ramdisk, the first kernel will boot into a barebones complete system on /var, then kexec into a new system! It would make very little difference either way, as both first-stage kernels would have their own root filesystem (ubi0:var), and kexec a second-stage kernel (Harmattan PR1.3, NITDroid or Nemo) into their respective root filesystem. Quote:
A reference entry is already provided in /etc/fstab, however it is not mounted by default at boot. You will need to call ubiattach and mount by yourself (or add the needed lines in /etc/init/mount-home.conf) https://goput.it/j3i.png |
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
(This turned out to be rather a long rant, but please bear with me, there are some important observations embedded in this posting...)
I have had some advances and some backsteps now when I am trying to create a kexec based boot loader. For some time I tried to implement it so that the first-stage kernel would be the normal Harmattan/Nitdroid kernel, and the optional Nemo stage would be loaded with kexec on selection. As kexec is not enabled in the PR1.3 Nitdroid image, I wnted to get the sources for that to build it myself. Only answer I got from e-yes was that kexec is broken and cannot be made to work on the kernel (and I got no source to try it myself :mad: ) Well, as obviously kexec works with MOSLO kernel I decided to try it with the standard PR1.3 kernel (kernel_2.6.32-20121301+0m8.tar) myself and see if it works. At least with this e-yes was correct, I did not manage to get kexec to boot another image reliably. I did not furter debug it but one option still would be to fix that and continue with the original idea. Oh, and I found out something I did not know before, fyi; When I tried booting into a freshly compiled kernel image, I thought, why bother flashing it, I will just load it up with flasher to see if it works correctly. Turns out Harmattan will not boot up correctly if it has not been booted from actual flash chip. I wasted days on debugging this, every time I booted, the device would rise correctly to preinit phase, and then *BOOM* Only when I checked logs for nth time I got a hunch this has something to do with kernel boot parameters. When booting external kernel, there is an item "bootreason=usb", and when booting from chip it is "bootreason=pwr_key" Nitdroid does not care about this, it will boot to ICS whichever way but Harmattan throws up and plays DEAD if the reason is usb. OK, I have now confirmed this by managing to boot correctly to Harmattan from MOSLO kernel via kexec when I replaced the bootreason tag on kernel command line. You live, You learn. :D So, now as I have method to boot Harmattan from MOSLO, I decided to do it the correct way: Create a first-stage boot from modified MOSLO booter, which will then kexec either Harmattan/Nitdroid or Nemo, based on selection. But how to get the first stage to boot so that root device is ubi0:var ? What I have learned is that when the system boots, whatever the boot reason, usb/flash, the kernel command line is always set so that the first items are "init=/sbin/preinit root=/dev/mmcblk0p2" I have found no way of easily changing that to something like "init=/init root=/dev/ubi0:var", for example. I have not tried to recompile kernel to force it to ignore that part yet. However, what mystifies me is how is it possible that when I load up the MOSLO kernel & initramfs, then what happens is the kernel mounts the initramfs as root and executes /init from there, even as the commandline still reads "init=/sbin/preinit root=/dev/mmcblk0p2" ?? So, I wanted to try to flash the MOSLO kernel permanently to the device, but it seems that it is impossible to flash the initramfs part. I tried several ways to flash it: sudo flasher -a firmware.bin -k zImage-moslo -n initrd-moslo.new --flash-only=kernel,initfs -f -R sudo flasher -a firmware.bin -k zImage-moslo -n initrd-moslo.new --flash-only=initfs -f -R but no way, it seems that only the kernel got flashed, it is impossible to flash initramfs on the device. (maybe there is no place it could be flashed to...?) My experiments continue, though. |
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Holidays are a really good time for some serious hacking :D
Now I can announce that I have a working multiboot toolkit that can be used to load any suitable OS to N9 device using a graphical touch selection menus. The work is based on patched Nemo kernel which is used to boot up a minimal system which will be used to select the next-level OS and load it up. With this system, we are no longer limited to tripleboot but indeed can create even quadboot and up :D The patching is needed to override the default command line that NOLO forces on the booting kernel. Happy new year to all TMO'ers :) |
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
|
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Hope whatever juiceme is up to will be released soon!
|
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
|
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
|
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
With this method I am using, all you need is to flash the first stage kernel just once, and any of the second-stage kernels can be booted from a directory in the filesystem. You can have multiple kernels running on the same filesystem, just by starting them with a different command line; for example I have both the nitdroid kernel (running the normal way of chrooting it to /home/nitdroid/) and an own flavour of openmode Nokia kernel, either one can be launched from a file on the FS. Also, as the selection is done before booting the final kernel I can rearrange partittions as I like, mounting for example Nemo partition as root and launching the Nemo kernel. Nothing would prevent me running Debian, for example using my Harm-Chom-install image, mounting it as root and starting a kernel of my desire on it. (I could do that, but there is no point really as of course it would not use the phone functionality) |
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
|
Re: [Announce] N9 Multiboot - Harmattan, Nemo & Nitdroid
Quote:
|
All times are GMT. The time now is 16:54. |
vBulletin® Version 3.8.8