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: 
Observer easmith5
Observer
1,478 Views
Registered: ‎07-16-2018

Installing DNNDK on Custom OS

Is it possible to install DNNDK using a custom OS image on the ZCU102, rather than the one downloaded from the boards website? It seems like it should be possible as my custom OS is aarch64, however when fiddling with the install.sh file, I get an error when trying to insert the dpu.ko kernel module. It also complains about a board type mismatch, but the board is the ZCU102, the OS is of course different. I used yocto and openembedded, as well as custom recipes on top of that for the OS. 

Exact error is below, is there any way to fiddle with the kernel modules/install file to install the DNNDK on a custom OS for the ZCU102?

root@zcu102:~/ZCU102# sh install.sh
Begin to install DeePhi DNNDK ...
Board type mismatch.
Install DeePhi DPU Driver ...
modprobe: ERROR: could not insert 'dpu': Exec format error
Installation failed!

0 Kudos
26 Replies
Explorer
Explorer
1,427 Views
Registered: ‎10-21-2015

Re: Installing DNNDK on Custom OS

Hi

Check whether your hostname  is zcu102 using uname -n

Figure out kernel version of dpu.ko using  modinfo dpu.ko like this

$ modinfo dpu.ko 
filename:       /media/hokim/data/DNNDK/pkgs/driver/dpu.ko
author:         DEEPHI
license:        GPL
depends:        
name:           dpu
vermagic:       4.14.0-xilinx-v2018.2 SMP mod_unload aarch64
parm:           signature_addr:ulong
parm:           extension:ulong
parm:           cache:int
parm:           timeout:int
parm:           mode:charp
parm:           profiler:int
parm:           debuglevel:uint
parm:           version:charp
parm:           coremask:uint
parm:           accipmask:uint

Your kernel version should be the same as that of dpu.ko

0 Kudos
Observer easmith5
Observer
1,417 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

Hi - 

I would like to use DNNDK on a custom OS, so as such I believe I will need to recompile the dpu module with my kernel, is the source code available somewhere to do this? Or can I do it from within the SDSoc? 

Thanks

0 Kudos
Xilinx Employee
Xilinx Employee
1,303 Views
Registered: ‎02-18-2013

Re: Installing DNNDK on Custom OS

We have plan to provide DPU driver source code to customers for system integration with DPU.

0 Kudos
Observer easmith5
Observer
1,276 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

That's great! Do you know what the timescale for that is? 

0 Kudos
Adventurer
Adventurer
1,257 Views
Registered: ‎01-20-2019

Re: Installing DNNDK on Custom OS

Dear @aluo please let us know one's source code is available publicly, or there is any other way to get the same kernel verion 4.14.0+ I am getting below mentioned error:-

 

@hokim please can you share me your dpu.ko file,  because know we have same kernel version release which you are showing in screen-shoot.

xilinx.png
dpu-info.png
0 Kudos
Explorer
Explorer
1,242 Views
Registered: ‎10-21-2015

Re: Installing DNNDK on Custom OS

Hi, @deepg799

You can change vermgic with https://github.com/puffydaemon/vermagic

 I changed dpu.ko of 4.14.0-xilinx-v2018.2 to 4.14.0-xilinx-v2018.3 and it works well

0 Kudos
Adventurer
Adventurer
1,229 Views
Registered: ‎01-20-2019

Re: Installing DNNDK on Custom OS

ok which os you are using ? petalinux or debian 9.6

0 Kudos
Observer easmith5
Observer
1,215 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

I am using an OS through Yocto, which is similar to one from petalinux. 

0 Kudos
Explorer
Explorer
1,176 Views
Registered: ‎10-21-2015

Re: Installing DNNDK on Custom OS

Hi, @deepg799

I'm using petalinux2018.3

0 Kudos
Xilinx Employee
Xilinx Employee
1,160 Views
Registered: ‎02-18-2013

Re: Installing DNNDK on Custom OS

@deepg799 @easmith5 Plan to provide it by end of Feb or Early Mar. 

0 Kudos
Adventurer
Adventurer
1,130 Views
Registered: ‎01-20-2019

Re: Installing DNNDK on Custom OS

@hokimthanx for the solution now I did the installation of dpu driver on custom os and I also compile and generate the hybrid executable file using make command but the problem is while the time of application running, it is throwing a below-mentioned error any idea about it?

root@zynqmp-iwg30m:/run/media/mmcblk1p1/ZU7/samples/miniVgg# ./miniVgg 1

DNNDK] Allocate DPU memory space in size of [16384 B]
[DNNDK] Failure of DPU memory space used out.

 

thanx in advance

0 Kudos
Adventurer
Adventurer
1,115 Views
Registered: ‎01-20-2019

Re: Installing DNNDK on Custom OS

Can anybody help me to sort out this error

0 Kudos
Observer easmith5
Observer
833 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

@aluo  Hi! Any word on this? Has the source been released? I'd really like to compile it with an exisiting OS I have set up for the Zynq+ SoC. 

0 Kudos
Xilinx Employee
Xilinx Employee
825 Views
Registered: ‎02-18-2013

Re: Installing DNNDK on Custom OS

0 Kudos
Xilinx Employee
Xilinx Employee
811 Views
Registered: ‎01-21-2014

Re: Installing DNNDK on Custom OS

You can also reference the following tutorial that ports the TRD to the Ultra96 and provides more detailed info on the flow: 

https://github.com/Xilinx/Edge-AI-Platform-Tutorials/tree/master/docs/DPU-Integration

0 Kudos
Observer easmith5
Observer
788 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

@aluo  thank you! This looks a little difference than I was expecting... it seems to be a vivado project rather than source code for building the DPU kernel module. Did the method for implementing DPU change? 

0 Kudos
Xilinx Employee
Xilinx Employee
785 Views
Registered: ‎01-21-2014

Re: Installing DNNDK on Custom OS

The sources for the kernel module are included in the Petalinux BSP delivered with the TRD, and they're also in the repository associated with the DPU Integration Tutorial. 

Terry

 

0 Kudos
Observer easmith5
Observer
763 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

Hi @terryo yes, thank you. It looks like those can also be used as yocto recipes which is what I need. Do you know what versions of yocto the recipes are compatible with? (eg: rocko, sumo, etc?)

0 Kudos
Xilinx Employee
Xilinx Employee
760 Views
Registered: ‎01-21-2014

Re: Installing DNNDK on Custom OS

Petalinux 2018.x is based on rocko. You can find the Yocto version for any Petalinux version at the following wiki page: 

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841883/Yocto

 

Regards, 

Terry

0 Kudos
Observer easmith5
Observer
755 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

@terryo One other question - Is there a possibility of writing this as a Yocto layer? That would make it really convenient to include in the project. I'm not totally sure how to incorporate it in a way that would update with the git repository, otherwise. 

0 Kudos
Observer easmith5
Observer
673 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

Hi @aluo, is the link you gave me good for an ES (engineering silicon) ZCU102? Just wanted to double check. 

To both you and @terryo  I've managed to build my OS with the recipes included in the yocto build. My next questions is this: Do I need to import the .hdf file into the build as well? Normal I would take the files from the Yocto build (fsbl, uboot, etc) and then whatever bitstream I want and build a BOOT.BIN in the xilinx SDK. Can I do this here as well with the bitstream file in the code you linked? Or do I need to build the yocto image using the .hdf file from the code you linked. I'm a little bit unclear on exactly how to incorporate that part of things. Thanks!

0 Kudos
Xilinx Employee
Xilinx Employee
666 Views
Registered: ‎01-21-2014

Re: Installing DNNDK on Custom OS

The .hdf includes the bitstream and other metdadata that allows Petalinux/Yocto and Vivado to stay in sync. I believe even with a custom yocto flow there is a reciepe that depends on it. Are you not seeing that?

 

Terry

 

0 Kudos
Xilinx Employee
Xilinx Employee
664 Views
Registered: ‎02-18-2013

Re: Installing DNNDK on Custom OS

@easmith5  please use ZCU102 with production silicon.

0 Kudos
Observer easmith5
Observer
652 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

Hi @aluo the board I have is engineering silicon. Does Xilinx not produce code for that board anymore? I can see if I can get my hands on a production silicon board. 

@terryo in the past we haven't used a recipe that depends on the .hdf file in the custom yocto flow. We just used the BSP from the meta-xilinx-bsp layer with the machine defintion. In my attemps to figure this out, it looks like meta-xilinx-tools has a recipe that depends on the hdf. Perhaps I'll try to add that layer and see if it works. 

0 Kudos
Observer easmith5
Observer
550 Views
Registered: ‎07-16-2018

Re: Installing DNNDK on Custom OS

Hi @terryo . I've managed to integrate the recipes into our custom yocto flow - so I have the dpu.ko module working and inserted (ie shows up in the list given by lsmod). Now I'm trying to get the rest working. The code for the ZCU102 has a prebuilt BOOT.BIN, but I think it was made with 2018.2. Previously I was using a 2017 version to make the BOOT.BIN. If I just throw the prebuilt 2018.2 BOOT.BIN in, the board boot hangs at the line: bootconsole [cdns0] disabled. I'll include the rest of the boot output below. Is this due to a mismatch in kernel/boot loader/device tree versions? Should I try and update my yocto flow from rocko to sumo or thud? Thanks! 

