L27.G.5 OMAP4 GingerBread Release Notes
From OMAPpedia
[edit] Introduction
This software release has been developed and verified in the following software and hardware environment.
Please note Toolchain required is 2010q1-202.
OS Kernel: Linux® 2.6.35
Android: Android Gingerbread 2.3.5
Toolchain: CodeSourcery compiler version Sourcery G++ Lite 2010q1-202 for ARM GNU/Linux
Reference hardware platform: TI OMAP4 4460 ES1.1 EMU Blaze
Build Host OS: Ubuntu
Daily Build Version: Gingerbread_DailyBuild_482
This release will also run on the OMAP 4430 ES2.2 Platform.
[edit] Tools & Dependency packages
Pre-requisite packages for build Android Filesystem (Note this is with reference to Ubuntu 10.04 64-bit). Ubuntu 64-bit is required by Gingerbread.
If you are behind firewall, you will have to set-up firewall using the instructions in [1]
The following commands will install the correct packages to your server:
sudo apt-get install git-core flex bison gperf libesd0-dev zip libwxgtk2.6-dev zlib1g-dev build-essential tofrodos x-dev sudo apt-get install lib32readline5-dev libstdc++6 lib32z1 lib32z1-dev ia32-libs g++-multilib libx11-dev libncurses5-dev
Add the partner repositories and install the JDK:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" sudo apt-get update sudo apt-get install sun-java6-jdk
Install repo tool:
mkdir ~/bin -p sudo apt-get install curl curl http://android.git.kernel.org/repo > ~/bin/repo chmod a+x ~/bin/repo export PATH=~/bin:$PATH
If you do not have sudo rights to your machine, contact your System Administrator for assistance.
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
gnu.tar.bz2]
[edit] Downloading Release Software
Android Filesystem Sources
you can get the Android source for this release by doing:
cdexport YOUR_PATH=`pwd` mkdir -p 27.G.5/mydroid; cd 27.G.5/mydroid export MYDROID=`pwd` repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b 27.x -m RLS27.G.5.Gingerbread.xml --repo-branch=master --repo-url=git://git.omapzoom.org/tools/repo repo sync
Kernel & Driver Sources
To clone kernel source from scratch do:
cd ${YOUR_PATH} mkdir kernel git clone git://git.omapzoom.org/kernel/omap.git kernel/android-2.6.35 cd kernel/android-2.6.35 git checkout 1dfc748746162d9e068338e517517a2aeb2781ae
If you already have kernel source cloned then just update it:
cd $YOUR_PATH/kernel/android-2.6.35 git fetch origin git checkout 1dfc748746162d9e068338e517517a2aeb2781ae
U-Boot Sources
cd ${YOUR_PATH} git clone git://git.omapzoom.org/repo/u-boot.git u-boot cd u-boot git checkout 157fe4353bdfe4f6a583d5a4c4ab2a7525527789
X-loader Sources
cd ${YOUR_PATH} git clone git://git.omapzoom.org/repo/x-loader.git x-loader cd x-loader git checkout 4361857120dc8b3fae5ee9861fe406a9aae67c8b
[edit] Release Content
This release has the below content - Kernel and Drivers tested with OMAP4 4460 ES1.1 EMU Blaze @1.2GHz and with OMAP4430 ES2.2 EMU Blaze platform, and verified with Gingerbread 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 or the SGX hardware Graphics Accelerator libraries and required
binaries
are now included within the mydroid repository at mydroid/device/ti/proprietary-open/graphics/omap4. These libraries and binaries will need to be copied to mydroid/out/target/product/blaze when building for the blaze board. Use the command below:
cp -ax mydroid/device/ti/proprietary-open/graphics/omap4/* mydroid/out/target/product/blaze
[edit] Build Instructions
[edit] Setting up build environment
From your work directory (where your 27.G.5 folder resides):
export YOUR_PATH=`pwd` export PATH=$PATH:/arm-2010q1/bin export MYDROID=${YOUR_PATH}/27.G.5/mydroid mkdir $MYDROID/logs export CROSS_COMPILE=arm-none-linux-gnueabi- export PATH=${YOUR_PATH}/u-boot/tools:${PATH}
[edit] 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
[edit] Building X-LOADER for OMAP4430
cd ${YOUR_PATH}/x-loader make distclean make ARCH=arm omap4430sdp_config make ift 2>&1 |tee $MYDROID/logs/x-loader_make.out ### For fastboot.sh flashing script purpouse rename MLO: #### mv MLO MLO_es2.2_gp
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}/mshield-dk cp -f ${YOUR_PATH}/x-loader/x-load.bin . ./generate_MLO OMAP4430 ES2.x x-load.bin ES2.x parameter changes according the SOM HS vresion you have, if you have ES HS 2.2 then use ES2.2 ### For fastboot.sh flashing script purpose rename MLO: #### mv MLO MLO_es2.2_emu or mv MLO MLO_es2.1_emu
[edit] Building X-LOADER for OMAP4460
cd ${YOUR_PATH}/x-loader make distclean make ARCH=arm omap4460sdp_config make ift 2>&1 |tee $MYDROID/logs/x-loader_make.out ### For fastboot.sh flashing script purpouse rename MLO: #### mv MLO MLO_es1.1_gp
Signing X-LOADER for EMU devices on 4460
The tool for signing x-loader is provided on TI's package. Please contact TI customer representative to get access to this tool.
Note: For this release when signing a ES 1.1 device please use the same command as the ES 1.0 device.
cd ${YOUR_PATH}/mshield-dk cp -f ${YOUR_PATH}/x-loader/x-load.bin . ./generate_MLO OMAP4460 ES1.0 x-load.bin ### For fastboot.sh flashing script purpose rename MLO: #### mv MLO MLO_es1.0_emu or mv MLO MLO_es1.1_emu
[edit] Building Kernel
Note: If you are building for a GP device (4430 or 4460) it is recommended not to build the SMC kernel driver.
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
[edit] Building Kernel modules
cd ${YOUR_PATH}/kernel/android-2.6.35 make ARCH=arm modules 2>&1 |tee $MYDROID/logs/kernel_modules.out
[edit] Building WLAN driver
cd $MYDROID/hardware/ti/wlan/wl1283/platforms/os/linux export KERNEL_DIR=${YOUR_PATH}/kernel/android-2.6.35 make ARCH=arm TNETW=1283
[edit] Building SoftAP/HotSpot driver
cd $MYDROID/hardware/ti/wlan/wl1283_softAP/platforms/os/linux export KERNEL_DIR=${YOUR_PATH}/kernel/android-2.6.35 make ARCH=arm TNETW=1283
[edit] Building Android Filesystem (AFS) with TI Codecs enabled
If you are running Ubuntu 11.10+ you will need to make the following modifications:
In frameworks/base/libs/utils/Android.mk
Change line 60: LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) To: LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
In build/core/combo/HOST_linux-x86.mk
Change line 61: HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
To: HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
On step below use the number of cores you have available; i.e. -j4 or -j12
cd $MYDROID source build/envsetup.sh 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
[edit] Building AFS with Android Codecs
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
[edit] 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 ${YOUR_PATH}/kernel/android-2.6.35/drivers/bluetooth/btwilink.ko $MYDROID/out/target/product/blaze/root cp -Rfp ${YOUR_PATH}/kernel/android-2.6.35/drivers/media/radio/wl128x/fm_v4l2_drv.ko $MYDROID/out/target/product/blaze/root cp -Rfp $MYDROID/hardware/ti/wlan/wl1283/platforms/os/linux/tiwlan_drv.ko $MYDROID/out/target/product/blaze/system/etc/wifi/ cp -Rfp $MYDROID/hardware/ti/wlan/wl1283_softAP/platforms/os/linux/tiap_drv.ko $MYDROID/out/target/product/blaze/system/etc/wifi/softap/ cp -ax $MYDROID/device/ti/proprietary-open/graphics/omap4/* $MYDROID/out/target/product/blaze #(To be run if you haven't build the SGX DDK) cp -Rfp $MYDROID/out/target/product/blaze/root/* . cp -Rfp $MYDROID/out/target/product/blaze/system/ . cp -Rfp $MYDROID/out/target/product/blaze/data/ .
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
It is recommended to remove the "critical" setting when the syslink_daemon for ducati is booting. To do this you will need to edit init.omap4430.rc for
eMMC boot or mmc-init.omap4430.rc for SD boot as indicated:
#Load IVA firmware service baseimage /system/bin/syslink_daemon.out -f /data/base_image_sys_m3.xem3 /data/base_image_app_m3.xem3 critical (Remove this line) user media group media So it will be: #Load IVA firmware service baseimage /system/bin/syslink_daemon.out -f /data/base_image_sys_m3.xem3 /data/base_image_app_m3.xem3 user media group media
[edit] Preparing eMMC images for 4430
cd $YOUR_PATH mkdir omap4_emmc_files cp -f $MYDROID/out/host/linux-x86/bin/fastboot omap4_emmc_files cp -f $MYDROID/out/host/linux-x86/bin/mkbootimg omap4_emmc_files if [ -e ${YOUR_PATH}/27.G.5/u-boot/u-boot.bin ] ; then cp -f ${YOUR_PATH}/27.G.5/u-boot/u-boot.bin omap4_emmc_files cp -f ${YOUR_PATH}/27.G.5/x-loader/MLO_es2.2_gp omap4_emmc_files cp -f ${YOUR_PATH}/27.G.5/kernel/android-2.6.35/arch/arm/boot/zImage omap4_emmc_files else cp -f ${YOUR_PATH}/u-boot/u-boot.bin omap4_emmc_files cp -f ${YOUR_PATH}/x-loader/MLO_es2.2_gp omap4_emmc_files cp -f ${YOUR_PATH}/kernel/android-2.6.35/arch/arm/boot/zImage omap4_emmc_files fi cp -f/MLO_es2.2_emu omap4_emmc_files
[edit] Preparing eMMC images for 4460
cd $YOUR_PATH mkdir omap4_emmc_files cp -f $MYDROID/out/host/linux-x86/bin/fastboot omap4_emmc_files cp -f $MYDROID/out/host/linux-x86/bin/mkbootimg omap4_emmc_files if [ -e ${YOUR_PATH}/27.G.5/u-boot/u-boot.bin ] ; then cp -f ${YOUR_PATH}/27.G.5/u-boot/u-boot.bin omap4_emmc_files cp -f ${YOUR_PATH}/27.G.5/x-loader/MLO_es1.1_gp omap4_emmc_files cp -f ${YOUR_PATH}/27.G.5/kernel/android-2.6.35/arch/arm/boot/zImage omap4_emmc_files else cp -f ${YOUR_PATH}/u-boot/u-boot.bin omap4_emmc_files cp -f ${YOUR_PATH}/x-loader/MLO_es1.1_gp omap4_emmc_files cp -f ${YOUR_PATH}/kernel/android-2.6.35/arch/arm/boot/zImage omap4_emmc_files fi cp -f/MLO_es1.0_emu omap4_emmc_files
Creating img files:
cd ${MYDROID} find out/target/product/blaze -name *.img -exec rm -f {} \; make cp -f ${MYDROID}/out/target/product/blaze/*.img $YOUR_PATH/omap4_emmc_files
This build should not take too much time and will re-generate a new *.img files with the modified init.rc file in it (If you built and installed GFX after
compiling AFS, system.img and data.img will also be updated with the GFX files).
Now from this new directory we will create the eMMC images which will be flashed using fastboot protocol (described later). First create boot.img image
using kernel image we copied previously:
cd $YOUR_PATH/omap4_emmc_files ./mkbootimg --kernel zImage --ramdisk ramdisk.img --base 0x80000000 --cmdline "console=ttyO2,115200n8 rootdelay=2 mem=448M@0x80000000 mem=512M@0xA0000000 init=/init vram=10M omapfb.vram=0:8M androidboot.console=ttyO2" --board omap4 -o boot.img Please note: To edit BootArgs you need to create again boot.img with the desired bootargs in --cmdline <"bootargs">
Now create cache partition:
cd $YOUR_PATH/omap4_emmc_files dd if=/dev/zero of=./cache.img bs=1048510 count=128 mkfs.ext4 -F cache.img -L cache
And finally the environment file with the bootargs and bootcmd information (see bootargs section)
Please see the Note for an update to the bootargs with information on disabling OPP-SB in the bootargs section.
[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 $YOUR_PATH/x-loader/MLO /tmp/mmc1 (if you are using EMU or HS device, plese copy signed MLO instead) $ cp $YOUR_PATH/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/myfs/* /tmp/mmc2 $ chmod -R 777 /tmp/mmc2/* $ umount /tmp/mmc1 $ umount /tmp/mmc2
Booting
SD boot is not offically supported hence SD boot was not validated
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 bootargs and boot as mentioned in the bootarg section.
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 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: [Please note this is an older snapshot (so rev numbers you see might be different as compared to below)]
-- OMAP 4 PPA release 1.0.5 -- Reset reason = 00030181 Texas Instruments X-Loader 1.41 (Feb 25 2011 - 22:30:29) Starting OS Bootloader from EMMC ... U-Boot 1.1.4-gbf5e493e (Feb 25 2011 - 22:30:11) 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 Fastboot entered...
If you had SD card S2 Dip swtich cnfiguration, you can change it now to eMMC conf:
SYS_BOOT configuration to boot from eMMC (S2-[1:3] ON, ON,
ON)
Now connect the Blaze micro USB port to your Linux box and go to where the eMMC files are. Previous partitions created will be deleted and eMMC will be
flashed with new u-boot and MLO.
Make sure the commands are issued as super user. You can use ./fastboot.sh which is located at
$MYDROID/device/ti/blaze/boot.
These steps are for 4430 ES2.2 devices. cd $YOUR_PATH/omap4_emmc_files cp -f $MYDROID/device/ti/blaze/boot/fastboot.sh . sed -i 's/${FASTBOOT-".\/..\/..\/..\/..\/out\/host\/linux-x86\/bin\/fastboot"}/.\/fastboot/g' fastboot.sh sed -i 's/${PRODUCT_OUT-".\/"}/./g' fastboot.sh sed -i 's/.boot\/$MLO/\/$MLO/g' fastboot.sh sed -i 's/.boot\/u-boot.bin/\/u-boot.bin/g' fastboot.sh if you are flashing 4460 ES1.0, depending on your device run the following: sed -i 's/MLO_es2.2_emu/MLO_es1.0_emu/g' fastboot.sh sed -i 's/MLO_es2.2_gp/MLO_es1.0_gp/g' fastboot.sh if you are flashing 4430 ES2.1, before executing the script run sed -i 's/MLO_es2.2_emu/MLO_es2.1_emu/g' fastboot.sh sed -i 's/MLO_es2.2_gp/MLO_es2.1_gp/g' fastboot.sh ./fastboot.sh --emu for gp run: ./fastboot.sh --gp
For your information the script does the following:
cd $YOUR_PATH/omap4_emmc_files ./fastboot flash xloader ./MLO ./fastboot flash bootloader ./u-boot.bin ./fastboot reboot-bootloader sleep 5 ./fastboot oem format ./fastboot flash boot ./boot.img ./fastboot flash system ./system.img ./fastboot flash userdata ./userdata.img ./fastboot flash cache ./cache.img
Booting
Power your board up and in your terminal window you should be able to see the auto-boot process start in 3 seconds:
-- OMAP 4 PPA release 1.0.0 -- Reset reason = 00030181 Texas Instruments X-Loader 1.41 (Feb 25 2011 - 22:30:29) Starting OS Bootloader from EMMC ... U-Boot 1.1.4-gbf5e493e (Feb 25 2011 - 22:30:11) Load address: 0x80e80000 DRAM: 1024 MB Flash: 0 kB In: serial Out: serial Err: serial Net: KS8851SNL Hit any key to stop autoboot: 5
[edit] New Fastboot Script Available
There is a new fastboot script that could be used in place of the current script.
The new script will detect the type of device you have on your board.
Location of the new script that you could copy over the same location as given above:
mydroid\device\ti\support-tools\boot\omap4\fastboot.sh
This script requires a change in the MLO naming convention given in the steps above when using the older fastboot script
Here is the format that would be used for the MLO name below:
${product}_${cputype}_${cpurev}_MLO example: Blaze_EMU_ES2.2_MLO
Running the script would be similar to the old script only you would only need to run ./fastboot.sh gingerbread
[edit] Bootargs
L27.G.5 SD card booting is not offically supported, init.rc and init.omap4430.rc need to be modified as follows:
NOTE: It is mandatory to use the bootarg listed below to disable OPP-SB if the final product is targeting 4460-1.2GHz or 4430-1GHz. Otherwise OPP-SB will be automatically enable if the silicon is detected to support it. The added item: opp_sb_off is added. Note: It is possible that silicons supporting OPP-SB (4460-1.5GHz, or 4430-1.2GHz) are delivered in place of non spin-binned silicons (4460-1.2GHz or
4430-1GHz).
init.rc
on post-fs
# once everything is setup, no need to modify / mount rootfs rootfs / rw remount
init.omap4430.rc
on fs
#mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/system /system wait ro #mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/userdata /data wait noatime nosuid nodev #mount ext4 /dev/block/platform/mmci-omap-hs.1/by-name/cache /cache wait noatime nosuid nodev
Example of SD card bootargs similar to the eMMC bootargs given in the BoardConfig.mk file.
setenv bootargs androidboot.console=ttyO2 console=ttyO2,115200n8 mem=448M@0x80000000 mem=512M@0xA0000000 root=/dev/mmcblk1p2 rw rootdelay=2 init=/init vram="10M" omapfb.vram="0:8M" setenv bootcmd 'mmcinit 0; fatload mmc 0 0x80000000 uImage;bootm 80000000' saveenv run bootcmd
Example of bootargs using "opp_sb_off"
setenv bootargs androidboot.console=ttyO2 console=ttyO2,115200n8 mem=448M@0x80000000 mem=512M@0xA0000000 root=/dev/mmcblk1p2 rw rootdelay=2 init=/init vram="10M" omapfb.vram="0:8M" opp_sb_off
"The env.txt and sd_card_env.txt files is no longer used to set the bootargs."
eMMC bootargs
The reference eMMC bootargs are present in
device/ti/blaze/BoardConfig.mk
120449834b6be9914642] file, in BOARD_KERNEL_CMDLINE variable.
Right after this your Blaze should start booting kernel image and loading the Android filesystem both from Blaze eMMC
In order to issue commands, it is necessary to type “su -“ on the console.
[edit] Resources
[edit] WLAN Calibration
For optimal Wi-Fi performance calibration of Wi-Fi hardware is mandatory, follow the procedure from WLAN_Calibration
[edit] WLAN Firmware files
The Wi-Fi and softAP/HotSpot firmware files go to following locations on file system
Wi-Fi Firmware (firmware.bin) --> /system/etc/wifi/firmware.bin
SoftAP/HotSpot Firmware (firmware_ap.bin) --> /system/etc/wifi/softap/firmware_ap.bin