-
Re: Petalinux build failed for MiniZED
bartokon Oct 15, 2020 4:24 PM (in response to cteq.eu)1 of 1 people found this helpfulOn default project (without fpga manager) you are appending this to pl.dtsi generated by petalinux:
This is default pl.dtsi
/*
* CAUTION: This file is automatically generated by Xilinx.
* Version:
* Today is: Fri Oct 9 14:26:45 2020
*/
/ {
amba_pl: amba_pl {
#address-cells = <1>;
#size-cells = <1>;
compatible = "simple-bus";
ranges ;
axi_gpio_0: gpio@41200000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41200000 0x10000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x1>;
xlnx,all-outputs-2 = <0x1>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x1>;
xlnx,gpio2-width = <0x1>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x1>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
misc_clk_0: misc_clk_0 {
#clock-cells = <0>;
clock-frequency = <100000000>;
compatible = "fixed-clock";
};
axi_gpio_1: gpio@41210000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41210000 0x10000>;
xlnx,all-inputs = <0x1>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x1>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
axi_gpio_2: gpio@41220000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41220000 0x10000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x8>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
axi_iic_0: i2c@41600000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-iic-2.0", "xlnx,xps-iic-2.00.a";
interrupt-names = "iic2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 30 4>;
reg = <0x41600000 0x10000>;
};
axi_intc_0: interrupt-controller@41800000 {
#interrupt-cells = <2>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-intc-4.1", "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg = <0x41800000 0x10000>;
xlnx,kind-of-intr = <0xffffffff>;
xlnx,num-intr-inputs = <0x20>;
};
bluetooth_uart: serial@43c00000 {
clock-frequency = <0x2dc6c00>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,xps-uart16550-2.00.a", "ns16550a";
current-speed = <115200>;
device_type = "serial";
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 29 4>;
port-number = <1>;
reg = <0x43c00000 0x10000>;
reg-offset = <0x1000>;
reg-shift = <2>;
xlnx,external-xin-clk-hz = <0x2dc6c00>;
xlnx,external-xin-clk-hz-d = <0x30>;
xlnx,has-external-rclk = <0x0>;
xlnx,has-external-xin = <0x1>;
xlnx,is-a-16550 = <0x1>;
xlnx,s-axi-aclk-freq-hz-d = "100.0";
xlnx,sim-device = "VERSAL_AI_CORE_ES1";
xlnx,use-modem-ports = <0x1>;
xlnx,use-user-ports = <0x1>;
};
xadc_wiz_0: xadc_wiz@43c10000 {
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,xadc-wiz-3.3", "xlnx,axi-xadc-1.00.a";
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 32 4>;
reg = <0x43c10000 0x10000>;
xlnx,alarm-limit-r0 = <0xb5ed>;
xlnx,alarm-limit-r1 = <0x57e4>;
xlnx,alarm-limit-r10 = <0x5555>;
xlnx,alarm-limit-r11 = <0x5111>;
xlnx,alarm-limit-r12 = <0x9999>;
xlnx,alarm-limit-r13 = <0x91eb>;
xlnx,alarm-limit-r14 = <0x6aaa>;
xlnx,alarm-limit-r15 = <0x6666>;
xlnx,alarm-limit-r2 = <0xa147>;
xlnx,alarm-limit-r3 = <0xca33>;
xlnx,alarm-limit-r4 = <0xa93a>;
xlnx,alarm-limit-r5 = <0x52c6>;
xlnx,alarm-limit-r6 = <0x9555>;
xlnx,alarm-limit-r7 = <0xae4e>;
xlnx,alarm-limit-r8 = <0x5999>;
xlnx,alarm-limit-r9 = <0x5111>;
xlnx,configuration-r0 = <0x0>;
xlnx,configuration-r1 = <0x21a0>;
xlnx,configuration-r2 = <0x400>;
xlnx,dclk-frequency = <0x64>;
xlnx,external-mux = "none";
xlnx,external-mux-channel = "VP_VN";
xlnx,external-muxaddr-enable = <0x0>;
xlnx,fifo-depth = <0x7>;
xlnx,has-axi = <0x1>;
xlnx,has-axi4stream = <0x0>;
xlnx,has-busy = <0x1>;
xlnx,has-channel = <0x1>;
xlnx,has-convst = <0x0>;
xlnx,has-convstclk = <0x0>;
xlnx,has-dclk = <0x1>;
xlnx,has-drp = <0x0>;
xlnx,has-eoc = <0x1>;
xlnx,has-eos = <0x1>;
xlnx,has-external-mux = <0x0>;
xlnx,has-jtagbusy = <0x0>;
xlnx,has-jtaglocked = <0x0>;
xlnx,has-jtagmodified = <0x0>;
xlnx,has-ot-alarm = <0x1>;
xlnx,has-reset = <0x0>;
xlnx,has-temp-bus = <0x0>;
xlnx,has-user-temp-alarm = <0x1>;
xlnx,has-vbram-alarm = <0x0>;
xlnx,has-vccaux-alarm = <0x1>;
xlnx,has-vccddro-alarm = <0x1>;
xlnx,has-vccint-alarm = <0x1>;
xlnx,has-vccpaux-alarm = <0x1>;
xlnx,has-vccpint-alarm = <0x1>;
xlnx,has-vn = <0x1>;
xlnx,has-vp = <0x1>;
xlnx,include-intr = <0x1>;
xlnx,sampling-rate = "961538.4615384615";
xlnx,sequence-r0 = <0x4f01>;
xlnx,sequence-r1 = <0x0>;
xlnx,sequence-r2 = <0x0>;
xlnx,sequence-r3 = <0x0>;
xlnx,sequence-r4 = <0x0>;
xlnx,sequence-r5 = <0x0>;
xlnx,sequence-r6 = <0x0>;
xlnx,sequence-r7 = <0x0>;
xlnx,sim-file-name = "design";
xlnx,sim-file-rel-path = "./";
xlnx,sim-file-sel = "Default";
xlnx,vaux0 = <0x0>;
xlnx,vaux1 = <0x0>;
xlnx,vaux10 = <0x0>;
xlnx,vaux11 = <0x0>;
xlnx,vaux12 = <0x0>;
xlnx,vaux13 = <0x0>;
xlnx,vaux14 = <0x0>;
xlnx,vaux15 = <0x0>;
xlnx,vaux2 = <0x0>;
xlnx,vaux3 = <0x0>;
xlnx,vaux4 = <0x0>;
xlnx,vaux5 = <0x0>;
xlnx,vaux6 = <0x0>;
xlnx,vaux7 = <0x0>;
xlnx,vaux8 = <0x0>;
xlnx,vaux9 = <0x0>;
};
};
};
You know axi_iic0 and bluetooth_uart, are located in PL-side of ZYNQ. Now you are modifying bluetooth_uart: serial@43c00000 node adding some new data to device-tree
Now let's turn on FPGA manger and device-tree overlays.
Now pl.dtsi looks like this:
/*
* CAUTION: This file is automatically generated by Xilinx.
* Version:
* Today is: Thu Oct 15 21:16:41 2020
*/
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&fpga_full>;
overlay0: __overlay__ {
#address-cells = <1>;
#size-cells = <1>;
firmware-name = "MINIZED.bit.bin";
};
};
fragment@1 {
target = <&amba>;
overlay1: __overlay__ {
clocking0: clocking0 {
#clock-cells = <0>;
assigned-clock-rates = <100000000>;
assigned-clocks = <&clkc 15>;
clock-output-names = "fabric_clk";
clocks = <&clkc 15>;
compatible = "xlnx,fclk";
};
clocking1: clocking1 {
#clock-cells = <0>;
assigned-clock-rates = <48000000>;
assigned-clocks = <&clkc 16>;
clock-output-names = "fabric_clk";
clocks = <&clkc 16>;
compatible = "xlnx,fclk";
};
clocking2: clocking2 {
#clock-cells = <0>;
assigned-clock-rates = <160000000>;
assigned-clocks = <&clkc 17>;
clock-output-names = "fabric_clk";
clocks = <&clkc 17>;
compatible = "xlnx,fclk";
};
};
};
fragment@2 {
target = <&amba>;
overlay2: __overlay__ {
#address-cells = <1>;
#size-cells = <1>;
axi_gpio_0: gpio@41200000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41200000 0x10000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x1>;
xlnx,all-outputs-2 = <0x1>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x1>;
xlnx,gpio2-width = <0x1>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x1>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
misc_clk_0: misc_clk_0 {
#clock-cells = <0>;
clock-frequency = <100000000>;
compatible = "fixed-clock";
};
axi_gpio_1: gpio@41210000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41210000 0x10000>;
xlnx,all-inputs = <0x1>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x1>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
axi_gpio_2: gpio@41220000 {
#gpio-cells = <3>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-gpio-2.0", "xlnx,xps-gpio-1.00.a";
gpio-controller ;
reg = <0x41220000 0x10000>;
xlnx,all-inputs = <0x0>;
xlnx,all-inputs-2 = <0x0>;
xlnx,all-outputs = <0x0>;
xlnx,all-outputs-2 = <0x0>;
xlnx,dout-default = <0x00000000>;
xlnx,dout-default-2 = <0x00000000>;
xlnx,gpio-width = <0x8>;
xlnx,gpio2-width = <0x20>;
xlnx,interrupt-present = <0x0>;
xlnx,is-dual = <0x0>;
xlnx,tri-default = <0xFFFFFFFF>;
xlnx,tri-default-2 = <0xFFFFFFFF>;
};
axi_iic_0: i2c@41600000 {
#address-cells = <1>;
#size-cells = <0>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-iic-2.0", "xlnx,xps-iic-2.00.a";
interrupt-names = "iic2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 30 4>;
reg = <0x41600000 0x10000>;
};
axi_intc_0: interrupt-controller@41800000 {
#interrupt-cells = <2>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,axi-intc-4.1", "xlnx,xps-intc-1.00.a";
interrupt-controller ;
reg = <0x41800000 0x10000>;
xlnx,kind-of-intr = <0xffffffff>;
xlnx,num-intr-inputs = <0x20>;
};
bluetooth_uart: serial@43c00000 {
clock-frequency = <0x2dc6c00>;
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,xps-uart16550-2.00.a", "ns16550a";
current-speed = <115200>;
device_type = "serial";
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 29 4>;
port-number = <1>;
reg = <0x43c00000 0x10000>;
reg-offset = <0x1000>;
reg-shift = <2>;
xlnx,external-xin-clk-hz = <0x2dc6c00>;
xlnx,external-xin-clk-hz-d = <0x30>;
xlnx,has-external-rclk = <0x0>;
xlnx,has-external-xin = <0x1>;
xlnx,is-a-16550 = <0x1>;
xlnx,s-axi-aclk-freq-hz-d = "100.0";
xlnx,sim-device = "VERSAL_AI_CORE_ES1";
xlnx,use-modem-ports = <0x1>;
xlnx,use-user-ports = <0x1>;
};
xadc_wiz_0: xadc_wiz@43c10000 {
clock-names = "s_axi_aclk";
clocks = <&misc_clk_0>;
compatible = "xlnx,xadc-wiz-3.3", "xlnx,axi-xadc-1.00.a";
interrupt-names = "ip2intc_irpt";
interrupt-parent = <&intc>;
interrupts = <0 32 4>;
reg = <0x43c10000 0x10000>;
xlnx,alarm-limit-r0 = <0xb5ed>;
xlnx,alarm-limit-r1 = <0x57e4>;
xlnx,alarm-limit-r10 = <0x5555>;
xlnx,alarm-limit-r11 = <0x5111>;
xlnx,alarm-limit-r12 = <0x9999>;
xlnx,alarm-limit-r13 = <0x91eb>;
xlnx,alarm-limit-r14 = <0x6aaa>;
xlnx,alarm-limit-r15 = <0x6666>;
xlnx,alarm-limit-r2 = <0xa147>;
xlnx,alarm-limit-r3 = <0xca33>;
xlnx,alarm-limit-r4 = <0xa93a>;
xlnx,alarm-limit-r5 = <0x52c6>;
xlnx,alarm-limit-r6 = <0x9555>;
xlnx,alarm-limit-r7 = <0xae4e>;
xlnx,alarm-limit-r8 = <0x5999>;
xlnx,alarm-limit-r9 = <0x5111>;
xlnx,configuration-r0 = <0x0>;
xlnx,configuration-r1 = <0x21a0>;
xlnx,configuration-r2 = <0x400>;
xlnx,dclk-frequency = <0x64>;
xlnx,external-mux = "none";
xlnx,external-mux-channel = "VP_VN";
xlnx,external-muxaddr-enable = <0x0>;
xlnx,fifo-depth = <0x7>;
xlnx,has-axi = <0x1>;
xlnx,has-axi4stream = <0x0>;
xlnx,has-busy = <0x1>;
xlnx,has-channel = <0x1>;
xlnx,has-convst = <0x0>;
xlnx,has-convstclk = <0x0>;
xlnx,has-dclk = <0x1>;
xlnx,has-drp = <0x0>;
xlnx,has-eoc = <0x1>;
xlnx,has-eos = <0x1>;
xlnx,has-external-mux = <0x0>;
xlnx,has-jtagbusy = <0x0>;
xlnx,has-jtaglocked = <0x0>;
xlnx,has-jtagmodified = <0x0>;
xlnx,has-ot-alarm = <0x1>;
xlnx,has-reset = <0x0>;
xlnx,has-temp-bus = <0x0>;
xlnx,has-user-temp-alarm = <0x1>;
xlnx,has-vbram-alarm = <0x0>;
xlnx,has-vccaux-alarm = <0x1>;
xlnx,has-vccddro-alarm = <0x1>;
xlnx,has-vccint-alarm = <0x1>;
xlnx,has-vccpaux-alarm = <0x1>;
xlnx,has-vccpint-alarm = <0x1>;
xlnx,has-vn = <0x1>;
xlnx,has-vp = <0x1>;
xlnx,include-intr = <0x1>;
xlnx,sampling-rate = "961538.4615384615";
xlnx,sequence-r0 = <0x4f01>;
xlnx,sequence-r1 = <0x0>;
xlnx,sequence-r2 = <0x0>;
xlnx,sequence-r3 = <0x0>;
xlnx,sequence-r4 = <0x0>;
xlnx,sequence-r5 = <0x0>;
xlnx,sequence-r6 = <0x0>;
xlnx,sequence-r7 = <0x0>;
xlnx,sim-file-name = "design";
xlnx,sim-file-rel-path = "./";
xlnx,sim-file-sel = "Default";
xlnx,vaux0 = <0x0>;
xlnx,vaux1 = <0x0>;
xlnx,vaux10 = <0x0>;
xlnx,vaux11 = <0x0>;
xlnx,vaux12 = <0x0>;
xlnx,vaux13 = <0x0>;
xlnx,vaux14 = <0x0>;
xlnx,vaux15 = <0x0>;
xlnx,vaux2 = <0x0>;
xlnx,vaux3 = <0x0>;
xlnx,vaux4 = <0x0>;
xlnx,vaux5 = <0x0>;
xlnx,vaux6 = <0x0>;
xlnx,vaux7 = <0x0>;
xlnx,vaux8 = <0x0>;
xlnx,vaux9 = <0x0>;
};
};
};
};
But using the same Avnet device-tree you can't modify this new pl.dtsi with petalinux (Yet i think).
Easiest way is to take this ^ device-tree fragments modify it by hand and generate device-tree overlay that you put into already live-device-tree that exists on running Minized.
Use this as a template for PYNQ: https://www.hackster.io/bartosz-rycko/minized-2020-1-getting-started-pynq-b39925, and generate new device-tree overlay with PYNQ-PRIO Thishttps://www.hackster.io/bartosz-rycko/eclypse-z7-pynq-porting-guide-3dd24c.
in petalinux type something like this "fpga-util -o my_overlay.dtbo" This should put new overlay and probe all devices. You can face this error: https://discuss.pynq.io/t/pynq-device-tree-overlay-zmods/1861/2 so best thing is to change interrupts registers for bluetooth and iic.
Quick note, this should work but it is not tested by any means! I think this should give you some tips what to do next.
cheers
-BR