Get the image working for the MicroZed (7010 and 7020).
Closed, ResolvedPublic

Description

adjusted task title.

skinkie created this task.Oct 17 2014, 11:08 PM
skinkie updated the task description. (Show Details)
skinkie raised the priority of this task from to High.
skinkie claimed this task.
skinkie added a project: Unknown Object (Project).
philippej removed a project: Unknown Object (Project).Oct 22 2014, 5:39 PM
sebastian lowered the priority of this task from High to Normal.Oct 28 2014, 2:46 PM
sebastian added a subscriber: sebastian.

no rush here.

Bertl raised the priority of this task from Normal to High.Nov 14 2014, 8:22 PM
Bertl added a subscriber: Bertl.

A working boot image (SD card and TFTP) would be very useful in the near future (let's say 1-2 weeks).

Thanks,
Herbert

@Bertl Do you have a 7020?

Bertl added a comment.Nov 14 2014, 8:53 PM

will test on the 7020 MicroZed ASAP.

sebastian reassigned this task from skinkie to Bertl.Nov 14 2014, 9:00 PM
sebastian added a subscriber: skinkie.

Reassigning to Herbert for testing:
http://stefan.konink.de/contrib/apertus/

Reassign to Stefan once tested.

Bertl added a comment.Nov 25 2014, 7:19 PM

After a long search for a _working_ SD card reader/writer (I have now three non working adapters) I'm now finally ready to do some testing.

First impression (testing with the 7010 MicroZed):

U-Boot 2014.01 (Jul 04 2014 - 19:30:04)

I2C: ready
Memory: ECC disabled
DRAM: 512 MiB
MMC: zynq_sdhci: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB

  • Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: Gem.e000b000
Hit any key to stop autoboot: 0
Device: zynq_sdhci
Manufacturer ID: 1c
OEM: 5356
Name: USD
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading uEnv.txt

  • Unable to read file uEnv.txt **

Copying Linux from SD to RAM...
reading uImage

  • Unable to read file uImage **

zynq-uboot>

this is after unpacking apertus-boot.tar.bz2 and moving the boot content to a 256MB VFAT partitioned SD card.
please advise what I'm seeing here.

fatload mmc 0 0x3000000 uImage
fatload mmc 0 0x2A00000 devicetree.dtb
setenv bootargs console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=2 init=/usr/lib/systemd/systemd
bootm 0x3000000 - 0x2A00000

Lets see if that works ;)

Bertl added a comment.Nov 25 2014, 8:02 PM

after adjusting the uImage to uImage.bin, this gives:

  1. Booting kernel from Legacy Image at 03000000 ... Image Name: Linux-3.14.0-xilinx Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3328432 Bytes = 3.2 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK
  2. Flattened Device Tree blob at 02a00000 Booting using the fdt blob at 0x2a00000 Loading Kernel Image ... OK Loading Device Tree to 1fb2b000, end 1fb2fb62 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.14.0-xilinx (root@) (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-53) ) #3 SMP PREEMPT Sun Aug 24 20:10:18 UTC 2014
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Xilinx Zynq
cma: CMA: reserved 128 MiB at 27800000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @e6f9f000 s9024 r8192 d15552 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260624
Kernel command line: console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=2 init=/usr/lib/systemd/systemd
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: 901416K/1048576K available (4539K kernel code, 232K rwdata, 1532K rodata, 180K init, 192K bss, 147160K reserved, 270336K highmem)
Virtual kernel memory layout:

vector  : 0xffff0000 - 0xffff1000   (   4 kB)
fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
modules : 0xbf000000 - 0xbfe00000   (  14 MB)
  .text : 0xc0008000 - 0xc05f6144   (6073 kB)
  .init : 0xc05f7000 - 0xc0624340   ( 181 kB)
  .data : 0xc0626000 - 0xc0660160   ( 233 kB)
   .bss : 0xc066016c - 0xc06902fc   ( 193 kB)

