Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1856609
  • 博文数量: 473
  • 博客积分: 13997
  • 博客等级: 上将
  • 技术积分: 5953
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-22 11:52
文章分类

全部博文(473)

文章存档

2014年(8)

2013年(38)

2012年(95)

2011年(181)

2010年(151)

分类: LINUX

2011-11-22 10:44:29

Installing MeeGo to N900 on external MMC card

NOTE: Read the whole guide before doing any steps in this guide to make sure you understand everything.

If you do not want to erase the NAND partition or the internal 32 G eMMC from the N900 device, this installation is for you. What you need for this installation is a raw image that can be put to the MMC card and kernel (same kernel that is installed to the MMC).

Images

Raw images and corresponding kernel images can be found at (development builds) and (stable releases)

Find official release images here ()

You may want to check for the most recent N900 test reports at to see how much functionality is known to work on the N900.

Installing Rootfs on external MMC card

First, what you need, is a microSD memory card which does not contain any information that you need, as it will be erased during this operation.

The steps in this guide require an MMC card of at least 4gb.

Linux

When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. You can also plug the N900 into your computer's USB slot, using the package-provided cable. Make sure the external microSD card is unmounted, as with most modern linux distributions today it will get auto-mounted if the has a valid filesystem (FAT32 or ExtX). To unmount, you can try this example:

sudo umount /dev/sdX

And use the mount command to determine if/ where it is mounted:

sudo mount (for an example how the microSD would look go .

Finding out the device node can also be done with, for example, fdisk:

sudo fdisk -l

An example output (NOTE: The /dev/sdX is used as an example on your PC. This might be also called /dev/mmcblk0, /dev/sdd or something else)

$ sudo fdisk -l ... Disk /dev/sdX: 3965 MB, 3965714432 bytes 194 heads, 30 sectors/track, 1330 cylinders Units = cylinders of 5820 * 512 = 2979840 bytes Disk identifier: 0x0001ab40 Device Boot Start End Blocks Id System /dev/sdX1 1 588 1708984 83 Linux

NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/sdX not /dev/sdX1.

After you are 100% sure that the /dev/sdX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:

$ sudo dd bs=4096 if= of=/dev/sdX

If you are low on disk space, you can use

$ bzcat .bz2 | sudo dd bs=4096 of=/dev/sdX

to decompress the compressed raw image on the fly, without having to unpack it on you computer first. And if you have pv(1) installed, you can add it in between to display the progress (the image is ~ 2GB in size as of 2010-10-04):

$ bzcat .bz2 | pv | sudo dd bs=4096 of=/dev/sdX

The dd does not show any progress until the file is written to the device, so be patient.

Although sending a USR1 signal to a running dd process makes it print I/O statistics to standard error and then resume copying:

$ dd if=/dev/zero of=/dev/null& pid=$!

from another term:

$ kill -USR1 $pid

dd will output:

328356+0 records in 328356+0 records out 1344946176 bytes (1.3 GB) copied, 105.625 s, 12.7 MB/s

After this, you can insert the card in the N900.

Windows
  1. Download and install bzip2 to Windows
  2. Uncompress raw image in command prompt "bunzip2.exe "
  3. Change (rename) extracted file extension from .raw to .img
  4. Download the Win32DiskImager.exe program: https://launchpad.net/win32-image-writer/+download (zip file)
  5. Unzip the file and extract the contents to a known directory
  6. Run W32DiskImager.exe
  7. Select the MeeGo image file
  8. Select the drive letter which corresponds to the microSD memory card.
  9. Click the "Write" button to byte-copy the image to the microSD memory card.
  10. insert the memory card into the device and attach the back cover
  11. load/flash kernel image
Notes about flashing the kernel

Get the N900's flasher from tablets-dev.nokia.com

To load the kernel:

flasher-3.5.exe -l -b -k [kernel image] to load it

To flash it

flasher-3.5.exe -f -b -k [kernel image] to flash it

Flashing replace the Maemo5 kernel and you won't be able to boot into maemo5 without flashing the original kernel back

Then connect N900 to the computer via the USB cable and the Meego OS will boot. You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.

When booting from a memory card make sure that the device's back cover is on. Otherwise the card will not mount and you'll see a kernel panic

'NOTE!!' If you get error 'Not enough space on disk'. Try again with external memorycard reader.

Mac OS X

When inserting the microSD memory card in the card reader, you need to find out what the proper device for the card is. This can be done with disktool:

diskutil list

An example output (NOTE: The /dev/diskX is used as an example on your Mac. This might be also called /dev/disk2, /dev/disk3 or something else)

$ diskutil list ... /dev/diskX #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *4.1 GB disk3 1: DOS_FAT_32 DISKETTE 4.1 GB disk3s1


NOTE: The .raw image contains the partition table, as well. So the image needs to be written to /dev/diskX not /dev/diskX1.

NOTE: If you want to improve the speed writing your mmc card, you can use the raw device, avoiding the use of the os buffer, add 'r' add the name of your mmc interface, example: /dev/rdiskX

After you are 100% sure that the /dev/diskX is the microSD memory card you just inserted in the card reader, you can use, for example, dd to put the image onto the card:

$ sudo dd bs=4096 if= of=/dev/diskX

If you are low on disk space, you can use

$ bzcat .bz2 | sudo dd bs=4096 of=/dev/diskX

to decompress the compressed raw image on the fly without having to unpack it on you computer first.

The dd does not show any progress until the file is written to the device, so be patient.

Although sending a SIGINFO signal to a running dd process makes it print I/O statistics to standard error and then resume copying:

$ dd if=/dev/zero of=/dev/null& pid=$!

from another term:

$ kill -SIGINFO $pid

After dd is done, dd will output something like this:

475136+1 records in 475136+1 records out 1946157057 bytes transferred in 2606.033611 secs (746789 bytes/sec)


After this, you can eject the microSD and insert the card in the N900.

On the N900 itself

This should be a last resort solution.

  1. Download and unpack the raw image to a desktop computer (see above).
  2. un-mount the microSD memory card
sudo gainroot umount /dev/mmcblkXpY dd if=/home/user/MyDocs/ of=/dev/mmcblk1 Notes
  • X, Y in umount command should be the device number and partition number, usually 1, 1. Do not take information from /proc/partitions!

N900 swaps devices during boot and /proc/partitions is what the kernel initially sees when it is loaded. N900's SD-Card is /dev/mmcblk1 for Maemo5-Standard-Install and not like shown in /proc/partitions, /dev/mmcblk0! NITdroid's SD-install has SD-Card as /dev/mmcblk0, instead. If you want to see what is mounted at the moment, type "mount|grep mmc" or "df|grep mmc".

  • There might be more than one partition on the microSD memory card, though it is unlikely and depends on your own setup. You need to unmount all partitions before you proceed to `dd`.
  • It is possible to download the compressed image to your N900, but it is not recommended as it takes a long time to unpack.
  • `dd` does not give any output while it is copying, so be patient.
  • If you aren't sure about any of these steps you should not proceed without consulting a professional.
Load or flash kernel on N900

Before MeeGo is able to boot, you also need to load the kernel (vmlinuz) provided with the raw image to the device. This can be done with the .

Dual-boot with maemo using u-boot

See instead.

Load or flash manually Prerequisites
  • the flasher application needs to be installed on your computer. You can get it from here.

On 64-bit Ubuntu/Debian this command would do the trick, after downloading the .deb file:

$ sudo dpkg --force-architecture -i maemo_flasher-*i386.deb Running Meego

NOTE: First, open the back cover of N900 and insert the MMC card to the slot. Reinstall the back cover again.

NOTE: Back cover must be closed to boot from MMC.

NOTE: If you have a flashing jig, you will need to put a magnet at the red location marked

You need to execute the following command on your host system.

NOTE: The device must be turned off and disconnected from the computer. Connect it to the computer using the USB cable, only after executing the command

$ sudo flasher-3.5 -l -k -b

A message like:

flasher v2.5.2 (Oct 21 2009) Suitable USB device not found, waiting.

is shown on the terminal of the computer.

Then connect N900 to the computer via the USB cable and the Meego OS will boot. You may need to keep the 'U' key pressed (on the phone's keyboard) when connecting the cable.

NOTE: The command above will only load the kernel to the device, so next time you boot the device, the original kernel should be used and your Maemo 5 OS should boot normally.

If you want to flash the kernel to your device so that it is not forgotten when it is powered off, use option -f instead of option -l on command above.

NOTE: It's highly recommended NOT to flash the kernel on your device, unless you really know what you're doing (so please use -l instead of -f). Don't blame us if you brick your device, you have been warned!

Examples of files that can be used with this guide
MeeGo Version
1.0.99.2.20101019.1 meego-handset-armv7l-n900-1.0.99.2.20101019.1-vmlinuz-2.6.35.3-10.3-n900 meego-handset-armv7l-n900-1.0.99.2.20101019.1-mmcblk0p.raw.bz2
1.1.80.0.20101001.1 meego-handset-armv7l-n900-1.1.80.0.20101001.1-vmlinuz-2.6.35.3-8.5-n900 meego-handset-armv7l-n900-1.1.80.0.20101001.1-mmcblk0p.raw.bz2
阅读(1304) | 评论(0) | 转发(0) |
0

上一篇:sysstat,sar实例

下一篇:gcc用法详解

给主人留下些什么吧!~~