Wednesday 28 December 2011

PANDABOARD DOTA


                                        -------------------------------
                                    PANDABOARD DOTA
                                        -------------------------------
building the Kernel:-
---------------------
git clone https://android.googlesource.com/kernel/omap
cd omap
git checkout remotes/origin/android-omap-panda-3.0
make ARCH=arm CROSS_COMPILE=/home/ramchandra/ics/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- mrproper
make ARCH=arm CROSS_COMPILE=/home/ramchandra/ics/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- defconfig panda_defconfig
make uImage

replace the kernel binary image under ics/device/ti/panda from arch/arm/boot/zImage




# From: www.android.com > Partners > Getting the Source
#    http://source.android.com/source/downloading.html

mkdir bin
export PATH=$PWD/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > bin/repo
chmod a+x bin/repo
# We want master
mkdir ics
cd ics
repo init -u https://android.googlesource.com/platform/manifest
repo sync



# From http://source.android.com/source/building.html
# and
# device/ti/panda/README

******replace the kernel binary image under device/ti/panda from arch/arm/boot/zImage


source build/envsetup.sh
lunch full_panda-eng
make fastboot



# Fetch the binaries from http://code.google.com/android/nexus/drivers.html#panda and extract it into ics root directory resulting into a "vendor" folder


wget --no-check-certificate https://dl.google.com/dl/android/aosp/imgtec-panda-itl41d-dfebf249.tgz
tar -zxvf imgtec-panda-itl41d-dfebf249.tgz

# accept license

make -j8


# wait a bit



--------------------------------------------------------------------------------------
                        Partitioning the SD-Card
                       --------------------------
Using fdisk /dev/sdX
make the following partitions in the sd card
sdX1 --->boot (64MB)
sdX2 --->system(around 1GB)
sdX3---->cache (64MB)
sdX4---->userdata(256MB)
sdX5---->sdcard(128MB)
sdX6---->our minimal fs (64MB)

sudo mkfs.vfat -F 32 -n "boot" /dev/sdX1
sudo mkfs.ext4 -j -L "system" /dev/sdX2
sudo mkfs.ext4 -j -L "cache" /dev/sdX3
sudo mkfs.ext4 -j -L "userdata" /dev/sdX4
sudo mkfs.ext4 -j -L "sdcard" /dev/sdX5
sudo mkfs.ext4 -j -L "amifs" /dev/sdX6


It will look like this :

Disk /dev/sdb: 3974 MB, 3974103040 bytes
128 heads, 32 sectors/track, 1895 cylinders
Units = cylinders of 4096 * 512 = 2097152 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a10f8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          66      135136    c  W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.
/dev/sdb2              67         322      524288   83  Linux
/dev/sdb3             323         450      262144   83  Linux
/dev/sdb4             451         706      524272   83  Linux
/dev/sdb5             739         770       65520   83  Linux
/dev/sdb6             707         738       65520   83  Linux

Partition table entries are not in disk order

--------------------------------------------------------------------------------------
# copy in the boot


mkdir mnt
sudo mount /dev/sdc1 mnt

sudo cp device/ti/panda/xloader.bin mnt/MLO
sudo cp device/ti/panda/bootloader.bin mnt/u-boot.bin

sudo umount mnt
sync

# Then plug the SD card into the Panda and USB into J18 and power on the unit

sudo ./fastboot devices

sudo fastboot oem format
sudo fastboot flash xloader device/ti/panda/xloader.bin
sudo fastboot flash bootloader device/ti/panda/bootloader.bin

sudo fastboot erase cache

sudo fastboot flash system out/target/product/panda/system.img
sudo fastboot flash userdata out/target/product/panda/userdata.img
sudo fastboot flash boot out/target/product/panda/boot.img


Now your bootable SD-Card is ready , Put your SD-Card in pandaboard :-
----------------------------------------------------------------------


----------------------------------------
THIS IS RUNNING WITH ANDROID FILE SYSTEM.
----------------------------------------
# ./busybox pwd
/

#mkdir new-root
# cd /new-root
#mkdir old-root
# ls
tmp    bin  data  var  linuxrc  media  lib  sys  busybox  mnt  index.html
proc  dev  old-root  boot  ota_arm  usr  sbin  lost+found  etc  home

# pwd
/new-root
# ./busybox pivot_root . old-root
# ./busybox mount none /proc -t proc
# ./busybox mount none /sys -t sysfs
# ./busybox mount none /dev/pts -t devpts


# ./busybox mount
rootfs on / type rootfs (rw)
/dev/root on /old-root type ext4 (rw,relatime,barrier=1,data=ordered)
devtmpfs on /old-root/dev type devtmpfs (rw,relatime,size=471164k,nr_inodes=117791,mode=755)
tmpfs on /old-root/dev type tmpfs (rw,relatime,mode=755)
devpts on /old-root/dev/pts type devpts (rw,relatime,mode=600)
sysfs on /old-root/sys type sysfs (rw,relatime)
none on /old-root/dev/cpuctl type cgroup (rw,relatime,cpu)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
# ./busybox umount /old-root/dev/pts
umount: can't umount /old-root/dev/pts: Device or resource busy
# ./busybox umount /old-root/sys
umount: can't umount /old-root/sys: Device or resource busy