Preemptible hierarchical RCU implementation.

Dump stacks of tasks blocking RCU-preempt GP.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.

RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
ps7-slcr mapped to f0004000
zynq_clock_init: clkc starts at f0004100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns
ps7-ttc #0 at f0006000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
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 0x44c1a0 - 0x44c1f8
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72760000, Cache size: 512 kB
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
syscon f8000000.ps7-slcr: regmap [mem 0xf8000000-0xf8000fff] registered
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0080000
bio: create slab <bio-0> at 0
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
Advanced Linux Sound Architecture Driver Initialized.
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)
TCP: reno registered
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.
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
bounce pool size: 64 pages
jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 1488
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.ps7-dma: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xuartps e0001000.serial: clock name 'aper_clk' is deprecated.
xuartps e0001000.serial: clock name 'ref_clk' is deprecated.
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3124999) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to f0068000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
zynq-qspi e000d000.ps7-qspi: pclk clock not found.
zynq-qspi: probe of e000d000.ps7-qspi failed with error -2
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
libphy: XEMACPS mii bus: probed
xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller
zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1
zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000
zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
zynq-edac f8006000.ps7-ddrc: ecc not enabled
cpufreq_cpu0: failed to get cpu0 regulator: -19
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: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
regulator-dummy: disabling
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:

No soundcards found.

Waiting 2 sec before mounting root device...
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 USD 3.74 GiB
mmcblk0: p1 p2 p3
List of all partitions:
b300 3931136 mmcblk0 driver: mmcblk

b301          261120 mmcblk0p1 00000000-01
b302         1376256 mmcblk0p2 00000000-02
b303         2292736 mmcblk0p3 00000000-03

No filesystem could mount root, tried: ext3 ext2 ext4 vfat msdos
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.0-xilinx #3
[<c0014688>] (unwind_backtrace) from [<c0010d3c>] (show_stack+0x10/0x14)
[<c0010d3c>] (show_stack) from [<c0447ab8>] (dump_stack+0x8c/0xd0)
[<c0447ab8>] (dump_stack) from [<c0013094>] (ipi_cpu_stop+0x3c/0x6c)
[<c0013094>] (ipi_cpu_stop) from [<c001370c>] (handle_IPI+0x64/0x84)
[<c001370c>] (handle_IPI) from [<c000853c>] (gic_handle_irq+0x58/0x60)
[<c000853c>] (gic_handle_irq) from [<c0011700>] (irq_svc+0x40/0x70)
Exception stack(0xc0627f18 to 0xc0627f60)
7f00: c0627f60 00000000
7f20: b737a708 00000000 b6fd107f 00000000 00000001 e6fa00e8 c0659180 c06591cc
7f40: c0688800 00000000 00000008 c0627f60 c005e430 c0359950 00000113 ffffffff
[<c0011700>] (
irq_svc) from [<c0359950>] (cpuidle_enter_state+0x50/0xd8)
[<c0359950>] (cpuidle_enter_state) from [<c0359abc>] (cpuidle_idle_call+0xe4/0x13c)
[<c0359abc>] (cpuidle_idle_call) from [<c000e828>] (arch_cpu_idle+0x8/0x38)
[<c000e828>] (arch_cpu_idle) from [<c005452c>] (cpu_startup_entry+0xbc/0x108)
[<c005452c>] (cpu_startup_entry) from [<c05f7a0c>] (start_kernel+0x284/0x2c0)
[<c05f7a0c>] (start_kernel) from [<00008074>] (0x8074)

Bertl added a comment.Nov 25 2014, 8:04 PM

I presume I should put a rootfs on partition 2, yes?

My suggestion was to take the ArchLinux ZedBoard image, and add our bootpart for the 7010 board. I guess given I see a kernel booting. We don't have any problems with the 7020 :-)

Bertl added a comment.Nov 27 2014, 2:29 AM

something strange is going on.

I added an uEnv.txt with:

kernel_image=uImage.bin
devicetree_image=devicetree.dtb
ramdisk_image=uramdisk.image.gz
bootargs="console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=5 init=/usr/lib/systemd/systemd"
uenvcmd=run myboot || bootm 0x3000000 - 0x2A00000

but the rootdelay=5 is ignored and the boot fails:

U-Boot 2014.01 (Jul 04 2014 - 19:30:04)

I2C:   ready
Memory: ECC disabled
DRAM:  512 MiB
MMC:   zynq_sdhci: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Gem.e000b000
Hit any key to stop autoboot:  0 
Device: zynq_sdhci
Manufacturer ID: 1c
OEM: 5356
Name: USD   
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
reading uEnv.txt
239 bytes read in 7 ms (33.2 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
## Error: "myboot" not defined
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.14.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3328432 Bytes = 3.2 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 1fb2a000, end 1fb2eb62 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.14.0-xilinx (root@) (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-53) ) #3 SMP PREEMPT Sun Aug 24 20:10:18 UTC 2014
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Xilinx Zynq
cma: CMA: reserved 128 MiB at 27800000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @e6f9f000 s9024 r8192 d15552 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: "console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=5 init=/usr/lib/systemd/systemd"
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: 901416K/1048576K available (4539K kernel code, 232K rwdata, 1532K rodata, 180K init, 192K bss, 147160K reserved, 270336K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc05f6144   (6073 kB)
      .init : 0xc05f7000 - 0xc0624340   ( 181 kB)
      .data : 0xc0626000 - 0xc0660160   ( 233 kB)
       .bss : 0xc066016c - 0xc06902fc   ( 193 kB)
Preemptible hierarchical RCU implementation.
        Dump stacks of tasks blocking RCU-preempt GP.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
ps7-slcr mapped to f0004000
zynq_clock_init: clkc starts at f0004100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns
ps7-ttc #0 at f0006000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
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 0x44c1a0 - 0x44c1f8
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72760000, Cache size: 512 kB
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
syscon f8000000.ps7-slcr: regmap [mem 0xf8000000-0xf8000fff] registered
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0080000
bio: create slab <bio-0> at 0
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
Advanced Linux Sound Architecture Driver Initialized.
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)
TCP: reno registered
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.
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
bounce pool size: 64 pages
jffs2: version 2.2. (NAND) (SUMMARY)  �ũ 2001-2006 Red Hat, Inc.
msgmni has been set to 1488
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.ps7-dma:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xuartps e0001000.serial: clock name 'aper_clk' is deprecated.
xuartps e0001000.serial: clock name 'ref_clk' is deprecated.
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3124999) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to f0068000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
zynq-qspi e000d000.ps7-qspi: pclk clock not found.
zynq-qspi: probe of e000d000.ps7-qspi failed with error -2
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
libphy: XEMACPS mii bus: probed
xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller
zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1
zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000
zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
zynq-edac f8006000.ps7-ddrc: ecc not enabled
cpufreq_cpu0: failed to get cpu0 regulator: -19
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: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
regulator-dummy: disabling
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU1: stopping
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.14.0-xilinx #3
[<c0014688>] (unwind_backtrace) from [<c0010d3c>] (show_stack+0x10/0x14)
[<c0010d3c>] (show_stack) from [<c0447ab8>] (dump_stack+0x8c/0xd0)
[<c0447ab8>] (dump_stack) from [<c0013094>] (ipi_cpu_stop+0x3c/0x6c)
[<c0013094>] (ipi_cpu_stop) from [<c001370c>] (handle_IPI+0x64/0x84)
[<c001370c>] (handle_IPI) from [<c000853c>] (gic_handle_irq+0x58/0x60)
[<c000853c>] (gic_handle_irq) from [<c0011700>] (__irq_svc+0x40/0x70)
Exception stack(0xe688df50 to 0xe688df98)
df40:                                     e688df98 00000000 3f278290 00000000
df60: 3ebde1b3 00000000 00000000 e6fa80e8 c0659180 c0659180 c0688800 00000000
df80: 00000008 e688df98 c005e430 c0359950 00000113 ffffffff
[<c0011700>] (__irq_svc) from [<c0359950>] (cpuidle_enter_state+0x50/0xd8)
[<c0359950>] (cpuidle_enter_state) from [<c0359abc>] (cpuidle_idle_call+0xe4/0x13c)
[<c0359abc>] (cpuidle_idle_call) from [<c000e828>] (arch_cpu_idle+0x8/0x38)
[<c000e828>] (arch_cpu_idle) from [<c005452c>] (cpu_startup_entry+0xbc/0x108)
[<c005452c>] (cpu_startup_entry) from [<000085e4>] (0x85e4)

but when I define myboot and set the bootargs manually, then the rootdelay is honored.

set myboot echo foo
run uenvboot
setenv bootargs console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=5 init=/usr/lib/systemd/systemd
bootm 0x3000000 - 0x2A00000
## Booting kernel from Legacy Image at 03000000 ...
   Image Name:   Linux-3.14.0-xilinx
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3328432 Bytes = 3.2 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 1fb2b000, end 1fb2fb62 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 3.14.0-xilinx (root@) (gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-53) ) #3 SMP PREEMPT Sun Aug 24 20:10:18 UTC 2014
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Xilinx Zynq
cma: CMA: reserved 128 MiB at 27800000
Memory policy: Data cache writealloc
PERCPU: Embedded 8 pages/cpu @e6f9f000 s9024 r8192 d15552 u32768
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 260624
Kernel command line: console=ttyPS0,115200n8 root=/dev/mmcblk0p2 rw rootdelay=5 init=/usr/lib/systemd/systemd
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: 901416K/1048576K available (4539K kernel code, 232K rwdata, 1532K rodata, 180K init, 192K bss, 147160K reserved, 270336K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc05f6144   (6073 kB)
      .init : 0xc05f7000 - 0xc0624340   ( 181 kB)
      .data : 0xc0626000 - 0xc0660160   ( 233 kB)
       .bss : 0xc066016c - 0xc06902fc   ( 193 kB)
Preemptible hierarchical RCU implementation.
        Dump stacks of tasks blocking RCU-preempt GP.
        RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
ps7-slcr mapped to f0004000
zynq_clock_init: clkc starts at f0004100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 3298534883328ns
ps7-ttc #0 at f0006000, irq=43
Console: colour dummy device 80x30
Calibrating delay loop... 1325.46 BogoMIPS (lpj=6627328)
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 0x44c1a0 - 0x44c1f8
L310 cache controller enabled
l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72760000, Cache size: 512 kB
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
syscon f8000000.ps7-slcr: regmap [mem 0xf8000000-0xf8000fff] registered
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xf0080000
bio: create slab <bio-0> at 0
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
Advanced Linux Sound Architecture Driver Initialized.
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)
TCP: reno registered
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.
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
bounce pool size: 64 pages
jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
msgmni has been set to 1488
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208
dma-pl330 f8003000.ps7-dma:     DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xuartps e0001000.serial: clock name 'aper_clk' is deprecated.
xuartps e0001000.serial: clock name 'ref_clk' is deprecated.
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3124999) is a xuartps
console [ttyPS0] enabled
xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to f0068000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
zynq-qspi e000d000.ps7-qspi: pclk clock not found.
zynq-qspi: probe of e000d000.ps7-qspi failed with error -2
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
libphy: XEMACPS mii bus: probed
xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
zynq-ehci zynq-ehci.0: Xilinx Zynq USB EHCI Host Controller
zynq-ehci zynq-ehci.0: new USB bus registered, assigned bus number 1
zynq-ehci zynq-ehci.0: irq 53, io mem 0x00000000
zynq-ehci zynq-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
zynq-edac f8006000.ps7-ddrc: ecc not enabled
cpufreq_cpu0: failed to get cpu0 regulator: -19
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: no vqmmc regulator found
mmc0: no vmmc regulator found
mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
regulator-dummy: disabling
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
Waiting 5 sec before mounting root device...
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 USD   3.74 GiB 
 mmcblk0: p1 p2 p3
EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (244)
EXT4-fs (mmcblk0p2): recovery complete
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: 180K (c05f7000 - c0624000)

also network sometimes works and sometimes fails at all levels (u-boot and kernel) with carrier problems.
you mentioned a fix/workaround from elphel on IRC but didn't elaborate.

Bertl added a comment.Nov 29 2014, 3:29 AM

Forgot to mention, behaviour is the same on the 7020 MicroZed.

Bertl renamed this task from Get the image working for the 7020 MicroZed. to Get the image working for the MicroZed (7010 and 7020)..Nov 29 2014, 3:30 AM
Bertl updated the task description. (Show Details)
Bertl reassigned this task from Bertl to skinkie.

Ok, enough information. I'll make an all in one image.

Bertl added a comment.Dec 16 2014, 4:19 PM

Any news on this?

I'd love to have an image which actually boots up automatically and doesn't require human interaction.

Best,
Herbert

I have asked Sven if we could directly migrate to the Elphel bootloader code, he was investigating it. But I haven't heard from him, so I contacted him on Sunday about it. Obviously I can upgrade the existing image to something like a 2GB partition and go with that, but I was hoping for "more".

It would be greatly appreciated if someone could take a peak if the following image will work on a vanilla MicroZed.

stefan.konink.de/contrib/apertus/apertos.img.xz

skinkie reassigned this task from skinkie to Bertl.Dec 22 2014, 10:07 PM
Bertl added a comment.Dec 26 2014, 5:10 PM

Sorry for the delay, I was busy with Xmas.

 reading uramdisk.image.gz
** Unable to read file uramdisk.image.gz **

and indeed fatls mmc 0:1 doesn't show any initramfs.

Bertl reassigned this task from Bertl to skinkie.Dec 26 2014, 5:11 PM
Bertl added a comment.Dec 26 2014, 5:20 PM

When manually booting with bootm 0x3000000 - 0x2A00000 it boots up to a certain point where it simply resets.

The point where it resets is not deterministic.

try #1 [ OK ] Started udev Coldplug all Devices.
try #2 [ OK ] Started udev Kernel Device Manager.
try #3 [ OK ] Started Flush Journal to Persistent Storage.

I'm now going to check with the previous image if that might be hardware related.

Bertl added a comment.Dec 26 2014, 5:45 PM

Problem seems to be power consumption related.
I got it to boot after applying additional power (i.e. the USB power is insufficient).

The image draws significantly more power than the previous one, the Zynq also heats up significantly when everything is idle.
I don't have specifics as the xadc interface seems to be non-functional (so no temperature/voltage measurements).

Is this on the 7020?

So what has changed between the last and this revision? Mainly the automatic starting of the ethernet interface and run DHCP.

But what I was more interested about: does the image "autoboot"?

Bertl added a comment.Dec 31 2014, 2:14 AM

no, it doesn't because it seems to execute the wrong script.

see my first response.

What would be the best way to 'clear' my configuration so I can observe the behavior you are having? You did select the dipswitch of booting from SD?

Bertl added a comment.Jan 10 2015, 1:37 AM

We should really move that to a faster medium, please ping me on IRC in the future if you need to know something to avoid further delays.

Jumper settings are:
JP3 2-3
JP2 2-3
JP1 1-2

I can probably upload a dump of all on-board memories.

Bertl added a comment.Jan 10 2015, 1:58 AM

QSPI is not accessible under linux with the image:
[ 0.746324] zynq-qspi e000d000.ps7-qspi: pclk clock not found.
[ 0.750826] zynq-qspi: probe of e000d000.ps7-qspi failed with error -2

