News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

zynqberry TE0726 M rpicam connection failed

Started by brazi_perjikolaei, March 09, 2020, 10:44:11 AM

Previous topic - Next topic

brazi_perjikolaei

Hi everyone,

I am trying to run demo1 (https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1) on my Zynqberry TE0726 M. Unfortunately it's not working. There is no video-in and I noticed that RPI camera is not recognized as a device on my board, although I used the same device-tree for my board as the given one in the demo1. I compared the device-trees of demo1 and demo3 (https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo3). The given addresses for camera_fb is different in device-trees. For demo1, it has the same address as hdmi_fb (0x1FC00000) but in demo3 the address is set to 1F800000! I changed the address of the camera in device-tree to 1F800000 and still I cannot connect to it. Does anyone know what is going wrong and what is the correct address and how can I fixed this?

Regards,
Perjikolaei

Oleksandr Kiyenko

Hello Perjikolaei,
There is a difference between framebuffer usage in demo1 and demo3
in first case camera interface and HDMI interface uses the same memory region for data and you see the image from the camera directly,
in second there are 2 separate frame buffers and you need to use tools to access second frame buffer.
As for camera detection, you need to check if you can see the camera device on I2C bus. It can appear at address 0x36 or 0x10 depending on your camera
version. If you can't see it probably you have some issue with the ribbon cable or camera module.

Best regards
Oleksandr Kiyenko

brazi_perjikolaei

Thanks a lot Oleksandr,

I got the differences between demo1 and demo3. I set the configuration back to demo1 device-tree. I connected the camera to my board and I cannot find fb1 in /dev/. I ran rpicam /dev/i2c-5 and it seems that there is camera there:
Raspberry Pi Camera Init v1.3
Unable to send data: No such device or address
Camera V2.X configuration
Found 2.X Camera Model ID 0x0219, Lot ID 0x5a8e68, Chip ID 0x0757
Camera init complete.


But still there is no fb1 when I try to run fbgrab -d /dev/fb1 . Can you please help me with this issue?

Regards,
Perjikolaei

Oleksandr Kiyenko

Hello Perjikolaei,
It looks like there is some mess in the config.
If you have 2 framebuffer configurations in your system-user.dtsi there should be 2 framebuffer device instances /dev/fb0 and /dev/fb1 these devices will be created regardless
of camera detected or not as there is a 100% software configuration. Please check your bootlog, there should be something regarding framebuffers.

BR
Oleksandr Kiyenko

JH

Hi,
you has referred to DEMO1, did you use 2019.2 download or older one (can you tel me the zip name of the download)?
Did you test with prebuilt files or did you generate all by  yourself?
Can you try out prebuilt files: Configure QSPI flash with prebuilt boot.bin) and put image.ub and init.sh from the download on the SD.
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-Launch

Can you send the whole boot log from uart console ( FSBL and uboot and linux)?
br
John

brazi_perjikolaei

Hi John,

I use 2019.2 (noprebuilt). I build the project in Vivado 2019.2 and set the kernel by myself in Petalinux 2019.2 and I used PYNQ to boot. The kernel configuration is as below:

CONFIG_XILINX_GMII2RGMII=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_AX8817X=y
CONFIG_USB_NET_AX88179_178A=y
CONFIG_USB_NET_CDCETHER=y
# CONFIG_USB_NET_CDC_EEM is not set
CONFIG_USB_NET_CDC_NCM=y
# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set
# CONFIG_USB_NET_CDC_MBIM is not set
# CONFIG_USB_NET_DM9601 is not set
# CONFIG_USB_NET_SR9700 is not set
# CONFIG_USB_NET_SR9800 is not set
# CONFIG_USB_NET_SMSC75XX is not set
CONFIG_USB_NET_SMSC95XX=y
# CONFIG_USB_NET_GL620A is not set
CONFIG_USB_NET_NET1080=y
# CONFIG_USB_NET_PLUSB is not set
# CONFIG_USB_NET_MCS7830 is not set
# CONFIG_USB_NET_RNDIS_HOST is not set
CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
CONFIG_USB_NET_CDC_SUBSET=y
# CONFIG_USB_ALI_M5632 is not set
# CONFIG_USB_AN2720 is not set
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
# CONFIG_USB_EPSON2888 is not set
# CONFIG_USB_KC2190 is not set
CONFIG_USB_NET_ZAURUS=y
# CONFIG_USB_NET_CX82310_ETH is not set
# CONFIG_USB_NET_KALMIA is not set
# CONFIG_USB_NET_QMI_WWAN is not set
# CONFIG_USB_NET_INT51X1 is not set
# CONFIG_USB_SIERRA_NET is not set
# CONFIG_USB_VL600 is not set
# CONFIG_USB_NET_CH9200 is not set
CONFIG_USBIP_CORE=y
# CONFIG_USBIP_VHCI_HCD is not set
# CONFIG_USBIP_HOST is not set
# CONFIG_USBIP_VUDC is not set
# CONFIG_USBIP_DEBUG is not set
CONFIG_FB_SIMPLE=y
CONFIG_SND_SIMPLE_CARD_UTILS=y
CONFIG_SND_SIMPLE_CARD=y
# CONFIG_FRAMEBUFFER_CONSOLE is not set

