首页 > 代码库 > 【Android 系统开发】 编译 Android 系统 u-boot 内核 源码 并烧写到 OK-6410A 开发板上

【Android 系统开发】 编译 Android 系统 u-boot 内核 源码 并烧写到 OK-6410A 开发板上


博客地址 http://blog.csdn.net/shulianghan/article/details/40299813 


本篇文章中用到的工具源码下载

-- ok-6410A 附带的 Android 光盘 下载地址http://pan.baidu.com/share/link?shareid=3662728609&uk=2754759285 ;

-- 光盘所含内容 : Android 引导 u-boot 源码, Android 内核 源码, Android 系统源码, 交叉编译工具链;


各项操作说明

-- 编译环境 : 编译源码 (u-boot, 内核, Android 系统) 是在 Ubuntu 12.04.4 LTS 操作系统上进行的;

-- 烧写环境 : 将编译的镜像烧写到 ok-6410A 开发板的操作实在 windows xp 上进行的;





一. 环境准备


root 用户登陆 : 由于进行嵌入式开发, root 权限在任何时候都需要使用, Ubuntu 系统直接使用 root 用户登陆界面;


软件版本

-- 虚拟机 : VMware10, 注意一定要用 10版本的, VM8版本的 vmware-tools 安装不上;

-- 操作系统 : Ubuntu 12.04.4 LTS 32位, 这里使用 32 位操作系统 编译 Android 的 2.3.4 源码; 

-- 嵌入式开发板arm11 S3C6410 飞凌ok-6410A 256M 内存 1G NandFlash ;



1. Ubuntu 12.04.4 安装 vmware-tools



(1) 添加国内源


源内容

#台湾源
deb http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ precise-updates universe main multiverse restricted

#网易源(速度很快)
deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted

#电子科技大学
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

#北京理工大学
deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

添加源操作

-- 源位置/etc/apt/sources.list

-- 添加源 : 使用 gedit /etc/apt/sources.list 命令, 将上面的源添加进入;

-- 更新源 : 使用 apt-get update 命令更新源信息;



(2) 安装 build-essential


安装 build-essential 包命令 : apt-get install build-essential;

-- 注意 : 一定要添加上面的源之后才能安装, 否则会报错;



(3) 安装 linux-header 包


安装流程

-- 查看 Ubuntu 版本 : uname -a 命令;

root@ubuntu:~# uname -a
Linux ubuntu 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:42:40 UTC 2014 i686 i686 i386 GNU/Linux
-- 安装 linux-headers : 安装命令 apt-get install linux-headers-3.11.0-15-generic , 这里 Ubuntu 默认已经安装好了;

root@ubuntu:~# apt-get install linux-headers-3.11.0-15-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-3.11.0-15-generic is already the newest version.
linux-headers-3.11.0-15-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 241 not upgraded.


(4) 安装 vmware-tools 


加载 vmware-tools 镜像

-- 选择菜单 : 菜单 --> 虚拟机 --> 安装 VMware-tools 选项, 之后 vmware-tools 的光盘镜像会挂在到 Ubuntu 虚拟机系统上;


-- 打开光盘 : 查看光盘中的内容, 注意 一定要使用 VMwareTools 9.6.2 的版本, 之前的 8 版本的工具安装很麻烦;


-- 安装 vmware-tools : 将光盘中的 VMwareTools-9.6.2-1688356.tar.gz 文件解压, 解压后的目录 vmware-tools-distrib, 进入该目录执行该目录下的 vmware-install.pl 文件, 使用 ./vmware-install.pl 命令, 一路回车, 即可完成安装;



(5) 设置共享目录


选择 设置 选项, 设置共享目录 : 注意, 该操作一定要在关闭 操作系统后执行;



开启虚拟机中的操作系统 : 共享目录就会出现在 Ubuntu 系统的 /mnt/hgfs/ 目录下;



拷贝源码和编译器到 Ubuntu 上将 Android 内核 框架 u-boot 源码, 编译器, 交叉编译器 拷贝到共享文件中, 此时我们就可以在 Ubuntu 中看到这些文件了;


-- Android 源码 : android2.3.4_32bit-2012-10-11.tar.gz, 这是 Android 2.3.4 的源码;

-- Bootloader 源码 : uboot1.1.6-2012-10-11.tar.gz, u-boot 源码, 用于引导 Android 操作系统;

-- Android 内核源码 : android2.3_kernel_v3.00-2014-06-12.tar.gz, Android 2.3.4 对应的内核源码;

-- x86 平台编译器 : arm-linux-gcc-4.3.2.tgz, 用于编译在 x86 平台执行的程序或库文件;

-- 交叉编译工具链 : arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2, 用于在 Linux x86 平台编译 arm 平台执行的文件或库;



2. 安装交叉编译器


(1) 查看编译器的目录结构


先在本地解压编译器查看其目录结构

-- arm-linux-gcc-4.3.2.tgz 编译器 : 位置 /usr/local/arm/4.3.2/ 目录下;

root@ubuntu:~/develop/ok6410/usr/local/arm/4.3.2/bin# ls
arm-linux-addr2line  arm-linux-gprof                   arm-none-linux-gnueabi-ar         arm-none-linux-gnueabi-ld
arm-linux-ar         arm-linux-ld                      arm-none-linux-gnueabi-as         arm-none-linux-gnueabi-nm
arm-linux-as         arm-linux-nm                      arm-none-linux-gnueabi-c++        arm-none-linux-gnueabi-objcopy
arm-linux-c++        arm-linux-objcopy                 arm-none-linux-gnueabi-c++filt    arm-none-linux-gnueabi-objdump
arm-linux-c++filt    arm-linux-objdump                 arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-ranlib
arm-linux-cpp        arm-linux-ranlib                  arm-none-linux-gnueabi-g++        arm-none-linux-gnueabi-readelf
arm-linux-g++        arm-linux-readelf                 arm-none-linux-gnueabi-gcc        arm-none-linux-gnueabi-size
arm-linux-gcc        arm-linux-size                    arm-none-linux-gnueabi-gcc-4.3.2  arm-none-linux-gnueabi-sprite
arm-linux-gcc-4.3.2  arm-linux-sprite                  arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-strings
arm-linux-gcov       arm-linux-strings                 arm-none-linux-gnueabi-gdb        arm-none-linux-gnueabi-strip
arm-linux-gdb        arm-linux-strip                   arm-none-linux-gnueabi-gdbtui
arm-linux-gdbtui     arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-gprof

-- arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 编译器 : 位置 /usr/local/arm/arm-none-linux-gnueabi/ 目录下;

root@ubuntu:~/develop/ok6410/usr/local/arm/arm-none-linux-gnueabi/bin# ls
arm-none-linux-gnueabi            arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-gdbtui   arm-none-linux-gnueabi-ranlib
arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-g++        arm-none-linux-gnueabi-gprof    arm-none-linux-gnueabi-readelf
arm-none-linux-gnueabi-ar         arm-none-linux-gnueabi-gcc        arm-none-linux-gnueabi-ld       arm-none-linux-gnueabi-size
arm-none-linux-gnueabi-as         arm-none-linux-gnueabi-gcc-4.3.2  arm-none-linux-gnueabi-nm       arm-none-linux-gnueabi-sprite
arm-none-linux-gnueabi-c++        arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-objcopy  arm-none-linux-gnueabi-strings
arm-none-linux-gnueabi-c++filt    arm-none-linux-gnueabi-gdb        arm-none-linux-gnueabi-objdump  arm-none-linux-gnueabi-strip



(2) 安装编译器


安装编译器命令 : 注意 使用 tar 命令, 解压到指定路径, 需要加上 -C 参数;

-- 安装 arm-linux-gcc-4.3.2.tgz 编译器tar -xvzf arm-linux-gcc-4.3.2.tgz -C / ;

-- 安装 arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 编译器tar -xvjf arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 -C / ;

-- 验证是否安装成功

root@ubuntu:~/develop/ok6410# ls /usr/local/arm/ -l
total 8
drwxr-xr-x 7 root    root    4096 Mar 25  2009 4.3.2
drwxr-xr-x 8 octopus octopus 4096 Feb 25  2009 arm-none-linux-gnueabi


编译器软链接 : 注意, 这里飞凌给的编译器的 arm-linux-gcc 是一个空白的链接, 这里需要建立一个软链接;

-- 查看交叉编译器的执行文件

-rwxr-xr-x 1 root root      62  3月 25  2009 arm-linux-gcc*

-- 创建软链接ln -s arm-none-linux-gnueabi-gcc arm-linux-gcc ;

lrwxrwxrwx 1 root root      26 10月 27 10:54 arm-linux-gcc -> arm-none-linux-gnueabi-gcc*



3. 安装 libncurses5-dev 库


安装 libncurses5-dev 库 : 使用 apt-get install libncurses5-dev 命令安装;

-- 作用 : 该库的作用是 在配置 内核 时使用 make menuconfig 命令使用;



4. 安装 并配置 minicom 


安装 minicom : 使用 sudo apt-get install minicom 命令, 安装 minicom 终端程序, 该程序运行的时候需要 root 权限;


配置 minicom




二. 编译 Android 系统



1. 编译 u-boot


开发板介绍 : 本人使用的开发板是 arm11 S3C6410 飞凌ok-6410A 256M 内存 1G NandFlash 嵌入式开发板;


(1) 解压文件到指定目录


解压文件 : 飞凌官方已经配置好了 u-boot 的编译环境, 并在其中指定了 交叉编译器的位置, 这里我们不修改内容;

-- 解压文件到指定目录 : 在 根目录 / 下创建 forlinx 目录, 将u-boot 源码解压到该目录中;

-- 创建目录mkdir forlinx 命令;

-- 拷贝文件cp uboot1.1.6-2012-10-11.tar.gz /forlinx/ 命令;

-- 解压文件tar -xvzf uboot1.1.6-2012-10-11.tar.gz 命令;

-- 解压后的目录

root@ubuntu:/forlinx# ls
uboot1.1.6  uboot1.1.6-2012-10-11.tar.gz


(2) 配置编译 u-boot


配置 u-boot

-- 进入 u-boot 源码目录cd uboot1.1.6;

-- 配置 u-bootmake forlinx_nand_ram256_config 命令;

root@ubuntu:/forlinx/uboot1.1.6# make forlinx_nand_ram256_config
Configuring for smdk6410 board which boot from NAND ram256 ...

编译 u-boot

-- 清理之前的编译文件 : make clean 命令;

-- 开始编译 : make 命令;

-- 编译文件 : 编译完成之后, 在 源码根目录产生了 u-boot.bin 文件;

root@ubuntu:/forlinx/uboot1.1.6# make

... ...

/usr/local/arm/4.3.2/bin/arm-linux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec
/usr/local/arm/4.3.2/bin/arm-linux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin
/usr/local/arm/4.3.2/bin/arm-linux-objdump -d u-boot > u-boot.dis
root@ubuntu:/forlinx/uboot1.1.6# ls
arm_config.mk                  config.mk  examples        lib_i386        MAINTAINERS           net              System.map
avr32_config.mk                COPYING    fs              lib_m68k        MAKEALL               nios2_config.mk  temp
blackfin_config.mk             cpu        i386_config.mk  lib_microblaze  Makefile              nios_config.mk   tools
board                          CREDITS    include         lib_mips        microblaze_config.mk  post             u-boot
CHANGELOG                      disk       lib_arm         lib_nios        mips_config.mk        ppc_config.mk    u-boot.bin
CHANGELOG-before-U-Boot-1.1.5  doc        lib_avr32       lib_nios2       mkconfig              README           u-boot.dis
Changelog_Samsung              drivers    lib_blackfin    lib_ppc         mmc.bin               rtc              u-boot.map
common                         dtt        lib_generic     m68k_config.mk  nand_spl              rules.mk         u-boot.srec


2. 编译内核


Android 内核编译

-- 拷贝内核 : 将内核拷贝到 /forlinx 目录下, 使用 cp android2.3_kernel_v3.00-2014-06-12.tar.gz /forlinx/ 命令;

-- 进入该目录cd /forlinx/ 命令;

-- 解压内核 : 使用 tar -xvzf android2.3_kernel_v3.00-2014-06-12.tar.gz 命令解压内核;

-- 配置环境变量export PATH=/usr/local/arm/arm-none-linux-gnueabi/bin:$PATH 命令, 也可以将该命令配置到配置文件中去;

-- 清理垃圾 : make clean ;

-- 编译 : make ;

-- 内核文件 android2.3_kernel/arch/arm/boot/zImage 文件;



3. 编译 Android 源码



(1) 安装编译用的库

 

安装必要的库 : 使用 

sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
命令;

root@ubuntu:/mnt/hgfs/shrewdFilesWithUbuntu# cd
root@ubuntu:~# sudo apt-get install git-core gnupg flex bison gperf build-essential > zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev > libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 > g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown > libxml2-utils xsltproc zlib1g-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libncurses5-dev is already the newest version.
zip is already the newest version.
zip set to manually installed.

... ...

Setting up openjdk-6-jre-lib (6b33-1.13.5-1ubuntu0.12.04) ...
Setting up libatk-wrapper-java-jni (0.30.4-0ubuntu2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
root@ubuntu:~# 


(2) 修改一些配置


修改代码配置 : 如果使用 Ubuntu 12.04 操作系统编译源码, 需要修改下面两个配置;

-- build/core/combo/HOST_linux-x86.mk : 将 HOST_GLOBAL_CFLAGS+=-D_FORTIFY_SOURCE=0 修改为 HOST_GLOBAL_CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 ;

-- frameworks/base/libs/utils/Android.mk : 将 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) 修改为 LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive ;



(3) 编译源码


编译源码

-- 清除编译信息make clean ;

root@octopus:/forlinx/android2.3.4_32bit# make clean
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GRJ06D
============================================
Checking build tools versions...
Entire build directory removed.
-- 编译源码./build-android ;

root@octopus:/forlinx/android2.3.4_32bit# ./build-android 
including device/htc/passion/vendorsetup.sh
including device/samsung/crespo/vendorsetup.sh
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.4
TARGET_PRODUCT=OK6410
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=GRJ06D
============================================
Checking build tools versions...

... ...

Generated: (out/target/product/OK6410/android-info.txt)
Target system fs image: out/target/product/OK6410/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: out/target/product/OK6410/system.img
Target ram disk: out/target/product/OK6410/ramdisk.img
Target userdata fs image: out/target/product/OK6410/userdata.img
Installed file list: out/target/product/OK6410/installed-files.txt


(4) 制作文件系统


制作文件系统 : 根目录下提供了制作文件系统的脚本, make-rootfs-nand2g, 执行这个脚本即可制作根文件系统;

-- 命令 : 进入 Android 源码根目录, 执行 ./make-rootfs-nand2g 命令, 之后在根目录生成 rootfs.yaffs2 就是制作的根文件系统;

-- 注意 : 一定要区分这两个脚本, make-rootfs-nand256m 用于制作 128M 内存 256 M NandFlash 的开发板的文件系统,    make-rootfs-nand2g 用于制作 256M 内存 2G NandFlash 开发板的文件系统;

root@octopus:/forlinx/android2.3.4_32bit# ls
bionic         cts          external     libcore                make-rootfs-nand2g      ndk       Readme  vendor
bootable       dalvik       frameworks   Makefile               make-rootfs-nand2g~     out       sdk
build          development  hardware     make-rootfs-nand256m   mkyaffs2image-nand256m  packages  setenv
build-android  device       jdk1.6.0_23  make-rootfs-nand256m~  mkyaffs2image-nand2g    prebuilt  system
root@octopus:/forlinx/android2.3.4_32bit# ./make-rootfs-nand256m
Generating rootfs for Android......done
Create device file......done
Install prebuilt packages......done
Install firmware for 3G ......done
Install ppp for 3G...done
Install usb_modeswitch.d for 3G...done
Install Dialup for 3G...done
Install ForlinxLED permissions fileInstall Apps  filemkyaffs2image: image building tool for YAFFS2 built Nov 24 2011
Processing directory rootfs_dir into image file rootfs.yaffs2

... ...

bject 1457, rootfs_dir/system/bin/sdcard is a file, 5 data chunks written
Object 1458, rootfs_dir/system/bin/dumpstate is a file, 17 data chunks written
Object 1459, rootfs_dir/system/bin/bootanimation is a file, 12 data chunks written
Object 1460, rootfs_dir/system/bin/Looper_test is a file, 35 data chunks written
Object 1461, rootfs_dir/system/bin/ioctl is a symlink to "toolbox"
Object 1462, rootfs_dir/system/bin/dvz is a file, 3 data chunks written
Object 1463, rootfs_dir/forlinx.rc is a file, 1 data chunks written
Operation complete.
2414 objects in 63 directories
35361 NAND pages
...done
...done
root@octopus:/forlinx/android2.3.4_32bit# ls
bionic         cts          external     libcore                make-rootfs-nand2g      ndk       Readme         setenv
bootable       dalvik       frameworks   Makefile               make-rootfs-nand2g~     out       rootfs_dir     system
build          development  hardware     make-rootfs-nand256m   mkyaffs2image-nand256m  packages  rootfs.yaffs2  vendor
build-android  device       jdk1.6.0_23  make-rootfs-nand256m~  mkyaffs2image-nand2g    prebuilt  sdk



三. 烧写 Android 系统到 ok-6410 开发板上



1. 制作一键烧写 SD 卡


(1) 格式化 U 盘 




(2) 将 mmc.bin 烧写到 sd 卡中


烧写 sd 卡 : 打开 飞凌 官方提供的 SD 卡烧写工具 SD_Writer.exe ;

-- 设置开发板类型 : 这里使用的是 ok-6410 开发板, 在 Board Model 选择 6410;

-- 选择盘符 : 点击 右上角 Scan 按钮, 就会自动将 SD 卡扫描出来;

-- SD Type : 选择 Auto 类型;

-- 设置操作系统类型 : OS Type 设置为 Linux||Android ;

-- 点击 program : 会弹出 对话框, 点击确认即可;


-- 拷贝引导 内核 文件系统到 sd 卡中 : 将 上面编译的 u-boot.bin (bootloader) , zImage (Android 内核镜像) , rootfs.yaffs2 (Android 文件系统) 拷贝到 SD 卡中;




2. 擦除 Eboot (该步骤之后回归 Ubuntu 系统操作)



(1) 擦除原因


擦除 NandFlash 必要性

-- 预装 WinCE 系统 : 开发板出厂默认烧写的是 WinCE 系统;

-- WinCE 约定 : WinCE 在烧写时将 NandFlash 前 4 个块都标记为坏块, 在烧写 Android 或者 Linux 系统的时候需要将 这 4 个坏块恢复过来;



(2) 擦除过程


Eboot 擦除 NandFlash 过程

-- 连接开发板使用 USB 转串口线连接开发板 与 电脑;

-- 运行 minicom 程序 : 使用 sudo minicom 运行 终端程序;

-- 进入 Eboot 状态 : 在开机后, 不停的按 空格键, 要在 1 秒之内按下, 否则就会错过机会, 文档上坑爹居然写 5 秒;

Initiating image launch in 2 seconds. 

Ethernet Boot Loader Configuration:

0) IP address: 0.0.0.0
1) Subnet mask: 255.255.255.0
2) DHCP: Disabled
3) Boot delay: 2 seconds
4) Reset to factory default configuration
5) Startup image: LAUNCH EXISTING
6) Program disk image into SmartMedia card: Enabled
7) Program DM9000A MAC address (00:00:00:00:00:00)
8) KITL Configuration: DISABLED
9) Format Boot Media for BinFS

A) Erase All Blocks
B) Mark Bad Block at Reserved Block 
C) Clean Boot Option: FALSE
D) Download image now
E) Erase Reserved Block 
F) Low-level format the Smart Media card
L) LAUNCH existing Boot Media image
R) Read Configuration 
S) Lcd Resolution select(480x272)
U) DOWNLOAD image now(USB)
W) Write Configuration Right Now

Enter your selection:
-- 选择 A : 在键盘中输入 "A" , 即可完成 擦除 NandFlash 工作;


Uboot 擦除 NandFlash 过程

-- 进入 Uboot 状态 : 选择 SD 卡启动, 使用上面烧写好的 SD 卡启动, 启动后 立即按 空格键, 即可进入 Uboot 状态;

U-Boot 1.1.6 (Oct  9 2012 - 13:20:58) for SMDK6410

****************************************
**    u-boot 1.1.6                    **
**    Updated for OK6410  TE6410 Board  **
**    Version (2012-09-23)          **
**    OEM: Forlinx Embedded           **
**    Web: http://www.witech.com.cn   **
****************************************

CPU:     S3C6410 @532MHz
         Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode) 
Board:   SMDK6410
DRAM:    256 MB
Flash:   0 kB
NandFlash Information:
Nandflash:ChipType= SLC  ChipName=MT29F16G08ABACAWP
No  No Calc pagesize, blocksize, erasesize,  use ids table .............
NandFlash:name=NAND 2GiB 1,8V 8-bit,id=38, pagesize=4096 ,chipsize=1024 MB,erasesize=524288 oobsize=128
NandFlash Size is 1024 MB 
SD/MMC:  SD 2.0 / Manufacturer: 0x1B,OEM: "SM/00000",REV: 1.0,S/N: -1320320343,DATE: 2008/3
         MMC/SD size: 971 MiB
         Freq = 25MHz
In:      serial
Out:     lcd
Err:     lcd
Hit any key to stop autoboot:  0 

###################### User Menu for OK6410#####################
[1] Format the nand flash
[2] Burn image from SD card
[3] Burn image from USB
[4] Reboot the u-boot
[5] Exit to command line
-----------------------------Select---------------------------------
Enter your Selection:
-- 输入 1 : 然后会提示一次 输入 y 回车即可;

Enter your Selection:1

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
         There is no reliable way to recover them.
         Use this command only for testing purposes if you
         are sure of what you are doing!

Really scrub this NAND flash? <y/N>
Erasing at 0x3ff80000 -- 100% complete.
Scanning device for bad blocks
OK


3. 向 NandFlash 中烧写 Android 系统


SD 卡启动后会自动向 NandFlash 中烧写系统 : 下面是 烧写的过程 ;

U-Boot 1.1.6 (Oct  9 2012 - 13:20:58) for SMDK6410

****************************************
**    u-boot 1.1.6                    **
**    Updated for OK6410  TE6410 Board  **
**    Version (2012-09-23)          **
**    OEM: Forlinx Embedded           **
**    Web: http://www.witech.com.cn   **
****************************************

CPU:     S3C6410 @532MHz
         Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode) 
Board:   SMDK6410
DRAM:    256 MB
Flash:   0 kB
NandFlash Information:
Nandflash:ChipType= SLC  ChipName=MT29F16G08ABACAWP
No  No Calc pagesize, blocksize, erasesize,  use ids table .............
NandFlash:name=NAND 2GiB 1,8V 8-bit,id=38, pagesize=4096 ,chipsize=1024 MB,erasesize=524288 oobsize=128
NandFlash Size is 1024 MB 
SD/MMC:  SD 2.0 / Manufacturer: 0x1B,OEM: "SM/00000",REV: 1.0,S/N: -1320320343,DATE: 2008/3
         MMC/SD size: 971 MiB
         Freq = 25MHz
In:      serial
Out:     lcd
Err:     lcd
Hit any key to stop autoboot:  0 

NAND erase: device 0 whole chip
Erasing at 0x3ff80000 -- 100% complete.
OK
reading u-boot.bin

212992 bytes read

NAND write: device 0 offset 0x0, size 0x200000
 1032192 bytes written: OK
reading zImage

4204072 bytes read

NAND write: device 0 offset 0x200000, size 0x500000

Writing data at 0x6ff000 -- 100% complete.
 5242880 bytes written: OK
reading rootfs.yaffs2

78397440 bytes read

NAND write: device 0 offset 0x700000, size 0x4ac4000

Writing data at 0x4f7f000 -- 100% complete.
 78397440 bytes written: OK


4. 启动 Android 系统


启动系统 : 关闭开发板电源, 这时可以将 SD 卡拔掉, 切换成 NandFlash 启动, 接通电源;

-- 注意 : Android 系统启动比较慢, 大概 5 ~ 10分钟, 要有耐心;

-- 启动过程 : 中间会有一次校准 屏幕的过程;

U-Boot 1.1.6 (Oct  9 2012 - 13:22:32) for SMDK6410                           

****************************************
**    u-boot 1.1.6                    **
**    Updated for OK6410  TE6410 Board  **
**    Version (2012-09-23)          **
**    OEM: Forlinx Embedded           **
**    Web: http://www.witech.com.cn   **
****************************************

CPU:     S3C6410 @532MHz
         Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz, Serial = CLKUART (SYNC Mode) 
Board:   SMDK6410
DRAM:    256 MB
Flash:   0 kB
NAND:    1024 MB 
In:      serial
Out:     serial
Err:     serial
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x200000, size 0x500000
 5242880 bytes read: OK
