Reply
Thread Tools
Akkumaru's Avatar
Posts: 694 | Thanked: 619 times | Joined on Nov 2011
#31
Do I smell a possibility of QUADBOOT?
__________________
Still learning on geeky knowledge
N9 *stolen*N900 *died*N900 *on hiatus* OnePlus X
 

The Following User Says Thank You to Akkumaru For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#32
Originally Posted by Akkumaru View Post
Do I smell a possibility of QUADBOOT?
If farfary adds backupmenu and sshd to juiceme's triple boot then we are looking at a quintboot
 

The Following 2 Users Say Thank You to thedead1440 For This Useful Post:
Akkumaru's Avatar
Posts: 694 | Thanked: 619 times | Joined on Nov 2011
#33
This makes me want to buy a 64 GB N9
__________________
Still learning on geeky knowledge
N9 *stolen*N900 *died*N900 *on hiatus* OnePlus X
 

The Following User Says Thank You to Akkumaru For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#34
Originally Posted by Akkumaru View Post
This makes me want to buy a 64 GB N9
Of course 16GB is just too small to fiddle with things...
 

The Following User Says Thank You to thedead1440 For This Useful Post:
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#35
I am thinking ways how to create an useful multiboot loader for N9. Last night I did some experiments with booting the device to normal Harmattan image using kexec from running MOSLO envireonment, and it seems doable.

So I am investigating this now from the following idea;
  • Device is partitioned so that there are 2 different partitions that contain a root filesystem, one for Harmattan/Nitdroid and one for Nemo
  • The modified MOSLO (kernel & initramfs) is flashed as the boot kernel of the device
  • Based on user action in MOSLO boot, the next stage is loaded in place with kexec (which is quite fast way to load the kernel)

Of course it is possible to add my almost-singleuser-mode-console and farfry's Backup Menu in the selections.

I have not tried yet to flash the MOSLO kenel permanently to the device, but rather in my experiments I have loaded with flasher options "-l -b". I would like to understand the Harmattan boot sequence a bit more thoroughly before I start really messing with it.

I have not yet found anywhere a detailed description how the boot sequence REALLY goes, all I know is what I have experimented with.
If anyone could point me to right direction, I would appreciate it.
  • What happens (detailed view) when the device is powered on?
  • The primary boot loader is something called NOLO, how does it work?
  • Where actually the flashed kernel is in the memory? (I cannot find it on any partition on mmcblk0 device?)
  • What is the format of the flashable kernel? How do I create one? (I have built modules in the kernel source tree but not yet managed to build a loadable kernel...?)
 

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
#36
 

The Following 3 Users Say Thank You to farfary For This Useful Post:
farfary's Avatar
Posts: 147 | Thanked: 300 times | Joined on Mar 2012 @ ^^ IRAN ^^ - Tehran :D
#37
i think bootloader not flashed in main storage
it flashed in NAND
 

The Following User Says Thank You to farfary For This Useful Post:
farfary's Avatar
Posts: 147 | Thanked: 300 times | Joined on Mar 2012 @ ^^ IRAN ^^ - Tehran :D
#38
you can tell http://www.sakoman.com/ to port u-boot for n9
i told him , but he didn't it
 

The Following User Says Thank You to farfary For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#39
juiceme, for your super-bootloader idea, you can flash the kernel, and set its cmdline to boot from /dev/mtd4 ("var", unused)

It's pretty big, you can definitely have a hell of a time sticking every kind of utility and kernel module and whatnot on there.

Time to answer some questions:
Originally Posted by juiceme View Post
I would like to understand the Harmattan boot sequence a bit more thoroughly before I start really messing with it.

I have not yet found anywhere a detailed description how the boot sequence REALLY goes, all I know is what I have experimented with.
If anyone could point me to right direction, I would appreciate it.[*]What happens (detailed view) when the device is powered on?
OMAP ROM does the bootchain all the way to NOLO, which loads the kernel into memory, passes atags, and executes the kernel.

Originally Posted by juiceme View Post
[*]The primary boot loader is something called NOLO, how does it work?
It's actually the secondary boot loader (see secondary.bin). The primary boot loader is the OMAP ROM, which has support for loading code via USB. As you can see when attaching USB cable while flasher is running. This is also why a cold flash even when NOLO is corrupted works.

It used to be able to store options for boot device etc, but that was removed in Fremantle. All it does now is the above (see {1})

Originally Posted by juiceme View Post
[*]Where actually the flashed kernel is in the memory? (I cannot find it on any partition on mmcblk0 device?)
Code:
$ cat /proc/mtd
mtd2, apparently.

