Post Go back to editing

Building Linux with IIO using Petalinux 2019.1 for the USRP E310 (sg3)

Hi -

For the past few months, I have been trying many different methods to successfully build a functional Linux kernel with IIO and all the relevant boot files for the Ettus USRP E310.

I started out building them manually following Xilinx/ADI tutorials for the zc702 eval board and adapting them to the E310 but I could not successfully build the boot files or rootfs.

By doing this I learned how to correctly partition the 8GB SD card supplied with the E310. 

I then stumbled upon this post: https://ez.analog.com/linux-device-drivers/linux-software-drivers/f/q-a/104393/usrp-e31x-with-linux---2018_r2 

and attempted to boot the E310_IIO_2018_R2 files supplied by mhennerich but the boot fails due to "device descriptor read/64, error -32'   that I cannot troubleshoot as I did not create the files. 

I retrieved and edited the uEnv.txt to suit my needs from the files supplied by ADI on the purchase of another board I have accesible.

I then attempted to follow the instructions available here: https://github.com/analogdevicesinc/meta-adi/tree/master/meta-adi-xilinx

These instructions introduced me to Petalinux. However, the supported configs are not compatible with the E310, and despite trying many things I moved away from this github repository as 

nothing was working. 

I have more recently been trying to build a generic Linux Kernel using https://github.com/analogdevicesinc/linux and include LIBIIO through Petalinux.

How do I build a working ETTUS USRP E310 IIO Linux Kernel with the required boot files (and possibly rootfs) using Petalinux 2019.1?

I have the hdf file required by the     
petalinux-config --get-hw-description=    command in Petalinux 2019.1. 

Thank you,

-Dominic



Top Replies

Parents
  • What I am trying to do is possible as you have provided the files I am using to do this, all I am asking is how you created these files.

    We don't use Petalinux for E310.

    We use https://github.com/analogdevicesinc/plutosdr-fw

    Instructions here

    https://wiki.analog.com/university/tools/pluto/building_the_image

    For Pluto and clones, Petalinux is too big, so it uses buildroot + u-boot.

  • Hi,

    Is there anything specific I need to change to get the instructions to work for the E310?

    Kind Regards,

    Dominic

  • Unfortunately, that did not work. I am trying to figure it out, if you have any other ideas?

    Kind Regards,

    Dominic

  • It turns out we never added E310 support, the same way we did for Sidekiq Z2.

    No idea why.

    I'm also vague whether this should be supported by Ettus or by us [as a Pluto clone].

    In any case, adding support for the E310 takes a bit more work than I remembered.

    I've created this branch:

    https://github.com/analogdevicesinc/plutosdr-fw/commits/e310-support

    But you also need some updates to buildroot + u-boot to make it work.

    So, you'd typically clone that plutosdr-fw recursively and then patch buildroot with the commit from this branch:

    https://github.com/analogdevicesinc/buildroot/commits/e310-support

    And u-boot with commit from this branch:

    github.com/.../e310-support

    I'm using Vivado 2019.1. Commands are:

    source /opt/Xilinx/SDK/2019.1/settings64.sh

    cd plutosdr-fw

    VIVADO_VERSION=2019.1 TARGET=e310 make V=s

    This generates some E310 images.

    THere isn't an E310 in our office atm to test this.

  • e310-fw-v0.31-3-g4e37-dirty.zip

    This is the FW image I managed to create.

    It's mostly a clone of the Sidekiq Z2 & Pluto.

    But I really have no idea how E310 is flashed.

    We typically use the frm file, or dfu file.

  • E310 boots from an SD card. It doesn’t get flashed. It is more similar to the SOM than Pluto. 

  • In that case, I guess all it needs is a BOOT.BIN and a kernel image.

  • Hi,

    The changes you made have since disappeared. The links you gave are no longer valid, is it because they have been merged? 

    Thank you for doing all those changes. I was on the right track changing the makefile for the E310, but I never could've made all the changes you made. 

    I am using Vivado 2018.2 but I will try with 2019.1 tomorrow as I have both on my PC.

    I downloaded the branches you changed and successfully managed to get a build, however the build files are not what the E310 needs. As rgets mentioned, it needs a BOOT.BIN, uImage, devicetree and uEnv.txt depending on what setup was decided when creating BOOT.BIN.

    The files I have obtained look more like what the pluto would expect to see on booting. I have a zImage rather than a uImage. It is all a bit confusing. I was hoping to see files like the ones I picked up from that other forum post (BOOT.BIN, uImage, devicetree. uEnv.txt). 

    When I place the files it needs on the E310, it doesn't even get as far as u-boot.

    Also, I did have to make some changes to get it to build successfully using make  when in the plutosdr-fw directory. 

    I had to remove the following line from the zynq_e310_defconfig  file used for creating the kernel:

    CONFIG_EXTRA_FIRMWARE="ad9467_intbypass_ad9517.stp ad9517.stp ad9517_fmcomms6.stp adau1761.bin imageon_edid.bin pzsdr-fmc-ad9517.stp Mykonos_M3.bin"

    I also had to use make menuconfig in the buildroot directory and change the expected versions of gcc and the toolchain externel headers to those that the error flagged it was expecting to see. To ensure my changes were saved I then had to use savedefconfig before I ran make again in the plutosdr-fw folder.

    I am at a loss of what to try, is there some way to configure it so that I get the desired files ? 

    Thank you for the help so far,

    Kind Regards,

    Dominic


  • So, I removed the links because I was informed by Robin that E310 requires an SD-card.

    Which means it should not be built via the plutosdf-fw codebase.

    Which likely means that all you have to do is manually build each project.

    Well, depends if you need the HDL as well.

    If you have an existing BOOT.BIN or just want to re-use the old one on the E310, you can just build the kernel and install in on the target.

    1. Creating BOOT.BIN

    For HDL,  what you do is clone this repo  https://github.com/analogdevicesinc/hdl/tree/master/projects/usrpe31x

    source /opt/Xilinx/SDK/2019.1/settings64.sh

    cd projects/usrpe31x

    make

    [ explained here as well https://wiki.analog.com/resources/fpga/docs/build?s[]=building&s[]=hdl  ]

    You do need a u-boot.

    So, build it from here:

    https://github.com/analogdevicesinc/u-boot-xlnx/tree/e310-support

    you use this script to create a BOOT.BIN file

    https://github.com/analogdevicesinc/wiki-scripts/tree/master/zynq_boot_bin

    build_boot_bin.sh system_top.hdf u-boot.elf

    2. Building the kernel

    Also explained here

    https://wiki.analog.com/resources/tools-software/linux-build/generic/zynq

    Clone https://github.com/analogdevicesinc/linux

    Make sure you have install build-essential and gcc-arm-linux-gnueabihf

    export ARCH=arm

    export CROSS_COMPILE=arm-linux-gnueabihf-

    make zynq_310_defconfig

    make uImage

    Again. I really don't know much about E310.

    We don't have one in our office.

    Maybe @tfcollins can give a better answer. He might have one around.

  • Hi,

    Thank you for that detailed explanation of how to build the files for the E310, it has been very helpful. Also, the e310-support branch that has been added in the u-boot-xlnx repository is where I couldn't get any further when I tried this method months ago. 
    I successfully built using these instructions, however when I move the files onto the device and boot it up, nothing happens. I believe it to be BOOT.BIN the problem as the uImage works with mhennerichs files. I will build again on Monday just in case I did something wrong. 

    However, I still get the error I posted earlier on in this post: the device descriptor error. 
    I must be doing something wrong upon booting it as this new image throws the same error. 

    My ultimate goal is to interface with the AD9361 chip via IIO_scope.

    Thank you for the help so far,
    Dominic

  • Hi,

    Unfortunately, IIO still fails to boot due to the following error:

    usb 1-1.3: device not accepting address 5, error -32

    I am about to attempt to rebuild the files for the E310 as the BOOT.BIN created using the above instructions causes sudo screen to not display anything while the E310 is booting. Which means nothing is happening. I can get the above error with mhennerichs BOOT.BIN.

    Would anyone happen to know if I am doing something wrong or not plugging something in that it needs upon booting?

    Kind Regards,

    Dominic

  • Hi,

    I just tested things on my side and everything seems to work expectedly.

    What you need to do:

    1) Download the latest zynq image from here: https://wiki.analog.com/resources/tools-software/linux-software/zynq_images

    2) Image the card with the instructions provided

    3) Copy BOOT.BIN, uImage, devicetree.dtb and uEnv.txt to the root of the FAT32 partition.

    4) Boot the E310.

    E310_2019_R1.tar.gz

    You should observe following kernel messages on the USB console:

    U-Boot 2016.07-03729-g45e5971-dirty (Dec 07 2016 - 10:25:56 +0100)
    
    Model: Zynq E310 Board
    Board: Xilinx Zynq
    I2C:   ready
    DRAM:  ECC disabled 1 GiB
    MMC:   sdhci@e0100000: 0
    Invalid bus 0 (err=-19)
    *** Warning - spi_flash_probe() failed, using default environment
    
    In:    serial@e0000000
    Out:   serial@e0000000
    Err:   serial@e0000000
    Model: Zynq E310 Board
    Board: Xilinx Zynq
    Net:   ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id
    eth0: ethernet@e000b000
    reading uEnv.txt
    377 bytes read in 13 ms (28.3 KiB/s)
    Importing environment from SD ...
    Hit any key to stop autoboot:  0 
    Device: sdhci@e0100000
    Manufacturer ID: 3
    OEM: 5344
    Name: SL08G 
    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 uEnv.txt
    377 bytes read in 9 ms (40 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from SD ...
    Running uenvcmd ...
    Copying Linux from SD to RAM...
    reading uImage
    4464952 bytes read in 396 ms (10.8 MiB/s)
    reading devicetree.dtb
    22454 bytes read in 26 ms (842.8 KiB/s)
    reading uramdisk.image.gz
    ** Unable to read file uramdisk.image.gz **
    ## Booting kernel from Legacy Image at 03000000 ...
       Image Name:   Linux-4.19.0-75617-g83098f1
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4464888 Bytes = 4.3 MiB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 02a00000
       Booting using the fdt blob at 0x2a00000
       Loading Kernel Image ... OK
       Loading Device Tree to 1fff7000, end 1ffff7b5 ... OK
    
    Starting kernel ...
    
    Booting Linux on physical CPU 0x0
    Linux version 4.19.0-75617-g83098f1 (michael@mhenneri-D06) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #488 SMP PREEMPT Wed Mar 4 17:09:44 CET 2020
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt: Machine model: Ettus Research E310 IIO (Z7020/AD9361)
    earlycon: cdns0 at MMIO 0xe0000000 (options '115200n8')
    bootconsole [cdns0] enabled
    Memory policy: Data cache writealloc
    cma: Reserved 128 MiB at 0x38000000
    random: get_random_bytes called from start_kernel+0xa0/0x404 with crng_init=0
    percpu: Embedded 16 pages/cpu @(ptrval) s33484 r8192 d23860 u65536
    Built 1 zonelists, mobility grouping on.  Total pages: 260608
    Kernel command line: earlycon console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 892768K/1048576K available (7168K kernel code, 546K rwdata, 4948K rodata, 1024K init, 146K bss, 24736K reserved, 131072K cma-reserved, 131072K 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 : 0x(ptrval) - 0x(ptrval)   (8160 kB)
          .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
          .data : 0x(ptrval) - 0x(ptrval)   ( 547 kB)
           .bss : 0x(ptrval) - 0x(ptrval)   ( 147 kB)
    rcu: Preemptible hierarchical RCU implementation.
    rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
            Tasks RCU enabled.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    efuse mapped to (ptrval)
    slcr mapped to (ptrval)
    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 (ptrval)
    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 (ptrval), 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: Spectre v2: using BPIALL workaround
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x100000 - 0x100060
    rcu: Hierarchical SRCU implementation.
    smp: Bringing up secondary CPUs ...
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    CPU1: Spectre v2: using BPIALL workaround
    smp: Brought up 1 node, 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
    futex hash table entries: 512 (order: 3, 32768 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    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 @ 0x(ptrval)
    zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
    `��k�ˋ��+W/Ҫ*LW�Y�X��edt MMIO 0xe0000000 (irq = 26, base_baud = 6249999) is a xuartps
    console [ttyPS0] enabled
    bootconsole [cdns0] disabled
    bootconsole [cdns0] disabled
    e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 27, base_baud = 6249999) is a xuartps
    GPIO line 1015 (txrx1_tx_led) hogged as output/high
    GPIO line 1013 (txrx2_tx_led) hogged as output/high
    GPIO line 1011 (rx1_rx_led) hogged as output/high
    GPIO line 1010 (rx2_rx_led) hogged as output/high
    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
    videodev: Linux video capture interface: v2.00
    jesd204: found 0 devices and 0 topologies
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm_global_timer
    NET: Registered protocol family 2
    tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    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
    hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
    workingset: timestamp_bits=30 max_order=18 bucket_order=0
    bounce: pool size: 64 pages
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    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
    brd: module loaded
    loop: module loaded
    MACsec IEEE 802.1AE
    libphy: Fixed MDIO Bus: probed
    tun: Universal TUN/TAP device driver, 1.6
    libphy: MACB_mii_bus: probed
    Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
    macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:01:22)
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    usbcore: registered new interface driver usb-storage
    usbcore: registered new interface driver usbserial_generic
    usbserial: USB Serial support registered for generic
    usbcore: registered new interface driver ftdi_sio
    usbserial: USB Serial support registered for FTDI USB Serial Device
    chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
    chipidea-usb2 e0002000.usb: Linked as a consumer to regulator.0
    ULPI transceiver vendor/product ID 0x0424/0x0009
    Found SMSC USB334x ULPI transceiver.
    ULPI integrity check: passed.
    ci_hdrc ci_hdrc.0: EHCI Host Controller
    ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    i2c /dev entries driver
    rtc-ds1307 0-0068: SET TIME!
    rtc-ds1307 0-0068: registered as rtc0
    cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (1.1.1)
    gspca_main: v2.14.0 registered
    cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at (ptrval) with timeout 10s
    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.mmc [e0100000.mmc] using ADMA
    ledtrig-cpu: registered to indicate activity on CPUs
    hidraw: raw HID events driver (C) Jiri Kosina
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    ad9361 spi0.0: ad9361_probe : enter (ad9361)
    random: fast init done
    mmc0: new high speed SDHC card at address aaaa
    mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
     mmcblk0: p1 p2 p3
    ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized
    usb 1-1: new high-speed USB device number 2 using ci_hdrc
    cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0x(ptrval), probed DDS AD9361
    NET: Registered protocol family 17
    Registering SWP/SWPB emulation handler
    hub 1-1:1.0: USB hub found
    hub 1-1:1.0: 3 ports detected
    usb 1-1.3: new full-speed USB device number 3 using ci_hdrc
    input: AKM                       AK4571                    as /devices/soc0/amba/e0002000.usb/ci_hdrc.0/usb1/1-1/1-1.3/1-1.3:1.3/0003:0556:0004.0001/input/input0
    hid-generic 0003:0556:0004.0001: input,hidraw0: USB HID v1.10 Device [AKM                       AK4571                   ] on usb-ci_hdrc.0-1.3/input3
    cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0x(ptrval), probed ADC AD9361 as MASTER
    input: gpio-keys as /devices/soc0/gpio-keys/input/input1
    rtc-ds1307 0-0068: setting system clock to 2000-01-01 01:10:26 UTC (946689026)
    ALSA device list:
      No soundcards found.
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    VFS: Mounted root (ext4 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    Run /sbin/init as init process
    Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
    random: init: uninitialized urandom read (12 bytes read)
    random: mountall: uninitialized urandom read (12 bytes read)
    [ OK ]ting up X socket directories...        
     * STARTDISTCC is set to false in /etc/default/distcc
     * /usr/bin/distccd not starting
    [ OK ]rting IIO Daemon iiod        
    
    Last login: Fri Dec 20 14:20:57 UTC 2019 on tty1
    Welcome to Linaro 14.04 (GNU/Linux 4.19.0-75617-g83098f1 armv7l)
    
     * Documentation:  https://wiki.analog.com/ https://ez.analog.com/
    
    New release '16.04.6 LTS' available.
    Run 'do-release-upgrade' to upgrade to it.
    
    root@analog:~# iio_attr -D
    IIO context has 4 devices:
            iio:device0: ad9361-phy, found 182 debug attributes
            iio:device1: xadc, found 0 debug attributes
            iio:device2: cf-ad9361-dds-core-lpc, found 1 debug attributes
            iio:device3: cf-ad9361-lpc, found 2 debug attributes
    root@analog:~# lsusb
    Bus 001 Device 003: ID 0556:0004 Asahi Kasei Microsystems Co., Ltd 
    Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    root@analog:~# lsusb -t
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ci_hdrc/1p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 3: Dev 3, If 0, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 1, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 2, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    root@analog:~#

    It should boot to the root prompt and IIOD should be started.

    So even if you still see the USB errors, you should be able to connect to the E310 remotely.

    USB works for me as you can see. Maybe you have a newer revision and the USB is not properly powered? Anyways that should not prevent you from connecting remotely via Ethernet.

    All my 2019_R1 build files are attached.

    -Michael

Reply
  • Hi,

    I just tested things on my side and everything seems to work expectedly.

    What you need to do:

    1) Download the latest zynq image from here: https://wiki.analog.com/resources/tools-software/linux-software/zynq_images

    2) Image the card with the instructions provided

    3) Copy BOOT.BIN, uImage, devicetree.dtb and uEnv.txt to the root of the FAT32 partition.

    4) Boot the E310.

    E310_2019_R1.tar.gz

    You should observe following kernel messages on the USB console:

    U-Boot 2016.07-03729-g45e5971-dirty (Dec 07 2016 - 10:25:56 +0100)
    
    Model: Zynq E310 Board
    Board: Xilinx Zynq
    I2C:   ready
    DRAM:  ECC disabled 1 GiB
    MMC:   sdhci@e0100000: 0
    Invalid bus 0 (err=-19)
    *** Warning - spi_flash_probe() failed, using default environment
    
    In:    serial@e0000000
    Out:   serial@e0000000
    Err:   serial@e0000000
    Model: Zynq E310 Board
    Board: Xilinx Zynq
    Net:   ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id
    eth0: ethernet@e000b000
    reading uEnv.txt
    377 bytes read in 13 ms (28.3 KiB/s)
    Importing environment from SD ...
    Hit any key to stop autoboot:  0 
    Device: sdhci@e0100000
    Manufacturer ID: 3
    OEM: 5344
    Name: SL08G 
    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 uEnv.txt
    377 bytes read in 9 ms (40 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from SD ...
    Running uenvcmd ...
    Copying Linux from SD to RAM...
    reading uImage
    4464952 bytes read in 396 ms (10.8 MiB/s)
    reading devicetree.dtb
    22454 bytes read in 26 ms (842.8 KiB/s)
    reading uramdisk.image.gz
    ** Unable to read file uramdisk.image.gz **
    ## Booting kernel from Legacy Image at 03000000 ...
       Image Name:   Linux-4.19.0-75617-g83098f1
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    4464888 Bytes = 4.3 MiB
       Load Address: 00008000
       Entry Point:  00008000
       Verifying Checksum ... OK
    ## Flattened Device Tree blob at 02a00000
       Booting using the fdt blob at 0x2a00000
       Loading Kernel Image ... OK
       Loading Device Tree to 1fff7000, end 1ffff7b5 ... OK
    
    Starting kernel ...
    
    Booting Linux on physical CPU 0x0
    Linux version 4.19.0-75617-g83098f1 (michael@mhenneri-D06) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11-rc1)) #488 SMP PREEMPT Wed Mar 4 17:09:44 CET 2020
    CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    OF: fdt: Machine model: Ettus Research E310 IIO (Z7020/AD9361)
    earlycon: cdns0 at MMIO 0xe0000000 (options '115200n8')
    bootconsole [cdns0] enabled
    Memory policy: Data cache writealloc
    cma: Reserved 128 MiB at 0x38000000
    random: get_random_bytes called from start_kernel+0xa0/0x404 with crng_init=0
    percpu: Embedded 16 pages/cpu @(ptrval) s33484 r8192 d23860 u65536
    Built 1 zonelists, mobility grouping on.  Total pages: 260608
    Kernel command line: earlycon console=ttyPS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
    Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    Memory: 892768K/1048576K available (7168K kernel code, 546K rwdata, 4948K rodata, 1024K init, 146K bss, 24736K reserved, 131072K cma-reserved, 131072K 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 : 0x(ptrval) - 0x(ptrval)   (8160 kB)
          .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
          .data : 0x(ptrval) - 0x(ptrval)   ( 547 kB)
           .bss : 0x(ptrval) - 0x(ptrval)   ( 147 kB)
    rcu: Preemptible hierarchical RCU implementation.
    rcu:    RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
            Tasks RCU enabled.
    rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
    NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
    efuse mapped to (ptrval)
    slcr mapped to (ptrval)
    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 (ptrval)
    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 (ptrval), 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: Spectre v2: using BPIALL workaround
    CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    Setting up static identity map for 0x100000 - 0x100060
    rcu: Hierarchical SRCU implementation.
    smp: Bringing up secondary CPUs ...
    CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    CPU1: Spectre v2: using BPIALL workaround
    smp: Brought up 1 node, 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
    futex hash table entries: 512 (order: 3, 32768 bytes)
    pinctrl core: initialized pinctrl subsystem
    NET: Registered protocol family 16
    DMA: preallocated 256 KiB pool for atomic coherent allocations
    cpuidle: using governor ladder
    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 @ 0x(ptrval)
    zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
    `��k�ˋ��+W/Ҫ*LW�Y�X��edt MMIO 0xe0000000 (irq = 26, base_baud = 6249999) is a xuartps
    console [ttyPS0] enabled
    bootconsole [cdns0] disabled
    bootconsole [cdns0] disabled
    e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 27, base_baud = 6249999) is a xuartps
    GPIO line 1015 (txrx1_tx_led) hogged as output/high
    GPIO line 1013 (txrx2_tx_led) hogged as output/high
    GPIO line 1011 (rx1_rx_led) hogged as output/high
    GPIO line 1010 (rx2_rx_led) hogged as output/high
    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
    videodev: Linux video capture interface: v2.00
    jesd204: found 0 devices and 0 topologies
    Advanced Linux Sound Architecture Driver Initialized.
    clocksource: Switched to clocksource arm_global_timer
    NET: Registered protocol family 2
    tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes)
    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
    hw perfevents: no interrupt-affinity property for /pmu@f8891000, guessing.
    hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
    workingset: timestamp_bits=30 max_order=18 bucket_order=0
    bounce: pool size: 64 pages
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    io scheduler mq-deadline registered
    io scheduler kyber registered
    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
    brd: module loaded
    loop: module loaded
    MACsec IEEE 802.1AE
    libphy: Fixed MDIO Bus: probed
    tun: Universal TUN/TAP device driver, 1.6
    libphy: MACB_mii_bus: probed
    Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
    macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 30 (00:0a:35:00:01:22)
    ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    usbcore: registered new interface driver usb-storage
    usbcore: registered new interface driver usbserial_generic
    usbserial: USB Serial support registered for generic
    usbcore: registered new interface driver ftdi_sio
    usbserial: USB Serial support registered for FTDI USB Serial Device
    chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
    chipidea-usb2 e0002000.usb: Linked as a consumer to regulator.0
    ULPI transceiver vendor/product ID 0x0424/0x0009
    Found SMSC USB334x ULPI transceiver.
    ULPI integrity check: passed.
    ci_hdrc ci_hdrc.0: EHCI Host Controller
    ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
    ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    i2c /dev entries driver
    rtc-ds1307 0-0068: SET TIME!
    rtc-ds1307 0-0068: registered as rtc0
    cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
    usbcore: registered new interface driver uvcvideo
    USB Video Class driver (1.1.1)
    gspca_main: v2.14.0 registered
    cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at (ptrval) with timeout 10s
    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.mmc [e0100000.mmc] using ADMA
    ledtrig-cpu: registered to indicate activity on CPUs
    hidraw: raw HID events driver (C) Jiri Kosina
    usbcore: registered new interface driver usbhid
    usbhid: USB HID core driver
    ad9361 spi0.0: ad9361_probe : enter (ad9361)
    random: fast init done
    mmc0: new high speed SDHC card at address aaaa
    mmcblk0: mmc0:aaaa SL08G 7.40 GiB 
     mmcblk0: p1 p2 p3
    ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized
    usb 1-1: new high-speed USB device number 2 using ci_hdrc
    cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0x(ptrval), probed DDS AD9361
    NET: Registered protocol family 17
    Registering SWP/SWPB emulation handler
    hub 1-1:1.0: USB hub found
    hub 1-1:1.0: 3 ports detected
    usb 1-1.3: new full-speed USB device number 3 using ci_hdrc
    input: AKM                       AK4571                    as /devices/soc0/amba/e0002000.usb/ci_hdrc.0/usb1/1-1/1-1.3/1-1.3:1.3/0003:0556:0004.0001/input/input0
    hid-generic 0003:0556:0004.0001: input,hidraw0: USB HID v1.10 Device [AKM                       AK4571                   ] on usb-ci_hdrc.0-1.3/input3
    cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0x(ptrval), probed ADC AD9361 as MASTER
    input: gpio-keys as /devices/soc0/gpio-keys/input/input1
    rtc-ds1307 0-0068: setting system clock to 2000-01-01 01:10:26 UTC (946689026)
    ALSA device list:
      No soundcards found.
    EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    VFS: Mounted root (ext4 filesystem) on device 179:2.
    devtmpfs: mounted
    Freeing unused kernel memory: 1024K
    Run /sbin/init as init process
    Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
    random: init: uninitialized urandom read (12 bytes read)
    random: mountall: uninitialized urandom read (12 bytes read)
    [ OK ]ting up X socket directories...        
     * STARTDISTCC is set to false in /etc/default/distcc
     * /usr/bin/distccd not starting
    [ OK ]rting IIO Daemon iiod        
    
    Last login: Fri Dec 20 14:20:57 UTC 2019 on tty1
    Welcome to Linaro 14.04 (GNU/Linux 4.19.0-75617-g83098f1 armv7l)
    
     * Documentation:  https://wiki.analog.com/ https://ez.analog.com/
    
    New release '16.04.6 LTS' available.
    Run 'do-release-upgrade' to upgrade to it.
    
    root@analog:~# iio_attr -D
    IIO context has 4 devices:
            iio:device0: ad9361-phy, found 182 debug attributes
            iio:device1: xadc, found 0 debug attributes
            iio:device2: cf-ad9361-dds-core-lpc, found 1 debug attributes
            iio:device3: cf-ad9361-lpc, found 2 debug attributes
    root@analog:~# lsusb
    Bus 001 Device 003: ID 0556:0004 Asahi Kasei Microsystems Co., Ltd 
    Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    root@analog:~# lsusb -t
    /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ci_hdrc/1p, 480M
        |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/3p, 480M
            |__ Port 3: Dev 3, If 0, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 1, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 2, Class=Audio, Driver=, 12M
            |__ Port 3: Dev 3, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    root@analog:~#

    It should boot to the root prompt and IIOD should be started.

    So even if you still see the USB errors, you should be able to connect to the E310 remotely.

    USB works for me as you can see. Maybe you have a newer revision and the USB is not properly powered? Anyways that should not prevent you from connecting remotely via Ethernet.

    All my 2019_R1 build files are attached.

    -Michael

Children
  • Hi Micheal,

    Thank you very much, what you have provided has been helpful getting at least a terminal to show up on the E310.

    The files you gave function correctly, however I still encounter a the same device descriptor error. You are right in saying that this should not stop me from connecting to the E310 remotely. I can via ethernet if I use the USB screen link to change the IP address. But the IP address keeps switching back so that I can't stay connected to it for long, about 2 minutes. 

    Also, I do not know if this is due to the USB error, but IIOD does start successfully and then I am presented with a terminal, but shortly afterwards it attempts to login again, and this time IIOD fails, and it fails to login. At this point I can only get a terminal by pressing enter. 

    I am sure you are correct about our E310 devices being different, I know that there are two models, the sg1 and the sg3. I know I have the sg3. Maybe this is causing the errors. 

    I have done some research on the device descriptor error and some people suggest a hardware error, but I have tried to boot on a second E310 (also an sg3) to meet the same errors.

    I am not entirely sure whether or not this error needs solving, provided I can interface with IIO_Scope via ethernet, but it would good to know where it comes from. 

    I guess my next question is what IP address do you use by default to remotely connect to the E310 when booting IIO_Scope. As I mentioned previously, I have to change the IP on the device but it appears to change itself back shortly afterwards preventing me from using IIO_Scope properly. 

    Any further help you can provide is greatly appreciated. 

    Kind Regards,

    Dominic

    EDIT: The P/N seen on the underside of the E310 should be of the form 156333X-01L. If X is A, B, C, or D then you have the sg1 model, if it is E or higher, then you have the sg3 model.

  • I am not entirely sure whether or not this error needs solving, provided I can interface with IIO_Scope via ethernet, but it would good to know where it comes from. 

    Sounds like support for an E310 forum.

    I guess my next question is what IP address do you use by default to remotely connect to the E310 when booting IIO_Scope. As I mentioned previously, I have to change the IP on the device but it appears to change itself back shortly afterwards preventing me from using IIO_Scope properly. 

    Should be given by DHCP server.

    Any further help you can provide is greatly appreciated. 

    I think at this point support should go to the E310 forums

  • I'm afraid I disagree, my problem lies with IIO, which is Analog Devices, not with the E310 itself. If I use another image I built for the E310 the way Ettus intend the E310 to be used, this device descriptor error does not occur. 
    The problem I am encountering is IIOD failing to log me in which I believe is an IIO problem. 



  • I can via ethernet if I use the USB screen link to change the IP address. But the IP address keeps switching back so that I can't stay connected to it for long, about 2 minutes. 

    It's the ubuntu network manager - use the enable_static_ip.sh script to enable static IP

    https://wiki.analog.com/resources/eval/user-guides/ad-fmcomms2-ebz/software/linux/applications/shell_scripts#enabling_a_static_ip_address

    It's already on the image.

    I am sure you are correct about our E310 devices being different, I know that there are two models, the sg1 and the sg3. I know I have the sg3. Maybe this is causing the errors. 

    Very likely - just ignore them.

    -Michael

  • Hi Michael,

    Thank you very much for all the help you provided. I can now interface with the E310 using  IIO_Scope seemlessly as I wanted to. It still tries to log me in twice but I can ignore it as IIO_scope still works, it must be due to the USB Error.

    If this happens to anyone else, once it has failed to log in you the second time but succeeded the first, just hit enter and you get the terminal back. 

    Thank you for the help you provided, it has been amazing.

    Kind Regards,
    Dominic