maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Booting Maemo 5 from mmc card on N900 (https://talk.maemo.org/showthread.php?t=36011)

Stskeeps 2009-12-07 10:25

Re: Booting Maemo 5 from mmc card on N900
 
Ideally you should also be calling /sbin/preinit on the new rootfs, not /sbin/init. In bootmenu, I'd have used ITEM_LINUXRC to run a certain script to set up the environment for me, pivot root and exec /sbin/preinit.

@SR 2009-12-08 22:25

Re: Booting Maemo 5 from mmc card on N900
 
MMC rootfs was mounted read-write (otherwise how could I even save output to files on it?).

I was playing with the device while only /usr was moved to mmc. Performance in some applications that use a lot of memory (browser, maps) was awful. Reducing swappiness (/proc/sys/vm/swappiness) from 100 to the kernel default 60 helped a little (swap was also on mmc).

OptX 2009-12-09 11:39

Re: Booting Maemo 5 from mmc card on N900
 
Im a little bit into linux, but not as much as you are. Where do i start to read (learn) ? Where is the thread for bootload or can i direct download that ?

bdogg64 2010-01-04 05:59

Re: Booting Maemo 5 from mmc card on N900
 
Does anyone know what the correct CONFIG_CMDLINE is to boot from the external mmc on the n900?

Here is the default

Code:

CONFIG_CMDLINE="init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0"
Here is what I have

Code:

CONFIG_CMDLINE="root=/dev/mmcblk0p3 rw rootdelay=5 console=ttyMTD,log console=tty0"
I have the mmc and appropriate filesystems compiled into the kernel, but I always get a kernel panic.

Any help would be great

Thanks

fanoush 2010-01-04 08:18

Re: Booting Maemo 5 from mmc card on N900
 
try root=MMmm hexadecimal notation, I guess there isn't /dev/whatever parser in kernel for all devices. At least N8x0/770 kernel uses root=1f03 for third mtd partition, mmcblk0p3 could be b303 (major 179, minor 3)

also init=/sbin/init (or whatever you use) might be good just in case

and BTW, you can install bootmenu if you don't mind booting initial code from internal flash and pivot_root-ing to new root a bit later, no kernel changes needed then

bdogg64 2010-01-04 12:28

Re: Booting Maemo 5 from mmc card on N900
 
Quote:

Originally Posted by fanoush (Post 452200)
try root=MMmm hexadecimal notation, I guess there isn't /dev/whatever parser in kernel for all devices. At least N8x0/770 kernel uses root=1f03 for third mtd partition, mmcblk0p3 could be b303 (major 179, minor 3)

also init=/sbin/init (or whatever you use) might be good just in case

and BTW, you can install bootmenu if you don't mind booting initial code from internal flash and pivot_root-ing to new root a bit later, no kernel changes needed then

I have bootmenu installed already, but when it tries to run exec /usr/sbin/chroot . /sbin/init after mounting the new root and running pivot_root, I get an error from /sbin/preinit line 372 saying not found. I'm probably missing something, but I'm not sure what it is yet.

Thanks

tomm 2010-01-06 19:43

Re: Booting Maemo 5 from mmc card on N900
 
So did anyone successfully did it? If so can you please post detailed steps to Boot from my 16gb MMC? I would like to partition mine as 8gb VFAT, 7 plus gb for ext2 and the rest for swap.

Thanks in advance.

Graham Cobb 2010-01-06 20:41

Re: Booting Maemo 5 from mmc card on N900
 
Quote:

Originally Posted by tomm (Post 456057)
So did anyone successfully did it?

Sure. I used Fanoush's instructions here: http://talk.maemo.org/showpost.php?p...0&postcount=45

daperl 2010-01-07 14:46

Re: Booting Maemo 5 from mmc card on N900
 
Quote:

Originally Posted by Graham Cobb (Post 456175)
Sure. I used Fanoush's instructions here: http://talk.maemo.org/showpost.php?p...0&postcount=45

Since you've done this have you tried to reboot to the flash partition? If so, did you first need to uncomment this line from /initrd/etc/event.d/rcS-late?

# /bin/mount /home || echo "Failed to mount /home partition."

fanoush 2010-01-07 14:52

Re: Booting Maemo 5 from mmc card on N900
 
Quote:

Originally Posted by daperl (Post 457369)
Since you've done this have you tried to reboot to the flash partition? If so, did you first need to uncomment this line from /initrd/etc/event.d/rcS-late?

# /bin/mount /home || echo "Failed to mount /home partition."

each system has its own copy of this file. basically the /opt and /home on internal eMMC is only for the system in flash. this should be commented only in system installed on microSD so /home and /opt is self contained there in the same partition (and not conflicting with original system in flash having different stuff in /opt and /home on eMMC). /initrd is temporary mount point in those instructions, the file is /etc/event.d/rcS-late in both systems but the /initrd/..... one refers to the one on microSD.


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

vBulletin® Version 3.8.8