最近又开始重新拿起以前做东西——试着将Linux内核移植在Virtex-II Pro的开发板上,不过用了很新的内核2.6.29和2.6.33的版本。

基本的平台信息

# Target Board:  Xilinx XUP Virtex-II Pro Development System Rev C

# Family:    virtex2p

# Device:    xc2vp30

# Package:   ff896

# Speed Grade:  -7

# Processor: ppc405_0

# Processor clock frequency: 200.00 MHz

# Bus clock frequency: 100.00 MHz

# On Chip Memory :  32 KB

# Total Off Chip Memory : 256 MB

# – DDR_SDRAM = 256 MB

图1. Base System的组成

内核版本linux-2.6-xlnx2.6.29

device Tree(dts file)

/* Device Tree Generator version: 1.3

*

* (C) Copyright 2007-2008 Xilinx, Inc.

* (C) Copyright 2007-2009 Michal Simek

*

* Michal SIMEK

*

* This program is free software; you can redistribute it and/or

* modify it under the terms of the GNU General Public License as

* published by the Free Software Foundation; either version 2 of

* the License, or (at your option) any later version.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 59 Temple Place, Suite 330, Boston,

* MA 02111-1307 USA

*

* CAUTION: This file is automatically generated by libgen.

* Version: Xilinx EDK 10.1.03 EDK_K_SP3.6

*

* XPS project directory: Linux_port_UART16550

*/

/dts-v1/;