# ./busybox umount /old-root/dev/cpuctl
# ./busybox umount /old-root/dev/pts
umount: can't umount /old-root/dev/pts: Device or resource busy
#
#
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/root on /old-root type ext4 (rw,relatime,barrier=1,data=ordered)
devtmpfs on /old-root/dev type devtmpfs (rw,relatime,size=471164k,nr_inodes=117791,mode=755)
tmpfs on /old-root/dev type tmpfs (rw,relatime,mode=755)
devpts on /old-root/dev/pts type devpts (rw,relatime,mode=600)
sysfs on /old-root/sys type sysfs (rw,relatime)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)




# ./busybox umount -l /old-root/dev
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/root on /old-root type ext4 (rw,relatime,barrier=1,data=ordered)
devtmpfs on /old-root/dev type devtmpfs (rw,relatime,size=471164k,nr_inodes=117791,mode=755)
sysfs on /old-root/sys type sysfs (rw,relatime)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)

# ./busybox umount -l /old-root/sys
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/root on /old-root type ext4 (rw,relatime,barrier=1,data=ordered)
devtmpfs on /old-root/dev type devtmpfs (rw,relatime,size=471164k,nr_inodes=117791,mode=755)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)

# ./busybox umount -l /old-root/dev
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/root on /old-root type ext4 (rw,relatime,barrier=1,data=ordered)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)


# ./busybox umount /old-root
umount: can't umount /old-root: Device or resource busy

# ./busybox umount -l /old-root
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)

# ./busybox ls /mnt
card   cf     net    ram    ramfs  thumb


#
#

# ./busybox ls
bin         dev         lib         mnt         sbin        var
boot        etc         linuxrc     old-root    sys
busybox     home        lost+found  ota_arm     tmp
data        index.html  media       proc        usr

< we will use ramfs for keeping our downloaded images.>
-------------------------------------------------------

#mkdir /mnt/ramfs
#mount -t ramfs -o size=620MB ramfs /mnt/ramfs
# ./busybox cp ota_arm /mnt/ramfs
# ./busybox cp busybox /mnt/ramfs/busybox
#
#
# pwd
/new-root
# ./busybox ls /mnt/ramfs
busybox        ota_arm
#
# pwd
/new-root

# cd /mnt/ramfs
# pwd
/mnt/ramfs

# ./busybox ls
busybox  ota_arm
# ./ota_arm http://10.0.0.150/system_test.img
Welcome 2

Welcome 2

 ./busybox wget http://10.0.0.150/system_test.img
Connecting to 10.0.0.150 (10.0.0.150:80)
system_test.img      100% |*******************************|   512M 00:00:00 ETA
Welcome#
#
#
#
# ./busybox ls
busybox          ota_arm          system_test.img
# ./busybox dd if=system_test.img of=/dev/mmcblk0p2
1048576+0 records in
1048576+0 records out
# ./busybox rm system_test.img
# ./busybox ls
busybox  ota_arm
# ./ota_arm http://10.0.0.150/boot_test.img

Welcome 2

Welcome 2

 ./busybox wget http://10.0.0.150/boot_test.img
Connecting to 10.0.0.150 (10.0.0.150:80)
boot_test.img        100% |*******************************|   131M 00:00:00 ETA
Welcome#
#
# ./busybox dd if=boot_test.img of=/dev/mmcblk0p1
270272+0 records in
270272+0 records out
#
# ./busybox rm boot_test.img
# ./busybox ls
busybox  ota_arm
# ./ota_arm http://10.0.0.150/userdata_test.img

Welcome 2

Welcome 2

 ./busybox wget http://10.0.0.150/userdata_test.img
Connecting to 10.0.0.150 (10.0.0.150:80)
userdata_test.img    100% |*******************************|   511M 00:00:00 ETA
# ./busybox dd if=userdata_test.img of=/dev/mmcblk0p5
1048544+0 records in
1048544+0 records out
#
#
#
# ./busybox rm /mnt/ramfs/*

# cd ..
# cd ..
# ./busybox umount /mnt/ramfs
# ./busybox mount
rootfs on / type rootfs (rw)
/dev/block/mmcblk0p7 on / type ext4 (rw,relatime,barrier=1,data=ordered)
none on /proc type proc (rw,relatime)
none on /sys type sysfs (rw,relatime)
none on /dev/pts type devpts (rw,relatime,mode=600)
# ./busybox reboot















                                                                                                 9,1           Top

No comments:

Post a Comment