Zybo GPIO Demo Run Embedded Linux
1.Environment
Ubuntu 12.04 x86_64
Vivado 2013.4
SDK 2013.4
2.Pre-requisites
2.1 CodeSourcery arm-gcc toolchain lite 32-bit compatible
git clone https://github.com/xupsh/CodeSourcery.git
echo “export PATH=~/CodeSourcery/bin:$PATH” >> ~/.bashrc
echo “export CROSS_COMPILE=arm-xilinx-linux-gnueabi-“ >> ~/.bashrc
arm-xilinx-linux-gnueabi-gcc –v
2.2 fsbl Download
http://pan.baidu.com/s/1jGj1yLK
LinaroDemo-> boot_image
2.3 u-boot Download
http://pan.baidu.com/s/1dD6D2pz
git clone https://github.com/Xilinx/u-boot-xlnx.git
Click Download ZIP right hand
2.4 devicetree Download
http://pan.baidu.com/s/1pJyR4pl
2.5 Kernel Download
http://pan.baidu.com/s/1pJqec35
https://github.com/Xilinx/linux-xlnx
branch->tags->Xilinx-v2013.4
2.6Randisk Download
wget http://www.wiki.xilinx.com/file/view/arm_ramdisk.image.gz/419243558/arm_ramdisk.image.gz
3.Hardware
Open vivado,Create a new project named zybo_gpio_demo,Click next。

In the device selection pannel,we choose xc7z010clg400-1 destdevice。

Add a new block design,named design_1。


Click Add Ip button in the view window,and add ZYNQ IP Core.

Double Click IP Core to configure it。

Choose Import XPS Settings,Add ZYBO_zynq_def.xml,click OK。

Download Link:
http://www.digilentinc.com/Data/Products/ZYBO/ZYBO_def.zip

Now ZYNQ has been configured and fit for zybo。

Click OK,go back to block design,click Add Ip button again,Insert GPIO IP core。

Double click GPIO core to config it:

The configuration is as follows:open Dual Channel,Set the bit width of each channel to 4bit。

Click Run Block Automation in the, and Run Connection Automation tips column, and Vivado will auto connection and configure。Click ok in all the pop-up dialogs。


Click refresh button at bottom left,the result is as follows。


In Source window, choose Sources tab,right click design_1, choose Generate Output Products…


Right click zynq_system_1,choose Create HDL Wrapper,Keep default,click OK, Vivado will generate a top file for IP subsystem。


Right click Constraints->constrs_1 and choose Add Source。

In the pop-up dialog,choose Create File…,rename it to system.xdc。

http://www.digilentinc.com/Data/Products/ZYBO/ZYBO_Master_xdc.zip
reference ZYBO_Master.xdc, add LED and SW constraints altogether 8 lines。

Finally,In Flow Navigator,expand Program and Debug,click Generate Bitstream.

When bitstream generated,Bitstream Generation successful completed dialog will be open, Choose Open Implementation Design,Click OK to finish.

In IP Integrator Item, click Open Block Design,choose zynq_system_1.bd,reopen the Block Design we built.

Choose File > Export > Export Hardware for SDK….,Export Hardware for SDK dialogue will be open,make sure Include bitstream and Launch SDK has been choosed.


4.Linux
4.1Compile u-boot
Enter u-boot source code folder and modify the boot file:
vi ./include/configs/zynq_zed.h
Modify line 39, insert code:
#define CONFIG_ZYNQ_PS_CLK_FREQ 50000000UL
Run the following command in u-boot source code folder.
make zynq_zed config
make
cp u-boot u-boot.elf
4.2Compile Kernel
Enter kernel source code folder, and run the following command.
cd linux-xlnx-xilinx-v2013.4
make ARCH=arm xilinx_zynq_defconfig
make ARCH=arm UIMAGE_LOADADDR=0x8000 uImage
cp arch/arm/boot/uImage .
4.3 Change Randisk
Run the following command and do the modify:
cp arm_ramdisk.image.gz ramdisk.image.gz
gunzip ramdisk.image.gz
mkdir file_tmp
mount ramdisk.image –o loop ./file_tmp/
Run the following command to repack to uramdisk:
sudo umount file_tmp/
gzip ramdisk.image
sudo apt-get install u-boot-tools
mkimage –A arm –T ramdisk –C gzip –d ramdisk.image.gz uramdisk.image.gz
5.References
5.1 My source references
http://pan.baidu.com/s/1bnq23UZ
5.2 Zybo Demo
http://www.digilentchina.com/product-more.asp?ClassId=1&Unid=367
5.3 Zybo Design Engineer Source
http://www.digilentinc.com/Products/Detail.cfm?Prod=ZYBO
6.Tips
6.1 If there are no mmcblk0p2 in the /dev/ folder?
You can connect the sdio(mmc) part to the arm processer in the ZYNQ IP configuration window

