UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
1,721 Views
Registered: ‎04-18-2017

Workflow from petalinux 2016.4 not working on 2017.4

Hello,

 

I managed to follow the workflow to control my custom IP with the UIO (https://forums.xilinx.com/t5/Embedded-Linux/Custom-Hardware-with-UIO/m-p/805185#M22515) with petalinux 2016.4. Now, I have 2017.4 but it does not work. What I did is:

 

First, I have the following architecture:

Screenshot from 2018-03-28 14-15-36.png

Then I do the following with petalinux:

 

petalinux-create --type project --template zynq --name twoIps
cd twoIps
petalinux-config --get-hw-description/home/user/vivado_prjt/vivado_prjt.sdk/

There I change:

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> boot image settings and set ‘image storage media’ option to ‘primary sd’

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> kernel image settings and set ‘image storage media’ option to ‘primary sd’

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> dtb image settings and set ‘image storage media’ option to ‘primary sd’

Image Packaging Configurations and set ‘Root filesystem type’ option to ‘SD card’

Add the UIO support in :

petalinux-config -c kernel

Device Drivers --->
        [M] Userspace I/O drivers--->
            <M> Userspace I/O platform driver with generic IRQ handling.
            <M> Userspace platform driver with generic irq and dynamic memory.
            <M> Xilinx AXI Performance Monitor driver (optional).

And:

petalinux-build

This generates pl.dtsi which looks like this:

/ {
	amba_pl: amba_pl {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "simple-bus";
		ranges ;
		CustomIP_0: CustomIP@43c00000 {
			compatible = "xlnx,CustomIP-1.0";
			reg = <0x43c00000 0x10000>;
			xlnx,s00-axi-addr-width = <0x4>;
			xlnx,s00-axi-data-width = <0x20>;
		};
		CustomIP_1: CustomIP@43c10000 {
			compatible = "xlnx,CustomIP-1.0";
			reg = <0x43c10000 0x10000>;
			xlnx,s00-axi-addr-width = <0x4>;
			xlnx,s00-axi-data-width = <0x20>;
		};
	};
};

And from there I change the system-conf.dtsi to look like this:

/include/ "system-conf.dtsi"
/ {
};

/ {
	model = "Zynq Zed Development Board";
	compatible = "xlnx,zynq-zed", "xlnx,zynq-7000";

	usb_phy0: phy0@e0002000 {
		compatible = "ulpi-phy";
		#phy-cells = <0>;
		reg = <0xe0002000 0x1000>;
		view-port = <0x0170>;
		drv-vbus;
	};
};

&clkc {
	ps-clk-frequency = <33333333>;
};

/ {
chosen {
    bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
    };

amba_pl: amba_pl {
		CustomIP_0: CustomIP@43c00000 {
			compatible = "generic-uio";
	    };
		CustomIP_1: CustomIP@43c10000 {
			compatible = "generic-uio";
	    };
	};
};

&usb0 {
	dr_mode = "host";
	usb-phy = <&usb_phy0>;
};

Then again:

petalinux-build
petalinux-package --boot --format BIN --fsbl ./images/linux/zynq_fsbl.elf --fpga ./images/linux/design1.bit --u-boot

The issue is now that this never boots. I cannot see anything on the terminal. When I did the same procedure with petalinux 2016.4 (and also Vivado 2016.4, now I have 2017.4) it booted and I was able to access the custom IP as shown in my other thread.

 

Has anything changed regarding the device tree? Or is it because I tested before with only one custom IP and now I have two? Should I have them in separate sections in the device tree? I put them like it is in the pl.dtsi file. I focus on the system-conf.dtsi file because if I leave it empty I can boot but of course do not have the custom IPs available.

Thanks for the help.

0 Kudos
6 Replies
Xilinx Employee
Xilinx Employee
1,711 Views
Registered: ‎08-01-2007

RE: Workflow from petalinux 2016.4 not working on 2017.4

If there not anything printed on terminal, it might not be a device tree problem.

 

FSBL, u-boot and Linux will all print to terminal. We should first decide which part of the software is not working. If there's no prints of FSBL, I suppose FSBL initialization code has some issues. Please double check Processor System settings in Vivado.

0 Kudos
Explorer
Explorer
1,700 Views
Registered: ‎04-18-2017

Re: RE: Workflow from petalinux 2016.4 not working on 2017.4

There are things being printed on the terminal as I first tested before changing anything on the system-user.dtsi so the operating system boots. It stops when I edit system-user.dtsi.
0 Kudos
Explorer
Explorer
1,668 Views
Registered: ‎04-18-2017

Re: RE: Workflow from petalinux 2016.4 not working on 2017.4

@rickys,

 

I have just tested a "clean" project with only the zynq and no IPs. First, without editing system-user.dtsi it boots. Then, I added the user IO options in the kernel and added to system-user.dtsi:

 

/include/ "system-conf.dtsi"
/ {
};

/ {
	chosen {
		bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
	};
};

And I get a kernel panic:

 

DHCP client bound to address 172.26.144.13 (15778 ms)
Hit any key to stop autoboot:  4  3  2  1  0 
Device: sdhci@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SL32G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
3764716 bytes read in 330 ms (10.9 MiB/s)
Device: sdhci@e0100000
Manufacturer ID: 3
OEM: 5344
Name: SL32G 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading system.dtb
13989 bytes read in 19 ms (718.8 KiB/s)
## Loading kernel from FIT Image at 10000000 ...
   Using 'conf@2' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@0' kernel subimage
     Description:  Linux Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000d4
     Data Size:    3749432 Bytes = 3.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   35bd5ac88136dc03b241c75de031714c9383b3f2
   Verifying Hash Integrity ... sha1+ OK
## Flattened Device Tree blob at 11800000
   Booting using the fdt blob at 0x11800000
   Loading Kernel Image ... OK
   Loading Device Tree to 07ff9000, end 07fff6a4 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0

Linux version 4.9.0-xilinx-v2017.4 (ariel@ariel-ESPRIMO-P957) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Wed Mar 28 17:17:09 CEST 2018

CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d

CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

OF: fdt:Machine model: xlnx,zynq-7000

bootconsole [earlycon0] enabled

cma: Reserved 16 MiB at 0x1f000000

Memory policy: Data cache writealloc

percpu: Embedded 14 pages/cpu @debca000 s25932 r8192 d23220 u57344

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048

Kernel command line: console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio

PID hash table entries: 2048 (order: 1, 8192 bytes)

Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)