Emily

Xilinx Zynq MP First Stage Boot Loader
Release 2018.2   Feb 27 2019  -  18:25:53
NOTICE:  ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000
NOTICE:  BL31: Secure code at 0x0
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v1.4(release):xilinx-v2018.1-4-g93a69a5a
NOTICE:  BL31: Built : 10:19:04, Feb 27 2019
PMUFW:  v1.0
 
 
U-Boot 2018.01 (Feb 27 2019 - 18:23:44 +0800) Xilinx ZynqMP ZCU102 rev1.0
 
I2C:   ready
DRAM:  4 GiB
EL Level:       EL2
Chip ID:        zu9eg
MMC:   sdhci@ff170000: 0 (SD)
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
*** Warning - bad CRC, using default environment
 
In:    serial@ff000000
Out:   serial@ff000000
Err:   serial@ff000000
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Bootmode: LVL_SHFT_SD_MODE1
Net:   ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
 
Warning: ethernet@ff0e0000 (eth0) using random MAC address - e6:d9:62:e4:de:2e
eth0: ethernet@ff0e0000
Hit any key to stop autoboot:  0
reading uEnv.txt
482 bytes read in 10 ms (46.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
reading Image
15016448 bytes read in 977 ms (14.7 MiB/s)
reading Image-zynqmp-zcu102-rev1.0.dtb
37381 bytes read in 19 ms (1.9 MiB/s)
## Flattened Device Tree blob at 04000000
   Booting using the fdt blob at 0x4000000
   Loading Device Tree to 000000007dd82000, end 000000007dd8e204 ... OK
 
Starting kernel ...
 
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.0+ (oe-user@oe-host) (gcc version 7.3.0 (GCC) ) #1 SMP Fri May 10 05:20:26 UTC 2019
[    0.000000] Boot CPU: AArch64 Processor [410fd034]
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8')
[    0.000000] bootconsole [cdns0] enabled
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 256 MiB at 0x000000006dc00000
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] percpu: Embedded 22 pages/cpu @ffffffc87ff61000 s51608 r8192 d30312 u90112
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 1033987
[    0.000000] Kernel command line: earlycon clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.000000] software IO TLB [mem 0x69c00000-0x6dc00000] (64MB) mapped at [ffffffc069c00000-ffffffc06dbfffff]
[    0.000000] Memory: 3785908K/4193280K available (9852K kernel code, 1096K rwdata, 2996K rodata, 640K init, 398K bss, 145228K reserved, 262144K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     modules : 0xffffff8000000000 - 0xffffff8008000000   (   128 MB)
[    0.000000]     vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000   (   250 GB)
[    0.000000]       .text : 0xffffff8008080000 - 0xffffff8008a20000   (  9856 KB)
[    0.000000]     .rodata : 0xffffff8008a20000 - 0xffffff8008d20000   (  3072 KB)
[    0.000000]       .init : 0xffffff8008d20000 - 0xffffff8008dc0000   (   640 KB)
[    0.000000]       .data : 0xffffff8008dc0000 - 0xffffff8008ed2200   (  1097 KB)
[    0.000000]        .bss : 0xffffff8008ed2200 - 0xffffff8008f35bcc   (   399 KB)
[    0.000000]     fixed   : 0xffffffbefe7fd000 - 0xffffffbefec00000   (  4108 KB)
[    0.000000]     PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000   (    16 MB)
[    0.000000]     vmemmap : 0xffffffbf00000000 - 0xffffffc000000000   (     4 GB maximum)
[    0.000000]               0xffffffbf00000000 - 0xffffffbf1dc00000   (   476 MB actual)
[    0.000000]     memory  : 0xffffffc000000000 - 0xffffffc880000000   ( 34816 MB)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 64.
[    0.000000]  RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=4
[    0.000000] NR_IRQS:64 nr_irqs:64 0
[    0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] arm_arch_timer: Architected cp15 timer(s) running at 99.99MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x171024c066, max_idle_ns: 440795204624 ns
[    0.000003] sched_clock: 56 bits at 99MHz, resolution 10ns, wraps every 4398046511100ns
[    0.008300] Console: colour dummy device 80x25
[    0.012558] console [tty0] enabled
[    0.015924] bootconsole [cdns0] disabled
0 Kudos
Highlighted
Visitor chulhoon
Visitor
403 Views
Registered: ‎03-26-2019

Re: Installing DNNDK on Custom OS

Hi, @aluo.

I hava the same problem when I try to run install.sh for ZCU104 in my custom board. I got the error.

modprobe: ERROR: could not insert 'dpu': Exec format error

To solve this problem, what should I do? Could you explain the step-by-step?

0 Kudos