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

Sunday 18 December 2011

How to make ICS self bootable SD Card for Pandaboard



If you want to build ICS for Pandaboard, You must use master branch.
I used AOSP local mirror.

~/panda$ mkdir ics
~/panda$ cd ics/
~/panda/ics$ repo init -u /home/kinneko/AOSP/platform/manifest.git
~/panda/ics$ repo sync

Ordinary, you can use AOSP directry, like this.

~/panda/ics$ repo init -u https://android.googlesource.com/platform/manifest.git 

And add binary video drivers.

~/panda/ics$ wget https://dl.google.com/dl/android/aosp/imgtec-panda-itl41d-dfebf249.tgz
~/panda/ics$ tar zxf imgtec-panda-itl41d-dfebf249.tgz
~/panda/ics$ ./extract-imgtec-panda.sh 

Read license, and type "I ACCEPT".

Delete disused files.

~/panda/ics$ rm imgtec-panda-itl41d-dfebf249.tgz extract-imgtec-panda.sh 


Build ICS.

~/panda/ics$ source build/envsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash

~/panda/ics$ lunch full_panda-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full_panda
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ICS_MR0
============================================

~/panda/ics$ time make -j12
(snip)
real 27m22.821s
user 248m39.990s
sys 14m33.140s

The value of "-j" option that may be the number of CPU in your build environment.

Download kernel.

~/panda/ics$ mkdir kernel
~/panda/ics$ cd kernel/
~/panda/ics/kernel$ git clone https://android.googlesource.com/kernel/omap
~/panda/ics/kernel$ cd omap/
~/panda/ics/kernel/omap$ git checkout -b android-omap-panda-3.0 origin/android-omap-panda-3.0
Checking out files: 100% (37523/37523), done.
Branch android-omap-panda-3.0 set up to track remote branch android-omap-panda-3.0 from origin.
Switched to a new branch 'android-omap-panda-3.0'

and build it.
You must add your path of the cross toolchain.

~/panda/ics/kernel/omap$ export ARCH=arm
~/panda/ics/kernel/omap$ export CROSS_COMPILE=arm-none-linux-gnueabi-
~/panda/ics/kernel/omap$ export PATH=/home/kinneko/panda/L27.12.1-P2/build_tools/arm-2010q1/bin:/usr/bin:/bin
~/panda/ics/kernel/omap$ make panda_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/lex.zconf.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
~/panda/ics/kernel/omap$ time make uImage modules -j12
(snip)
  Image arch/arm/boot/uImage is ready
real 1m13.291s
user 10m23.260s
sys 0m44.740s

make rootfs tree.

~/panda/ics/kernel$ cd ../out/target/product/panda/
~/panda/ics/out/target/product/panda$ cp -a root/* rootfs/
~/panda/ics/out/target/product/panda$ cp -a system rootfs/

edit init.rc.

~/panda/ics/out/target/product/panda$ vi rootfs/init.rc

#on fs
# mount mtd partitions
    # Mount /system rw first to give the filesystem a chance to save a checkpoint
#    mount yaffs2 mtd@system /system
#    mount yaffs2 mtd@system /system ro remount
#    mount yaffs2 mtd@userdata /data nosuid nodev
#    mount yaffs2 mtd@cache /cache nosuid nodev

and

    mount rootfs rootfs / rw remount


service console /system/bin/sh
    class core
    console
    disabled
    #user shell
    #group log

edit init.omap4pandaboard.rc.

~/panda/ics/out/target/product/panda$ vi rootfs/init.omap4pandaboard.rc 

#on fs
#       mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system wait ro
#       mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data wait noatime nosuid nodev
#       mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache wait noatime nosuid nodev

download uboot source codes.

~/panda$ git clone git://git.omapzoom.org/repo/u-boot.git    
Cloning into u-boot...
remote: Counting objects: 140837, done.
remote: Compressing objects: 100% (25115/25115), done.
remote: Total 140837 (delta 114484), reused 140801 (delta 114455)
Receiving objects: 100% (140837/140837), 42.50 MiB | 388 KiB/s, done.
Resolving deltas: 100% (114484/114484), done.

and build it.

~/panda$ cd u-boot/
~/panda/u-boot$ git checkout 601ff71c8d46b5e90e13613974a16d10f2006bb3
Note: checking out '601ff71c8d46b5e90e13613974a16d10f2006bb3'.
(snip)

You must add some short patches.

~/panda$ diff -Naur u-boot.org/include/configs/omap4430panda.h u-boot/include/configs/omap4430panda.h
--- u-boot.org/include/configs/omap4430panda.h 2011-11-22 16:05:02.384622136 +0900
+++ u-boot/include/configs/omap4430panda.h 2011-11-21 17:52:16.169639483 +0900
@@ -133,11 +133,11 @@
 /* Environment information */
 #if defined(CONFIG_4430ZEBU) && !defined(CONFIG_4430ES2)
 /* Give the standard Kernel jump command as boot cmd and without any delay */
-#define CONFIG_BOOTDELAY         0
+#define CONFIG_BOOTDELAY         1
 #define CONFIG_EXTRA_ENV_SETTINGS \
  "bootcmd=go 0x80008000\0"
 #else
-#define CONFIG_BOOTDELAY         0
+#define CONFIG_BOOTDELAY         1

 #endif /*CONFIG_4430ZEBU */