{

#address-cells = <1>;

#size-cells = <1>;

compatible = "xlnx,virtex405", "xlnx,virtex";

model = "testing";

DDR_SDRAM: memory@0 {

device_type = "memory";

reg = < 0x0 0x10000000 >;

} ;

aliases {

ethernet0 = &Ethernet_MAC;

serial0 = &RS232_Uart_1;

} ;

chosen {

bootargs = "console=ttyS0 root=/dev/ram";

linux,stdout-path = "/plb@0/serial@83e00000";

} ;

cpus {

#address-cells = <1>;

#cpus = <0x1>;

#size-cells = <0>;

ppc405_0: cpu@0 {

clock-frequency = <200000000>;

compatible = "PowerPC,405", "ibm,ppc405";

d-cache-line-size = <0x20>;

d-cache-size = <0x4000>;

dcr-access-method = "native";

dcr-controller ;

device_type = "cpu";

i-cache-line-size = <0x20>;

i-cache-size = <0x4000>;

model = "PowerPC,405";

reg = <0>;

timebase-frequency = <200000000>;

xlnx,dcr-resync = <0x0>;

xlnx,deterministic-mult = <0x0>;

xlnx,disable-operand-forwarding = <0x1>;

xlnx,fastest-plb-clock = "DPLB0";

xlnx,generate-plb-timespecs = <0x1>;

xlnx,mmu-enable = <0x1>;

} ;

} ;

plb0: plb@0 {

#address-cells = <1>;

#size-cells = <1>;

compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus";

ranges ;

DDR_SDRAM: mpmc@84800000 {

#address-cells = <1>;

#size-cells = <1>;

compatible = "xlnx,mpmc-4.03.a";

reg = < 0x84800000 0x10000 >;

} ;

DIPSWs_4Bit: gpio@81420000 {

compatible = "xlnx,xps-gpio-1.00.a";

reg = < 0x81420000 0x10000 >;

xlnx,all-inputs = <0x1>;

xlnx,all-inputs-2 = <0x0>;

xlnx,dout-default = <0x0>;

xlnx,dout-default-2 = <0x0>;

xlnx,family = "virtex2p";

xlnx,gpio-width = <0x4>;

xlnx,interrupt-present = <0x0>;

xlnx,is-bidir = <0x1>;

xlnx,is-bidir-2 = <0x1>;

xlnx,is-dual = <0x0>;

xlnx,tri-default = <0xffffffff>;

xlnx,tri-default-2 = <0xffffffff>;

} ;

Ethernet_MAC: ethernet@81000000 {

compatible = "xlnx,xps-ethernetlite-2.00.b", "xlnx,xps-ethernetlite-1.00.a";

device_type = "network";

interrupt-parent = ;

interrupts = < 1 0 >;

local-mac-address = [ 00 0a 35 8e 08 00 ];

reg = < 0x81000000 0x10000 >;

xlnx,duplex = <0x1>;

xlnx,family = "virtex2p";

xlnx,rx-ping-pong = <0x1>;

xlnx,tx-ping-pong = <0x1>;

} ;

LEDs_4Bit: gpio@81400000 {

compatible = "xlnx,xps-gpio-1.00.a";

reg = < 0x81400000 0x10000 >;

xlnx,all-inputs = <0x0>;

xlnx,all-inputs-2 = <0x0>;

xlnx,dout-default = <0x0>;

xlnx,dout-default-2 = <0x0>;

xlnx,family = "virtex2p";

xlnx,gpio-width = <0x4>;

xlnx,interrupt-present = <0x0>;

xlnx,is-bidir = <0x0>;

xlnx,is-bidir-2 = <0x1>;

xlnx,is-dual = <0x0>;

xlnx,tri-default = <0xffffffff>;

xlnx,tri-default-2 = <0xffffffff>;

} ;

PushButtons_5Bit: gpio@81440000 {

compatible = "xlnx,xps-gpio-1.00.a";

reg = < 0x81440000 0x10000 >;

xlnx,all-inputs = <0x1>;

xlnx,all-inputs-2 = <0x0>;

xlnx,dout-default = <0x0>;

xlnx,dout-default-2 = <0x0>;

xlnx,family = "virtex2p";

xlnx,gpio-width = <0x5>;

xlnx,interrupt-present = <0x0>;

xlnx,is-bidir = <0x1>;

xlnx,is-bidir-2 = <0x1>;

xlnx,is-dual = <0x0>;

xlnx,tri-default = <0xffffffff>;

xlnx,tri-default-2 = <0xffffffff>;

} ;

RS232_Uart_1: serial@83e00000 {

clock-frequency = <100000000>;

compatible = "xlnx,xps-uart16550-2.00.b", "xlnx,xps-uart16550-2.00.a", "ns16550";

current-speed = <9600>;

device_type = "serial";

interrupt-parent = ;

interrupts = < 2 2 >;

reg = < 0x83e00000 0x10000 >;

reg-offset = <0x1003>;

reg-shift = <2>;

xlnx,family = "virtex2p";

xlnx,has-external-rclk = <0x0>;

xlnx,has-external-xin = <0x0>;

xlnx,is-a-16550 = <0x1>;

} ;

SysACE_CompactFlash: sysace@83600000 {

compatible = "xlnx,xps-sysace-1.00.a";

interrupt-parent = ;

interrupts = < 0 2 >;

reg = < 0x83600000 0x10000 >;

xlnx,family = "virtex2p";

xlnx,mem-width = <0x10>;

} ;

xps_bram_if_cntlr_1: xps-bram-if-cntlr@ffff8000 {

compatible = "xlnx,xps-bram-if-cntlr-1.00.a";

reg = < 0xffff8000 0x8000 >;

xlnx,family = "virtex2p";

} ;

xps_intc_0: interrupt-controller@81800000 {

#interrupt-cells = <0x2>;

compatible = "xlnx,xps-intc-1.00.a";

interrupt-controller ;

reg = < 0x81800000 0x10000 >;

xlnx,kind-of-intr = <0x2>;

xlnx,num-intr-inputs = <0x3>;

} ;

} ;

ppc405_0_dplb1: plb@1 {

#address-cells = <1>;

#size-cells = <1>;

compatible = "xlnx,plb-v46-1.03.a", "xlnx,plb-v46-1.00.a", "simple-bus";

ranges ;

} ;

;

硬件系统的的配置和Linux内核的配置基本是是按照参考4做的。

Linux内核启动

通过编译好的内核文件simpleImage.initrd.virtex405-yao.elf文件通过XMD工具下载到板子上进行测试.

XMD%dow simpleImage.initrd.virtex-yao.elf

在串口终端显示如下内容:

zImage starting: loaded at 0x00400000 (sp: 0x00857fb0)

Allocating 0x345810 bytes for kernel ...

gunzipping (0x00000000

Attached initrd image at 0x00591000-0x008560b7

initrd head: 0x1f8b0808

Linux/PowerPC load: console=ttyS0 ip=on root=/dev/ram

Finalizing device tree... flat tree at 0x864300

后来通过修改arch/powerpc/boot/main.c来打印出一些调试信息,确定程序停止在第210行,运行kentry函数,见图2。

图2. arch/powerpc/boot/main.c 部分代码

Ref

1. Linux Operating System Software Debugging Techniques with Xilinx Embedded Development Platforms

2. Debugging Kernel Boot Problems  from Xilinx Open Source Wiki

3."Finalizing device tree… flat tree at 0x5a4300" —- Linux booting problem on custom board. (virtex4fx140)

from Xilinx Forums

4. Tutorials for Running Linux on Xilinx FPGAs

5.Linux kernel git from Xilinx and device trees

linux运行reggen文件,Linux启动问题——记Virtex-II Pro(PPC405)Linux内核移植相关推荐

  1. linux启动sh文件命令,Linux 运行 .sh 文件的两种方法

    Linux 运行 .sh 文件的两种方法 文章作者:网友投稿 发布时间:2010-06-15 13:31:16 来源:网络 一个中等水平的Linux用户一定少不了经常执行.sh文件,当然了,你可以在图 ...

  2. Linux运行python文件出现以下错误:terminate called after throwing an instance of ‘std::runtime_error‘

    Linux运行python文件出现以下错误:terminate called after throwing an instance of 'std::runtime_error'

  3. linux运行o文件是什么,Linux的.a、.so和.o文件

    在说明Linux的.a..so和.o文件关系之前,先来看看windows下obj,lib,dll,exe的关系 windows下obj,lib,dll,exe的关系 lib是和dll对应的.lib是静 ...

  4. linux 运行go文件路径,go程序部署到linux上运行-Go语言中文社区

    go 语言版本:go1.9.2 开发环境:win10 部署环境:ubuntu 14.04.6 一.win10上的操作 1.在src目录下依次执行set CGO_ENABLED=0.set GOOS=l ...

  5. linux 运行msi文件是什么意思,查看Msi文件内容

    Baseadapter与Simpleadapter之争 作者:andyrat,联系方式:andyrat@qq.com c#字符串操作方法实例 # 字符串是使用 string 关键字声明的一个字符数组. ...

  6. Linux运行SQL文件

    Linux系统运行SQL文件 1.现在/opt目录下有一个uc_menu.sql文件,需要将其数据备份到数据库中,应进行如下操作 2.步骤如下: (1)首写进入进入mysql: (2)输入mysql密 ...

  7. linux运行php文件

    步骤一.安装php 先检查是否安装php:find / -name php.ini,如果显示下面信息那么系统已经安装php,直接跳过本步骤. 如果没有安装,那么就进行下面操作: linux安装php详 ...

  8. linux运行run文件显示cannot execute binary file

    感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正! 如果转载,请保留作者信息. 博客地址:http://blog.csdn.net/qq_21398167原博文地址 ...

  9. linux 没有那个文件或目录_基于CentOS8Linux运维教程-Linux文件目录管理笔记

    Linux文件目录结构及用途 文件目录增删改查 vim编辑器使用技巧 准备工作: 虚拟机 root登录系统 打开终端 操作技巧 方向键 上下键可以查看历史的命令 tab键 自动补齐命令及参数 取消命令 ...

最新文章

  1. vim学习笔记(一)
  2. 8个开发必备的PHP功能
  3. cordova常用命令
  4. 104_鼠标事件对象
  5. Scrapy-css选择器
  6. 2021算法竞赛入门班第一节课【枚举、贪心】习题
  7. Servlet和JSP规范及版本对应关系
  8. php助手函数自定义,Laravel 添加自定义助手函数
  9. WebSocket剖析
  10. Python import容易犯的一个错误
  11. 大结局:GitHub正式归于微软旗下,新CEO下周一上任“三把火”
  12. 图的应用之--图的连通
  13. 二项分布期望和方差公式推导
  14. 魔板(最小步数模型)
  15. 新西兰计算机科学硕士哪所大学最好,2020年新西兰哪些大学计算机科学专业比较好及其优势介绍...
  16. 7个步骤!3分钟!轻松绘制简单好看的折线图!
  17. 塔夫斯大学计算机教授,塔夫茨大学开发出一系列3D打印半球形超材料 具有独特微波或光学特性...
  18. 2022新版域名防红系统源码
  19. 收集整理威尔逊定理的证明
  20. 功放板加开关音量_一种带音量开关功能的音响功放板的制作方法

热门文章

  1. PostgreSQL获取uuid
  2. javascript中的面向对象理解(一)
  3. MySQL自学笔记——存储过程
  4. Explain信息中Extra字段解释
  5. spring-security验证登录https变成http导致登录跳转失败
  6. 弘辽科技:拼多多开直通车大忌有哪些?推广多少钱?
  7. 探究XServer中的字体系统:如何设置字体和字体缩放
  8. uboot makefile分析之 make xx_config
  9. Google 浏览器Chrome安全性能引发魔道之争
  10. Visio制作的图像转换为eps教程