CONFIG_STAGING=y
CONFIG_XILINX_APF=y
CONFIG_XILINX_DMA_APF=y
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=256
CONFIG_CROSS_COMPILE="arm-xilinx-linux-gnueabi-"
CONFIG_LOCALVERSION="-xilinx-apf"
CONFIG_PRINTK_TIME=n
CONFIG_DEBUG_KERNEL=n
CONFIG_HAVE_DEBUG_KMEMLEAK=n
CONFIG_LOCKUP_DETECTOR=n
CONFIG_DEBUG_RT_MUTEXES=n
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=n
CONFIG_PROVE_LOCKING=n
CONFIG_DEBUG_ATOMIC_SLEEP=n
CONFIG_PROVE_RCU=n
CONFIG_DMA_API_DEBUG=n


I copied the device-tree given in the demo1 and used it as device-tree in petalinux with a minor change (I added xlnk to be able to use pynq in python).


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


/ {
    #address-cells = <1>;
    #size-cells = <1>;

    reserved-memory {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        hdmi_fb_reserved_region@1FC00000 {
            compatible = "removed-dma-pool";
            no-map;
            // 512M (M modules)
            reg = <0x1FC00000 0x400000>;
            // 128M (R modules)
            //reg = <0x7C00000 0x400000>;
        };
        camera_fb_reserved_region@1FC00000 {
            compatible = "removed-dma-pool";
            no-map;
            // 512M (M modules)
            reg = <0x1FC00000 0x400000>;
            // 128M (R modules)
            //reg = <0x7C00000 0x400000>;
        };

    };

    hdmi_fb: framebuffer@0x1FC00000 {           // HDMI out
        compatible = "simple-framebuffer";
        // 512M (M modules)
        reg = <0x1FC00000 (1280 * 720 * 4)>;    // 720p
        // 128M (R modules)
        //reg = <0x7C00000 (1280 * 720 * 4)>;   // 720p
        width = <1280>;                         // 720p
        height = <720>;                         // 720p
        stride = <(1280 * 4)>;                  // 720p
        format = "a8b8g8r8";
        status = "okay";
    };

    camera_fb: framebuffer@0x1FC00000 {         // CAMERA in
        compatible = "simple-framebuffer";
        // 512M (M modules)
        reg = <0x1FC00000 (1280 * 720 * 4)>;    // 720p
        // 128M (R modules)
        //reg = <0x7C00000 (1280 * 720 * 4)>;   // 720p
        width = <1280>;                         // 720p
        height = <720>;                         // 720p
        stride = <(1280 * 4)>;                  // 720p
        format = "a8b8g8r8";
    };
...


According to the boot file, just one framebuffer is mapped:

[    0.000000] Zynq clock init
[    0.000011] sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511102ns
[    0.004657] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07a4e8b, max_idle
_ns: 440795203012 ns
[    0.014353] Switching to timer-based delay loop, resolution 3ns
[    0.019012] clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
[    0.026732] timer #0 at (ptrval), irq=17
[    0.029792] Console: colour dummy device 80x30
[    0.032428] Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS
(lpj=3333332)
[    0.041610] pid_max: default: 32768 minimum: 301
[    0.045037] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050164] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.056428] CPU: Testing write buffer coherency: ok
[    0.059422] CPU0: Spectre v2: using BPIALL workaround
[    0.063330] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.119459] Setting up static identity map for 0x100000 - 0x100060
[    0.139409] rcu: Hierarchical SRCU implementation.
[    0.179408] smp: Bringing up secondary CPUs ...
[    0.259777] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.259785] CPU1: Spectre v2: using BPIALL workaround
[    0.262341] smp: Brought up 1 node, 2 CPUs
[    0.264997] SMP: Total of 2 processors activated (1333.33 BogoMIPS).
[    0.270055] CPU: All CPU(s) started in SVC mode.
[    0.274311] devtmpfs: initialized
[    0.278643] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[    0.281961] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750
000 ns
[    0.290124] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.308124] pinctrl core: initialized pinctrl subsystem
[    0.309390] NET: Registered protocol family 16
[    0.321153] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.322376] cpuidle: using governor menu
[    0.331364] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[    0.332421] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.337050] zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB @ 0x(ptrval)
[    0.342648] zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
[    0.347198] e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 26, base_baud = 6249999) is a xuartps
[    0.369862] console [ttyPS0] enabled
[    0.372134] bootconsole [cdns0] disabled
[    0.401591] vgaarb: loaded
[    0.403323] SCSI subsystem initialized
[    0.406003] usbcore: registered new interface driver usbfs
[    0.410988] usbcore: registered new interface driver hub
[    0.415091] usbcore: registered new device driver usb
[    0.419129] media: Linux media interface: v0.10
[    0.422737] videodev: Linux video capture interface: v2.00
[    0.426973] pps_core: LinuxPPS API ver. 1 registered
[    0.430658] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.438503] PTP clock support registered
[    0.441249] EDAC MC: Ver: 3.0.0
[    0.450028] FPGA manager framework
[    0.452494] Advanced Linux Sound Architecture Driver Initialized.
[    0.458198] clocksource: Switched to clocksource arm_global_timer
[    0.463465] simple-framebuffer 1fc00000.framebuffer: framebuffer at 0x1fc00000, 0x384000 bytes, mapped
to 0x(ptrval)
[    0.472725] simple-framebuffer 1fc00000.framebuffer: format=a8b8g8r8, mode=1280x720x32, linelength=512
0
[    0.503720] Console: switching to colour frame buffer device 160x45
[    0.531044] simple-framebuffer 1fc00000.framebuffer: fb0: simplefb registered!
[    0.547196] NET: Registered protocol family 2
[    0.551006] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
[    0.557379] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.563191] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.568418] TCP: Hash tables configured (established 4096 bind 4096)
[    0.573535] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.578088] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.583258] NET: Registered protocol family 1
[    0.586797] RPC: Registered named UNIX socket transport module.
[    0.591520] RPC: Registered udp transport module.
[    0.594910] RPC: Registered tcp transport module.
[    0.598323] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.603459] PCI: CLS 0 bytes, default 64
[    0.603994] hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
[    0.610834] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    0.619275] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.625164] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.631776] io scheduler noop registered
[    0.634389] io scheduler deadline registered
[    0.637395] io scheduler cfq registered (default)
[    0.640861] io scheduler mq-deadline registered
[    0.644076] io scheduler kyber registered
[    0.648875] dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
[    0.654274] dma-pl330 f8003000.dmac:         DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
[    0.671384] brd: module loaded
[    0.678966] loop: module loaded
[    0.683386] m25p80 spi0.0: non-uniform erase sector maps are not supported yet.
[    0.689470] m25p80 spi0.0: s25fl128s (16384 Kbytes)
[    0.693079] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.698117] Creating 4 MTD partitions on "spi0.0":
[    0.701641] 0x000000000000-0x000000500000 : "boot"
[    0.706069] 0x000000500000-0x000000520000 : "bootenv"
[    0.710781] 0x000000520000-0x000000fa0000 : "kernel"
[    0.715291] 0x000000fa0000-0x000001000000 : "spare"
[    0.720239] libphy: Fixed MDIO Bus: probed
[    0.724234] CAN device driver interface
[    0.727346] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[    0.731927] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    0.737204] usbcore: registered new interface driver asix
[    0.741392] usbcore: registered new interface driver ax88179_178a
[    0.746224] usbcore: registered new interface driver cdc_ether
[    0.750847] usbcore: registered new interface driver smsc95xx
[    0.755337] usbcore: registered new interface driver net1080
[    0.759767] usbcore: registered new interface driver cdc_subset
[    0.764422] usbcore: registered new interface driver zaurus
[    0.768785] usbcore: registered new interface driver cdc_ncm
[    0.773701] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.778950] ehci-pci: EHCI PCI platform driver
[    0.782225] usbcore: registered new interface driver usb-storage
[    0.787171] chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
[    0.794776] chipidea-usb2 e0002000.usb: Linked as a consumer to regulator.0
[    0.800950] ULPI transceiver vendor/product ID 0x0424/0x0007
[    0.805298] Found SMSC USB3320 ULPI transceiver.
[    0.808759] ULPI integrity check: passed.
[    0.821967] ci_hdrc ci_hdrc.0: EHCI Host Controller
[    0.825551] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[    0.858226] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[    0.863057] hub 1-0:1.0: USB hub found
[    0.865528] hub 1-0:1.0: 1 port detected
[    0.870392] i2c /dev entries driver
[    0.873275] cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 22
[    0.878676] cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 23
[    0.909261] i2c i2c-1: Added multiplexed i2c bus 2
[    0.913056] i2c i2c-1: Added multiplexed i2c bus 3
[    0.916840] i2c i2c-1: Added multiplexed i2c bus 4
[    0.920657] i2c i2c-1: Added multiplexed i2c bus 5
[    0.924141] pca954x 1-0070: registered 4 multiplexed busses for I2C mux pca9544
[    0.932235] cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer with timeout 10s
[    0.938574] EDAC MC: ECC not enabled
[    0.941018] Xilinx Zynq CpuIdle Driver started
[    0.944891] sdhci: Secure Digital Host Controller Interface driver
[    0.949783] sdhci: Copyright(c) Pierre Ossman
[    0.952821] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.980929] mmc0: SDHCI controller on e0101000.mmc [e0101000.mmc] using ADMA
[    0.987161] ledtrig-cpu: registered to indicate activity on CPUs
[    0.992442] usbcore: registered new interface driver usbhid
[    0.996731] usbhid: USB HID core driver
[    0.999504] xlnk xlnk: Major 244
[    1.001639] xlnk xlnk: xlnk driver loaded
[    1.004364] xlnk xlnk: xlnk_pdev is not null
[    1.008506] fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
[    1.015815] NET: Registered protocol family 10
[    1.020001] Segment Routing with IPv6
[    1.022484] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.028058] NET: Registered protocol family 17
[    1.031282] can: controller area network core (rev 20170425 abi 9)
[    1.036206] NET: Registered protocol family 29
[    1.039391] can: raw protocol (rev 20170425)
[    1.042348] can: broadcast manager protocol (rev 20170425 t)
[    1.046740] can: netlink gateway (rev 20170425) max_hops=1
[    1.051306] Registering SWP/SWPB emulation handler
[    1.055734] of-fpga-region fpga-full: FPGA Region probed
[    1.060789] hctosys: unable to open rtc device (rtc0)
[    1.064547] of_cfs_init
[    1.065765] of_cfs_init: OK
[    1.067549] ALSA device list:
[    1.069325]   No soundcards found.
[    1.071825] Waiting for root device /dev/mmcblk0p2...
[    1.075666] mmc0: new high speed SDHC card at address 0001
[    1.080619] mmcblk0: mmc0:0001 EB1QT 29.8 GiB
[    1.105232]  mmcblk0: p1 p2
[    1.236201] random: fast init done
[    1.238547] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[    1.439336] hub 1-1:1.0: USB hub found
[    1.441944] hub 1-1:1.0: 5 ports detected
[    1.590932] EXT4-fs (mmcblk0p2): recovery complete
[    1.598447] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.605271] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.610086] devtmpfs: mounted
[    1.614900] Freeing unused kernel memory: 1024K
[    1.618402] Run /sbin/init as init process
[    1.788244] usb 1-1.1: new high-speed USB device number 3 using ci_hdrc
[    1.961385] smsc95xx v1.0.6
[    2.074212] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-ci_hdrc.0-1.1, smsc95xx USB 2.0 Ethern
[    2.197992] systemd[1]: System time before build time, advancing clock.
[    2.221664] systemd[1]: Failed to insert module 'autofs4': No such file or directory
[    2.271212] systemd[1]: systemd 237 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[    2.291708] systemd[1]: Detected architecture arm.
[    2.347055] systemd[1]: Set hostname to <pynq>.
[    2.495391] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.508627] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.521791] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.534922] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.548094] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.561273] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.574414] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.587529] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.600716] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.613823] systemd-fstab-generator[780]: Failed to create unit file /run/systemd/generator/var-swap.swap, as it already exists. Duplicate entry in /etc/fstab?
[    2.630551] systemd-fstab-g: 26 output lines suppressed due to ratelimiting
[    2.636766] systemd[776]: /lib/systemd/system-generators/systemd-fstab-generator failed with exit status 1.
[    2.889946] systemd[1]: File /lib/systemd/system/systemd-journald.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[    2.905723] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[    3.255819] random: systemd: uninitialized urandom read (16 bytes read)
[    3.261525] systemd[1]: Started ntp-systemd-netif.path.
[    3.288394] random: systemd: uninitialized urandom read (16 bytes read)
[    3.293761] systemd[1]: Reached target System Time Synchronized.
[    3.328361] random: systemd: uninitialized urandom read (16 bytes read)
[    3.333946] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.368423] systemd[1]: Reached target Remote File Systems.
[    4.605067] Adding 1048572k swap on /var/swap.  Priority:-2 extents:18 across:4571132k SS
[    4.803555] systemd-journald[791]: Received request to flush runtime journal from PID 1
[    4.890484] systemd-journald[791]: File /var/log/journal/692bc65a506d4a2aade09c705326a92a/system.journal corrupted or uncleanly shut down, renaming and replacing.
[    6.582114] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[    8.222083] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[    9.180131] random: crng init done
[    9.180146] random: 7 urandom warning(s) missed due to ratelimiting
[   18.509682] systemd-journald[791]: File /var/log/journal/692bc65a506d4a2aade09c705326a92a/user-1000.journal corrupted or uncleanly shut down, renaming and replacing.
[   18.590937] systemd-journald[791]: Failed to set ACL on /var/log/journal/692bc65a506d4a2aade09c705326a92a/user-1000.journal, ignoring: Operation not supported


