manual way of installing hardware packages on mmc cards or mounted image files

Asked by Cem Merven

I've try to install (unsuccessfully) linaro android image on my beagleboard xM rev.C by following the instructions on page https://wiki.linaro.org/Platform/Android/ImageInstallation.

Methodology I've used:
1) Clean installation of Ubuntu 10.04 LTS (the Lucid Lynx) on VMWare 7.1.4
2) All the External dependencies which mentioned in the ImageInstallation wiki and the readme file which comes with the package
3) Checking out latest development tools with bazaar tools which is also mentioned in the wiki page
4) Performing every action under root privilages inside "root terminal" (sudo -i)
5) New micro SD 4GB toshiba card (which also cleaned to it's "raw state" by manually removing left-over partitions with the gparted in every iteration)
6) Downloading and checking integrity of "boot.tar.bz2", "system.tar.bz2", "userdata.tar.bz2" files.

So far I've accomplished formating sd card with the "linaro-android-media-create" with a few warnings
but I've failed in the rest (stack trace is at end of this message).

I've seen six partitions after formating according to parted as...

root@ubuntu:~/linaro# parted /dev/sdb
GNU Parted 2.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Generic- SD/MMC (scsi)
Disk /dev/sdb: 3951MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 32.3kB 138MB 138MB primary boot, lba
 2 138MB 407MB 268MB primary
 3 407MB 675MB 268MB primary
 4 675MB 3951MB 3276MB extended
 5 675MB 1212MB 537MB logical
 6 1212MB 3951MB 2739MB logical

...but I don't know how to "precisely" place the three android images on those partitions manually.

Here is my question(s) and wishes
* Is there any way of placing those required images on partitions manually (using existing bash tools and commands)?
* If there is... please consider refering them in the same wiki page.
* It is nice to have an downloadable VMWare or VirtualBox Ubuntu Image which includes tools related to linaro development working out of the box...

I've been trying to debug and understand python scripts with the "eric IDE" to find the root cause of the problem [ probably me :) ]. But I am at the stage of inception of the python, source code, tools, platform and other things... and it is a slow process. :)

Regards...

PS : For the records, here is the console dump and the python stack trace :

root@ubuntu:~/linaro# ./linaro-image-tools/linaro-android-media-create --mmc /dev/sdb --dev beagle --system /root/linaro/system.tar.bz2 --userdata /root/linaro/userdata.tar.bz2 --boot /root/linaro/boot.tar.bz2
====================================================================
            linaro-android-media-create is EXPERIMENTAL

 The command line parameters as well as the distribution format will
 be changed and we will not keep backward compatibility for the
 current version here.
====================================================================

I see...
Device Mount point Size
/dev/fd0 none 0MB
/dev/sda none 12288MB
/dev/sda1 / 11721MB
/dev/sda2 none 564MB
/dev/sda5 none 564MB
/dev/sdb none 3768MB
/dev/sdb1 none 131MB
/dev/sdb2 none 256MB
/dev/sdb3 none 256MB
/dev/sdb4 none 3124MB
/dev/sdb5 none 511MB
/dev/sdb6 none 2611MB
/dev/sdc none 0MB
/dev/sdd none 0MB
/dev/sde none 0MB
/dev/sr0 none 0MB
Are you 100% sure, on selecting [/dev/sdb] (y/n)? y
Checking that no-one is using this disk right now ...
OK
Warning: bad partition start (earliest 1318913)
partition ends on cylinder 1023, beyond the end of the disk
partition ends on cylinder 1023, beyond the end of the disk
Warning: partition 1 does not end at a cylinder boundary
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Traceback (most recent call last):
  File "./linaro-image-tools/linaro-android-media-create", line 141, in <module>
    args.should_create_partitions, args.should_align_boot_part)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 66, in setup_android_partitions
    get_android_partitions_for_media (media, board_config)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 372, in get_android_partitions_for_media
    media.path, 1 + board_config.mmc_part_offset)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 432, in _get_device_file_for_partition_number
    device_path = _get_udisks_device_path(dev_file)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 447, in _get_udisks_device_path
    return udisks.get_dbus_method('FindDeviceByDeviceFile')(device)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.UDisks.Error.Failed: No such device
root@ubuntu:~/linaro# ./linaro-image-tools/linaro-android-media-create --mmc /dev/sdb --dev beagle --system /root/linaro/system.tar.bz2 --userdata /root/linaro/userdata.tar.bz2 --boot /root/linaro/boot.tar.bz2
====================================================================
            linaro-android-media-create is EXPERIMENTAL

 The command line parameters as well as the distribution format will
 be changed and we will not keep backward compatibility for the
 current version here.
====================================================================

I see...
Device Mount point Size
/dev/fd0 none 0MB
/dev/sda none 12288MB
/dev/sda1 / 11721MB
/dev/sda2 none 564MB
/dev/sda5 none 564MB
/dev/sdb none 3768MB
/dev/sdc none 0MB
/dev/sdd none 0MB
/dev/sde none 0MB
/dev/sr0 none 0MB
Are you 100% sure, on selecting [/dev/sdb] (y/n)? y
Checking that no-one is using this disk right now ...
OK
Warning: bad partition start (earliest 1318913)
partition ends on cylinder 1023, beyond the end of the disk
partition ends on cylinder 1023, beyond the end of the disk
Warning: partition 1 does not end at a cylinder boundary
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Traceback (most recent call last):
  File "./linaro-image-tools/linaro-android-media-create", line 141, in <module>
    args.should_create_partitions, args.should_align_boot_part)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 66, in setup_android_partitions
    get_android_partitions_for_media (media, board_config)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 372, in get_android_partitions_for_media
    media.path, 1 + board_config.mmc_part_offset)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 432, in _get_device_file_for_partition_number
    device_path = _get_udisks_device_path(dev_file)
  File "/root/linaro/linaro-image-tools/linaro_image_tools/media_create/partitions.py", line 447, in _get_udisks_device_path
    return udisks.get_dbus_method('FindDeviceByDeviceFile')(device)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
    **keywords)
  File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 620, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.freedesktop.UDisks.Error.Failed: No such device
root@ubuntu:~/linaro#

Question information

Language:
English Edit question
Status:
Solved
For:
Linaro Image Tools Edit question
Assignee:
No assignee Edit question
Solved by:
Cem Merven
Solved:
Last query:
Last reply:
Revision history for this message
Cem Merven (cemmerven) said :
#1

I've mount mmc card to the host (windows 7) than using it as a "vmware raw disk". Inside a virtual machine (using ubuntu as guest) which it appears as a normal disk (/dev/sdb) than used "android-media-create" successfully.