编译修改文件系统:点击打开链接
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