码迷,mamicode.com
首页 > 其他好文 > 详细

Learn ZYNQ (3)

时间:2014-05-30 23:08:44      阅读:542      评论:0      收藏:0      [点我收藏+]

标签:des   android   c   style   java   http   

移植android3.3到ZedBoard

follow doc:Android移植Guide1.3.pdf

follow website:

sudo apt-get install git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386  libgl1-mesa-dev g++-multilib mingw32 tofro-dos  python-markdown libxml2-utils xsltproc zlib1g-dev:i386 uboot-mkimage gparted screen

从以下网址下载dk-6u45-linux-i586.bin

http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html

进入编译目录

chmod u+x jdk-6u45-linux-i586.bin

./jdk-6u45-linux-i586.bin

mkdir -p /usr/lib/jvm

mv jdk1.6.0_45 /usr/lib/jvm/

update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_45/bin/java" 1

update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_45/bin/javac" 1

update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_45/bin/javaws" 1

update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/usr/lib/jvm/jdk1.6.0_45/jre/lib/i386/libnpjp2.so" 1

update-alternatives --config java

update-alternatives --config javac

update-alternatives --config javaws

update-alternatives --config mozilla-javaplugin.so

下载Linux 源

git clone https://github.com/Digilent/linux-digilent.git

下载Android Kernel

git clone https://android.googlesource.com/kernel/common -b android-3.3

在疆目录下建立bin目录并将其添加到path环境变量,并下载REPO脚本

mkdir ~/bin

export PATH=~/bin:$PATH

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

给repo加权限

chmod a+x ~/bin/repo

cd YourWorkspace

新建repo疆目录,repo将安装在此目录下,然后安装最新的repo

repo init -u https://android.googlesource.com/platform/manifest

repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1

repo sync

准备BOOT.BIN(FSBL,SSBL,)

下载wget http://www.digilentinc.com/Data/Products/ZedBoard/ZedBoard_Linux_Design.zip

解压后在sd_image目录下可以发现sd卡boot分区需要装载的所有文件

VGA(HDMI)

[Hardware Design Source folder]:/root/android_for_zed/ZedBoard_Linux_Design/

[Xillinux sources folder] : /root/android_for_zed/xillinux-eval-zedboard-1.2/

下载http://www.xillybus.com/downloads/xillinux-eval-zedboard-1.2.zip

cd ~/android_for_zed/

cp -r xillinux-eval-zedboard-1.2/system/pcores/xillyvga_v1_00_a/ ZedBoard_Linux_Design/hw/xps_proj/pcores/

cd ~/android_for_zed/ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a

mkdir netlist

安装ISE14.4

用ISE打开~/android_for_zed/xillinux-eval-zedboard-1.2/runonce

regenerate core

完成后:

cd ~/android_for_zed/

cp xillinux-eval-zedboard-1.2/runonce/vga_fifo.v ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/hdl/verilog/

cp xillinux-eval-zedboard-1.2/runonce/vga_fifo.ngc ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/netlist/

cp xillinux-eval-zedboard-1.2/cores/xillyvga_core.ngc ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/netlist/

cd ~/android_for_zed/ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/data

vi xillyvga_v2_1_0.pao

加入一行lib xillyvga_v1_00_a vga_fifo verilog

cd ~/android_for_zed/ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/hdl/verilog

vi xillyvga.v

最后加入一段

FDCE vga_iob_ff[13:0] (

        .Q({vga_red, vga_green, vga_blue, vga_hsync, vga_vsync}),

        .D({vga_red_app[7:4], vga_green_app[7:4], vga_blue_app[7:4], vga_hsync_app, vga_vsync_app}),

        .C(vga_clk_app),

        .CE(1‘b1),

        .CLR(1‘b0)

);

在第69行修改

output [3:0] vga_blue,

  output [3:0] vga_green,

  output  vga_hsync,

  output [3:0] vga_red,

cd ~/android_for_zed/ZedBoard_Linux_Design/hw/xps_proj/pcores/xillyvga_v1_00_a/data/

vi xillyvga_v2_1_0.bbd

加入以下3行:

Files

#####

vga_fifo.ngc,xillyvga_core.ngc

vi xillyvga_v2_1_0.mpd

第90行那里,改三行:

PORT vga_red = "", DIR = O, VEC = [3:0]

PORT vga_green = "", DIR = O, VEC = [3:0]

PORT vga_blue = "", DIR = O, VEC = [3:0]

第7行后插入两行:

OPTION STYLE = MIX

OPTION RUN_NGCBUILDF = TRUE

用ISE的XPS打开~/android_for_zed/ZedBoard_Linux_Design/hw/xps_proj/system.xps如下图

点击BUS INTERFACE的TAB页

删除axi_hdmi_tx_16_b0, axi_iic_hdmi, axi_vdma_0共三项

打开system.mhs,修改152行去掉hdmi_int,

点IP Catalog ->Project local PCores ->User -> XILLYVGA

将VGA通过INTERCONNECT3链接到ZYNC,其他接线如图所示

点Ports->Xillvga_0,将如图所示几个端口MakeExernel

OK,Generate bitstream.

4 Prepare the kernel for Android

git log --pretty=oneline --format="%Cgreen%h %Creset%s" --grep="Linux 3.3." -n 20

显示20行:

7a84477 mtd: fix oops in dataflash driver

e2aa417 Merge tag ‘v3.3-rc7‘ into gpio/next

fde7d90 Linux 3.3-rc7

192cfd5 Linux 3.3-rc6

d5a74af Merge tag ‘iommu-fixes-v3.3-rc5‘ of git://git.kernel.org/pub/scm/linux/k

e0e5ce5 Merge branch ‘imx/dt‘ of git://git.linaro.org/people/shawnguo/linux-2.6

a0008bf Merge branch ‘lpc32xx/fixes-non-critical‘ of git://git.antcom.de/linux-2

f2273ec Merge branch ‘lpc32xx/fixes‘ of git://git.antcom.de/linux-2.6 into fixes

a173fc6 Merge branch ‘kirkwood/board‘ into next/boards

6b21d18 Linux 3.3-rc5

2daa79e Merge branch ‘lpc32xx/drivers‘ into next/drivers

fa2c8f4 Merge tag ‘v3.3-rc4‘ into for-3.4 in order to resolve the conflict resol

b01543d Linux 3.3-rc4

ffafe77 Merge branch ‘v3.3-samsung-fixes-3‘ of git://git.kernel.org/pub/scm/linu

082f53c Merge branch ‘for-arm-soc‘ of git://sources.calxeda.com/kernel/linux int

a08a499 Merge tag ‘v3.3-rc3‘ as we‘ve got several bugfixes in there which are co

d65b4e9 Linux 3.3-rc3

290436c Merge tag ‘v3.3-rc2‘ into perf/core

177f72f Merge tag ‘v3.3-rc2‘ into for-3.4

62aa2b5 Linux 3.3-rc2

以上源都含有Linux3.3.的字符

需要将patch放到Linux Kernel 顶层

git diff 192cfd5 HEAD > 3.3-rc6-to-Android.patch

有意个文件3.3-rc6-to-Android.patch出现在当前Linux根目录中了。

git apply --ignore-whitespace --ignore-space-change --check 3.3-rc6-to-Android.patch

weiwandaisxu

Learn ZYNQ (3),布布扣,bubuko.com

Learn ZYNQ (3)

标签:des   android   c   style   java   http   

原文地址:http://www.cnblogs.com/shenerguang/p/3760017.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!