Originally Posted by juiceme View Post
[*]What is the format of the flashable kernel? How do I create one? (I have built modules in the kernel source tree but not yet managed to build a loadable kernel...?)
It is the zImage which is directly flashable (and loadable via kexec) to the device (build product is at arch/arm/boot/zImage)
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.

Last edited by Hurrian; 2012-12-03 at 10:01.
 
Community Council | Posts: 4,920 | Thanked: 12,867 times | Joined on May 2012 @ Southerrn Finland
#40
Okay, now I had time to prepare the "/dev/mtd4" partition. Apparently that can be done neatly on the normally running device, there was no need to boot to single mode etc. to prepare it:

Code:
~ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00100000 00040000 "bootloader"
mtd1: 002c0000 00040000 "config"
mtd2: 01000000 00040000 "kernel"
mtd3: 00200000 00040000 "log"
mtd4: 1ca40000 00040000 "var"
mtd5: 02000000 00040000 "moslo"
mtd6: 20000000 00040000 "omap2-onenand"
~ # 
~ # /usr/sbin/ubiattach /dev/ubi_ctrl -m 4
UBI device number 0, total 1832 LEBs (472743936 bytes, 450.8 MiB), available 1810 LEBs (467066880 bytes, 445.4 MiB), LEB size 258048 bytes (252.0 KiB)
~ # 
~ # /usr/sbin/ubimkvol /dev/ubi0 -N var -m
Set volume size to 467066880
Volume ID 0, size 1810 LEBs (467066880 bytes, 445.4 MiB), LEB size 258048 bytes (252.0 KiB), dynamic, name "var", alignment 1
~ # 
~ # mount -t ubifs ubi0:var /root/tp1
~ # 
~ # mount
rootfs on / type rootfs (rw)
/dev/root on / type ext4 (rw,noatime,errors=remount-ro,barrier=1,stripe=8,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=503976k,nr_inodes=125994,mode=755)
/dev/mmcblk0p3 on /home type ext4 (rw,noatime,errors=remount-ro,barrier=1,stripe=8,data=ordered)
none on /proc type proc (rw,nosuid,nodev,noexec,relatime)
none on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,noatime,size=4096k)
tmpfs on /var/run type tmpfs (rw,nosuid,noatime,size=512k)
none on /dev type tmpfs (rw,noatime,size=10240k,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noatime,size=65536k)
none on /sys/kernel/debug type debugfs (rw,relatime)
cgroup on /syspart type cgroup (rw,relatime,freezer,memory,cpu)
/dev/mapper/signonfs on /home/user/.signon/signonfs-mnt type ext2 (rw,sync,noexec,relatime,errors=continue)
/dev/mmcblk0p1 on /home/user/MyDocs type vfat (rw,nosuid,nodev,noexec,noatime,nodiratime,uid=29999,fmask=0133,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,rodir,errors=remount-ro)
ubi0:var on /root/tp1 type ubifs (rw,relatime)
~ # 
~ # ls tp1/ -la
total 4
drwxr-xr-x    2 root     root           160 Dec  4 13:52 .
drwxr-xr-x   18 root     root          4096 Dec  4 00:35 ..
~ # 
~ # df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 3.9G      3.2G    535.1M  86% /
devtmpfs                 10.0M    248.0K      9.8M   2% /dev
/dev/mmcblk0p3            2.0G    760.8M      1.1G  40% /home
tmpfs                     4.0M    108.0K      3.9M   3% /tmp
tmpfs                   512.0K    112.0K    400.0K  22% /var/run
none                     10.0M    248.0K      9.8M   2% /dev
tmpfs                    64.0M    248.0K     63.8M   0% /dev/shm
/dev/mapper/signonfs      6.8M     41.0K      6.4M   1% /home/user/.signon/signonfs-mnt
/dev/mmcblk0p1           53.7G      5.9G     47.8G  11% /home/user/MyDocs
ubi0:var                414.8M     24.0K    410.0M   0% /root/tp1
~ #
Some thoughts;
  • Does the partition name have to be "var", or will something in the system break if I change it to something else entirely. Just a cosmetic thing but if it is to be holding boot related stuff rather than /var/ then it might be nice to call it something else... forex. "rescue"
  • I am still thinking about which is the best launching order for the rest of the system... whether to use Harmattan/Nitdroid kernel as the first stage boot and then kexec other images from that, or have own small subsytem like the MOSLO booter kernel+initramfs which then would kexec further images if needed.
  • The mtd4 partition is indeed a nice place to set up stuff, I thought of maybe putting all the kernels and initramfs/initrd's there. It would be easy to load them up from there, each with tailored command line to set up the rest of the system.
    Having full debian environment there is also a nice idea, currently I use a loop-mounted HARM-CHOM image which is 2G of size but a lot smaller filesystem is OK
 
Reply


 
Forum Jump


All times are GMT. The time now is 05:06.