L27.INC1.5.1 Froyo ES2 Release Notes
From OMAPpedia
Contents |
[edit] Introduction
This software release has been developed and verified in the following software and hardware environment.
OS Kernel: Linux® 2.6.32
Android: Froyo public project
Toolchain: CodeSourcery compiler version 2009q1.
Reference hardware platform: TI OMAP4 ES2 EMU Blaze
Build Host OS: Ubuntu
[edit] Tools & Dependency packages
Pre-requisite packages for build Android Filesystem
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”
Tool Chain for building Kernel and Drivers
The Kernel and Driver sources are built using CodeSourcery ARM Compiler version 2009q1 - 203 version. This tool chain can be obtained from [http://www.codesourcery.com/sgpp/lite/arm/portal/release858 Select IA32 GNU/Linux TAR one (1a6e88782f08b09a0e6cef545a1712ec)
[edit] 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.5.1_Froyo_RC0 $ export MANIFEST=`pwd` $ cd$ export YOUR_PATH=`pwd` $ mkdir -p 27.5/mydroid; cd 27.5/mydroid $ export MYDROID=`pwd` $ repo init –u $MANIFEST $ repo sync
Kernel & Driver Sources
$ cd$ export YOUR_PATH=`pwd` $ cd $YOUR_PATH; mkdir kernel $ git clone git://git.omapzoom.org/kernel/omap.git kernel/android-2.6.32 $ cd kernel/android-2.6.32 $ git checkout c992da641423f If you already have kernel source cloned then just update it : $ cd $YOUR_PATH/kernel/android-2.6.32 $ git fetch origin $ git checkout c992da641423f
[edit] Release Content
This release is an engineering release of L27.5 with the below content - Kernel and Drivers ported to OMAP4 ES2 EMU Blaze platform and verified with Froyo UI The release has also been verified with OMAP4 SGX hardware Graphics Accelerator libraries Please contact TI customer representative to access hardware accelerated Graphics sources
[edit] Build Instructions
From your work directory (where your 27.5 folder resides):
Setting up build environment
export YOUR_PATH=`pwd` export PATH=$PATH:/arm-2009q1/bin export MYDROID=27.5/mydroid mkdir $MYDROID/logs export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun export CROSS_COMPILE=arm-none-linux-gnueabi- export PATH=${MYDROID}/bootable/bootloader/u-boot/tools:${PATH}
Building U-BOOT
cd $MYDROID/bootable/bootloader/u-boot make distclean make ARCH=arm omap4430sdp_config make export PATH=$PATH:$MYDROID/bootable/bootloader/u-boot/tools
Building X-LOADER
cd $MYDROID/bootable/bootloader/x-loader make distclean make ARCH=arm omap4430sdp_config make ift
Building X-LOADER for 600MHz parts
cd $MYDROID/bootable/bootloader/x-loader make distclean make ARCH=arm omap4430sdp_MPU_600MHz_config make ift
Signing X-LOADER for EMU devices The tool for signing x-loader is provided on TI's package
cd $YOUR_PATH/27.5/mshield-dk cp -f $MYDROID/bootable/bootloader/x-loader/x-load.bin . ./generate_MLO x-load.bin
Building Kernel
cd $YOUR_PATH/kernel/android-2.6.32 make ARCH=arm distclean make ARCH=arm android_4430_defconfig make ARCH=arm uImage
Building Kernel modules
cd $YOUR_PATH/kernel/android-2.6.32 make ARCH=arm modules
Building AFS
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 -j4
Building with Android Codecs
Edit: “vendor/ti/blaze/BoardConfig.mk”: Uncomment “USE_CAMERA_STUB := true” Comment “BOARD_USES_TI_CAMERA_HAL := true” Comment "HARDWARE_OMX := true” This release is not yet verified with Android codecs. Camera based applications need TI properitary drivers. Please contact TI customer representative to get access to propreitary sources
Please follow the below instructions to modify the file system to make it work.
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.32/drivers/misc/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
edit build.prop file as below echo “ro.sf.lcd_density=240” >> system/build.prop
[edit] 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):(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):
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//tmp/mmc1 $ mount /dev/ /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.32/arch/arm/boot/uImage /tmp/mmc1 $ cp -Rfp $YOUR_PATH/27.5/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/mmcblk0p2 rw rootdelay=2 mem=463M init=/init 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
[edit] Booting Kernel and Android File System from eMMC
Formatting eMMC
If your are going to use of eMMC for the first time, you need to create the appropriate partitions and then create a filesystem (format) for each one. For this you need to boot an Android filesystem entirely from SD card as described earlier. Once your Android filesystem is up and running, your need to enable eMMC as a device for USB mass storage: $ echo /dev/block/mmcblk1 >/sys/devices/platform/musb_hdrc/gadget/lun0/file Now connect the Blaze micro USB connector to your Linux box and from your PC terminal type: $ sudo fdisk -l And a list of available devides should appear. You should see eMMC as an un-mounted raw device of 32 GB: (device name may vary on other linux-boxes) Disk /dev/sdg: 32.0 GB, 32015122432 bytes 255 heads, 63 sectors/track, 3892 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Note: the eMMC device data (head, cylinders and sectors) presented here may vary on other Blaze boards Now create two partitions exactly the same way as for SD card: $ sudo fdisk /dev/sdg (assuming you are formatting Blaze eMMC for the first time): Command (m for help): d Command (m for help): x Expert command (m for help): h Number of heads (1-256, default 30): 255 Expert command (m for help): s Number of sectors (1-63, default 29): 63 Warning: setting sector offset for DOS compatiblity Expert command (m for help): c Number of cylinders (1-1048576, default 2286): 3891 Configure eMMC partitions: Expert command (m for help): r Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-123, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-123, default 123): +1024M NOTE: This is the vFAT size, in this case the vFAT size would be 1GB you can change this, in this partition the boot files and media content must be placed. Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (10-123, default 10): Using default value 10 Last cylinder or +size or +sizeM or +sizeK (10-123, default 123): Using default value 123 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)) * You have to format 1st partitions with vfat32 filesystem. Command (m for help): a Create partition table: Command (m for help): w 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. Formatting partitions: $ sudo mkfs.vfat -F 32 -n boot /dev/sdg1 $ sudo mkfs.ext3 -L rootfs /dev/sdg2
Copying Binaries onto eMMC
Now type the following to mount your eMMC partitions on your Linux box (logged as root@ubuntu-box): $ mkdir /tmp/mmc1 $ mkdir /tmp/mmc2 $ mount /dev//tmp/mmc1 $ mount /dev/ /tmp/mmc2 Load the appropriate software to the SD Card (logged as root@ubuntu-box): $ cp $YOUR_PATH/kernel/android-2.6.32/arch/arm/boot/uImage /tmp/mmc1 $ cp -Rfp $YOUR_PATH/27.5/myfs/* /tmp/mmc2 $ chmod –R 777 /tmp/mmc2/* $ umount /tmp/mmc1 $ umount /tmp/mmc2
Booting
Insert your SD card (with u-boot and signed x-loader 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 mem=463M root=/dev/mmcblk1p2 rw rootdelay=2 init=/init 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 * bootable sdcard is required to get OMAP prompt, it can be changed or removed once the kernel is loaded
[edit] Bootargs
L27.5 Bootargs for SD card boot
setenv bootargs console=ttyO2,115200n8 root=/dev/mmcblk0p2 rw rootdelay=2 mem 463M init=/init omapfb.vram="0:4M" setenv bootcmd 'mmcinit 0; fatload mmc 0 0x80000000 uImage; bootm 0x80000000' boot
Saving Bootargs for eMMC boot
$setenv bootargs 'console=ttyO2,115200n8 mem=463M root=/dev/mmcblk1p2 rw rootdelay=2 init=/init 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