AnsweredAssumed Answered

Kernel boot process too slow!

Question asked by FivePandaH on Jan 16, 2018
Latest reply on Jan 17, 2018 by FivePandaH

#Linux boot process too slow

Hi,

I have a custom designed z7030 board and its design is based on ZC706, with all MIO's config left no changed.

I had successfully migrated the ad9265_fmc_zc706 design to this z7030 board, and the Linux desktop was alos launched.

But, the kernel boot process takes too much time, nearly 3 minutes or more. The boot information is as follows:

<the boot code>

U-Boot 2016.07-11381-g45e5971-dirty (Nov 21 2017 - 09:01:16 +0800)

Model: Zynq ZC706 Development Board
Board: Xilinx Zynq
I2C: ready
DRAM: ECC disabled 1 GiB
MMC: sdhci@e0100000: 0
Invalid bus 0 (err=-1)
*** Warning - spi_flash_probe() failed, using default environment

In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Model: Zynq ZC706 Development Board
Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 7, interface rgmii-id
eth0: ethernet@e000b000
reading uEnv.txt
380 bytes read in 64 ms (4.9 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot: 0
Device: sdhci@e0100000
Manufacturer ID: 41
OEM: 3432
Name: SD32G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
380 bytes read in 64 ms (4.9 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Running uenvcmd ...
Copying Linux from SD to RAM...
reading uImage
4096672 bytes read in 411 ms (9.5 MiB/s)
reading devicetree.dtb
14302 bytes read in 76 ms (183.6 KiB/s)
reading uramdisk.image.gz
** Unable to read file uramdisk.image.gz **
## Booting kernel from Legacy Image at 03000000 ...
Image Name: Linux-4.9.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4096608 Bytes = 3.9 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 1fff9000, end 1ffff7dd ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.9.0 (fivepanda@ubuntu) (gcc version 6.2.1 20161114 (Linaro GCC Snapshot 6.2-2016.11) ) #1 SMP PREEMPT Tue Jan 16 10:03:39 CST 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt:Machine model: Xilinx Zynq ZC706
bootconsole [earlycon0] enabled
cma: Reserved 128 MiB at 0x38000000
Memory policy: Data cache writealloc
percpu: Embedded 13 pages/cpu @ef7d0000 s23564 r8192 d21492 u53248
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260608
Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait
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: 899692K/1048576K available (5585K kernel code, 239K rwdata, 2200K rodata, 256K init, 153K bss, 17812K 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 : 0xc0008000 - 0xc057c8d4 (5587 kB)
.init : 0xc07cc000 - 0xc080c000 ( 256 kB)
.data : 0xc080c000 - 0xc0847c00 ( 239 kB)
.bss : 0xc0847c00 - 0xc086e334 ( 154 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to f0802000
slcr mapped to f0804000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at f0804100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at f080c000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x82c0 - 0x8318
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor 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 @ 0xf0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
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.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=30 max_order=18 bucket_order=0
bounce: pool size: 64 pages
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xilinx-vdma 43000000.axivdma: missing xlnx,flush-fsync property
xilinx-vdma 43000000.axivdma: missing xlnx,addrwidth property
xilinx-vdma 43000000.axivdma: Xilinx AXI VDMA Engine Driver Probed!!
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 25, base_baud = 6249999) is a xuartps
郼onsole [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to f0875000
[drm] Initialized
brd: module loaded
loop: module loaded
m25p80 spi32765.0: unrecognized JEDEC id bytes: 00, 00, 00
MACsec IEEE 802.1AE
libphy: Fixed MDIO Bus: probed
libphy: mdio_driver_register: xgmiitorgmii
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 28 (00:0a:35:00:01:22)
Marvell 88E1116R e000b000.etherne:07: attached PHY driver [Marvell 88E1116R] (mii_bus:phy_addr=e000b000.etherne:07, irq=-1)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
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
e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 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
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
si570: probe of 1-005d failed with error -5
i2c i2c-0: Added multiplexed i2c bus 1
i2c i2c-0: Added multiplexed i2c bus 2
at24 3-0054: 1024 byte 24c08 EEPROM, writable, 1 bytes/write
i2c i2c-0: Added multiplexed i2c bus 3
4-0021 supply vcc not found, using dummy regulator
pca953x 4-0021: interrupt support not compiled in
i2c i2c-0: Added multiplexed i2c bus 4
rtc-pcf8563 5-0051: pcf8563_write_block_data: err=-5 addr=0e, data=03
rtc-pcf8563 5-0051: pcf8563_probe: write error
rtc-pcf8563: probe of 5-0051 failed with error -5
i2c i2c-0: Added multiplexed i2c bus 5
i2c i2c-0: Added multiplexed i2c bus 6
i2c i2c-0: Added multiplexed i2c bus 7
i2c i2c-0: Added multiplexed i2c bus 8
pca954x 0-0074: registered 8 multiplexed busses for I2C switch pca9548
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 f0978000 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.sdhci [e0100000.sdhci] using DMA
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
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
mmc0: Problem switching card into high-speed mode!
mmc0: new SDHC card at address 0001
mmcblk0: mmc0:0001 SD32G 29.0 GiB
mmcblk0: p1 p2 p3
usb 1-1: new low-speed USB device number 2 using ci_hdrc
Console: switching to colour frame buffer device 210x65
axi-hdmi 70e00000.axi_hdmi: fb0: frame buffer device
[drm] Initialized axi_hdmi_drm 1.0.0 20120930 on minor 0
random: fast init done
input: ATEN UC-10KM V1.3.124 as /devices/soc0/amba/e0002000.usb/ci_hdrc.0/usb1/1-1/1-1:1.0/0003:0557:2221.0001/input/input0
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
o
|o
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
oo
o INVERT DCO 0x0 CLK 199999998 Hz
cf_axi_adc 44a00000.axi-ad9265-core-lpc: ADI AIM (10.00.b) at 0x44A00000 mapped to 0xf1080000, probed ADC AD9265 as MASTER
hid-generic 0003:0557:2221.0001: input,hidraw0: USB HID v1.10 Keyboard [ATEN UC-10KM V1.3.124] on usb-ci_hdrc.0-1/input0
asoc-simple-card adv7511_hdmi_snd: hdmi-hifi.0 <-> 75c00000.axi-spdif-tx mapping ok
input: gpio_keys as /devices/soc0/gpio_keys/input/input1
hctosys: unable to open rtc device (rtc0)
ALSA device list:
#0: HDMI monitor
input: ATEN UC-10KM V1.3.124 as /devices/soc0/amba/e0002000.usb/ci_hdrc.0/usb1/1-1/1-1:1.1/0003:0557:2221.0002/input/input2
hid-generic 0003:0557:2221.0002: input,hidraw1: USB HID v1.10 Mouse [ATEN UC-10KM V1.3.124] on usb-ci_hdrc.0-1/input1
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: 256K (c07cc000 - c080c000)
This architecture does not have kernel memory protection.
Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory
init: hwclock main process (891) terminated with status 1

 

To this code line, it takes about 8 seconds or less, and hangs up about 3+ minutes, then it resumes to print :

systemd-udevd[1337]: could not open moddep file '/lib/modules/4.9.0/modules.dep.bin'
* Setting up X socket directories... [ OK ]
* STARTDISTCC is set to false in /etc/default/distcc
* /usr/bin/distccd not starting
* Starting IIO Daemon iiod [ OK ]

 

To this code, Linux boot up.I could not resolve this issue,  for I don't know what happened during the kernel boot sequence.

The HDL and Linux kernel is the newest branch 2017_R1, the HDL project remains the same except for the Zynq device type, the linux kernel  the same with no change,  I modified the devicetree to remove out the AD9517 and its related clock, and from the boot code I can see the AD9265 iio device works .

 

Where could the problem be? 

Outcomes