I hope it's the boot file you meant. The RPI camera type is V2.1.  Is there any other file which can help to find the problem?

regards,
Perjikolaei

JH

Hi,
can you test one time prebuilt files please? They should work.

there are 3 parts which works together:
1. PL Design
2. FSBL, which starts DMA
3. Linux init (init.sh) scripts which enable camera stream on PL (I think this part is missing or did you include this, or did you include this part directly as app or so?)
I also see only fb0 on your boot log, like Alex mentioned, but there should be 2

Point1 is the same on all 3 demos. Different is only FSBL DMA access and linux part.

we use only petalinux to generate linux parts, what we have changed manually are described here:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux
we provide also a template project with our changes:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-DesignSources
--> use this template instead of generating a new petalinux project, see also https://wiki.trenz-electronic.de/display/PD/PetaLinux+KICKstart

I would recommend to test at first prebuilt files, than regenerate everything without changes(use our petalinux template)  and than start to modify like you which. 

br
John

Oleksandr Kiyenko

Hi Perjikolaei,
Looks like I see the problem, there are 2 framebuffer devices with the same address 0x1FC00000 it's not correct
if you want to use 2 framebuffers camera_fb should be at 0x1F800000 so

camera_fb_reserved_region@1F800000 {
...
reg = <0x1F800000 0x400000>;
...
};
...
camera_fb: framebuffer@0x1F800000 {         // CAMERA in
...
reg = <0x1F800000 (1280 * 720 * 4)>;    // 720p
};
...

