新手上路
- 积分
- 32
- 金钱
- 32
- 注册时间
- 2024-1-9
- 在线时间
- 7 小时
|
发表于 2024-3-18 16:29:41
|
显示全部楼层
我也用的petalinux 2023.2,但是ubuntu用的18.04版本,你的改一下设备树,
我的如下,可以编译通过并正常启动运行:
/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
system-user.dtsi内容如下:
/include/"system-conf.dtsi"
#include "include/dt-bindings/input/input.h"
#include "include/dt-bindings/gpio/gpio.h"
#include "include/dt-bindings/phy/phy.h"
/ {
model = "Alientek Navigator Zynq Development Board";
compatible = "xlnx,zynq-zc702", "xlnx,zynq-7000";
leds {
compatible = "gpio-leds";
gpio-led1 {
label = "led2";
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
gpio-led2 {
label = "led1";
gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
gpio-led3 {
label = "pl_led0";
gpios = <&axi_gpio_0 0 0 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
gpio-led4 {
label = "pl_led1";
gpios = <&axi_gpio_0 1 0 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
gpio-led5 {
label = "ps_led0";
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
gpio-led6 {
label = "ps_led1";
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "timer";
};
};
keys {
compatible = "gpio-keys";
autorepeat;
gpio-key1 {
label = "pl_key0";
gpios = <&gpio0 55 GPIO_ACTIVE_LOW>;
linux,code = <KEY_LEFT>;
gpio-key,wakeup;
autorepeat;
};
gpio-key2 {
label = "pl_key1";
gpios = <&gpio0 56 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RIGHT>;
gpio-key,wakeup;
autorepeat;
};
gpio-key3 {
label = "ps_key1";
gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
linux,code = <KEY_UP>;
gpio-key,wakeup;
autorepeat;
};
gpio-key4 {
label = "ps_key2";
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
linux,code = <KEY_DOWN>;
gpio-key,wakeup;
autorepeat;
};
touch-key {
label = "touch_key";
gpios = <&gpio0 57 GPIO_ACTIVE_HIGH>;
linux,code = <KEY_ENTER>;
gpio-key,wakeup;
autorepeat;
};
};
};
教程提供的很多东西,petalinux版本升级以后就不能用了,也挺着急的 |
|