@@ -147,10 +147,9 @@
  " ip=dhcp"
 #else

-#define CONFIG_BOOTARGS "console=ttyO2,115200n8 mem=512M" \
- " init=/init vram=32M omapfb.vram=0:16M androidboot.console=ttyO2"
+#define CONFIG_BOOTARGS "console=ttyO2,115200n8 mem=1G androidboot.console=ttyO2 console=ttyO2,115200n8 mem=512M root=/dev/mmcblk0p3 rw rootdelay=2 init=/init vram=32M omapfb.vram=0:16M androidboot.console=ttyO2"

-#define CONFIG_BOOTCOMMAND "booti mmc0"
+#define CONFIG_BOOTCOMMAND "mmcinit 0;fatload mmc 0 0x80000000 uImage; bootm 0x80000000"

 #endif

Save this to "uboot.patch", and patch it.

~/panda/u-boot$ patch -p1 < uboot.patch
patching file include/configs/omap4430panda.h

Build it.

~/panda/u-boot$ make omap4430panda_config
Configuring for omap4430panda board...
~/panda/u-boot$ make
~/panda/u-boot$ cd ..

Get xloader.

~/panda$ git clone git://git.omapzoom.org/repo/x-loader.git
Cloning into x-loader...
remote: Counting objects: 1593, done.
remote: Compressing objects: 100% (407/407), done.
remote: Total 1593 (delta 1174), reused 1565 (delta 1163)
Receiving objects: 100% (1593/1593), 457.30 KiB | 76 KiB/s, done.
Resolving deltas: 100% (1174/1174), done.
~/panda$ cd x-loader/
~/panda/x-loader$ git checkout c8855fa6b85bd44073bd1b25dbffa99f02cbeeed
Note: checking out 'c8855fa6b85bd44073bd1b25dbffa99f02cbeeed'.

And build it.

~/panda/x-loader$ make omap4430panda_config
rm -f include/config.h include/config.mk
Configuring for omap4430panda board...
echo "/* Generarated file. Do not edit */" >./include/config.h
echo "#include <configs/omap4430panda.h>" >>./include/config.h
MPU at 1GHz revision..
~/panda/x-loader$ make ift
~/panda/x-loader$ cd ..

Fromat SD Card.
I used 2GB Card.
Inceart SD Card to build PC, and seek for device name.

~/panda$ dmesg
[29960.845516]  sdb: sdb1

Delete partitoins.

~/panda$ sudo dd if=/dev/zero of=/dev/sdb bs=1 count=1024
[sudo] password for kinneko:
1024+0 records in
1024+0 records out
1024 bytes (1.0 kB) copied, 0.00346839 s, 295 kB/s

Add three new partitions.
boot, media, rootfs.
"boot" include xloader, uboot and kernel.
"media" is android user space.
"rootfs "include android systems.

~/panda$ sudo fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xdf7c7ae8.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1015, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1015, default 1015): +64M
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (37-1015, default 37):
Using default value 37
Last cylinder, +cylinders or +size{K,M,G} (37-1015, default 1015): +1024M
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (593-1015, default 593):
Using default value 593
Last cylinder, +cylinders or +size{K,M,G} (593-1015, default 1015):
Using default value 1015
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))
Command (m for help): a
Partition number (1-4): 1
Command (m for help): p
Disk /dev/sdb: 1967 MB, 1967128576 bytes
61 heads, 62 sectors/track, 1015 cylinders
Units = cylinders of 3782 * 512 = 1936384 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdf7c7ae8
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          36       68045    c  W95 FAT32 (LBA)
/dev/sdb2              37         592     1051396   83  Linux
/dev/sdb3             593        1015      799893   83  Linux
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.


Format partitions.

~/panda$ sudo mkfs.vfat -F 32 -n "boot" /dev/sdb1
mkfs.vfat 3.0.9 (31 Jan 2010)

~/panda$ sudo mkfs.vfat -F 32 -n "media" /dev/sdb2
mkfs.vfat 3.0.9 (31 Jan 2010)

~/panda$ sudo mkfs.ext4 -j -L "rootfs" /dev/sdb3
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
50064 inodes, 199973 blocks
9998 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=205520896
7 block groups
32768 blocks per group, 32768 fragments per group
7152 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840
Writing inode tables: done                          
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 29 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Mount and copy files.

~/panda$ sudo mount /dev/sdb1 /media/
~/panda$ sudo cp -r x-loader/MLO /media/
~/panda$ sudo cp -r u-boot/u-boot.bin /media/
~/panda$ sudo cp -r ics/kernel/omap/arch/arm/boot/uImage /media/
~/panda$ ls -al /media/
total 4043
drwxr-xr-x  2 root root     512 Nov 21 18:24 .
drwxr-xr-x 24 root root    4096 Sep  6 19:03 ..
-rwxr-xr-x  1 root root   21604 Nov 21 17:54 MLO
-rwxr-xr-x  1 root root  160528 Nov 21 17:52 u-boot.bin
-rwxr-xr-x  1 root root 3951668 Nov 21 17:16 uImage
~/panda$ sudo umount /media/

~/panda$ sudo mount /dev/sdb3 /media
~/panda$ sudo cp -a ics/out/target/product/panda/rootfs/* /media/
~/panda$ sudo chmod 777 -R /media/
~/panda$ sudo umount /media