6.2 How to boot arm ubuntu with auto login?
solution: modify /etc/init/ttyPS0.conf, insert a line in the end,
exec /bin/login -f root < /dev/ttyPS0 > /dev/ttyPS0 2>&1
Zybo GPIO Demo Run Embedded Linux的更多相关文章
- 构建自己的embedded linux系统
[教程]使用buildroot完全自定义自己的embedded linux系统(nand)http://www.eeboard.com/bbs/thread-38377-1-1.html [教程] [ ...
- 【转载】关于Embedded Linux启动的经典问题
转载自:http://linux.chinaunix.net/techdoc/install/2009/04/13/1107608.shtml 发信人: armlinux (armlinux), 信区 ...
- How to build and run ARM Linux on QEMU from scratch
This blog shows how to run ARM Linux on QEMU! This can be used as a base for later projects using th ...
- Qt for Embedded Linux
1. Qt for Embedded Linux http://doc.qt.io/qt-5/embedded-linux.html 2. Installing Qt for Embedded Lin ...
- 虹软人脸识别——官方 Qt Demo 移植到 Linux
一.前言 最近需要在 Linux 平台下开发一个人脸识别相关的应用,用到了虹软的人脸识别 SDK.之前在 Windows 平台用过,感觉不错,SDK 里面还带了 Demo 可以快速看到效果.打开 Li ...
- postgresql9.5 run 文件linux安装后配置成开机服务
网上出现的比较多安装方法要么是源码安装,要么是yum安装,我发觉都要配置很多属性,比较麻烦,所以现在我在centos7长用 run文件来安装 http://get.enterprisedb.com/p ...
- Understanding Memory Technology Devices in Embedded Linux
转: NAND Chip Drivers NAND technology users such as USB pen drives, DOMs, Compact Flash memory, and S ...
- 记第一次使用NET CORE 2.2 完成的DEMO部署在LINUX并且上线
.NET CORE 这么久了一直没有成功打通过,今天花了点儿时间做了一个小DEMO,首次完成并且部署上线.记录一下. DEMO中只是测试了一下从MSSQL中获取数据,并且显示在页面上,涉及到了数据库连 ...
- Qt4.8.6 Embedded Linux 的编译与移植
最近买了个飞凌ok6410 的开发板,于是在其中搭建qt4.8.6运行环境.费了两三天时间,主要还是对Linux系统的生疏,在一些问题上徘徊很久,在这里做一些过程笔记.烧写ARM-Linux系统,根据 ...
随机推荐
- java项目上线过程
关于如何将Javaweb上线,部署到公网,让全世界的人都可以访问的问题.小编将作出系列化,完整的流程介绍. 1.在myeclipse中开发好项目,打包成war格式,不会的同学参考以下 http://z ...
- Oracle Database 12c Release 1下载安装(自身经历)
1.访问Oracle官网:https://www.oracle.com/index.html,下载Oracle Database 12c Release 1 (注意:File1和File2都要下载!! ...
- ubuntu下设置数据库字符集
就linux环境下出现的数据库乱码的问题,以ubuntu为例进行的总结 ubuntu环境设置的字符集utf8,windows默认字符集是GBK,Ubuntu的默认字符集为utf-8,这使 得在用tel ...
- Linux安装卸载Mysql数据库
关于mysql数据库在Linux下的应用一直以来都是我认为比较棘手的,这次通过搭建Linux学习环境顺便研究和学习Mysql数据库在Linux下安装和卸载. 1.先来看看卸载吧,如下图所示: 以上的命 ...
- iOS打包测试
iOS开发中,怎么打包为ipa格式的软件包以及怎么安装到手机终端上. (我的开发环境为Xcode6.1.1 )作为个人开发者(当然我的开发者帐号为个人开发者帐号,而不是企业开发者帐号),对于自己来说, ...
- hosts文件权限导致监听无法启动
1.所属系统:2.问题描述:3.解决4.参考???疑点:为什么修改主机名会使hosts文件权限发生改变 1.所属系统: ZHJS2#[/]uname -a HP-UX ZHJS2 B.11.31 U ...
- 18.tty驱动程序框架
tty驱动程序框架 一.TTY概念解析 在Linux系统中,终端是一类字符型设备,它包括多种类型,通常使用tty来简称各种类型的终端设备. 1.1串口终端(/dev/ttyS*) 串口终端是使用计算机 ...
- Domino----The Address Book does not contain a cross certificate capable of validating the public key.
The Address Book does not contain a cross certificate capable of validating the public key. 地址本不包含交叉 ...
- 使用git grep进行git搜索
1.git grep foo 会自动map所有包含foo的文件 2.git grep -n foo 显示行号 3.git grep --name-only foo 只显示文件名 4.git grep ...
- <HTML>菜鸟入门基础须知
将持续更新-- 一,基础常用标签and属性 既然要学习这门知识,那必须得先知道这是什么能做什么,HTML:是一种超文本标记语言,什么意思呢,我拆开看一下,超(超链接)文本(犹如TXT)标记(改变成自己 ...