zynq7 linux点灯,从读手册开始让zynq板卡跑起linux(一)

编译修改文件系统:点击打开链接

Device Tree

Device tree is a process by which the Linux kernel initializes itself based on the hardware platform. Device tree allows a single kernel image to run on multiple hardware platforms. A device tree file, named *.dts, is a text file that describes the hardware platform. It is compiled into a device tree blob, *.dtb, which is loaded into memory before the Linux kernel is started. The Linux kernel then uses that device tree blob to initialize itself at runtime.

Device Tree Generator

Xilinx SDK supports the Device Tree Generator for Zynq. For Linux kernel 3.3 and later, the device tree syntax has changed for denoting interrupts. To calculate the correct value in these releases, use Table 7-3 in the Zynq-7000 AP SoC TRM to locate the correct SPI ID# for the desired peripheral. Then, subtract 32 from this value. The result is what should be entered into the device tree interrupt field.

Example: From Table 7-3, UART 1 has a value of "82" for the SPI ID#. Subtracting 32 from this yields "50." "50" is the value found in the interrupt field for the UART 1 peripheral in the device tree.

SMP

By default the kernel is configured to use both CPUs in SMP mode. The following command shows the CPU information and should indicate two CPUs, numbered 0 and 1.

By default, the kernel handles all interrupts on the 1st CPU. They can be pushed to the 2nd CPU and there are user space daemons that will do interrupt load balancing.

zynq> cat /proc/cpuinfo

Using A Single CPU

A user may cause it to use only one CPU by adding "maxcpus=1" to the kernel command line in the device tree.

Specifying A CPU

A user may cause an application to run on a specific CPU using the BusyBox utility taskset.

The following command will display the help information for the taskset command.

zynq> taskset --help

The mask field of the command specifies the CPU and is a value of 1 or 2. The following command starts the application top running on the 2nd CPU.

zynq> taskset 2 top

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值