[[bc10/Software]]

COLOR(red){Currently Work in Progress}~

- Contents
#contents

* Overview: android-2.2_r1.1 for bc10 [#s9f7cc12]
>
This section discusses how to build userland of android-2.2_r1.1. android-2.2_r1.1 is based upon the Android Open Source~
Project (AOSP). AOSP is modified for the hardware of bc10, and android-2.2_r1.1 is created. The directions of how to create~
the userlnd are: 1) building the development environment for android-2.2_r1.1, 2) obtaining the source code, 3) running the~
modification script for bc10, and 4) installing SGX SDK. SGX SDK improves rendering 2D/3D graphics and encoding/decoding~
video.~

>
COLOR(red){This is still working in progress for some devices, and the contents of this page may change without advanced notice}~

* Development Environment [#sec9a45b]
>
-  OS: Ubuntu 10.04 (32 bit version)
- JAVA: Java 1.5x
- Android: android-2.2_r1.1

** Install packages [#t3d2e940]
>
Obtain the required packages from the repository of Ubuntu, and install the packages
 $ sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev \
   libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev uboot-mkimage

** java5 [#ef8bd7c6]
>
Ubuntu 9.10 or newer has no longer supported sun-java5-jdk initially. sun-java5-jdk  is not in the repository of the 9.10 or~
newer version of Ubuntu, but is needed to build '''branch android-2.2_r1.1'''. Add the old repository on '''/etc/apt/sources.list''',~
temporarily.
 $ sudo vi /etc/apt/sources.list

>
   ## respective vendors as a service to Ubuntu users.
   deb http://archive.canonical.com/ubuntu lucid partner
   deb-src http://archive.canonical.com/ubuntu lucid partner

>  
   deb http://archive.ubuntu.com/ubuntu lucid-security main restricted
   deb-src http://archive.ubuntu.com/ubuntu lucid-security restricted main multiverse universe #Added by software-properties
   deb http://archive.ubuntu.com/ubuntu lucid-security universe
   deb http://archive.ubuntu.com/ubuntu lucid-security multiverse
 + deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
 + deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

>
After adding the repository to the sources.list, use '''apt-get update'''to acquire the added repository information and install '''sun-java5-jdk'''.

>
 $ sudo apt-get update
 $ sudo apt-get install sun-java5-jdk

>
After the installation of the old java is completed, erase the added repository. This prevents accidentally installing unnecessary old packages.

>
 $ sudo vi /etc/apt/sources.list

>
   ## respective vendors as a service to Ubuntu users.
   deb http://archive.canonical.com/ubuntu lucid partner
   deb-src http://archive.canonical.com/ubuntu lucid partner

>  
   deb http://archive.ubuntu.com/ubuntu lucid-security main restricted
   deb-src http://archive.ubuntu.com/ubuntu lucid-security restricted main multiverse universe #Added by software-properties
   deb http://archive.ubuntu.com/ubuntu lucid-security universe
   deb http://archive.ubuntu.com/ubuntu lucid-security multiverse
 - deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse
 - deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse

>
Once again, use '''apt-get update''', and reset the information of repository to the original one.

> 
 $ sudo apt-get update

* Obtain Source [#te6d3425]
** Configuration of repo [#i8bf71c9]
>
To download the source code of android, configure '''repo'''.

>
 $ cd ~
 $ mkdir bin
 $ curl http://android.git.kernel.org/repo >~/bin/repo
 $ chmod a+x ~/bin/repo

>
On Ubuntu, PATH is automatically set to '''~/bin''' once users log-out then log-in again. To stay working on the current environment,~
without log-out, '''~/bin''' can be added to PATH of the environment variable. To configure the environment variable, follow the command~
shown below.

>
 $ export PATH=~/bin:$PATH

** Initialize repo [#nd45006b]
>
Create a working directory  called '''bc10''', and execute '''repo init''' for obtaining '''android-2.2_r1.1 branch'''.

>
 $ cd ~/
 $ mkdir bc10 
 $ cd bc10
 $ repo init -u git://android.git.kernel.org/platform/manifest.git -b android-2.2_r1.1

** Addition of local_manifest.xml [#e5230886]
>
The source code, which is obtained from '''android-2.2_r1.1 branch''' does not include ALSA. To use ALSA as the audio library, create~
'''local_manifest.xml''' below the directory of '''bc10/.repo/'''. Then, as ALSA related files are added to '''local_manifest.xml''', the source code~
of ALSA  is downloaded.~
~
Since the files related to ALAS does not tagged out against android-2.2-r1, use Froyo branch, directly.~

>
 $ vi .repo/local_manifest.xml

>
 <?xml version="1.0" encoding="UTF-8"?>
 <manifest>
   <project path="external/alsa-lib" name="platform/external/alsa-lib" revision="froyo"/>
   <project path="external/alsa-utils" name="platform/external/alsa-utils" revision="froyo"/>
   <project path="hardware/alsa_sound" name="platform/hardware/alsa_sound" revision="froyo"/>
 </manifest>

** repo sync [#k202dd8e]
>
After '''local_manifest.xml''' is revised, execute repo sync. Obtain the source code of android.

>
 $ repo sync


* Applying of the build configuration file for bc10 [#m8aadfc2]
>
The second command line below is to copy the configuration file from github repository to the directory below '''bc10/'''. This~
intends to optimize and build android2.2_r1.1 for bc10. Then, execute '''bc10-patch.sh'''. %%which is located under the directory%%~
%%of '''device/beatcraft/patch-for-bc10'''.%%~

>
%% $ cd ~/bc10/device/%%~
%% $ git clone git://github.com/bc-dev/device_beatcraft_bc10.git beatcraft%%~
%% $ cd beatcraft/patch-for-bc10/%%~
%% $ ./bc10-patch.sh%%~
~
 $ cd
 $ git clone git://github.com/bc-dev/patch_to_android-2.2_r1.1_for_b10.git
 $ cd patch_to_android-2.2_r1.1_for_b10

>
The destination of the files, which are obtained by '''git clone''' is not specified.~
Before executing '''bc10-patch.sh''', modify the environment variable inside '''bc10-patch.sh'''~
to match up to the PATH, which us determined in the configuration file~

>
 ### Settings 
 ANDROID_DIR=${HOME}/bc10
 SETUP_DIR=${HOME}/patch_to_android-2.2_r1.1_for_b10
 PATCH_DIR=${SETUP_DIR}/patches-for-bc10

>
After checking the configuration of PATH, execute '''bc10-patch.sh'''.~

>
 $ ./bc10-patch.sh


>
Applying this patch, the list of features are also added.
- Correspond to Mouse, and display mouse cursor
- Correspond to USB camera which employs v412 interface


* Build Android [#t73c3eeb]
>
To build android, set up the development environment of bc10.

>
 $ cd ~/bc10
 $ source build/envsetup.sh
 $ lunch bc10-eng

>
 ============================================
 PLATFORM_VERSION_CODENAME=REL
 PLATFORM_VERSION=2.2
 TARGET_PRODUCT=bc10
 TARGET_BUILD_VARIANT=eng
 TARGET_SIMULATOR=false
 TARGET_BUILD_TYPE=release
 TARGET_BUILD_APPS=
 TARGET_ARCH=arm
 HOST_ARCH=x86
 HOST_OS=linux
 HOST_BUILD_TYPE=release
 BUILD_ID=FRF91
 ============================================

>
Check the configuration listed above, then, execute '''make''' command.

>
 $ make

>
The duration of '''make''' process is reduced as applying parallel execution. Add an extension, '''j2''' to the command line. The~
results may differ. This highly depends on CPU.~
To obtain detail information of the '''make''' process, add '''showcommands''' and execute with '''make''' command. This outputs~
the logs which report the details of the executed commands during the '''make'''process.~

* Creation of image [#pcfed8e8]
>
After the build process is completed, the binary of userland, which is built by the process, is moved to the bootable location.~
To organize userland, '''bc10-image.sh''' is used.~

>
%% $ cd ~/bc10%%~
%% $ cd device/beatcraft/patch-for-bc10/image/%%~
%% $ ./bc10-image.sh%%~

>
 $ cd patch_to_android-2.2_r1.1_for_b10
 $ ./mkbc10-image.sh

>
To run the script,  a new directly, '''bc10-image/''' is added to '''out/target/product/bc10/'''. android userland is placed inside~
the directory of '''bc10-image'''.

>
 /home/beat/bc10/out/target/product/bc10
 mkdir android for android-rfs
 /home/beat/bc10/out/target/product/bc10
 copy android-root
 copy android-system
 change permission and owner
 [sudo] password for beat:
 $ cd ~/bc10/out/target/product/bc10
 $ ls -l

>
 -rw-r--r--  1 beat beat        7 2010-08-27 23:37 android-info.txt
 drwxrwxrwx  8 root root     4096 2010-08-30 11:34 bc10-image
 -rw-r--r--  1 beat beat     8866 2010-08-27 21:16 clean_steps.mk
 drwxr-xr-x  3 beat beat     4096 2010-08-27 21:54 data
 -rw-r--r--  1 beat beat    22869 2010-08-27 23:37 installed-files.txt
 drwxr-xr-x 13 beat beat     4096 2010-08-27 23:28 obj
 -rw-r--r--  1 beat beat      189 2010-08-27 21:16 previous_build_config.mk
 -rw-r--r--  1 beat beat   163811 2010-08-27 23:37 ramdisk.img
 drwxr-xr-x  8 beat beat     4096 2010-08-27 21:54 root
 drwxr-xr-x  4 beat beat     4096 2010-08-27 21:54 symbols
 drwxr-xr-x 11 beat beat     4096 2010-08-27 23:17 system
 -rw-------  1 beat beat 78486144 2010-08-27 23:37 system.img
 -rw-------  1 beat beat  1522752 2010-08-27 23:37 userdata.img

>
 $ cd bc10-image
 $ ls -l

>
 drwxrwxrwx  2 root root   4096 2010-08-27 21:26 data
 -rwxrwxrwx  1 root root    118 2010-08-27 21:54 default.prop
 drwxrwxrwx  2 root root   4096 2010-08-27 21:26 dev
 -rwxrwxrwx  1 root root 107440 2010-08-27 21:54 init
 -rwxrwxrwx  1 root root   1677 2010-08-27 20:53 init.goldfish.rc
 -rwxrwxrwx  1 root root    197 2010-08-24 20:58 init.omap3.rc
 -rwxrwxrwx  1 root root  13605 2010-08-24 20:58 init.rc
 drwxrwxrwx  2 root root   4096 2010-08-27 21:26 proc
 drwxrwxrwx  2 root root   4096 2010-08-27 21:54 sbin
 drwxrwxrwx  2 root root   4096 2010-08-27 21:26 sys
 drwxrwxrwx 11 root root   4096 2010-08-30 11:34 system

* kernel build [#j93b0abc]
>
The details of changed parts in X-Loader, U-Boot, and kernel are listed in the section of [[the changed parts of X-Loader, U-Boot, and kernel>#u91c1114]].

** Configure the environment variable [#x2bb6b8e]
>
X-Loader, U-Boot and kernel are necessity for boot. All three are built by tookchain, which is distributed with the source code of android.~
~
Configure environment variable as toolchain can be used for cross compile on the build process of these files.

>
 $ export PATH=/home/beat/bc10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin:${PATH}
 $ export ARCH=arm
 $ export CROSS_COMPILE=arm-eabi-


** X-Loader [#r82ab56e]
>
 $ cd ~/bc10
 $ git clone git://gitorious.org/~bc-dev/x-load-omap3/x-load-bc10.git x-load-bc10
 $ cd x-load-bc10
 $ git checkout -t -b bc10 origin/bc10
 $ make omap3530bc10_config
 $ make

>
Since '''x-load.bin''' is not matched with the format of OMAP BootROM, X-Loader does not work as the bootloader as it is wretten into~
NAND Flash or a SD card. To solve this issue, '''x-load.bin''' is modified with signGP.~
The executable file of signGP is downloaded form the website, whose address is shown below.~
http://beagleboard.googlecode.com/files/signGP~
Execute the downloaded signGP.~
 $ ./signGP x-loader.bin
 $ ./signGP x-load.bin
After its build is completed,  change the name of file, '''x-loader.bin.ift''' into MLO, and  MLO is written into the top of the FAT~
partition of SD card.~

** U-Boot [#w583bb25]
>
 $ cd ~/bc10
 $ git clone git://gitorious.org/bc10/u-boot-bc10.git u-boot-bc10
 $ cd u-boot-bc10
 $ git checkout -t -b build origin/build
 $ make omap3_bc10_config
 $ make
~
After U-Boot is built, '''u-boot.bin''' is copied to the FAT partition of SD card.

** kernel [#m4983c49]
>
 $ cd ~/bc10
 $ git clone git://gitorious.org/~bc-dev/rowboat/bc10-rowboat-kernel.git bc10-rowboat-kernel
 $ cd bc10-rowboat-kernel
 $ git checkout -t -b bc10-2.6.32-build origin/bc10-2.6.32-build
 $ make omap3_bc10_defconfig
 $ make uImage
 $ make modules

>
After the build is over, uImage is created in the following directory.~
~
 $ ls ~/bc10/bc10-rowboat-kernel/arch/arm/boot/
 Image  Makefile  bootp  compressed  install.sh  uImage  zImage


* Installation of SGX SDK [#d0fd99bc]
>
Install SGX SDK
Caution: It takes quite time to download SGX_SDK.~

>
 $ cd bc10
 $ git clone git://gitorious.org/rowboat/ti_android_sgx_sdk.git TI_Android_SGX_SDK
 $ cd TI_Android_SGX_SDK
 $ ./OMAP35x_Android_Graphics_SDK_setuplinux_3_01_00_03.bin

>
As the location of installation is asked, in this section, choose the default location, '''${HOME}OMAP35x_Android_Graphics_SDK_3_01_00_03'''.~
As the installation is completed, the file is placed in the directory.~

** Edit Rules.make [#fc8e037a]
>
'''Rules.make''' is edited as shown below, and the file is located at '''{HOME}/bc10/device/beatcraft/bc10'''. Copy the file.~
~
To build SGX SDK, android userland, toolchain, and kernel source are needed.'''Rules.make''' is a reference for the location of the directory of~
'''{HOME}/bc10/device/beatcraft/bc10''' as SGX SDK are built and installed.

>
 $ cd ${HOME}/OMAP35x_Android_Graphics_SDK_3_01_00_03
 $ mv Rules.make Rules.make.orig
 $ cp ${HOME}/bc10/device/beatcraft/bc10/Rules.make ${HOME}/OMAP35x_Android_Graphics_SDK_3_01_00_03/

>
 #Rules.make
 
 PLATFORM=LinuxOMAP3
 
 ################# FIELDS MODIFIABLE BY THE USER ###############################
 #set home area HOME (relative location for all SDK operations)
 # HOME=INVALIDVAL
 HOME=/home/beat
 #Current Directory where Graphics SDK is installed
 GRAPHICS_INSTALL_DIR=$(HOME)/OMAP35x_Android_Graphics_SDK_3_01_00_03
 #GRAPHICS_INSTALL_DIR=$(HOME)/bc10/TI_ANDROID
 #Android Specific
 #Path of Android Root FS
 # ANDROID_ROOT=$(HOME)/INVALIDVAL
 ANDROID_ROOT=$(HOME)/bc10/out/target/product/bc10/bc10-image
 #set toolchain root path for arm-eabi
 # CSTOOL_DIR=INVALIDVAL
 CSTOOL_DIR=$(HOME)/bc10/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/
 CSTOOL_PREFIX=arm-eabi-
 CSTOOL_PATH=$(CSTOOL_DIR)/bin
 CSTOOL_LIBSTDC++_PATH=$(CSTOOL_DIR)/arm-none-linux-gnueabi/libc/usr/lib
 
 #set the kernel installation path
 # KERNEL_INSTALL_DIR=$(HOME)/INVALIDVAL
 KERNEL_INSTALL_DIR=$(HOME)/bc10/kernel-rowboat-bc10
 TARGETFS_INSTALL_DIR=$(ANDROID_ROOT) 
 
 GFX_TARGETFS_KERMOD_PATH=$(TARGETFS_INSTALL_DIR)/lib/modules/2.6.32 
 
 #Android
 ANDROID_DISCIMAGE=$(TARGETFS_INSTALL_DIR)/

>
Copy is completed, then start executing the build process.

>
 $ cd ~/OMAP35x_Android_Graphics_SDK_3_01_00_03
 $ make
 $ make OMAPES=3.x install

>
In the code shown above, the last code, '''make  install''' does have an option '''OMAPES=3.x'''. Since bc10 is equipped with OMAP3530 as CPU,~
and 3.x is selected.  There are same options for other types of processors.

>
 For OMAP3530 ES 1or2 = 2.x
 For OMAP3530 ES3.0   = 3.x
 For AM3517           = 3.x
 For AM37x            = 5.x

>
After the build process is completed, the massage, described  below, appears. 

>
 Installation complete!

>
The required files has been copied to the directory '''~/bc10/out/target/product/bc10/bc10-image/''', and this is the end of the creation of~
android userland for bc10.


* Create SD card image[#mef5758b]

>
This section reviews how to crete SD card image. This most processes shown here have been discussed before. The structure~
of SD card and contents of each partition are the same as other embedded Linux system which includes Android. The creation~
of SD card image are to follow the directions, which is listed at “[[Create bootable SD card on bc10/booting:http://labs.beatcraft.com/en/index.php?bc10%2Fbooting#mef5758b]].” The placement of~
the created images is to apply the same method as rowboart-eclair-dsp's one.

>
The overview of structure of SD card is shown below.
- FAT32 partition
-- X-Loader
-- U-Boot
-- Linux kernel
- Linux partition
-- Linux toot file system

>It is assumed that working environment is Linux. ~
The order of the instructions is shown below.~
+ Initialization and setting of partitions
+ Format the bootlorder file system
+ Placing the bootlorder files

>The instruction is originally listed at [[LinuxBootDiskFormat (code.google.com):http://code.google.com/p/beagleboard/wiki/LinuxBootDiskFormat]], and this section is quoted and rearranged.~
For the convenience of the explanation for the command lines,  user inputs are also shown, and user inputs are written~
inside squire brackets [ ]. This is an example, and the directory and the location of device file may vary. These are~
highly dependent on SD cards.~

** Unmount SD card [#o84d4969]
>Unmount is required for creating partitions and formatting the SD card.  If the automounter mounts the SD card, unmount~
the SD card.~
>
Assume that presently a SD card is mounted as it is described below.~
 $ [df -h]
 Filesystem            Size  Used Avail Use% Mounted on
 ...
 /dev/sdc1             400M   94M  307M  24% /media/disk
 ...
>
The name of the SD card is '''disk''', and the SD card is currently situated the directory '''/media/disk'''.~
Unmount the SD card.~
 $ [umount /media/disk]

** Initialization and configuration of partitions [#o5b41862]
>Execute '''fdisk''' command. The parameter of '''fdisk''' is the starting point of the SD card, in which the device file of the SD~
card is located. The directory may differ, depending on SD cards. Please check before start this task.~
 $ [sudo fdisk /dev/sdc]
 Command (m for help): [p]
 
 Disk /dev/sdc: 2021 MB, 2021654528 bytes
 255 heads, 63 sectors/track, 245 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sdc1   *           1         246     1974240+   c  W95 FAT32 (LBA)
 Partition 1 has different physical/logical endings:
      phys=(244, 254, 63) logical=(245, 200, 19)

>Write down the number of bytes on the SD card. The number will use later. (in this example 2021654528)~
Delete any partitions that already exist in the SD card.
 Command (m for help): [d]
 Selected partition 1

>Change to expert mode.
 Command (m for help): [x]

>Set the number of heads to 255.
 Expert Command (m for help): [h]
 Number of heads (1-256, default xxx): [255]

>Set the number of sectors to 63.
 Expert Command (m for help): [s]
 Number of sectors (1-63, default xxx): [63]

>The number of cylinders is differ, and it is dependent on SD cards. This is how to calculate the number of cylinders.~
The outcome is truncated, do not be rounded.
 #cylinders = FLOOR (the number of Bytes on the SD Card (from above) / 255 / 63 / 512 )

>The number of cylinders for the SD card used here is calculated as described below.
 2021654528 / 255 / 63 / 512 = 245.79
 -> 245

>Set the number of cylinders, The number of cylinders is 245 for this example.
 Expert Command (m for help): [c]
 Number of cylinders (1-256, default xxx): [enter the number calculated above]

>Return to normal mode.
 Expert Command (m for help): [r]

>Create FAT32 partition in the SD card.
 Command (m for help): [n]
 Command action
    e   extended
    p   primary partition (1-4)
 [p]
 Partition number (1-4): [1]
 First cylinder (1-245, default 1): [(press Enter)]
 Using default value 1
 Last cylinder or +size or +sizeM or +sizeK (1-245, default 245): [+50]
 
 Command (m for help): [t]
 Selected partition 1
 Hex code (type L to list codes): [c]
 Changed system type of partition 1 to c (W95 FAT32 (LBA))

>Set up the boot flag in the first partition, and make it bootable.
 Command (m for help): [a]
 Partition number (1-4): [1]

>Create the second partition for the root file system of Linux.
 Command (m for help): [n]
 Command action
    e   extended
    p   primary partition (1-4)
 [p]
 Partition number (1-4): [2]
 First cylinder (52-245, default 52): [(press Enter)]
 Using default value 52
 Last cylinder or +size or +sizeM or +sizeK (52-245, default 245): [(press Enter)]
 Using default value 245

>Check up configurations of the newly created partitions.
 Command (m for help): [p]
 
 Disk /dev/sdc: 2021 MB, 2021654528 bytes
 255 heads, 63 sectors/track, 245 cylinders
 Units = cylinders of 16065 * 512 = 8225280 bytes
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sdc1   *           1          51      409626    c  W95 FAT32 (LBA)
 /dev/sdc2              52         245     1558305   83  Linux

>Save the changes in the partition table.
 Command (m for help): [w]
 The partition table has been altered!
 
 Calling ioctl() to re-read partition table.
 
 WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
 The kernel still uses the old table.
 The new table will be used at the next reboot.
 
 WARNING: If you have created or modified any DOS 6.x
 partitions, please see the fdisk manual page for additional
 information.
 Syncing disks.

** Format the file system [#fa62126f]

>Format the FAT32 partition and the Linux partition.~
In the example described below, '''LABLE1''' and '''LABEL2''' are given by the commands. The names of the partitions are~
freely decided. Input the names of the partitions.~
 $ [sudo mkfs.msdos -F 32 /dev/sdc1 -n LABEL1]
 mkfs.msdos 2.11 (12 Mar 2005)
 
 $ [sudo mkfs.ext3 -L LABEL2 /dev/sdc2]
 mke2fs 1.40-WIP (14-Nov-2006)
 Filesystem label=
 OS type: Linux
 Block size=4096 (log=2)
 Fragment size=4096 (log=2)
 195072 inodes, 389576 blocks
 19478 blocks (5.00%) reserved for the super user
 First data block=0
 Maximum filesystem blocks=402653184
 12 block groups
 32768 blocks per group, 32768 fragments per group
 16256 inodes per group
 Superblock backups stored on blocks: 
         32768, 98304, 163840, 229376, 294912
 
 Writing inode tables: done                            
 Creating journal (8192 blocks): done
 Writing superblocks and filesystem accounting information: 

** Place the image files of bootloaders [#x0f56359]
>
The image files of bootloaders are set into the SD card.~
First, remount the SD card. (Gently push the SD card into its holder, then the card pops out, and reinsert the~
SD card into its folder again.) The mount point of SD card is highly dependent on system. Change the mount~
point, which is suitable to its system.~

*** FAT partition [#vb152e75]
>
- X- Loader ~
There are strict rules for placing X-Loader, the first bootloader on SD card. Please set up X-Loader exactly~
in the way described below.~
+After the format of FAT32 partition is completed, X-Loader is the first one to be placed in the partition.
+It is placed at the top of the directory in the partition. 
+Change the name of the file to '''MLO'''.

>
 $ cd  ~/bc10/x-load-bc10
 $ cp x-load.bin.ift /media/LABEL1/MLO

>
- u-boot&#12288;~
Next, U-Boot, the second bootloader, is placed.
The file is named as '''u-boot.bin'''.

>
 $ cd ~/bc10/u-boot-bc10
 $ cp u-boot.bin /media/LABEL1/u-boot.bin

>
- boot.scr ~
Crate '''boot.scr''' in the same way as the [[rowboat-edcllair-dsp:http://labs.beatcraft.com/en/index.php?bc10%2Frowboat-eclair-dsp-4#vd13abe8]] section has done.~
'''boot.scr''' creates the same contents as '''setenv''', an u-boot command prompt in serial console, generates.~
Because of this file, does not require any manual setting as every time computer boots.~
Caution: as configure the file, do not change memory mapping.~
~
Create the contents of boot.script described below.~

>
 $ cd ~
 $ vi boot.script

>
 if fatload mmc 0 84000000 uImage
 then
  echo ***** Kernel: /dev/mmcblk0p1/uImage.bin *****
 fi
 echo ***** RootFS: /dev/mmcblk0p2 *****
 setenv bootargs 'mem=88M@0x80000000 mem=128M@0x88000000 androidboot.console=ttyS2 console=tty0 console=ttyS2,115200n8 root=/dev/mmcblk0p2 init=/init rootwait omapfb.video_mode=680x480MR-24@60'
 bootm 84000000

>
As this file is used as a varialbe, '''mkimage''' is executed as it is shown below.

>
 $ mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n ./boot.script -d ./boot.script ./boot.scr &> /dev/null

>
Createed '''boot.scr''' is copied to FAT partition of the SD card.

>
 $ sudo cp boot.scr /media/LABEL1/


*** Linux partition [#t9d4c7b5]
>
Place the userland of android for bc10, which is just built.~

>
 $ cd ~/bc10/out/target/product/bc10/bc10-image
 $ sudo cp -fr * /media/LABEL2/

>
At the end, before unmount the SD card, execute '''sync'''.

> 
 $ sync
 $ sudo umount /media/LABEL1
 $ sudo umount /media/LABEL2

>
The creation of SD card image has been completed. 

* Modified parts of X-Loader, U-Boot, and kernel [#u91c1114]
>
This section lists up the modified parts of X-Loader, U-Boot, and kernel. These changes are specifically adjustments for bc10 froyo.

** bc10-rowboat-kernel [#neda8d63]

*** Origin [#h914d4e1]
>
- Repository 
-- git://gitorious.org/rowboat/kernel.git
- Branch
-- rowboat-eclair-2.6.32

*** Major changes [#r755ba71]
>
- Create a profile for bc10
-- arch/arm/configs/omap3_bc10_defconfig
-- arch/arm/mach-omap2/Kconfig
-- arch/arm/mach-omap2/Makefile
-- arch/arm/mach-omap2/board-omap3bc10.c
- Add the driver for CMEL OLED43 AMOLED display
-- drivers/video/omap2/displays/Kconfig
-- drivers/video/omap2/displays/Makefile
-- drivers/video/omap2/displays/panel-cmel-oled43.c
- Add the driver for TSC2003 touchscreen control
-- arch/arm/configs/omap3_bc10_defconfig
-- arch/arm/mach-omap2/board-omap3bc10.c
-- drivers/input/touchscreen/Kconfig
-- drivers/input/touchscreen/Makefile
-- drivers/input/touchscreen/tsc2003.c
- Add the sound/soc driver
-- arch/arm/configs/omap3_bc10_defconfig
-- sound/soc/omap/Kconfig
-- sound/soc/omap/Makefile
-- sound/soc/omap/omap3bc10.c
- Port the code for avoiding the sysfs permission issue from 0xlab kernel
-- fs/namei.c
-- fs/sysfs/dir.c
-- fs/sysfs/file.c
-- fs/sysfs/inode.c
-- fs/sysfs/symlink.c
-- fs/sysfs/sysfs.h
-- include/linux/namei.h
- Add the driver for AMI602 6-axis motion sensor 
-- arch/arm/configs/omap3_bc10_defconfig
-- arch/arm/mach-omap2/board-omap3bc10.c
-- drivers/hwmon/Kconfig
-- drivers/hwmon/Makefile
-- drivers/hwmon/ami602.c
-- include/linux/i2c/ami602.h


** u-boot-bc10 [#h6617f85]

*** Origin [#g8ca4c4e]
>
- Repository 
-- git://git.denx.de/u-boot.git
- Branch
-- master

*** Major changes [#z7622068]
>
- Create a profile for bc10
-- board/beatcraft/bc10/Makefile
-- board/beatcraft/bc10/bc10.c
-- board/beatcraft/bc10/bc10.h
-- board/beatcraft/bc10/config.mk
-- boards.cfg
-- doc/README.omap3
-- include/configs/omap3_bc10.h
- Arrange the configuration of MUX 
-- board/beatcraft/bc10/bc10.h

** x-load-bc10 [#r4265c37]

*** Origin [#d9d3a932]
>
- Repository 
-- git://gitorious.org/x-load-omap3/mainline.git
- Branch
-- master

*** Major changes [#obe79c88]
>
- Create a profile for bc10
-- Makefile
-- board/omap3530bc10/Makefile
-- board/omap3530bc10/config.mk
-- board/omap3530bc10/omap3530bc10.c
-- board/omap3530bc10/platform.S
-- board/omap3530bc10/x-load.lds
-- drivers/Makefile
-- include/configs/omap3530bc10.h
- Arrange the configuration of MUX 
-- board/omap3530bc10/omap3530bc10.c


* Reference URL [#e90654f8]
- rowboat ConfigureAndBuild ~
-- http://code.google.com/p/rowboat/wiki/ConfigureAndBuild#Install_the_drivers_in_Target_filesystem

* Revision History [#jdfde316]
-2010/09/08 Initial release~
-2010/09/14 Add "Create SD card image" section~
-2010/11/30 Modify the script, which gives a patch to '''android-2.2_r1.1''' and its application method~

Front page   Edit Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes