Go Back   maemo.org - Talk > Devices > Nokia N810
 
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
  #1  
Old 2008-10-30, 18:04
rash.m2k rash.m2k is offline
 
Join Date: Aug 2008
Posts: 642
Thanks!: 15
Thanked 486 Times in 228 Posts
Default External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Ok guys I have os2008 installed on my N810 on the internal 2GB card. I also have a 4GB minisd card in the external slot.

THe problem is that when start my N810 WITH my external card plugged in then the device boots from mmcblk1p1 - which is actually supposed to be the external memory card! df -h shows that mmcblk1p1 is mapped to root device and mmcblk0p1 is mapped to /media/mmc2.
Quote:
~ $ df -h
Filesystem Size Used Available Use% Mounted on
/dev/mmcblk0p1 4.0M 2.3M 1.7M 58% /mnt/initfs
none 512.0k 148.0k 364.0k 29% /mnt/initfs/tmp
/dev/mmcblk1p1 1.8G 579.7M 1.2G 32% /
none 512.0k 148.0k 364.0k 29% /tmp
none 1.0M 60.0k 964.0k 6% /dev
tmpfs 1.0M 0 1.0M 0% /dev/shm
/dev/mmcblk0p1 1.8G 579.7M 1.2G 32% /media/mmc2
sfdisk -l however shows the correct mappings.

mmcblk0p1 is internal mmc

mmcblk1p1 as external mmc
/home/user # sfdisk -l

Quote:
Disk /dev/mmcblk0: 61440 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk0p1 0+ 61439 61440- 1966079+ 83 Linux
/dev/mmcblk0p2 0 - 0 0 0 Empty
/dev/mmcblk0p3 0 - 0 0 0 Empty
/dev/mmcblk0p4 0 - 0 0 0 Empty

Disk /dev/mmcblk1: 124368 cylinders, 4 heads, 16 sectors/track
Units = cylinders of 32768 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/mmcblk1p1 0+ 124367 124368- 3979768 b W95 FAT32
/dev/mmcblk1p2 0 - 0 0 0 Empty
/dev/mmcblk1p3 0 - 0 0 0 Empty
/dev/mmcblk1p4 0 - 0 0 0 Empty
The problem I believe lies in the bootmenu.sh file located in the /mnt/initfs folder - the mmc mappings for the N810 are different to N800 somehow.

I can get access to this file and change it but I'm not sure what I should be changing.

I need the N810 to automatically name the internal & external memory as I want to create swap space on the external memory card.

Any help would be much appreciated on how to get these mapping correct.

Last edited by rash.m2k; 2008-10-30 at 18:14.
Reply With Quote
  #2  
Old 2008-10-31, 11:13
fanoush fanoush is offline
 
Join Date: Jan 2006
Location: Czech Republic
Posts: 2,152
Thanks!: 102
Thanked 1,490 Times in 589 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Quote:
Originally Posted by rash.m2k View Post
THe problem is that when start my N810 WITH my external card plugged in then the device boots from mmcblk1p1 - which is actually supposed to be the external memory card!
This is known issue
https://bugs.maemo.org/show_bug.cgi?id=2747


Quote:
Originally Posted by rash.m2k View Post
The problem I believe lies in the bootmenu.sh file located in the /mnt/initfs folder - the mmc mappings for the N810 are different to N800 somehow.
The problem is in linux kernel. bootmenu.sh just has a workaround for this, you can't fix it there.
Quote:
Originally Posted by rash.m2k View Post
Any help would be much appreciated on how to get these mapping correct.
Once system boots (udev is used for /dev directory), mapping is consistent and 'correct', /dev/mmcblk1 is always external slot, /dev/mmcblk0 is internal one.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
Reply With Quote
  #3  
Old 2008-10-31, 11:30
rash.m2k rash.m2k is offline
 