Boot with zImage

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36 (root@ubuntu) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #624 PREEMPT Tue Jun 3 11:45:02 CST 2014
CPU: ARMv6-compatible processor [410fb766] revision 6 (ARMv7), cr=00c5387f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: SMDK6410
Memory policy: ECC disabled, Data cache writeback
CPU S3C6410 (id 0x36410101)
S3C24XX Clocks, Copyright 2004 Simtec Electronics
camera: no parent clock specified
S3C64XX: PLL settings, A=532000000, M=532000000, E=24000000
S3C64XX: HCLK2=266000000, HCLK=133000000, PCLK=66500000
mout_apll: source is fout_apll (1), rate is 532000000
mout_epll: source is epll (1), rate is 24000000
mout_mpll: source is mpll (1), rate is 532000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
mmc_bus: source is mout_epll (0), rate is 24000000
usb-bus-host: source is clk_48m (0), rate is 48000000
uclk1: source is dout_mpll (1), rate is 66500000
spi-bus: source is mout_epll (0), rate is 24000000
spi-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
audio-bus: source is mout_epll (0), rate is 24000000
irda-bus: source is mout_epll (0), rate is 24000000
camera: no parent clock specified
s3c64xx: 10485760 bytes SDRAM reserved for fimc at 0x5f5f9000
s3c64xx: 8388608 bytes SDRAM reserved for pp at 0x5edf9000
s3c64xx: 8388608 bytes SDRAM reserved for tv at 0x5e5f9000
s3c64xx: 6291456 bytes SDRAM reserved for mfc at 0x5dff9000
s3c64xx: 4194304 bytes SDRAM reserved for jpeg at 0x5dbf9000
s3c64xx: 8388608 bytes SDRAM reserved for cmm at 0x5d3f9000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: root=/dev/mtdblock2 rootfstype=yaffs2 init=/linuxrc console=ttySAC0,115200
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB = 256MB total
Memory: 205464k/205464k available, 56680k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xff600000 - 0xffe00000   (   8 MB)
    vmalloc : 0xd0800000 - 0xe0000000   ( 248 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .init : 0xc0008000 - 0xc0033000   ( 172 kB)
      .text : 0xc0033000 - 0xc07a2000   (7612 kB)
      .data : 0xc07ce000 - 0xc0834560   ( 410 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:246
VIC @f4000000: id 0x00041192, vendor 0x41
VIC @f4010000: id 0x00041192, vendor 0x41
High resolution timer: rate = 66500000, HZ = 100
Console: colour dummy device 80x30
console [ttySAC0] enabled
Calibrating delay loop... 530.84 BogoMIPS (lpj=2654208)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
NET: Registered protocol family 16
hw perfevents: enabled with v6 PMU driver, 3 counters available
s3c64xx_dma_init: Registering DMA channels
s3c64xx_dma_init1: registering DMA 0 (d0808100)
s3c64xx_dma_init1: registering DMA 1 (d0808120)
s3c64xx_dma_init1: registering DMA 2 (d0808140)
s3c64xx_dma_init1: registering DMA 3 (d0808160)
s3c64xx_dma_init1: registering DMA 4 (d0808180)
s3c64xx_dma_init1: registering DMA 5 (d08081a0)
s3c64xx_dma_init1: registering DMA 6 (d08081c0)
s3c64xx_dma_init1: registering DMA 7 (d08081e0)
PL080: IRQ 73, at d0808000
s3c64xx_dma_init1: registering DMA 8 (d080c100)
s3c64xx_dma_init1: registering DMA 9 (d080c120)
s3c64xx_dma_init1: registering DMA 10 (d080c140)
s3c64xx_dma_init1: registering DMA 11 (d080c160)
s3c64xx_dma_init1: registering DMA 12 (d080c180)
s3c64xx_dma_init1: registering DMA 13 (d080c1a0)
s3c64xx_dma_init1: registering DMA 14 (d080c1c0)
s3c64xx_dma_init1: registering DMA 15 (d080c1e0)
PL080: IRQ 74, at d080c000
S3C6410: Initialising architecture
bio: create slab <bio-0> at 0
SCSI subsystem initialized
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:99 gpio_ensure_requested+0x50/0x19c()
autorequest GPIO-24
Modules linked in:
[<c0039d38>] (unwind_backtrace+0x0/0xf8) from [<c0053c88>] (warn_slowpath_common+0x4c/0x64)
[<c0053c88>] (warn_slowpath_common+0x4c/0x64) from [<c0053d34>] (warn_slowpath_fmt+0x30/0x40)
[<c0053d34>] (warn_slowpath_fmt+0x30/0x40) from [<c0223570>] (gpio_ensure_requested+0x50/0x19c)
[<c0223570>] (gpio_ensure_requested+0x50/0x19c) from [<c0223864>] (gpio_direction_output+0xac/0x13c)
[<c0223864>] (gpio_direction_output+0xac/0x13c) from [<c0289dec>] (s3c64xx_spi_setup+0x144/0x268)
[<c0289dec>] (s3c64xx_spi_setup+0x144/0x268) from [<c0288088>] (spi_setup+0x40/0xf0)
[<c0288088>] (spi_setup+0x40/0xf0) from [<c0288910>] (spi_add_device+0x98/0x15c)
[<c0288910>] (spi_add_device+0x98/0x15c) from [<c0288a48>] (spi_new_device+0x74/0xac)
[<c0288a48>] (spi_new_device+0x74/0xac) from [<c0288b90>] (spi_register_master+0x110/0x190)
[<c0288b90>] (spi_register_master+0x110/0x190) from [<c001fd84>] (s3c64xx_spi_probe+0x378/0x488)
[<c001fd84>] (s3c64xx_spi_probe+0x378/0x488) from [<c025924c>] (platform_drv_probe+0x18/0x1c)
[<c025924c>] (platform_drv_probe+0x18/0x1c) from [<c025806c>] (driver_probe_device+0x78/0x198)
[<c025806c>] (driver_probe_device+0x78/0x198) from [<c0258218>] (__driver_attach+0x8c/0x90)
[<c0258218>] (__driver_attach+0x8c/0x90) from [<c025782c>] (bus_for_each_dev+0x60/0x8c)
[<c025782c>] (bus_for_each_dev+0x60/0x8c) from [<c025714c>] (bus_add_driver+0x208/0x2e4)
[<c025714c>] (bus_add_driver+0x208/0x2e4) from [<c0258494>] (driver_register+0x6c/0x154)
[<c0258494>] (driver_register+0x6c/0x154) from [<c025966c>] (platform_driver_probe+0x18/0x9c)
[<c025966c>] (platform_driver_probe+0x18/0x9c) from [<c0033380>] (do_one_initcall+0x30/0x1a0)
[<c0033380>] (do_one_initcall+0x30/0x1a0) from [<c0008418>] (kernel_init+0xa8/0x160)
[<c0008418>] (kernel_init+0xa8/0x160) from [<c0034aa8>] (kernel_thread_exit+0x0/0x8)
---[ end trace da227214a82491b7 ]---
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
s3c-i2c s3c2440-i2c.0: slave address 0x10
s3c-i2c s3c2440-i2c.0: bus frequency set to 64 KHz
s3c-i2c s3c2440-i2c.0: i2c-0: S3C I2C adapter
Advanced Linux Sound Architecture Driver Version 1.0.23.
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
cfg80211: Calling CRDA to update world regulatory domain
Switching to clocksource clock_source_timer2
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
ashmem: initialized
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
msgmni has been set to 401
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
S3C_LCD clock got enabled :: 133.000 Mhz
LCD TYPE :: LTE480WV will be initialized
Window[0] - FB1: map_video_memory: clear ff600000:0007f800
            FB1: map_video_memory: dma=5cd80000 cpu=ff600000 size=0007f800
Window[0] - FB2: map_video_memory: clear ff63fc00:0003fc00
            FB2: map_video_memory: dma=5cdbfc00 cpu=ff63fc00 size=0003fc00
Console: switching to colour frame buffer device 60x34
fb0: s3cfb frame buffer device
Window[1] - FB1: map_video_memory: clear ff700000:0007f800
            FB1: map_video_memory: dma=5ce00000 cpu=ff700000 size=0007f800
Window[1] - FB2: map_video_memory: clear ff73fc00:0003fc00
            FB2: map_video_memory: dma=5ce3fc00 cpu=ff73fc00 size=0003fc00
fb1: s3cfb frame buffer device
Window[2] - FB1: map_video_memory: clear ff680000:0003fc00
            FB1: map_video_memory: dma=5ce80000 cpu=ff680000 size=0003fc00
fb2: s3cfb frame buffer device
jkq debug VIDCON0 is 353

@@@@@@@@@@@@@@@@@@@@@@@@@@
leds    initialized

@@@@@@@@@@@@@@@@@@@@@@@@@@
pwm     initialized
adc     herr
adc     initialized
seg     initialized
s3c6400-uart.0: s3c2410_serial0 at MMIO 0x7f005000 (irq = 16) is a S3C6400/10
s3c6400-uart.1: s3c2410_serial1 at MMIO 0x7f005400 (irq = 20) is a S3C6400/10
s3c6400-uart.2: s3c2410_serial2 at MMIO 0x7f005800 (irq = 24) is a S3C6400/10
s3c6400-uart.3: s3c2410_serial3 at MMIO 0x7f005c00 (irq = 28) is a S3C6400/10
pmem: 1 init
S3C NAND Driver, (c) 2008 Samsung Electronics
forlinx************Nandflash:ChipType= SLC  ChipName=MT29F8G08ABABAWP
S3C NAND Driver is using hardware ECC.
NAND device: Manufacturer ID: 0x2c, Chip ID: 0x38 (Micron NAND 2GiB 1,8V 8-bit)
Creating 4 MTD partitions on "NAND 2GiB 1,8V 8-bit":
0x000000000000-0x000000200000 : "Bootloader"
0x000000200000-0x000000700000 : "Kernel"
0x000000700000-0x00000cf00000 : "User"
0x00000cf00000-0x000040000000 : "File System"
CAN device driver interface
mcp251x spi1.0: MCP251x didn‘t enter in conf mode after reset
mcp251x spi1.0: Probe failed
mcp251x spi1.0: probe failed
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
dm9000 Ethernet Driver, V2.6.31
[dm9] dm9000_probe ndev->irq=6c 
[dm9].1 read id 0x01010101
dm9000 dm9000.0: read wrong id 0x01010101
[dm9].2 read id 0x90000a46
[dm9000 Ethernet Driver, V2.6.31]: KV= 2.6.36 !!
[dm9000 Ethernet Driver, V2.6.31]: ChipID= 0x90000a46 !!
[DM9000]dm9000 revision 0x19
eth0: dm9000a at d0832000,d0c00004 IRQ 108 MAC: 08:90:00:a0:90:90 (platform data)
rtw driver version=v3.4.4_4749.20121105 
Build at: Jun  3 2014 09:04:49
##########rtw_suspend_lock_init ###########
usbcore: registered new interface driver rtl8192cu
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
usbcore: registered new interface driver rt73usb
ohci_hcd: USB 1.1 ‘Open‘ Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 79, io mem 0x74300000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: S3C24XX OHCI
usb usb1: Manufacturer: Linux 2.6.36 ohci_hcd
usb usb1: SerialNumber: s3c24xx
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
pl2303: Prolific PL2303 USB to serial adaptor driver
s3c-hsotg s3c-hsotg: regs d0840000, irq 90
s3c-hsotg s3c-hsotg: s3c_hsotg_corereset: reset failed, GRSTCTL=80000001
s3c-hsotg s3c-hsotg: GRXFSIZ=0x00001800, GNPTXFSIZ=0x18001800
s3c-hsotg s3c-hsotg: shared fifos
s3c-hsotg s3c-hsotg: DCFG=0x00200000, DCTL=0x00000002, DIEPMSK=0000000f
s3c-hsotg s3c-hsotg: GAHBCFG=0x00000000, 0x44=0x00000000
s3c-hsotg s3c-hsotg: GRXFSIZ=0x00000800, GNPTXFSIZ=0x04000800
s3c-hsotg s3c-hsotg: DPTx[1] FSize=768, StAddr=0x00000f00
s3c-hsotg s3c-hsotg: DPTx[2] FSize=768, StAddr=0x00001200
s3c-hsotg s3c-hsotg: DPTx[3] FSize=768, StAddr=0x00001500
s3c-hsotg s3c-hsotg: DPTx[4] FSize=768, StAddr=0x00001800
s3c-hsotg s3c-hsotg: DPTx[5] FSize=768, StAddr=0x00001b00
s3c-hsotg s3c-hsotg: DPTx[6] FSize=768, StAddr=0x00001e00
s3c-hsotg s3c-hsotg: DPTx[7] FSize=768, StAddr=0x00002100
s3c-hsotg s3c-hsotg: DPTx[8] FSize=768, StAddr=0x00002400
s3c-hsotg s3c-hsotg: DPTx[9] FSize=768, StAddr=0x00002700
s3c-hsotg s3c-hsotg: DPTx[10] FSize=768, StAddr=0x00002a00
s3c-hsotg s3c-hsotg: DPTx[11] FSize=768, StAddr=0x00002d00
s3c-hsotg s3c-hsotg: DPTx[12] FSize=768, StAddr=0x00003000
s3c-hsotg s3c-hsotg: DPTx[13] FSize=768, StAddr=0x00003300
s3c-hsotg s3c-hsotg: DPTx[14] FSize=768, StAddr=0x00003600
s3c-hsotg s3c-hsotg: DPTx[15] FSize=768, StAddr=0x00003900
s3c-hsotg s3c-hsotg: ep0-in: EPCTL=0x00008000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep0-out: EPCTL=0x00008000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep1-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep1-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep2-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep2-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep3-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep3-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep4-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep4-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep5-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep5-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep6-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep6-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep7-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep7-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep8-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep8-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep9-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep9-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep10-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep10-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep11-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep11-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep12-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep12-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep13-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep13-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep14-in: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: ep14-out: EPCTL=0x00000000, SIZ=0x00000000, DMA=0x00000000
s3c-hsotg s3c-hsotg: DVBUSDIS=0x000017d7, DVBUSPULSE=000005b8
android init
android_probe pdata: c07d52a8
android_bind
android_usb gadget: android_usb ready
s3c-hsotg s3c-hsotg: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x00008000
s3c-hsotg s3c-hsotg: DCTL=0x00000002
s3c-hsotg s3c-hsotg: EP0: DIEPCTL0=0x00008000, DOEPCTL0=0x80008000
s3c-hsotg s3c-hsotg: S3C_GINTSTS_USBSusp
s3c-hsotg s3c-hsotg: s3c_hsotg_irq: USBRst
s3c-hsotg s3c-hsotg: bound driver android_usb
f_adb init
android_register_function adb
f_mass_storage init
android_register_function usb_mass_storage
android_usb gadget: invalid number of LUNs: 0
adb_bind_config
mice: PS/2 mouse device common for all mice
input: gpio-keys as /devices/platform/gpio-keys/input/input0
S3C Touchscreen driver, (c) 2008 Samsung Electronics
s3c-ts.c SCREEN_X=480 SCREEN_Y=272
Unexpected
S3C TouchScreen got loaded successfully : 12 bits
input: S3C TouchScreen as /devices/virtual/input/input1
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c-rtc s3c64xx-rtc: rtc disabled, re-enabling
using rtc device, s3c, for alarms
s3c-rtc s3c64xx-rtc: rtc core: registered s3c as rtc0
i2c /dev entries driver
lirc_dev: IR Remote Control driver registered, major 253 
IR NEC protocol handler initialized
IR RC5(x) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR LIRC bridge handler initialized
Linux video capture interface: v2.00
usbcore: registered new interface driver em28xx
em28xx driver loaded
Em28xx: Initialized (Em28xx Audio Extension) extension
cx231xx v4l2 driver loaded.
usbcore: registered new interface driver cx231xx
cx231xx: Cx231xx Audio Extension initialized
usbcore: registered new interface driver usbvision
USBVision USB Video Device Driver for Linux : 0.9.10
usbcore: registered new interface driver pvrusb2
pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
pvrusb2: Debug mask is 31 (0x1f)
SE401 usb camera driver version 0.24 registering
usbcore: registered new interface driver se401
usbcore: registered new interface driver zr364xx
zr364xx: Zoran 364xx
usbcore: registered new interface driver stkwebcam
sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.47pre49
usbcore: registered new interface driver sn9c102
pwc: Philips webcam module version 10.0.13 loaded.
pwc: Supports Philips PCA645/646, PCVC675/680/690, PCVC720[40]/730/740/750 & PCVC830/840.
pwc: Also supports the Askey VC010, various Logitech Quickcams, Samsung MPC-C10 and MPC-C30,
pwc: the Creative WebCam 5 & Pro Ex, SOTEC Afina Eye and Visionite VCS-UC300 and VCS-UM100.
usbcore: registered new interface driver Philips webcam
gspca: main v2.10.0 registered
usbcore: registered new interface driver hdpvr
usbcore: registered new interface driver ibmcam
usbcore: registered new interface driver ultracam
konicawc: v1.4:Konica Webcam driver
usbcore: registered new interface driver konicawc
usbcore: registered new interface driver vicam
usbcore: registered new interface driver s2255
[CAM]s3c_fimc_register_controller.id=0
s3c_fimc_init_global s3c_fimc.cam_clock=-1065535004
s3c-fimc: controller 0 registered successfully
[CAM]s3c_fimc_register_controller.id=1
s3c-fimc: controller 1 registered successfully
s3c-fimc: info ov965x_init
[CAM]s3c_fimc_register_camera,cam->id=0
s3c_fimc.cam_clock = c07d39e4
parent clock for camera: 266.000 MHz, divisor: 11
[CAM]RESET CAM.[CAM]Reset and init reg!1cam->client=ccc52b00
[CAM]Reset and init reg!1
[CAM]Reset and init reg!2
[CAM]s3c_fimc_init_camera[CAM]I2C_CAM_INIT.
[CAM]s3c_fimc_init_camera[CAM]s3c_fimc_init_camera[CAM]Reset and init reg!3
S3C6400 MFC Driver, (c) 2007 Samsung Electronics
->################### s3cmfc:s3c_mfc_sfr_base_virt_addr:d0856000
cym s3c_mfc_mememap: addr:5dff9000 size:1138688 
S3C6400 MFC Driver, (c) 2007 Samsung Electronics
S3C PostProcessor Driver v3.12, (c) 2009 Samsung Electronics
S3C6410 TV encoder Driver, (c) 2008 Samsung Electronics
 S3C6410 TV encoder Driver init OK. 
S3C6410 TV scaler Driver, (c) 2008 Samsung Electronics
 S3C6410 TV scaler Driver init OK. 
S3C Rotator Driver, (c) 2008 Samsung Electronics
s3c_rotator_probe called
s3c_rotator_probe success
S3C JPEG Driver, (c) 2007 Samsung Electronics
phy_addr = 78800000..mem_size = 1034
phy_addr = 5dbf9000..mem_size = 79e000
s3c-g2d: Driver loaded succesfully
s3c-g2d: Module initialized.
s3c-g3d: detected FIMG-3DSE version 1.5.0
s3c-g3d: Driver loaded succesfully
s3c-g3d: Module initialized.
S3C CMM Driver, (c) 2008 Samsung Electronics
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
Bluetooth: Virtual HCI driver ver 1.3
Bluetooth: Broadcom Blutonium firmware driver ver 1.2
usbcore: registered new interface driver bcm203x
Bluetooth: Digianswer Bluetooth USB driver ver 0.10
usbcore: registered new interface driver bpa10x
Bluetooth: BlueFRITZ! USB driver ver 1.2
usbcore: registered new interface driver bfusb
Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
Bluetooth: Atheros AR30xx firmware driver ver 1.0
usbcore: registered new interface driver ath3k
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004120, 3=80808080
enter s3c64xx_setup_sdhci1_cfg_gpio
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
logger: created 64K log ‘log_main‘
logger: created 256K log ‘log_events‘
logger: created 64K log ‘log_radio‘
logger: created 64K log ‘log_system‘
asoc: AC97 HiFi <-> s3c-ac97 mapping ok
s3c6400_setup_sdhci_cfg_card: CTRL 2=c0004120, 3=80808080
ALSA device list:
  #0: SMDK (WM9713)
TCP cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20090105 abi 8)
NET: Registered protocol family 29
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
Bluetooth: L2CAP ver 2.15
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: HIDP (Human Interface Emulation) ver 1.2
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
s3c-rtc s3c64xx-rtc: hctosys: invalid date/time
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: mounted
Freeing init memory: 172K
[dm9000 Ethernet Driver, V2.6.31]: Link-Down!!
dm9000 dm9000.0: eth0: link down
eth0: link down
*****************start calibrate*****************
 open tslib config file success, start read.... 
xres = 480, yres = 272
Took 1 samples...
Top left : X = 1648 Y =  959
Took 5 samples...
Top right : X = 1638 Y = 3095
Took 4 samples...
Bot right : X = 2497 Y = 3087
Took 4 samples...
Bot left : X = 2432 Y = 1022
Took 4 samples...
Center : X = 2078 Y = 2068
-118.192871 -0.005818 0.180906
-288.479492 0.208874 -0.002692
Calibration constants: -7745888 -381 11855 -18905792 13688 -176 65536 
 *****************end calibrate*******************
*****************start init *****************
yaffs: dev is 32505859 name is "mtdblock3" rw
yaffs: passed flags ""
init (53): /proc/1/oom_adj is deprecated, please use /proc/1/oom_score_adj instead.
enabling adb
adb_open
warning: `rild‘ uses 32-bit capabilities (legacy support in use)
/system/bin/sh: can‘t access tty; job control turned off
/ # s3c-rtc s3c64xx-rtc: rtc only supports 100 years
alarm_set_rtc: Failed to set RTC, time will be lost on reboot
binder: release proc 96, transaction 475, not freed
alarm_release: clear alarm, pending 0
request_suspend_state: wakeup (3->0) at 140825288211 (1970-01-02 00:00:30.600321338 UTC)
init: untracked pid 63 exited
init: untracked pid 67 exited
request_suspend_state: wakeup (0->0) at 162926044091 (1970-01-02 00:00:52.701077112 UTC)
binder: 206: binder_alloc_buf, no vma
binder: 147:153 transaction failed 29201, size 4-0
binder: send failed reply for transaction 1178 to 206:206
binder: release 250:250 transaction 1572 out, still active
binder: 147:275 transaction failed 29189, size 14024-0
binder: send failed reply for transaction 1572, target dead

/ # 



5. 常见错误 


中间出了点小状况, 报出下面错误

Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
s3c-rtc s3c64xx-rtc: hctosys: invalid date/time
yaffs: dev is 32505858 name is "mtdblock2" rw
yaffs: passed flags ""
VFS: Mounted root (yaffs2 filesystem) on device 31:2.
devtmpfs: error mounting -2
Freeing init memory: 172K
Failed to execute /linuxrc.  Attempting defaults...
Kernel panic - not syncing: No init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c0039d38>] (unwind_backtrace+0x0/0xf8) from [<c058a5ec>] (panic+0x60/0x1a8)
[<c058a5ec>] (panic+0x60/0x1a8) from [<c00335ac>] (init_post+0xbc/0x130)
[<c00335ac>] (init_post+0xbc/0x130) from [<c0008488>] (kernel_init+0x118/0x160)
[<c0008488>] (kernel_init+0x118/0x160) from [<c0034aa8>] (kernel_thread_exit+0x0/0x8)
-- 错误原因 : 编译 Android 源码后制作文件系统 使用的 make-rootfs-nand256m 脚本 制作成 128 M 内存 的文件系统了, 我的板子是 256 M 的, 应该使用 make-rootfs-nand2g 脚本制作文件系统;




WinCE : 



Android : 

-- 校准屏幕 : 


-- 启动后的系统 :




博客地址 http://blog.csdn.net/shulianghan/article/details/40299813 


本篇文章中用到的工具源码下载 

-- ok-6410A 附带的 Android 光盘 下载地址 : http://pan.baidu.com/share/link?shareid=3662728609&uk=2754759285 ;

-- 光盘所含内容 : Android 引导 u-boot 源码, Android 内核 源码, Android 系统源码, 交叉编译工具链;


各项操作说明 : 

-- 编译环境 : 编译源码 (u-boot, 内核, Android 系统) 是在 Ubuntu 12.04.4 LTS 操作系统上进行的;

-- 烧写环境 : 将编译的镜像烧写到 ok-6410A 开发板的操作实在 windows xp 上进行的;


博客地址 http://blog.csdn.net/shulianghan/article/details/40299813 


本篇文章中用到的工具源码下载 

-- ok-6410A 附带的 Android 光盘 下载地址 : http://pan.baidu.com/share/link?shareid=3662728609&uk=2754759285 ;

-- 光盘所含内容 : Android 引导 u-boot 源码, Android 内核 源码, Android 系统源码, 交叉编译工具链;


各项操作说明 : 

-- 编译环境 : 编译源码 (u-boot, 内核, Android 系统) 是在 Ubuntu 12.04.4 LTS 操作系统上进行的;

-- 烧写环境 : 将编译的镜像烧写到 ok-6410A 开发板的操作实在 windows xp 上进行的;

【Android 系统开发】 编译 Android 系统 u-boot 内核 源码 并烧写到 OK-6410A 开发板上