L27.INC1.7.2 OMAP4 Froyo ES2 Release Notes

From OMAPpedia

Revision as of 19:11, 26 October 2010 by Lgonzalez (Talk | contribs)
Jump to: navigation, search

Contents

Introduction

This software release has been developed and verified in the following software and hardware environment.

Please note Toolchain is upgraded since L27.7.0 release

OS Kernel: Linux® 2.6.35
Android: Froyo public project
Toolchain: CodeSourcery compiler version Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux
Reference hardware platform: TI OMAP4 ES2.1 EMU Blaze
Build Host OS: Ubuntu

Tools & Dependency packages

Pre-requisite packages for build Android Filesystem (Note this is with reference to uBuntu 8.04)

The following commands will install the correct packages to your server:
$ sudo apt-get install git-core flex bison gperf libesd0-dev libwxgtk2.6-dev zlib1g-dev build-essential libstdc++5 tofrodos
$ sudo apt-get install x-dev
$ sudo apt-get install libx11-dev
$ sudo apt-get install libncurses5-dev
$ sudo apt-get install sun-java5-jdk
If you do not have sudo rights to your machine, contact your System Administrator for assistance.
Google has issued that “sun-java6-jdk” has become unsupported: “because of incompatibilities with @Override”
To uninstall “sun-java6-jdk” please type:
$ sudo apt-get remove sun-java6-jdk
“Intrepid (8.10) users may need a newer version of libreadline:
$ sudo apt-get install lib32readline5-dev”

For higher versions of U-buntu please refer to 
http://omappedia.org/wiki/Android:_Configuring_the_Host_PC#Additional_packages_required_for_building

Tool Chain for building Kernel and Drivers

The Kernel and Driver sources are built using Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux
version.