sorry, looks like this mistake appear during migration to new Vivado version

BR
Oleksandr Kiyenko


brazi_perjikolaei

Hi Oleksandr,

now I am a little bit confused! Because I mentioned the address issue (same address for hmdi and camera) in the first comment and then you told me it is correct for the demo1:
QuoteThere is a difference between framebuffer usage in demo1 and demo3
in first case camera interface and HDMI interface uses the same memory region for data and you see the image from the camera directly,
in second there are 2 separate frame buffers and you need to use tools to access second frame buffer.

Regards,
Perjikolaei

JH

Hi,
remove the camera frame buffer. On Demo1 only one frame buffer is need. Camera is setup by DMA controller over FSBL(see FSBL code). With petalinux this is ignored (So demo1 is working on our place). Sorry this was my mistake, i've expected you should see 2 framebuffer on demo 1, but demo1 need only one.

br
John

brazi_perjikolaei

Quote from: JH on March 10, 2020, 11:56:39 AM
Hi,
can you test one time prebuilt files please? They should work.

there are 3 parts which works together:
1. PL Design
2. FSBL, which starts DMA
3. Linux init (init.sh) scripts which enable camera stream on PL (I think this part is missing or did you include this, or did you include this part directly as app or so?)
I also see only fb0 on your boot log, like Alex mentioned, but there should be 2