But if it helps, I can try to dump it from u-boot.

So first of all, the uenv.txt issue will be solved by the description Sven gave. Needs a recompiled u-boot, we can handle that.

Regarding the qspi, i'll investigate if the 7010 has issues with it as well. But after that I need to investigate why the Xilinx stock settings are wrong.

Bertl added a comment.Jan 10 2015, 8:35 AM

I rolled my own devicetree for the ZedBoard, it might make sense to do so for the MicroZed as well.
Also some devices will not be required in the kernels (because the hardware is not there) and others might need to be enabled (because the default is to disable them)

Thanks in advance,
Herbert

Status: the current only problem with the current compilation of u-boot seems to be that the uenv.txt is not loaded by default. It did require a minor change to the uenv.txt.

The device has the following stock configuration:

"uenvboot=" \
        "if run loadbootenv; then " \
                "echo Loaded environment from ${bootenv}; " \
                "run importbootenv; " \
        "fi; " \
        "if test -n $uenvcmd; then " \
                "echo Running uenvcmd ...; " \
                "run uenvcmd; " \
        "fi\0" \
"sdboot=if mmcinfo; then " \
                "run uenvboot; " \
                "echo Copying Linux from SD to RAM... && " \
                "fatload mmc 0 0x3000000 ${kernel_image} && " \
                "fatload mmc 0 0x2A00000 ${devicetree_image} && " \
                "fatload mmc 0 0x2000000 ${ramdisk_image} && " \
                "bootm 0x3000000 0x2000000 0x2A00000; " \
        "fi\0" \

When I manually run:

zynq-uboot> run uenvboot
reading uEnv.txt
3427 bytes read in 17 ms (196.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...

zynq-uboot> run sdboot
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
reading uEnv.txt
3427 bytes read in 17 ms (196.3 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading uImage
3328496 bytes read in 298 ms (10.7 MiB/s)
reading devicetree.dtb
7011 bytes read in 17 ms (402.3 KiB/s)

Booting kernel from Legacy Image at 03000000 ...

(everything works)

But when I run it directly:
zynq-uboot> run sdboot
Device: zynq_sdhci
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
reading uEnv.txt
3427 bytes read in 16 ms (209 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
reading uImage
3328496 bytes read in 299 ms (10.6 MiB/s)
reading devicetree.dtb
7011 bytes read in 17 ms (402.3 KiB/s)
reading uramdisk.image.gz

  • Unable to read file uramdisk.image.gz **

Obviously this all makes sense because it doesn't "run" the sdboot from the uenv thingie, but it runs the fatload the current configuration.

Please advise:

  1. Run saveenv, so at least the reboot functions.
  2. Rewrite sdboot it calls itself a second time with loop prevention(?)
  3. Add an empty ramdisk image.
Bertl added a comment.Jan 19 2015, 1:24 AM

My preference (as stated on IRC):

Have a cleaned up default environment in our uboot.
By default, source the uenv.txt from SD and if successfull, run uenvboot (or axiomboot)

Bertl added a comment.Feb 10 2015, 7:43 AM

Any progress here?
Can we expect something in the near future?

I'm asking because I need a working bootloader and kernel for testing and if this needs much more time on your side, I'm going to build/config my own for this purpose.

Thanks,
Herbert

Yes. Expect an update of the image and uboot this evening.

New boot.bin for testing.

http://stefan.konink.de/contrib/apertus/boot.bin

Known issues:
QSPI not being detected.

Update to boot.bin to kernel 3.14. XADC has been added. QSPI still not detected.

u-boot seems to have a problem with modified MAC addresses.

setenv ethaddr 00:0a:35:00:01:22
bootp

works fine, but

setenv ethaddr 00:0a:35:00:01:23
bootp

fails with:

Retry count exceeded

although the dhcp server hands out a proper IP.

btw, where can I find/get the kernel/u-boot sources you used?

If we remove the ethaddr option, will it be recovered by Linux when the PHY is setup?

Just send you an email on the sources topic.

It seems, u-boot doesn't update the GEM registers.

The following manual GEM modification makes it work (for the :23 MAC address):

mw.l 0xE000B08C 0x2301

What happens is that the GEM is initialized with the u-boot hard coded MAC address, and changing the etheraddr later in uEnv.txt does indeed change the u-boot generated packets, but it doesn't update (or reinitialize) the GEM, so it still only receives packets for the hardcoded MAC.

Bertl added a comment.Mar 16 2015, 5:23 AM

QSPI works with the correct devicetree entry.

ps7-qspi@e000d000 {
        #address-cells = <1>;
        #size-cells = <0>;
        clock-names = "ref_clk", "pclk", "aper_clk";
        clocks = <0x2 0xa 0x2 0x2b 0x2 0x2b>;
        compatible = "xlnx,zynq-qspi-1.0", "xlnx,ps7-qspi-1.00.a";
        interrupt-parent = <0x3>;
        interrupts = <0x0 0x13 0x4>;
        is-dual = <0x0>;
        num-chip-select = <0x1>;
        num-cs = <0x1>;
        reg = <0xe000d000 0x1000>;
        xlnx,fb-clk = <0x1>;
        xlnx,qspi-mode = <0x0>;
        flash@0 {
                compatible = "s25fl128s1";
                reg = <0x0>;
                spi-tx-bus-width = <1>;
                spi-rx-bus-width = <4>;
                spi-max-frequency = <50000000>;
                #address-cells = <1>;
                #size-cells = <1>;
                partition@qspi-fsbl-uboot {
                          label = "qspi-fsbl-uboot";
                          reg = <0x0 0x100000>;
                };
                partition@qspi-linux {
                          label = "qspi-linux";
                          reg = <0x100000 0x500000>;
                };
                partition@qspi-device-tree {
                          label = "qspi-device-tree";
                          reg = <0x600000 0x20000>;
                };
                partition@qspi-rootfs {
                          label = "qspi-rootfs";
                          reg = <0x620000 0x5E0000>;
                };
                partition@qspi-bitstream {
                          label = "qspi-bitstream";
                          reg = <0xC00000 0x400000>;
                };
        };
};

note that I do not have your devicetree.dts, so this is from the decompiled devicetree.dtb.

Bertl added a comment.Mar 16 2015, 6:35 AM

u-boot networking is still a big problem, especially for TFTP based boot.

It seems that there is roughly a 30% chance that there is a timeout when the PHY is reset:

Gem.e000b000:0 is connected to Gem.e000b000.  Reconnecting to Gem.e000b000
Gem.e000b000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Gem.e000b000: No link.

Unfortunately, this u-boot version resets the PHY on every TFTP request, so if you load three files (kernel, initramfs, devicetree), then your chances to get all of them without a timeout are minimal.

I know that I switched to the digilent branch of u-boot for the alpha because of this annoying, time consuming, issue.

In T37#4698, @Bertl wrote:

QSPI works with the correct devicetree entry.

Do tell, how did you get a working devicetree if the thing is entirely generated out of broken software?

Bertl added a comment.Mar 16 2015, 1:28 PM

Back for the alpha I started writing my own devicetree and I simply copied the relevant part from there (adjusting to the decompiled devicetree of course).

IMHO it makes a lot of sense to write a clean devicetree ourselves, as both the xilinx and the digilent version is somewhat broken and/or contains unnecessary definitions (like for xilinx/digilent IP cores).

My proposal would be to start one for the MicroZed and keep it up-to-date in git (on github). I can provide an initial version which probably needs a few minor updates.

anuejn added a subscriber: anuejn.Nov 5 2017, 9:38 PM

Can this be closed?

sebastian closed this task as Resolved.Feb 18 2019, 10:38 AM