Join Date: Aug 2008
Posts: 642
Thanks!: 15
Thanked 486 Times in 228 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Thanks for your reply fanoush. Its the same bug but the n810 boots correctly with or without memory card inserted. (correct me if I'm wrong)

However when it boots WITH external memory card inserted, the internal memory is mapped to both mmcblk0 and mmcblk1. Unmounting mmcblk0 is possible BUT not mmcblk1 - as it says it's in USE. Also removing the externel mmc in this state causes the N810 to reboot every single time.

By internal memory I mean the internal 2GB card slot on the N810, the internal 256MB flash does not play a part in this.

Last edited by rash.m2k; 2008-10-31 at 11:40.
Reply With Quote
  #4  
Old 2008-10-31, 12:18
fanoush fanoush is offline
 
Join Date: Jan 2006
Location: Czech Republic
Posts: 2,152
Thanks!: 102
Thanked 1,490 Times in 589 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Quote:
Originally Posted by rash.m2k View Post
However when it boots WITH external memory card inserted, the internal memory is mapped to both mmcblk0 and mmcblk1. Unmounting mmcblk0 is possible BUT not mmcblk1 - as it says it's in USE.
well, you unmount mount points not devices, what is the exact command line you are using? Also why you are trying to unmount it? Maybe you can leave it alone?

Quote:
Originally Posted by rash.m2k View Post
Also removing the externel mmc in this state causes the N810 to reboot every single time.
This can be also related to the fact that you are booting from partition one (mmcblkXp1) not 2 and up. First partition is usually FAT one, maybe system is confused and does something stupid when you open slot door?
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
Reply With Quote
  #5  
Old 2008-10-31, 13:53
rash.m2k rash.m2k is offline
 
Join Date: Aug 2008
Posts: 642
Thanks!: 15
Thanked 486 Times in 228 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Quote:
Originally Posted by fanoush View Post
well, you unmount mount points not devices, what is the exact command line you are using? Also why you are trying to unmount it? Maybe you can leave it alone?

umount /dev/mmcblk0p1

This can be also related to the fact that you are booting from partition one (mmcblkXp1) not 2 and up. First partition is usually FAT one, maybe system is confused and does something stupid when you open slot door?
I don't really understand whats going on until I read pages and pages of threads. What I do know is that inserting the mmc card AFTER the system has booted works fine.

If I boot the system with the mmc card inside then the internal memory is mounted as internel memory AND as the root device.

I can't explain it very well so ask me any questions you need to figure this out.
Reply With Quote
  #6  
Old 2008-11-03, 08:07
fanoush fanoush is offline
 
Join Date: Jan 2006
Location: Czech Republic
Posts: 2,152
Thanks!: 102
Thanked 1,490 Times in 589 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

Just FYI, I have fixed this issue, see patch attached to https://bugs.maemo.org/show_bug.cgi?id=2747 After all it was really easy and fits cleanly into kernel structures. Let's hope Nokia applies it to any future diablo updates.

Prebuilt kernel is not currently available due to http://www.internettablettalk.com/fo...676#post229676 :-)
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
Reply With Quote
  #7  
Old 2009-07-29, 23:45
Bundyo's Avatar
Bundyo Bundyo is offline
 
Join Date: Oct 2007
Location: Bulgaria
Posts: 4,708
Thanks!: 7,443
Thanked 4,649 Times in 1,717 Posts
Default Re: External MMC only works if plugged after boot! mmcblk0 and mmcblk1 wrong!

So fanoush, to summarize from that bug:

Is the only thing we need to uncomment the first line and comment the second to get consistent mmc names? It works for me, but I if that's the fix - its good to know when cloning n8x0...?
Code:
#KERNEL=="mmcblk*", IMPORT{program}="/lib/udev/mmc_id $env{PHYSDEVPATH}" 
KERNEL=="mmcblk*", IMPORT{program}="/lib/udev/mmc_id $sysfs{slot_name}"
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:47.