Login

Running the Android OS on the mini2440

Shannon's experience running and using the Android OS on the FriendlyArm mini2440

  • Welcome
  • OS Install
  • Android Tips
 

Step by Step - Booting and running the Android OS from the SD card

Downloads

Archive android-install-kit-mini2440.tar.gz 39.41MB

Note the md5 checksum for the archive should be:  a742e3e60b27925efb98ae4c01a3fe73

Additional note, please do not use the comments at the bottom of the page as a support forum.  You will receive much better support by joining this group:  http://groups.google.com/group/mini2440?lnk=srg

Overview

The goal is to install the Android OS (version 1.5) on the mini2440 so that it boots and runs off of a SD card. 

In this configuration the NAND flash is only used to start the boot loader, u-boot.  The SD card contains the kernel and the root file system.  The primary advantage of this configuration is that it avoids unnecessary writes to the NAND flash, which in my experience leads to file-system corruption.  A secondary benefit is that the SD card can be mounted on a PC and changes can be easily made to the system.

All of the files needed are included in the tarball which is available at the top of the page.

Credit

Everything on this site has been compiled from online resources.  My contribution is to bring them together in a cohesive fashion.   I wil begin the process of working backward and identifying the origional sources soon.  Most of the difficult work has been performed by others, and they diserve the lion's share of the credit.

Feedback

Please leave feedback if you use these instructions.  I would love to have a rough idea of how many people succeeded or failed because of these instructions.

Assumptions

You are assumed to have a moderate degree of Linux skill, and comfort at the command line.  You should understand how to mount, unmount and prepare filesystems on a removeable SD card.  You should also have a SD card reader on your linux machine. 

We assume you have formatted the SD card with three partitions, the 2nd partition has an ext2 file system containing the uImage file, the 3rd partition has a ext3 file system containing the contents of the file system.  The first partition contains swap space.  You are assumed to be running Linux and have minicom installed.  You have minicom configured to communicate to the mini2440 at 155200 baud.  

It is also assumed that your mini2440 has a 128M flash.  As the included boot-loaders are specific to this memory size.  Otherwise you should substitute the provided u-boot boot loader with a suitable one compiled for your memory configuration.

Finally you should have 30 - 60 minutes of time available to complete the install.

TODO: provide instructions for SD card prep. 

Starting

With the power off, insert the SD card into the mini2440.  It must be formatted and contain the root filesystem  and kernel.

Boot using supervivi off of the NOR flash (switch toward near edge). 

Connect the USB transfer cable between the unix machine and the mini2440.

You will need to have two terminals open. On the first terminal you will have started minicom and are communicating with the mini2440. 

The second terminal should contain a unix shell.  Create a directory to contain the contents of the tarball ( android-install-kit-mini2440.tar.gz).  Change to that directory and extract the contents.  This terminal will be used to initiate USB transfers of files to supervivi.

At the supervivi menu, press "q" to drop into the shell.

Load u-boot into ram

Supervivi> load ram  0x31000000 0x0003b29c u 

On the 2nd terminal, run

# ./s3c2410_boot_usb u-boot-128MB.bin  

On the first terminal verify that the file transfered.  (You will see an error on the 2nd terminal, ignore it).

execute u-boot

Supervivi> go 0x31000000 

You should be rewarded with the u-boot prompt

 MINI2440 # 

Prep the NAND

 MINI2440 # nand info
 MINI2440 # nand bad
 MINI2440 # nand scrub 
 MINI2240 # nand createbbt
 MINI2440 # mtdparts
 MINI2440 # set ethaddr 08:00:2f:00:00:06
 MINI2440 # dynenv set 40000
 MINI2440 # saveenv

There are two options, A and B, only perform one of them!

Why two methods?  U-boot is already loaded in memory, we can write the memory to the NAND and be finished (Option A).  However, uboot has a seldom documented ability to receive files using ymodem.  This option does not require a USB data transfer cable.  I include Ymodem transfer instructions to highlight this capability of u-boot.

Use Option A if you are in a hurry or are happy with the USB transfer method.  Use Option B if you would like to learn to use Ymodem to transfer files to uboot using the serial port.

Option A, write the copy of u-boot in RAM onto the NAND

 nand write.e 31000000 0  0x0003b29c

End of Option A

Option B, reload u-boot into ram using YMODEM and minicom.

Read ahead and be prepared to act quickly (old-school ymodem upload).

 MINI2440 # loady 0x32000000 

 Press [CTL]+[a] then [s]

An ASCII pop-up should appear, choose ymodem

And ASCII file browser should appear, choose the file using the space key (u-boot-128MEG.bin) then press enter.

You should see the file upload progress screen, with luck your transfer will complete.

 Write the file to the NAND

nand write.e 32000000 0  0x0003b29c

End of Option B

 Power the board off

Move the NAND/NOR switch away from the near edge

Power the board on

You should see the u-boot menu

Set the environment to boot off of SD

MINI2440 # setenv bootargs console=ttySAC0,115200 root=/dev/mmcblk0p3 rootfstype=ext3 mini2440=1tb rootdelay=3 init=/linuxrc
MINI2440 # setenv bootcmd mmcinit \; ext2load mmc 0:2 0x31000000 uImage \; bootm 0x31000000
MINI2440 # saveenv

Reboot

Success! ?

You should be rewarded with the Android OS. 

There is only one issue that I am aware of, one of the Android services (settings) will issue several errors when the machine boots.  This does not occure when the same filesystem is loaded directly on NAND flash.  So I suspect it is caused by the SD device not being available for media (since we booted off of it).  If anyone solves this, please let me know and I will incorporate the changes into the install kit.

Once you get this far you will want to change your network settings, language preferences and remove the sdcard entry in mountd.  This is covered in more detail here: http://mini2440.spaceopera.org/site/developmentenviroment/configuration/ 


 

Last modified: Nov 19, 2011

 

Navigation

  • Welcome
  • OS Install
    • Getting started with the Linux tools
    • Background - The Bootloader
    • Bad Blocks
    • Step by Step - Booting and running the Android OS from the SD card
    • Configuration
    • Future plans
 
 
 

© Shannon Haworth · Design by Luka Cvrk · MeshCMS integrated by Rostislav Palivoda