This tool chain can be obtained from [http://www.codesourcery.com/sgpp/lite/arm/portal/package6488/public/arm-none-linux-gnueabi/arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2]

Downloading Release Software

Android Filesystem Sources

you can get the Android source for this release by doing:

	$ git clone git://git.omapzoom.org/platform/omapmanifest.git
	$ cd omapmanifest
	$ git reset --hard RLS27.7.1_Froyo
	$ export MANIFEST=`pwd`
	$ cd <your work directory>
	$ export YOUR_PATH=`pwd`
	$ mkdir -p 27.7.1/mydroid; cd 27.7.1/mydroid
	$ export MYDROID=`pwd`
	$ repo init –u $MANIFEST
	$ repo sync


Kernel & Driver Sources

To clone kernel source from scratch do:

	$ cd <your work directory>; export YOUR_PATH=`pwd`
	$ mkdir kernel
	$ git clone git://git.omapzoom.org/kernel/omap.git kernel/android-2.6.35
	$ cd kernel/android-2.6.35
	$ git checkout 04452742cb6edc5ae60162b2f0eb4d5711355319

If you already have kernel source cloned then just update it:

	$ cd $YOUR_PATH/kernel/android-2.6.35
	$ git fetch origin
	$ git checkout 04452742cb6edc5ae60162b2f0eb4d5711355319

U-Boot Sources

        $ cd <your work directory>; export YOUR_PATH=`pwd`
	$ git clone git://git.omapzoom.org/repo/u-boot.git u-boot
	$ cd u-boot
	$ git checkout 0e685295040b140a8b90d1b299e635a4eb1d5684


X-loader Sources

        $ cd <your work directory>; export YOUR_PATH=`pwd`
	$ git clone git://git.omapzoom.org/repo/x-loader.git x-loader
	$ cd x-loader
	$ git checkout 8876b8613d21df15e1dd17d933f8bd708dee6aba

Release Content

This release has the below content
- Kernel and Drivers tested with OMAP4 ES2 EMU Blaze platform and verified with Froyo UI
- A9 source code for accelerating Video

The release has been verified with OMAP4 SGX hardware Graphics Accelerator libraries and accelerated Video codecs
Please contact TI customer representative to gain access TI proprietary packages

Note: Bootargs have changed from L27.7.0 release. Please refer bootargs section for the details

Build Instructions

Setting up build environment

From your work directory (where your 27.7.1 folder resides):

export YOUR_PATH=`pwd`
export PATH=$PATH:<toolchain_parent_dir>/arm-2010q1/bin
export MYDROID=${YOUR_PATH}/27.7.1/mydroid
mkdir $MYDROID/logs
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
export CROSS_COMPILE=arm-none-linux-gnueabi-
export PATH=${YOUR_PATH}/u-boot/tools:${PATH}

Building U-BOOT

cd $YOUR_PATH/u-boot
make distclean
make ARCH=arm omap4430sdp_config
make 2>&1 |tee $MYDROID/logs/u-boot_make.out

Building X-LOADER

cd $YOUR_PATH/x-loader
make distclean	
make ARCH=arm omap4430sdp_config
make ift 2>&1 |tee $MYDROID/logs/x-loader_make.out

For previous board revisions with OMAP4 ES1 600MHz, the configuration should be changed as described below:

cd $YOUR_PATH/x-loader
make distclean	
make ARCH=arm omap4430sdp_MPU_600MHz_config
make ift 2>&1 |tee $MYDROID/logs/x-loader_make.out

Signing X-LOADER for EMU devices

The tool for signing x-loader is provided on TI's package. Please contact TI customer representative to get access to this tool.

cd $YOUR_PATH/27.7.1/mshield-dk
cp -f $YOUR_PATH/x-loader/x-load.bin .
./generate_MLO x-load.bin

Building Kernel

To create kernel uImage you need to add "mkimage" directory path to your "PATH" environment variable:

cd $YOUR_PATH/kernel/android-2.6.35
make ARCH=arm distclean
make ARCH=arm android_4430_defconfig
make ARCH=arm uImage 2>&1 |tee $MYDROID/logs/kernel_make.out

Building Kernel modules

cd $YOUR_PATH/kernel/android-2.6.35
make ARCH=arm modules 2>&1 |tee $MYDROID/logs/kernel_modules.out

Building WLAN driver

export HOST_PLATFORM=sdc4430
export KERNEL_DIR=$YOUR_PATH/kernel/android-2.6.35
cd $MYDROID/hardware/ti/wlan/wl1283/platforms/os/linux
make ARCH=arm

Building Android Filesystem (AFS) with TI Codecs enabled

on step below use the number of cores you have available; i.e. -j4 or -j12:

cd $MYDROID
cp -Rfp device/ti/blaze/buildspec.mk.default buildspec.mk
make clean (required for rebuild only)
make -j4 2>&1 |tee $MYDROID/logs/android_make.out

Building AFS with Android Codecs

Edit “device/ti/blaze/BoardConfig.mk” and:

sed -i "s/.*USE_CAMERA_STUB.*/USE_CAMERA_STUB := true/g" $MYDROID/device/ti/blaze/BoardConfig.mk
sed -i 's/BOARD_USES_TI_CAMERA_HAL := true/#BOARD_USES_TI_CAMERA_HAL := true/g' $MYDROID/device/ti/blaze/BoardConfig.mk
sed -i 's/HARDWARE_OMX := true/#HARDWARE_OMX := true/g' $MYDROID/device/ti/blaze/BoardConfig.mk

This release was not verified with Android codecs. Camera based applications need TI proprietary drivers. Please contact TI customer representative to get access to proprietary sources

Preparing Android binaries

The following binaries are required by the Blaze® board. This step will prepare a directory, called myfs, containing all necessary Android files that you must include within your SD card.

cd $YOUR_PATH
mkdir myfs
cd myfs
cp -Rfp $YOUR_PATH/kernel/android-2.6.35/drivers/staging/ti-st/*.ko $MYDROID/out/target/product/blaze/root
cp -Rfp $MYDROID/out/target/product/blaze/root/* .
cp -Rfp $MYDROID/out/target/product/blaze/system/ .
cp -Rfp $MYDROID/out/target/product/blaze/data/ .
cp -Rfp $MYDROID/device/ti/blaze/init.omap4sdp.rc init.rc

Changing default display resolution on Android

Default LCD density is now set to 240 (was 160 previously by default). If you want to come back to the previous setting to make Android UI look smaller (smaller icons, etc...), comment the following line in system/build.prop

#ro.sf.lcd_density=240

Booting Kernel and Android File System from SD card

Formatting SD Card

You will need to format your SD for the Linux file system. Connect your SD memory card reader with memory card inserted to a USB port on your Linux Ubuntu PC. You must login as Super User.

$ su
$ fdisk -l

Match the device to the size of your memory card. Look for the /dev/*** device which matches the memory card in the card reader. Use the matching device’s letter prefix in the next command. For example if the device for memory card reader card example was: /dev/sdb1, then use only /dev/sdb in the fdisk command.

Take note of the size in bytes of your SD Card. You will need this to calculate the number of cylinders in a future step.

$ fdisk /dev/sdb  (replace sdb with the letter prefix for your device)

(Delete all partitions on the card if they exist)
Command (m for help): d
Partition number (1-4): 1
Command (m for help): d
Selected partition 2

Command (m for help): x

(Change the number of heads, sectors and cylinders on the device)
Expert command (m for help): h
Number of heads (1-256, default 255): 255
Expert command (m for help): s
Number of sectors (1-63, default 63): 63
Expert command (m for help): c
Number of cylinders (1-1048576, default 248): <You must calculate the number of cylinders for your SD card.  To do this, use the following formula:  

new_cylinders = (Size in bytes from your fdisk –l command)/8225280
Drop any fractional values and enter the whole number in this command.
Use this number all the steps that refer to the number of cylinders>

(Now return to the main menu)
Expert command (m for help): r

(Create the first partition)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-248, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-248, default 248): +64M

If you plan to use this SD card partition for storing media your can use +1024M assuming a 2+ GB SD card.

(Create the second partition)
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (10-248, default 10): 10
Last cylinder or +size or +sizeM or +sizeK (124-248, default 248): <use the cylinder value you calculated earlier>  

(Change the first partition to at FAT32 partition)
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

(Toggle the bootable flag for partition 1)
Command (m for help): a
Partition number (1-4): 1

(Print the partition table to confirm your settings)
Command (m for help): p

(Sample Output – your output may differ depending on your SD card’s size and brand)
Disk /dev/sdb: 2041 MB, 2041577472 bytes
255 heads, 63 sectors/track, 248 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1         9        72261     c  W95 FAT32 (LBA)
/dev/sdb2              10       248     1919767+    83  Linux

(Write your changes to the SD Card)	
Command (m for help): w

(You will see the following output)
The partition table has been altered!

Calling ioctl() to re-read partition table.


WARNING: If you have created or modified any DOS 6.x partitions, please see the fdisk manual page for additional information.
Syncing disks.

Format your partitions typing the following commands (logged as root@ubuntu-box):
$ mkfs.vfat -F 32 -n boot /dev/<your device’s first partition’s name – see the print output from the previous step> 
$ mkfs.ext3 -L android_fs /dev/<your device’s second partition’s name – see the print output from the previous step> 

There is a shell script that all calculations above automatically; to get it do:
$ wget http://cgit.openembedded.org/cgit.cgi/openembedded/plain/contrib/angstrom/omap3-mkcard.sh

Add execution permission:
$ chmod +x omap3-mkcard.sh

And you are ready to use it by just typing:
$sudo ./omap3-mkcard.sh <your_device (e.g. /dev/sdb)>

Copying Binaries onto SD Card

Now type the following to mount your SD Card on your Linux box (logged as root@ubuntu-box):

$ mkdir /tmp/mmc1
$ mkdir /tmp/mmc2
$ mount /dev/<your device’s first partition’s name> /tmp/mmc1
$ mount /dev/<your device’s second partition’s name> /tmp/mmc2

Load the appropriate software to the SD Card (logged as root@ubuntu-box):

$ cp $MYDROID/bootable/bootloader/x-loader/MLO /tmp/mmc1
$ cp $MYDROID/bootable/bootloader/u-boot/u-boot.bin /tmp/mmc1
$ cp $YOUR_PATH/kernel/android-2.6.35/arch/arm/boot/uImage /tmp/mmc1
$ cp -Rfp $YOUR_PATH/27.7.1/myfs/* /tmp/mmc2
$ chmod –R 777 /tmp/mmc2/*
$ umount /tmp/mmc1
$ umount /tmp/mmc2

Booting

Insert your SD card (with u-boot, x-loader and uImage loaded in FAT partition and ) into Blaze SD/MMC card slot, then plug the Blaze mini USB port to your PC and open a serial terminal (baudrate:115200, no parity, 8 bits). Power your board up and in your terminal window you should be able to see the ‘New’ u-boot prompt:

“OMAP44XX SDP #”

In your serial terminal define the following:

setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk1p2 rw rootdelay=2 mem=463M init=/init vram="10M" omapfb.vram="0:4M"' 

now type this:

mmcinit 0; fatload mmc 0 0x80000000 uImage; bootm 0x80000000

Right after this your Blaze should start booting using the kernel image and loading the Android filesystem from your SD

Booting Kernel and Android File System from eMMC

Formatting eMMC

Starting on L27.7.2 release onwards the eMMC partition table changed and the flashing procedure now uses fastboot protocol. Please read carefully the following instructions

If your are going to use eMMC for the first time, you need to create the appropriate partition table and create a filesystem (format) for each partition. For this you need to load u-boot from your SD card; for this you need to change your SYS_BOOT configuration (S2-[1:3] OFF, ON, OFF). Use the u-boot.bin and the x-loader you built for this release; copy them to your "boot" partition of your SD card, turn your Blaze on and press any key on your serial terminal to stop the auto-boot process.

Now type from you serial terminal (on the u-boot prompt) 'fastboot' and board should be waiting for any fastboot command. You should see something like this:

---- OMAP 4 PPA tactical release 0.8.1 ----                                                                          
                                                                                                                     

Texas Instruments X-Loader 1.41 (Oct 20 2010 - 12:03:47)
Starting OS Bootloader from MMC/SD1 ...


U-Boot 1.1.4-g0e685295-dirty (Oct 14 2010 - 17:09:14)

Load address: 0x80e80000
DRAM:  1024 MB
Flash:  0 kB
In:    serial
Out:   serial
Err:   serial
Net:   KS8851SNL
Hit any key to stop autoboot:  0 
OMAP44XX SDP # fastboot
Disconnect USB cable to finish fastboot..

Now connect the Blaze micro USB port to your Linux box and go to where the eMMC files are. The first fastboot command will create the partition table on eMMC and the others will flash the files onto the corresponding eMMC partition:

$ cd <emmc_files_dir>
$ ./fastboot flash mbr mbr.bin
$ ./fastboot flash xloader ./MLO
$ ./fastboot flash bootloader ./u-boot.bin
$ ./fastboot flash environment ./env.txt
$ ./fastboot flash kernel ./uMulti-2
$ ./fastboot flash system ./system.img
$ ./fastboot flash userdata ./data.img
$ ./fastboot flash cache ./cache.img

Once the partition table is created you no longer need to flash mbr anymore; only when partition table changes is when we would need to flash mbr again but don't expect changes in the partition table so soon. You can now switch to boot from eMMC.

Booting

Insert your SD card into Blaze SD/MMC card slot (now only required to store MM files), then plug the Blaze mini USB port to your PC and open a serial terminal (baudrate:115200, no parity, 8 bits). Disconnect the micro USB cable if connected to Blaze, change your SYS_BOOT configuration to boot from eMMC (S2-[1:3] ON, ON, ON) and power your board up and in your terminal window you should be able to see the auto-boot process start in 5 seconds:

---- OMAP 4 PPA tactical release 0.8.1 ----


Texas Instruments X-Loader 1.41 (Oct 20 2010 - 12:03:47)
Starting OS Bootloader from EMMC ...


U-Boot 1.1.4-g8024422c-dirty (Oct 20 2010 - 12:03:36)

Load address: 0x80e80000
DRAM:  1024 MB
Flash:  0 kB
In:    serial
Out:   serial
Err:   serial
Net:   KS8851SNL
Hit any key to stop autoboot:  5

If you want to verify that your bootargs and bootcmd were flashed correctly as described in env.txt file, then press any key to stop the auto-boot process and type 'print':

OMAP44XX SDP # print
bootdelay=5
bootargs=console=ttyO2,115200n8 mem=458M@0x80000000 mem=512M@0xA0000000 rootdelay=2 mem=463M init=/init vram="10M" omapfb.vram="0:4M"
bootcmd=mmcinit 1;mmc 1 read 0x1000 0x81000000 0x500000;bootm 81000000
loadaddr=81000000
stdin=serial
stdout=serial
stderr=serial
ethact=KS8851SNL

Environment size: 223/131068 bytes

To continue booting just type 'boot' and the boot process will start.

Bootargs

Note: Bootargs have changed for this release. For SD boot now root value is /dev/mmcblk1p2 and eMMC boot is /dev/mmcblk0p2.
Note that additional parameter vram="10M" should be used in the bootargs

L27.7.1 Bootargs for SD card boot

setenv bootargs 'console=ttyO2,115200n8 root=/dev/mmcblk1p2 rw rootdelay=2 mem=463M init=/init vram="10M" omapfb.vram="0:4M"'
setenv bootcmd 'mmcinit 0;fatload mmc 0 0x80000000 uImage; bootm 0x80000000'
saveenv
boot

Saving Bootargs for eMMC boot


$setenv bootargs 'console=ttyO2,115200n8 mem=463M root=/dev/mmcblk0p2 rw rootdelay=2 init=/init vram="10M" omapfb.vram="0:4M"'
$setenv bootcmd 'mmcinit 1;fatload mmc 1 0x80000000 uImage;bootm 80000000'
$saveenv
$boot

Right after this your Blaze should start booting kernel image and loading the Android filesystem both from Blaze eMMC

Note - bootable sdcard is required to get OMAP prompt, it can be changed or removed once the kernel is loaded

Resources

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox