• 0
malkauns

PCAM elf on PetaLinux from SD card

Question

Hi all,  I am able to successfully build the PCAM demo project for the Zybo Z7-10 and can verify that it works.  After importing the project into the SDK and letting it build, sdk/pcam_vdma_hdmi/Debug/pcam_vdma_hdmi.elf is generated.  I would like to be able to run this application from with PetaLinux booted from an SD card so that I can control the camera as well as performing other operations within Linux.  If I try to run the generated pcam_vdma_hdmi.elf as it is I get an "Illegal instruction" error message.  What do I have to do to make this work from within a booted PetaLinux?

Edited by malkauns

Share this post


Link to post
Share on other sites

21 answers to this question

Recommended Posts

  • 0

Hi @malkauns,

I have reached out to more experienced embedded linux engineers to see if they would have any input for you. It may be a little bit before you receive a response. The more experience embedded engineers are out of the office this week.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

We have a PCAM demo in the Petalinux-Zybo-Z7-20 project. The PCAM support is not included in the Petalinux-Zybo-Z7-10 project because they were intended for SDSoC and the FPGA in the Z7-10 is too small for SDSoC usage.

We modified the Z7-20 Vivado project to work on the Z7-10 (system.hdf file attached.)

Follow these steps to have PCAM support on the Z7-10.

  1. Git clone  Petalinux-Zybo-Z7-20
  2. Unzip the attached system.hdf file in a folder and include the system.hdf in the unzipped folder itself. Copy & replace the folder contents into project-spec/hw-description of the petalinux project.
  3. Build the image with the petalinux-build command
  4. Follow the PCAM instructions at the bottom of the readme for Petalinux-Zybo-Z7-20

 

FYI, here are the steps to modifying the  Z7-20 Vivado project to work on the Z7-10. A SDSoC license is needed for generating the bitstream.

  1. Download the Zybq-Z7-20-base-linux project from https://github.com/Digilent/Zybo-Z7-20-base-linux and unzip.
  2. Download the Vivado library from https://github.com/Digilent/vivado-library and unzip it in the Zybq-Z7-20-base-linux project, in the \repo\vivado-library folder.
  3. Make sure you have the Zybo Z7 board support files in your Vivado installation. If you don’t have them, download them from https://github.com/Digilent/vivado-boards, unzip the downloaded file, and copy the contents from the \vivado-boards-master\new\board_files folder to your Vivado 2017.4 installation folder (e.g. C:\Xilinx\Vivado\2017.4\data\boards\board_files).
  4. Open Vivado 2017.4, select Tools -> Run Script and run the create_project.tcl script from the \proj folder inside the Zybq-Z7-20-base-linux folder.
  5. Change the target board in Viado, by selecting Settings -> Project Device -> Zybo Z7-10 -> OK. Save the project.
  6. You will need to regenerate the IPs used in this project, due to the board change. Tools -> Report IP Status -> Upgrade Selected.
  7. The Zybo Z7-10 board has one less RGB LED than Zybo Z7-20 boards. Therefore, you will need to do several change to the project:
    • In the Zybo-Z7-Master.xdc file, comment out the lines referring to RGB LED 5:
      #set_property -dict { PACKAGE_PIN Y11   IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[2] }]; #IO_L18N_T2_13 Sch=led5_r
      #set_property -dict { PACKAGE_PIN T5    IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[1] }]; #IO_L19P_T3_13 Sch=led5_g
      #set_property -dict { PACKAGE_PIN Y12   IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[0] }]; #IO_L20P_T3_13 Sch=led5_b
    • In the same XDC file, change the indexes of the lines referring to RGB LED 6, so they look like this:
      set_property -dict { PACKAGE_PIN V16   IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[2] }]; #IO_L18P_T2_34 Sch=led6_r
      set_property -dict { PACKAGE_PIN F17   IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[1] }]; #IO_L6N_T0_VREF_35 Sch=led6_g
      set_property -dict { PACKAGE_PIN M17   IOSTANDARD LVCMOS33 } [get_ports { pwm_rgb[0] }]; #IO_L8P_T1_AD10P_35 Sch=led6_b
    • In the project block diagram, double-click on pwm_rgb IP and change the Number of PWMs from 6 to 3. Select OK and save the project.
    • Also in the project block diagram, double click on the output from the pwm_rgb IP (pwm_rgb signal), select Properties and then change the LEFT parameter from 5 to 2. Save the project.
  8. It may have happened that no top-level wrapper was generated for your project. If so, right-click on the system_i block diagram and select Create HDL Wrapper…
  9. Then right-click on the newly-created wrapper and select Set As Top. Save the project.
  10. You can now generate the bitstream and you should not see any issues while doing that.

Share this post


Link to post
Share on other sites
  • 0

Hi Vicentiu,  Thanks for putting in the effort to make this work on the Z7-10.  I really appreciate what you all are doing.  However, I am unable to get the Z7 to boot fully.  It gets stuck at "Starting kernel".  Here are the commands I used to build Petalinux on a fresh install of Ubuntu 16.04 in VirtualBox:

 

sudo apt-get update
sudo apt-get install tofrodos gawk xvfb git libncurses5-dev tftpd zlib1g-dev zlib1g-dev:i386 libssl-dev flex bison chrpath socat autoconf libtool texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev screen pax xterm python diffstat unzip libncurses-dev chrpath socat texinfo gcc-multilib libsdl1.2-dev

sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales #ok.. ok.. ok
sudo apt-get install tftpd-hpa
sudo chmod a+w /var/lib/tftpboot/
sudo mkdir -p /opt/pkg/petalinux
sudo chown $USER /opt/pkg/
sudo chgrp $USER /opt/pkg/
sudo chgrp $USER /opt/pkg/petalinux/
sudo chown $USER /opt/pkg/petalinux/

#download petalinux-v2017.4-final-installer.run

chmod +x petalinux-v2017.4-final-installer.run
./petalinux-v2017.4-final-installer.run /opt/pkg/petalinux

comment out the following line in /opt/pkg/petalinux/components/yocto/source/arm/layers/core/meta/conf/sanity.conf:
INHERIT += "sanity" 

git clone --recursive https://github.com/Digilent/Petalinux-Zybo-Z7-20.git
wget https://forum.digilentinc.com/applications/core/interface/file/attachment.php?id=8742 -O system.hdf
mkdir system.hdf_zip
unzip system.hdf -d system.hdf_zip
cp -r system.hdf_zip/* Petalinux-Zybo-Z7-20/Zybo-Z7-20/project-spec/hw-description/ #i'm assuming this is where to magic is supposed to happen for the Z7-10..
cp system.hdf Petalinux-Zybo-Z7-20/Zybo-Z7-20/project-spec/hw-description/ #..and here
cd Petalinux-Zybo-Z7-20/Zybo-Z7-20/
source /opt/pkg/petalinux/settings.sh
echo "configparams-sdk-launch-timeout 180" > .xsdbrc
petalinux-build
petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system_wrapper.bit --u-boot
cd images/linux
cp BOOT.BIN image.ub /run/media/$USER/BOOT/
sudo umount /dev/sdb2
sudo dd if=rootfs.ext4 of=/dev/sdb2
sync
eject /dev/sdb
#insert SD card into Zybo Z7-10, make sure its in SD boot mode and power on
#hangs at "Starting kernel"

 

Please let me know what I need to do to get it fully booting on the Z7-10.

Share this post


Link to post
Share on other sites
  • 0

Are you using minicom to connect to the serial console?

If yes, try connecting with Putty.

We've noticed the same issue with minicom, and terminal output worked fine once we switched to Putty.

Share this post


Link to post
Share on other sites
  • 0

 I'm using Linux and am using this command to view output from the board:

screen /dev/ttyUSB1 115200

Using a BOOT.BIN and image.ub that I have made a while back I can get the board to complete the boot process and make it to the prompt so there must be something that needs tweaking in this project.  Is there some dtsi file that needs editing?  Maybe some boot option is missing.  Are you actually able the get this to boot on the Z7-10?

 

Here's the boot log output where it gets stuck at "Starting kernel ...":



U-Boot 2017.01 (Dec 18 2018 - 09:59:59 -0800)

Model: Zynq Zybo Z7 Development Board
Board: Xilinx Zynq
I2C:   ready
DRAM:  ECC disabled 1 GiB
MMC:   sdhci@e0100000: 0 (SD)
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ZYNQ GEM: e000b000, phyaddr 1, interface rgmii-id
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB

Warning: ethernet@e000b000 using MAC address from ROM
eth0: ethernet@e000b000
U-BOOT for Zybo Z7
ethernet@e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Hit any key to stop autoboot:  4  3  2  1  0 
Device: sdhci@e0100000
Manufacturer ID: 9f
OEM: 5449
Name: 00000 
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading image.ub
2281992 bytes read in 225 ms (9.7 MiB/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:    2249752 Bytes = 2.1 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   133089f2029c5e4eeeea23f7e95c11a63be240c3
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@2' configuration
   Trying 'fdt@0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x102255e0
     Data Size:    30947 Bytes = 30.2 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   399c9df8f6c14fe63d1e25f5d3e1786d61310363
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x102255e0
   Loading Kernel Image ... OK
   Loading Device Tree to 07ff5000, end 07fff8e2 ... OK

Starting kernel ...

 

Edited by malkauns
more data

Share this post


Link to post
Share on other sites
  • 0

I ran most of the commands you ran and booted successfully. I'm connecting with TeraTerm from Windows.

I didn't run the following:

Quote

echo "configparams-sdk-launch-timeout 180" > .xsdbrc

and

sudo dd if=rootfs.ext4 of=/dev/sdb2

It looks like you want a rootfs. I booted with initramfs.

if you want rootfs, you'll need to run petalinux-config to change root filesystem type and also change the bootargs. The details are in the "Configure SD rootfs" section of the project.

Make sure you clean the project after switching from initramfs to rootfs (or vice versa). We noticed that if you make the switch and rebuild without cleaning, it will stay stuck in that same place: Starting kernel....

Share this post


Link to post
Share on other sites
  • 0

Hi,

I have a Zybo Zynq-Z7-10 board with PMOD PCam-5C

I tried the steps in the replies:

https://forum.digilentinc.com/topic/17074-pcam-elf-on-petalinux-from-sd-card/?do=findComment&comment=42504

https://forum.digilentinc.com/topic/17074-pcam-elf-on-petalinux-from-sd-card/?do=findComment&comment=42698

I setup as well a microSD card 8G using gParted: first partition 1GB type fat16  and  the second partition 6.80GB type ext4.

After inserting the card in Zybo's slot and switching the jumper to SD  , the effect of switching on is that the board lights on the LED red LD13 PGOOD, the connected HDMI Monitor has not signal.


I have some questions: which resolution has the HDMI output in Petalinux? The bitstream file of Z7-20 Vivado project with the modifications of the diagram and PWM  https://github.com/Digilent/Zybo-Z7-20-base-linux - how does it get inserted in the Petalinux binaries that get on the SD card?

I guess using this command --- petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system_wrapper.bit --u-boot  ----  but there is no interdependency set in the previous posts.
Should the project run and the HDMI display connected to the output of the Zynq must run even without the bitstream ?
The microsd card was formated with gParted, is compulsory using of a dedicated tool to write the rootfs, boot.bin files ? or the commands:
 

cp BOOT.BIN image.ub /dev/sdd1/

is enough ?

https://github.com/Digilent/Petalinux-Zybo-Z7-20?_ga=2.177147622.2104787184.1555966017-216103582.1546520870#configure-sd-rootfs

sudo umount /dev/sdd2

sudo dd if=images/linux/rootfs.ext4 of=/dev/sdd2

sync
sudo resize2fs /dev/sdd2

sync

should be enough?

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Hi,

as I mentioned in the previous post as the Zybo-z7-20-base linux was not referenced by the Petalinux project build, so I sourced the hardware description:
petalinux-config --get-hw-description=<PATH-TO-HDF-DIRECTORY>

I did as well the petalinux-config and selected SD card instead of initramfs .

The outcome is that there is some activity of the board afterwards the sd with boot.bin and image.ub are copied on the card and fed into the Zybo: the LED Green is blinking

I tried connected to the serial terminal with screen , but no establishing of the communication is done.

With dmesg -w , the Zybo device seems restarting and the peripherals listed by the dmesg are ftdi and /dev/ttyUSB0 , and it seems disconnected and the serial is enumerated afterwards on the /dev/ttyUSB1 and this restarting of the Zybo board is like continous after 5 or 10 seconds.

Also the HDMI synk to the display is without effect and I can not see the "desktop" of the Petalinux.

I had a post here:

that only the

pipeline_mode_change(vdma_driver, cam, vid, Resolution::R640_480_60_NN,OV5640_cfg::mode_t::MODE_720P_1280_720_60fps); 

 

worked when debugged on ARM the https://github.com/Digilent/Zybo-Z7-20-pcam-5c project .
 

I would be interested if something similar - a setting of the HDMI -dvi2rgb or other display driver could be done when initializing the Programming System - ARM :

something like the following snippet

set video resolution (Resolution::R640_480_60)

into this https://github.com/Digilent/Petalinux-Zybo-Z7-20/blob/master/Zybo-Z7-20/project-spec/hw-description/ps7_init.c file      ??
 

Thanks and regards!

Edited by flying
clarification

Share this post


Link to post
Share on other sites
  • 0

Hi @flying,

There is a lot to unpack here.

Firstly I would like to draw your attention to the fact that this post was originally started by malkauns regarding the porting of the petalinux project with PCAM capabilities to the Zybo Z7-10 board, very similar to a previous topic which you have started. If you follow the steps in the previous post by vicentiu you should have the HW configuration finished by vivado, and then all you need to run is:

 petalinux-config --get-hw-description=<PATH-TO-HDF-DIRECTORY>
 petalinux-build
 petalinux-package --boot --force --fsbl images/linux/zynq_fsbl.elf --fpga images/linux/system_wrapper.bit --u-boot

In the Petalinux-Zybo-Z7-20 project and you should have everything working the way it's described in the projects readme.

Secondly (although off topic), regarding the "the "desktop" of the Petalinux.", our petalinux project so far has no GUI in the FS(file system) therefore you will not be able to see anything on the HDMI display. The HDMI is currently configured as a pass trough, in the petalinux project, at 720p; which means everything that is sent via the HDMI RX connector is forwarded to the HDMI TX connector without processing. All of this is routed trough the FPGA, meaning that without programming the .bit into the FPGA, the HDMI will not work. For more details on this please refer to the block diagram of the Zybo-Z7-20-base-linux which is an intuitive description of what I explained here.

Lastly, regarding the rest of the questions (also off topic), most are answered by reading trough the petalinux user guide ug1144 which describes how petalinux works and the workflow. I would also recommend reading up on how the Zynq processor is used in bare-metal and the role of the ps7_init files, the .bit, the .hdf and the BOOT.bin.Unfortunately going in to detail about these, would be hard without making it in to a tutorial or a step by step guide with page long explanations at every step.

I hope this helped clarify some of your queries.

-Ciprian

Share this post


Link to post
Share on other sites
  • 0

@Ciprian hi .. i appreciate your help and with ur post i easily build the petalinux package.. now i have an issue... i put the BOOT.bin and image.ub in SD card... and i can see on my terminal zybo is booting... but there is no display on HDMI... nothing

 

that is boot log 

 

# Loading kernel from FIT Image at 10000000 ...
   Using 'conf@1' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel@0' kernel subimage
     Description:  Linux Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000d4
     Data Size:    3747152 Bytes = 3.6 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00008000
     Entry Point:  0x00008000
     Hash algo:    sha1
     Hash value:   9148b4404b115a186177ed7382575198177ace89
   Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
   Using 'conf@1' configuration
   Trying 'ramdisk@0' ramdisk subimage
     Description:  ramdisk
     Type:         RAMDisk Image
     Compression:  uncompressed
     Data Start:   0x10397780
     Data Size:    5710888 Bytes = 5.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: unavailable
     Entry Point:  unavailable
     Hash algo:    sha1
     Hash value:   e746a76fc1a540d3ce401458e53bfb6f97a4da98
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'conf@1' configuration
   Trying 'fdt@0' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x10392f18
     Data Size:    18360 Bytes = 17.9 KiB
     Architecture: ARM
     Hash algo:    sha1
     Hash value:   ac86165606bbdd5ddb6ede988a4b11dd1a6ac878
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x10392f18
   Loading Kernel Image ... OK
   Loading Ramdisk to 07a8d000, end 07fff428 ... OK
   Loading Device Tree to 07a85000, end 07a8c7b7 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.0-xilinx-v2017.4 (bilal@ubuntu) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #1 SMP PREEMPT Tue May 21 20:56:12 PDT 2019
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 0x3f000000
Memory policy: Data cache writealloc
percpu: Embedded 14 pages/cpu @ef7d0000 s25932 r8192 d23220 u57344
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260608
Kernel command line: console=ttyPS0,115200 earlyprintk
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 1007272K/1048576K available (6144K kernel code, 200K rwdata, 1460K rodata, 1024K init, 229K bss, 24920K reserved, 16384K cma-reserved, 245760K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0700000   (7136 kB)
      .init : 0xc0900000 - 0xc0a00000   (1024 kB)
      .data : 0xc0a00000 - 0xc0a32000   ( 200 kB)
       .bss : 0xc0a32000 - 0xc0a6b698   ( 230 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 f0802000
slcr mapped to f0804000
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 f0804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 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 (1333.33 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 @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 26, base_baud = 6249999) is a xuartps
àconsole [ttyPS0] enabled
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: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 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.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5580K (c7a8d000 - c8000000)
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=18 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
bounce: pool size: 64 pages
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
xilinx-vdma 43000000.dma: Xilinx AXI VDMA Engine Driver Probed!!
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f086d000
[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 28 (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-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
xilinx-vtc: probe of 43c10000.v_tc failed with error -2
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f087e000 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.
Freeing unused kernel memory: 1024K (c0900000 - c0a00000)
mmc0: Problem switching card into high-speed mode!
mmc0: new SDXC card at address 0001
mmcblk0: mmc0:0001 SD64G 58.2 GiB
 mmcblk0: p1
INIT: version 2.88 booting
Starting udev
udevd[736]: starting version 3.2
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
random: udevd: uninitialized urandom read (16 bytes read)
udevd[737]: starting eudev-3.2
random: udevd: uninitialized urandom read (16 bytes read)
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Populating dev cache
random: dd: uninitialized urandom read (512 bytes read)
hwclock: can't open '/dev/misc/rtc': No such file or directory
Wed May 22 03:58:06 UTC 2019
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
 Removing any system startup links for run-postinsts ...
  /etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.24.1) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Starting Dropbear SSH server: random: dropbearkey: uninitialized urandom read (32 bytes read)
Generating key, this may take a while...
random: dropbearkey: uninitialized urandom read (32 bytes read)
random: dropbearkey: uninitialized urandom read (32 bytes read)
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCQZ25idtThpIUIA3l0VqrmPk/CNM/vZzpo4Ks1du8zcbaH8y/6Podg/DOc/WeL3W4ruDerandom: dropbear: uninitialized urandom read (32 bytes read)
dR6boCnNyjRVtQuVdCbUx3c+yy/gzH5sWfH+nu6AvTAu+ZaqnZZORAB/zA8Bx1ErLb8nMNxi6lo/PKRBWVyq7Lqo+F2dg5THBdAdznYPTRSiHKs/q/IwtmCfdIw2NjPJ/4HQbLBi3eTwSjo+j7nORE5u9eig4LqPoZOQaw0edrwnbEyntMwUuC8vOpU0GRlYm86xYYc/4IWg4+rS8JfzmiTJ2JNy86NTDSOe1vx8gFFAtPwxM+Dr/KJrB1BD/20CNm2U+m4ZvzE5AEdyX root@test_02
Fingerprint: md5 eb:2b:38:dc:87:cc:a0:36:28:b8:db:e9:64:96:49:4e
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: random: tcf-agent: uninitialized urandom read (16 bytes read)
OK

PetaLinux 2017.4 test_02 /dev/ttyPS0

test_02 login: root
Password:
root@test_02:~#

Share this post


Link to post
Share on other sites
  • 0

also if i run these commands as mention in Zybo-z7-20 i got error

 

root@test_03:~# width=1920
root@test_03:~# height=1080
root@test_03:~# rate=15
root@test_03:~# media-ctl -d /dev/media0 -V '"ov5640 2-003c":0 [fmt:UYVY/'"$width"x"$height"'@1/'"$rate"' field:none]'
-sh: media-ctl: command not found
root@test_03:~# ^C
root@test_03:~# v4l2-ctl -d /dev/video0 --info
-sh: v4l2-ctl: command not found
root@test_03:~# v4l2-ctl --all
-sh: v4l2-ctl: command not found

Share this post


Link to post
Share on other sites
  • 0

Hi @ahmedengr.bilal,

Like I mentioned in the previous post there is no HDMI output from the Linux side, neither the embedded rootFS provided by petalinux nor the kernel configuration we give out is set to accommodate this feature.

Regarding the missing media-ctl and v4l2-ctl, you have not activated the v4l-utils in the rootfs configuration of the petalinux. to do this you need to navigate to your petalinux project folder and run:

petalinux-config -c rootfs

Once the menu appears you need to go to Filesystem Packages->misc->v4l-utils and activate: v4l-utils, libv4l, media-ctl. Rebuild the whole project and it should be working now.

-Ciprian

Share this post


Link to post
Share on other sites
  • 0

@Ciprian Thanks for the response.. i got it working now...

 

I need to go a bit off topic.. is there any article how to use opencv on petalinux for video processing ? please share some info if there is some link or someone worked in it

Share this post


Link to post
Share on other sites
  • 0
On 6/10/2019 at 12:16 PM, ahmedengr.bilal said:

@Ciprian Thanks for the response.. i got it working now...

 

I need to go a bit off topic.. is there any article how to use opencv on petalinux for video processing ? please share some info if there is some link or someone worked in it

Hi @ahmedengr.bilal,

You have three options:

1. Use standard OpenCV library which can be included in Petalinux rootfs. After that you can develop your application using OpenCV functions.

2. Use xfOpenCV library from Xilinx. Find the documentation here. Some examples here. It offers a subset of standard OpenCV library functions, modified to be easily accelerated in FPGA.

3. Use standard OpenCV and xfOpenCV libraries. This options is suitable for more complex algorithms where you process some functions on ARM processor and another ones in FPGA for better performance.

For all mentioned options you have to implement the image acquisition mechanism from a camera if you don't intend to use static images.

Usually, the easiest way to develop video processing apps using xfOpenCV and OpenCV on Xilinx SoC is SDSoC. Find more info here. Using SDSoC you have a hardware platform which describes your hardware configuration and another important aspects like libraries, sample projects, etc. Usually, this platform is provided by the development board manufacturer, in this case Digilent. Two SDSoC platform aspects are important for you:

1. The hardware configuration which implements the image acquisition mechanism. Find Digilent Zybo Z7-20 SDSoC Platform here.

2. Sample projects. Find sample projects for the above mentioned platform here.

Share this post


Link to post
Share on other sites
  • 0

@bogdan.deac thanks alot for your valuable feedback and awesome information .. i am looking into all this... i will update you and may require your more assistance on this... once again thanks alot for all this information,, really appreciate it

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now