Point1 is the same on all 3 demos. Different is only FSBL DMA access and linux part.

we use only petalinux to generate linux parts, what we have changed manually are described here:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux
we provide also a template project with our changes:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-DesignSources
--> use this template instead of generating a new petalinux project, see also https://wiki.trenz-electronic.de/display/PD/PetaLinux+KICKstart

I would recommend to test at first prebuilt files, than regenerate everything without changes(use our petalinux template)  and than start to modify like you which. 

br
John


Hi John,
I tried the prebuild data and it works. I used the fsbl and image.ub from  prebuild folder. But I like to have access to the camera using PYNQ. I used the same configuration and device-tree as it is mentioned in the demo1.

Quote from: JH on March 10, 2020, 12:44:04 PM
Hi,
remove the camera frame buffer. On Demo1 only one frame buffer is need. Camera is setup by DMA controller over FSBL(see FSBL code). With petalinux this is ignored (So demo1 is working on our place). Sorry this was my mistake, i've expected you should see 2 framebuffer on demo 1, but demo1 need only one.

br
John

I erased the framebuffer for the camera but still I cannot see it as a device (fb). Is there any configuration which is not mentioned in the kernel configuration?

Regards,
Perjikolaei

JH

Hi,
so Hardware is ok.

These are the only free points where we influence the stream:
1. PL Design
2. FSBL, which starts DMA
3. Linux init (init.sh) scripts which enable camera stream on PL (I think this part is missing or did you include this, or did you include this part directly as app or so?)