Memory: 493036K/524288K available (6144K kernel code, 200K rwdata, 1464K rodata, 1024K init, 230K bss, 14868K reserved, 16384K cma-reserved, 0K highmem)

Virtual kernel memory layout:

    vector  : 0xffff0000 - 0xffff1000   (   4 kB)

    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)

    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)

    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

    modules : 0xbf000000 - 0xbfe00000   (  14 MB)

      .text : 0xc0008000 - 0xc0700000   (7136 kB)

      .init : 0xc0900000 - 0xc0a00000   (1024 kB)

      .data : 0xc0a00000 - 0xc0a320c0   ( 201 kB)

       .bss : 0xc0a320c0 - 0xc0a6b8d8   ( 231 kB)

Preemptible hierarchical RCU implementation.

	Build-time adjustment of leaf fanout to 32.

	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2

NR_IRQS:16 nr_irqs:16 16

efuse mapped to e0800000

slcr mapped to e0802000

L2C: platform modifies aux control register: 0x72360000 -> 0x72760000

L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000

L2C-310 erratum 769419 enabled

L2C-310 enabling early BRESP for Cortex-A9

L2C-310 full line of zeros enabled for Cortex-A9

L2C-310 ID prefetch enabled, offset 1 lines

L2C-310 dynamic clock gating enabled, standby mode enabled

L2C-310 cache controller enabled, 8 ways, 512 kB

L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001

zynq_clock_init: clkc starts at e0802100

Zynq clock init

sched_clock: 64 bits at 325MHz, resolution 3ns, wraps every 4398046511103ns

clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4af477f6aa, max_idle_ns: 440795207830 ns

Switching to timer-based delay loop, resolution 3ns

clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 551318127 ns

timer #0 at e080a000, irq=17

Console: colour dummy device 80x30

Calibrating delay loop (skipped), value calculated using timer frequency.. 650.00 BogoMIPS (lpj=3250000)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

CPU: Testing write buffer coherency: ok

CPU0: thread -1, cpu 0, socket 0, mpidr 80000000

Setting up static identity map for 0x100000 - 0x100058

CPU1: thread -1, cpu 1, socket 0, mpidr 80000001

Brought up 2 CPUs

SMP: Total of 2 processors activated (1300.00 BogoMIPS).

CPU: All CPU(s) started in SVC mode.

devtmpfs: initialized

VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4

clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

pinctrl core: initialized pinctrl subsystem

NET: Registered protocol family 16

DMA: preallocated 256 KiB pool for atomic coherent allocations

cpuidle: using governor menu

hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.

hw-breakpoint: maximum watchpoint size is 4 bytes.

zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0840000

zynq-pinctrl 700.pinctrl: zynq pinctrl initialized

e0000000.serial: ttyPS0 at MMIO 0xe0000000 (irq = 25, base_baud = 6250000) is a xuartps
���k׋��+W/�*LW�Y�X��ed
console [ttyPS0] enabled

bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled

vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=30 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e0828000
[drm] Initialized
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl128s, expected n25q512a
m25p80 spi0.0: s25fl128s (16384 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000500000 : "boot"
0x000000500000-0x000000520000 : "bootenv"
0x000000520000-0x000000fa0000 : "kernel"
0x000000fa0000-0x000001000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 27 (00:0a:35:00:1e:53)
RTL8211E Gigabit Ethernet e000b000.etherne:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at e0942000 with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20161123 t)
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
ALSA device list:
  No soundcards found.
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
mmc0: new high speed SDHC card at address aaaa
0100           16384 ram0  (driver?)
0101           16384 ram1  (driver?)
mmcblk0: mmc0:aaaa SL32G 29.7 GiB 
0102           16384 ram2  (driver?)
 mmcblk0: p1 p2
0103           16384 ram3  (driver?)
0104           16384 ram4  (driver?)
0105           16384 ram5  (driver?)
0106           16384 ram6  (driver?)
0107           16384 ram7  (driver?)
0108           16384 ram8  (driver?)
0109           16384 ram9  (driver?)
010a           16384 ram10  (driver?)
010b           16384 ram11  (driver?)
010c           16384 ram12  (driver?)
010d           16384 ram13  (driver?)
010e           16384 ram14  (driver?)
010f           16384 ram15  (driver?)
1f00            5120 mtdblock0  (driver?)
1f01             128 mtdblock1  (driver?)
1f02           10752 mtdblock2  (driver?)
1f03             384 mtdblock3  (driver?)
b300        31166976 mmcblk0  driver: mmcblk
  b301          524288 mmcblk0p1 377467b6-01
  b302        30638080 mmcblk0p2 377467b6-02
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.4 #1
Hardware name: Xilinx Zynq Platform
[<c010e244>] (unwind_backtrace) from [<c010a4a4>] (show_stack+0x10/0x14)
[<c010a4a4>] (show_stack) from [<c02dc2d0>] (dump_stack+0x80/0x9c)
[<c02dc2d0>] (dump_stack) from [<c010c9f8>] (ipi_cpu_stop+0x3c/0x70)
[<c010c9f8>] (ipi_cpu_stop) from [<c010d210>] (handle_IPI+0x64/0x84)
[<c010d210>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x78/0x94)
[<c0101420>] (gic_handle_irq) from [<c010ae8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0a01f38 to 0xc0a01f80)
1f20:                                                       00000000 00000000
1f40: 1e28e000 debcf9c0 3c08f20d 00000000 debcee40 00000000 3ba12c80 00000000
1f60: 00000000 00000000 0000000b c0a01f88 c04b22d8 c04b22fc 60000113 ffffffff
[<c010ae8c>] (__irq_svc) from [<c04b22fc>] (cpuidle_enter_state+0xe4/0x1b0)
[<c04b22fc>] (cpuidle_enter_state) from [<c014c834>] (cpu_startup_entry+0x17c/0x19c)
[<c014c834>] (cpu_startup_entry) from [<c0900bb4>] (start_kernel+0x2f8/0x358)
[<c0900bb4>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Is there anything I should add when I call petalinux-config -c kernel?

Thanks for the help.

0 Kudos
Explorer
Explorer
1,656 Views
Registered: ‎04-18-2017

Re: RE: Workflow from petalinux 2016.4 not working on 2017.4

I added the boot args in

boot options--> kernel commandline type ---> "extend bootloader kernel arguments"

And also in system-user.dtsi but that did not solve the kernel panic issue.

 

EDIT: I removed the "chosen" node in system-user.dtsi but left the boot args in petalinux's gui and it boots. Therefore, there is something wrong with the system-user.dtsi file.

 

EDIT 2: The issue is here:

 

 

VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100           16384 ram0  (driver?)
mmc0: new high speed SDHC card at address aaaa
0101           16384 ram1  (driver?)
0102           16384 ram2  (driver?)
0103           16384 ram3  (driver?)
0104           16384 ram4 mmcblk0: mmc0:aaaa SL32G 29.7 GiB
 (driver?)
0105           16384 ram5  mmcblk0: p1 p2
 (driver?)
0106           16384 ram6  (driver?)
0107           16384 ram7  (driver?)
0108           16384 ram8  (driver?)
0109           16384 ram9  (driver?)
010a           16384 ram10  (driver?)
010b           16384 ram11  (driver?)
010c           16384 ram12  (driver?)
010d           16384 ram13  (driver?)
010e           16384 ram14  (driver?)
010f           16384 ram15  (driver?)
1f00            5120 mtdblock0  (driver?)
1f01             128 mtdblock1  (driver?)
1f02           10752 mtdblock2  (driver?)
1f03             384 mtdblock3  (driver?)
b300        31166976 mmcblk0  driver: mmcblk
  b301          524288 mmcblk0p1 377467b6-01
  b302        30638080 mmcblk0p2 377467b6-02
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.9.0-xilinx-v2017.4 #1
Hardware name: Xilinx Zynq Platform
[<c010e244>] (unwind_backtrace) from [<c010a4a4>] (show_stack+0x10/0x14)
[<c010a4a4>] (show_stack) from [<c02dc2d0>] (dump_stack+0x80/0x9c)
[<c02dc2d0>] (dump_stack) from [<c010c9f8>] (ipi_cpu_stop+0x3c/0x70)
[<c010c9f8>] (ipi_cpu_stop) from [<c010d210>] (handle_IPI+0x64/0x84)
[<c010d210>] (handle_IPI) from [<c0101420>] (gic_handle_irq+0x78/0x94)
[<c0101420>] (gic_handle_irq) from [<c010ae8c>] (__irq_svc+0x6c/0xa8)
Exception stack(0xc0a01f38 to 0xc0a01f80)
1f20:                                                       00000000 00000000
1f40: 1e28e000 debcf9c0 3baac3c6 00000000 debcee40 00000000 3b418677 00000000
1f60: 00000000 00000000 0000000b c0a01f88 c04b0548 c04b056c 60000113 ffffffff
[<c010ae8c>] (__irq_svc) from [<c04b056c>] (cpuidle_enter_state+0xe4/0x1b0)
[<c04b056c>] (cpuidle_enter_state) from [<c014c834>] (cpu_startup_entry+0x17c/0x19c)
[<c014c834>] (cpu_startup_entry) from [<c0900bb4>] (start_kernel+0x2f8/0x358)
[<c0900bb4>] (start_kernel) from [<0000807c>] (0x807c)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

First I did not have anything in bootargs related to root. Then I added

bootargs = "root=/dev/mmcblk0p2 console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";

But still I got the error. How should I know which to choose from the list? If it is the rootfs that cannot be loaded and it is in the second partition of the SD card, why isn't it mmcblk0p2?

 

EDIT3: I am following UG1144 "how to configure the sd card" and it says I should copy rootfs.cpio to the rootfs partition and extract the file system. But the thing is I am using ubuntu by following this tutorial so if I do that I will have the file system generated by petalinux and not ubuntu (which I need).

0 Kudos
Highlighted
Explorer
Explorer
1,641 Views
Registered: ‎04-18-2017

Re: RE: Workflow from petalinux 2016.4 not working on 2017.4

To make things more clear. I have created a new project where I get the hw in petalinux. Then I change:

 

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> boot image settings and set ‘image storage media’ option to ‘primary sd’

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> kernel image settings and set ‘image storage media’ option to ‘primary sd’

Subsystem AUTO Hardware Settings -> Advanced bootable images storage Settings -> dtb image settings and set ‘image storage media’ option to ‘primary sd’

Image Packaging Configurations and set ‘Root filesystem type’ option to ‘SD card’

This solves the boot arg root, which I can check in components/plnx_workspace/device-tree/device-tree-generation/system-conf.dtsi that has been applied correctly root=/dev/mmcblk0p2.

 

Add the UIO support in :

petalinux-config -c kernel

Device Drivers --->
        [M] Userspace I/O drivers--->
            <M> Userspace I/O platform driver with generic IRQ handling.
            <M> Userspace platform driver with generic irq and dynamic memory.
            <M> Xilinx AXI Performance Monitor driver (optional).

 

And I also change the bootargs,

boot options--> kernel commandline type ---> "extend bootloader kernel arguments

And there I write

console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio

Besides this, I add to system-user.dtsi:

 

/ {
	amba_pl: amba_pl {
		CustomIP_0: CustomIP@43c00000 {
		compatible = "generic-uio";
		};
	};
};

 

 

If I build like this, Ubuntu boots with no issues. In fact, I can see

 

ubuntu@arm:~$ cat /proc/cmdline
console=ttyPS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio

But the device is not showing in /dev/uio0. Therefore, if I add to system-user.dtsi:

 

 

/ {
    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
    };

    amba_pl: amba_pl {
        CustomIP_0: CustomIP@43c00000 {
        compatible = "generic-uio";
        };

    };    
};

Then I get the kernel panic with error 6 which cannot mount root fs. So it is in fact the issue when adding the bootargs to system-user.dtsi.

 

0 Kudos
Explorer
Explorer
1,630 Views
Registered: ‎04-18-2017

Re: RE: Workflow from petalinux 2016.4 not working on 2017.4

I found this thread that suggests:

 

1. In system-top.dtsi do not include the uio-compatible string within the amba_pl, therefore it looks like this:

/include/ "system-conf.dtsi"
/ {
};

&CustomIP_0 {
	compatible = "generic-uio";
};

2. The bootargs is not in that file. I add it with the GUI with petalinux-config -c kernel.

 

I can see now the IP in /dev/uio0 and I can control it with a simple C code, but I don't know if this is the correct approach in spite it works....

0 Kudos