what we have change on petalinux is described here:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux
--> the parts which will be done by xsa import and from default setup from xilinx is not included. In this case you must recreate our petalinux design one time again with petalinux build envirment (you can also use our petalinux  template instead to select our changes manually) after you has generate it again you can extract all files you want from the normal petalinux project.

br
John



https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux

brazi_perjikolaei

#12
Quote from: JH on March 24, 2020, 04:38:50 PM
Hi,
so Hardware is ok.

These are the only free points where we influence the stream:
1. PL Design
2. FSBL, which starts DMA
3. Linux init (init.sh) scripts which enable camera stream on PL (I think this part is missing or did you include this, or did you include this part directly as app or so?)

what we have change on petalinux is described here:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux
--> the parts which will be done by xsa import and from default setup from xilinx is not included. In this case you must recreate our petalinux design one time again with petalinux build envirment (you can also use our petalinux  template instead to select our changes manually) after you has generate it again you can extract all files you want from the normal petalinux project.

br
John



https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-SoftwareDesign-PetaLinux


Hi John,

about init.sh, I cannot run it on PYNQ image, because devmem is not a known command but after installing busybox, it works. The problem is that the camera is not known as a device in my image and I don't have /dev/fb .I tried to build the image.ub (like the one you already generated) by petalinux following the given instruction in https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1. In petalinux, I used the XSA generated by Vivado 2019.2. Do I just need to configure the u-boot, kernel and rootfs, and edit the device-tree in system-user.dtsi? I don't need to change Advanced bootable images storage settings in petalinux-config?

I was not able to generate the same image.ub. The generated image size is 4.2 MB which is much less than 18.2 MB in prebuild folder. Do you have any idea what do I do wrong?

P.S. Is it the right address of the camera?
        i2c1@3 {    // Camera Interface Connector
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <3>;
        };


Regards,
Perjikolaei

JH

Hi,
did you use our template with pregenerated xsa or did you create petalinux from scretch?
Template:
https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-DesignSources
--> use this template and import xsa instead of generating a new petalinux project, see also https://wiki.trenz-electronic.de/display/PD/PetaLinux+KICKstart
template includes the manuell setup which we has described on our wiki.

PS: your device tree question:

https://wiki.trenz-electronic.de/display/PD/TE0726+Zynqberry+Demo1#TE0726ZynqberryDemo1-DeviceTree

br
John