UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer sjmjk429
Observer
1,212 Views
Registered: ‎04-13-2018

PetaLinux hangs at login prompt on zynq-7000

Jump to solution

I am trying to get Linux running for the first time on my Zynq7000-based target board and bitstream. I was able to successfully build u-boot and Linux with PetaLinux 2018.1 (to match Vivado version used to create the bitstream), but Linux boots all the way to the login prompt and then hangs -- I'm unable to type anything.

 

I'm suspecting the problem has something to do with my custom .hdf and bitstream, but I've used this bitstream and target board successfully to run FreeRTOS applications. u-boot also appears to work fine. I can use tftpboot to load and boot the image.ub.

 

Has anyone come across a similar Linux hang/unresponsive login prompt problem on their Zynq7000 board, or have any suggestions on things to try to fix this problem?

 

I came across a similar issue that was posted in the forum (link: Petalinux hanging just as login prompt appears), but it was for a zynqMP system. I've tried these suggestions from the post, but Linux still hangs at the login prompt.

- Disable CPU_IDLE in the kernel,
- Boot with the following added to bootargs: clk_ignore_unused cpuidle.off=1,
- and boot with the JTAG disconnected

 

 

Here are the step I took to build Linux in PetaLinux 2018.1:

% petalinux-create -t project --template zynq --name petalinux-proj

 

% petalinux-config --get-hw-description <directory to my .hdf>
- boot size in Flash Settings increased to 0xc00000 to accomodate bitstream
- MACHINE_NAME set to zc702

 

% petalinux-config -c kernel
- set to CONFIG_DEBUG_ZYNQ_UART0 instead of UART1 (on my board ps_uart0 is used instead of ps_uart1)

 

I then created a BOOT.BIN and flashed to my board:

% petalinux-build
% petalinux-package --boot --format BIN --fsbl --fpga <my bitstream> --u-boot --kernel

 

 

Here is my kernel boot output, launched from u-boot:

 

Zynq> tftpboot 0x10000000 solo4/image.ub
Using ethernet@e000b000 device
TFTP from server 192.168.118.189; our IP address is 192.168.118.123
Filename 'solo4/image.ub'.
Load address: 0x10000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################
7.2 MiB/s
done
Bytes transferred = 10018276 (98dde4 hex)
Zynq> setenv bootargs 'console=ttyPS0,115200n8 earlycon clk_ignore_unused cpuidle.off=1'
Zynq> bootm
## Loading kernel from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Verifying Hash Integrity ... OK
Trying 'kernel@1' kernel subimage
Description: Linux kernel
Type: Kernel Image
Compression: gzip compressed
Data Start: 0x10000104
Data Size: 3963585 Bytes = 3.8 MiB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: c9996457045e261626ef1d8c7e1342fee06656da
Verifying Hash Integrity ... sha1+ OK
## Loading ramdisk from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Trying 'ramdisk@1' ramdisk subimage
Description: petalinux-user-image
Type: RAMDisk Image
Compression: gzip compressed
Data Start: 0x103d0554
Data Size: 6017795 Bytes = 5.7 MiB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: 1aa779c37c64dd597e63f0cb6d02da54cc6f17a1
Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 10000000 ...
Using 'conf@system-top.dtb' configuration
Trying 'fdt@system-top.dtb' fdt subimage
Description: Flattened Device Tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x103c7cc8
Data Size: 34761 Bytes = 33.9 KiB
Architecture: ARM
Hash algo: sha1
Hash value: 061bfc425857a6ce7d9e2247359bc456561c68e0
Verifying Hash Integrity ... sha1+ OK
Booting using the fdt blob at 0x103c7cc8
Uncompressing Kernel Image ... OK
Loading Ramdisk to 07a42000, end 07fff303 ... OK
Loading Device Tree to 07a36000, end 07a417c8 ... OK

Starting kernel ...

Booting Linux on physical CPU 0x0
Linux version 4.14.0-xilinx-v2018.1 (oe-user@oe-host) (gcc version 7.2.0 (GCC)) #1 SMP PREEMPT Tue Aug 7 09:45:52 CDT 2018
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: Zynq ZC702 Development Board
earlycon: cdns0 at MMIO 0xe0000000 (options '115200n8')
bootconsole [cdns0] enabled
Memory policy: Data cache writealloc
cma: Reserved 16 MiB at 0x1f000000
random: fast init done
percpu: Embedded 16 pages/cpu @debb9000 s34764 r8192 d22580 u65536
Built 1 zonelists, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200n8 earlycon clk_ignore_unused cpuidle.off=1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 487096K/524288K available (6144K kernel code, 243K rwdata, 1584K rodata, 1024K init, 154K bss, 20808K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc0700000 (7136 kB)
.init : 0xc0900000 - 0xc0a00000 (1024 kB)
.data : 0xc0a00000 - 0xc0a3ce60 ( 244 kB)
.bss : 0xc0a3ce60 - 0xc0a639c4 ( 155 kB)
Preemptible hierarchical RCU implementation.
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 e0800000
slcr mapped to e0802000
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 e0802100
Zynq clock init
sched_clock: 64 bits at 199MHz, resolution 5ns, wraps every 4398046511102ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x2e2049cb99, max_idle_ns: 440795211806 ns
Switching to timer-based delay loop, resolution 5ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 597261305 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 399.99 BogoMIPS (lpj=1999999)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100060
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
smp: Brought up 1 node, 2 CPUs
SMP: Total of 2 processors activated (799.99 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
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 @ 0xe0840000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
console [ttyPS0] enabledat MMIO 0xe0000000 (irq = 27, base_baud = 6249999) is a xuartps
console [ttyPS0] enabled
bootconsole [cdns0] disabled
bootconsole [cdns0] disabled
e0001000.serial: ttyPS1 at MMIO 0xe0001000 (irq = 28, base_baud = 6249999) is a xuartps
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
FPGA manager framework
fpga-region fpga-full: FPGA Region probed
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 5880K
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=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
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
xilinx-vdma 83000000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83000000.dma failed with error -2
xilinx-vdma 83010000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83010000.dma failed with error -2
xilinx-vdma 83020000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83020000.dma failed with error -2
xilinx-vdma 83030000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83030000.dma failed with error -2
xilinx-vdma 83100000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83100000.dma failed with error -2
xilinx-vdma 83110000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83110000.dma failed with error -2
xilinx-vdma 83300000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83300000.dma failed with error -2
xilinx-vdma 83400000.dma: failed to get axi_aclk (-2)
xilinx-vdma: probe of 83400000.dma failed with error -2
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
81a00000.serial: ttyS2 at MMIO 0x81a01000 (irq = 51, base_baud = 8324187) is a 16550A
81a10000.serial: ttyS1 at MMIO 0x81a11000 (irq = 52, base_baud = 8324187) is a 16550A
brd: module loaded
loop: module loaded
m25p80 spi0.0: found n25q00a, expected n25q512a
m25p80 spi0.0: n25q00a (262144 Kbytes)
4 ofpart partitions found on MTD device spi0.0
Creating 4 MTD partitions on "spi0.0":
0x000000000000-0x000000c00000 : "boot"
0x000000c00000-0x000000c20000 : "bootenv"
0x000000c20000-0x0000016a0000 : "kernel"
0x0000016a0000-0x000010000000 : "spare"
libphy: Fixed MDIO Bus: probed
CAN device driver interface
libphy: MACB_mii_bus: probed
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
chipidea-usb2 e0002000.usb: 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
i2c /dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
cdns-i2c e0005000.i2c: 400 kHz mmio e0005000 irq 24
pca954x 1-0074: probe failed
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at e096d000 with timeout 10s
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
failed to register cpuidle driver
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Registering SWP/SWPB emulation handler
input: gpio-keys as /devices/soc0/gpio-keys/input/input0
hctosys: unable to open rtc device (rtc0)
of_cfs_init
of_cfs_init: OK
clk: Not disabling unused clocks
ALSA device list:
No soundcards found.
Freeing unused kernel memory: 1024K
INIT: version 2.88 booting
Starting udev
udevd[803]: starting version 3.2.2
udevd[804]: starting eudev-3.2.2
hwclock: can't open '/dev/misc/rtc': No such file or directory
Tue Aug 7 14:46:40 UTC 2018
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 5
Configuring network interfaces... Cannot find device "eth0"
Cannot find device "eth0"
Cannot find device "eth0"
Starting Dropbear SSH server: Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbuodqV3+PlsLFYmCl6sGgp2d7ncQlM2G0LRTDnNCRlzYAQEsBrl5FhIu099EZ2QA4he9JECxTOVcBatMIG2eVzojL27h4i4Goc2ykGvK/BiGZ02GACZi3sx6/3gi9gOeRO0yPACV+Mkkr1JkSUG8/KGaBO1rSATdQBprIVoPhiTkxW0cXzGcc1SXcb44BbM1HHsLcoTp7mzkQCZL4A2O+QBMvfC00RHumSsAwbY1VCzJwAhvdlLZwQ8KgeyDbkEdru1bqwkT4gzZpptshbXh/KYSdywImMWzZZxsOQobFLXq50ggsSXiPID6pR2uZA2WGzRX/lTzeUzlW3xyrbq+5 root@solo4
Fingerprint: md5 4d:b7:09:e1:f5:10:70:fa:16:cb:df:33:ea:a9:af:8e
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: OK

PetaLinux 2018.1 solo4 /dev/ttyPS0

solo4 login:<hangs here, cannot type>

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
1,013 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi @sjmjk429,

 

Since you had DTG settings to zc702 for custom board it pulled the zc702 eval board device-tree https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.1/BOARD/zc702.dtsi

 

CONFIG_SUBSYSTEM_MACHINE_NAME="zc702"

 Right setting for custom board

 

CONFIG_SUBSYSTEM_MACHINE_NAME="template"
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
11 Replies
Explorer
Explorer
1,134 Views
Registered: ‎10-21-2015

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi,

 

To change actual uart port for linux console, you better to use petalinux-config instead of petalinux-config -c kernel

Maybe your devicetree is using uart1 like following 

    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk quiet";
        stdout-path = "serial0:115200n8";
    };

    aliases {
        ethernet0 = "/amba/ethernet@e000b000";
        serial0 = "/amba/serial@e0001000";
        spi0 = "/amba/spi@e000d000";
    };

        serial@e0000000 {
            compatible = "xlnx,xuartps", "cdns,uart-r1p8";
            status = "disabled";
            clocks = <0x1 0x17 0x1 0x28>;
            clock-names = "uart_clk", "pclk";
            reg = <0xe0000000 0x1000>;
            interrupts = <0x0 0x1b 0x4>;
        };

        serial@e0001000 {
            compatible = "xlnx,xuartps", "cdns,uart-r1p8";
            status = "okay";
            clocks = <0x1 0x18 0x1 0x29>;
            clock-names = "uart_clk", "pclk";
            reg = <0xe0001000 0x1000>;
            interrupts = <0x0 0x32 0x4>;
            device_type = "serial";
            port-number = <0x0>;
            u-boot,dm-pre-reloc;
        };

You can check this using  'dtc -I dtb -O dts -o system.dts system.dtb' command

If so, you can change  serial0 alias by using petalinux-config => Subsystem AUTO Hardware Settings =>

Serial Settings => Primary stdin/stdout (ps7_uart_0)

 

0 Kudos
Observer sjmjk429
Observer
1,121 Views
Registered: ‎04-13-2018

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

hello hokim, thank you for your reply.

That's a handy command to convert the system.dtb back to .dts!

 

I didn't mention it in my original post, but I did set my serial settings to ps_uart0 in petalinux-config. I've attached my system.dts.

 

chosen {
bootargs = "console=ttyPS0,115200 earlyprintk";
stdout-path = "serial0:115200n8";
};

aliases {
ethernet0 = "/amba/ethernet@e000b000";
i2c0 = "/amba_pl/i2c@81600000";
i2c1 = "/amba/i2c@e0004000";
i2c2 = "/amba/i2c@e0005000";
serial0 = "/amba/serial@e0000000";
serial1 = "/amba_pl/serial@81a10000";
serial2 = "/amba_pl/serial@81a00000";
serial3 = "/amba/serial@e0001000";
spi0 = "/amba/spi@e000d000";
spi1 = "/amba_pl/axi_quad_spi@81e00000";
spi2 = "/amba/spi@e0007000";
};

 

serial@e0000000 {
compatible = "xlnx,xuartps", "cdns,uart-r1p8";
status = "okay";
clocks = <0x1 0x17 0x1 0x28>;
clock-names = "uart_clk", "pclk";
reg = <0xe0000000 0x1000>;
interrupts = <0x0 0x1b 0x4>;
device_type = "serial";
port-number = <0x0>;
};

serial@e0001000 {
compatible = "xlnx,xuartps", "cdns,uart-r1p8";
status = "okay";
clocks = <0x1 0x18 0x1 0x29>;
clock-names = "uart_clk", "pclk";
reg = <0xe0001000 0x1000>;
interrupts = <0x0 0x32 0x4>;
u-boot,dm-pre-reloc;
pinctrl-names = "default";
pinctrl-0 = <0xa>;
device_type = "serial";
port-number = <0x3>;
};

 

In my xparameters_ps.h file generated by SDK, the ps_uart0's interrupt is mapped to 59.

#define XPS_UART0_INT_ID 59U

 

Should the device tree reflect this somehow?

 

Also, I noticed in my system.dts file it has a uart1-default entry, but I don't have one for uart0.

 

uart1-default {
linux,phandle = <0xa>;
phandle = <0xa>;

mux {
groups = "uart1_10_grp";
function = "uart1";
};

conf {
groups = "uart1_10_grp";
slew-rate = <0x0>;
io-standard = <0x1>;
};

conf-rx {
pins = "MIO49";
bias-high-impedance;
};

conf-tx {
pins = "MIO48";
bias-disable;
};
};

 

I tried adding a uart0-default to my system-user.dtsi, but it had no effect on Linux hanging at the login prompt.

 

project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi:

 

/include/ "system-conf.dtsi"

/ {

};

&pinctrl0 {
pinctrl_uart0_default: uart0-default {
mux {
groups = "uart0_10_grp";
function = "uart0";
};

conf {
groups = "uart0_10_grp";
slew-rate = <0>;
io-standard = <1>;
};

conf-rx {
pins = "MIO41";
bias-high-impedance;
};

conf-tx {
pins = "MIO40";
bias-disable;
};
};
};

&uart0 {
u-boot,dm-pre-reloc;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart0_default>;
};

 

0 Kudos
Explorer
Explorer
1,102 Views
Registered: ‎10-21-2015

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

I think, there is no problem in your devicetree.

It has uart0 as console.

For debugging, you can add IMAGE_FEATURE += "debug-tweaks" to petalinux-user-image.bb(append)

and rebuild petalinux root filesystem image.

It supports auto-login without login prompt.

0 Kudos
Observer sjmjk429
Observer
1,082 Views
Registered: ‎04-13-2018

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

I set debug-tweaks (which can also be set through petalinux-config, Yocto Settings) and now the Linux boot does an auto-login and makes it to the shell prompt. Then it hangs there. I'm unable to type anything at the shell prompt:

 

...

INIT: version 2.88 booting
Starting udev
[ 2.830101] udevd[774]: starting version 3.2.2
[ 2.854873] udevd[775]: starting eudev-3.2.2
hwclock: can't open '/dev/misc/rtc': No such file or directory
Wed Aug 15 13:14:52 UTC 2018
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting internet superserver: inetd.
Configuring packages on first boot....
(This may take several minutes. Please do not power off the machine.)
Running postinst /etc/rpm-postinsts/100-sysvinit-inittab...
update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing)
Removing any system startup links for run-postinsts ...
/etc/rcS.d/S99run-postinsts
INIT: Entering runlevel: 3
Configuring network interfaces... Cannot find device "eth0"
Cannot find device "eth0"
Cannot find device "eth0"
Starting Dropbear SSH server: Generating key, this may take a while...
Public key portion is:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp8ntqK02HC5dRo8Am4Qy2f+IS0rr40Op0JEQqGN5jvgzJQ23CZzRxpHWS+UU2ldzxqeIjmZpdjGO4m4MhmtZhW/18TTuJNLwq1Z/lvmdU3pQ9ti38eqQb5ZP7QAnBZzgctmXIXUqiazP18FkYXkPA+vsPyw0RTSVFspBujmMP3TEaho/g5wqx0xXmvB6lvaylG1PxgAlKi+EIClxWufFPlVH2cT0jnB2E+u5/IfKtoQN4nnIQTeW5prJpONZTSJakMPDNcm0NfqI+Fp2DWBglSucF0ilyP1H+MjvrgGIXT3od2/E51hLOfED2jVwLaiYE+jEmHiedPcUY1nLM6Mx5 root@solo4
Fingerprint: md5 c4:72:04:74:71:73:e1:21:20:46:68:93:dd:69:a9:a7
dropbear.
hwclock: can't open '/dev/misc/rtc': No such file or directory
Starting syslogd/klogd: done
Starting tcf-agent: OK

root@solo4:~# <hangs, cannot type>

 

I also tried booting with runlevel 1 (no network interfaces), but that didn't help either.

0 Kudos
Moderator
Moderator
1,040 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi @sjmjk429,

 

Remove cpu idle from device-tree.

 

Have you tried booting linux using simple Zynq PS block and make sure your design satisfies 

 

The following is a list of hardware requirements for a Zynq-7000 hardware project to boot
Linux:
1. One Triple Timer Counter (TTC) (required)
IMPORTANT: If multiple TTCs are enabled, the Zynq-7000 Linux kernel uses the first TTC block from the
device tree. Please make sure the TTC is not used by others.
2. External memory controller with at least 32 MB of memory (required)
3. UART for serial console (required)
4. Non-volatile memory (optional), for example, QSPI Flash and SD/MMC
5. Ethernet (optional, essential for network access) 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer sjmjk429
Observer
1,018 Views
Registered: ‎04-13-2018

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hello Sandeep,

 

One of the first things I tried was disabling CPU_IDLE from kernel config which was suggested in this posting for ZynqMP: Petalinux hanging just as login prompt appears. I've also tried these:

- Boot with the following added to bootargs: clk_ignore_unused cpuidle.off=1
- boot with the JTAG disconnected

 

I'm still seeing Linux hang after booting to the login prompt or shell prompt (if debug-tweak enabled).

 

I didn't see cpu idle in my device tree (attached here).

 

Our target board satisfies the HW requirements:

1. One Triple Timer Counter (TTC) (required)
IMPORTANT: If multiple TTCs are enabled, the Zynq-7000 Linux kernel uses the first TTC block from the
device tree. Please make sure the TTC is not used by others.

We're not using either of the PS TTCs.


2. External memory controller with at least 32 MB of memory (required)

Target board has 512MB of external memory.


3. UART for serial console (required)

Using PS uart0.


4. Non-volatile memory (optional), for example, QSPI Flash and SD/MMC

Have 256MB of qspi flash.


5. Ethernet (optional, essential for network access) 

Using PS ethernet0 at e000_b000.

 

0 Kudos
Moderator
Moderator
1,002 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi @sjmjk429,

 

On Zynq-7000 PS TTC is mandatory please enable in vivado.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer sjmjk429
Observer
959 Views
Registered: ‎04-13-2018

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Sandeep,

 

I didn't have the TTC enabled in Vivado, so thanks for pointing that out. It's going to be a couple of days before I generate a new HDF, though.

 

But I also came across this post that says newer Linux's use the global timer if the TTC is missing (link). In my Linux boot, I see these messages:

 

clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x2e2049cb99, max_idle_ns: 440795211806 ns
Switching to timer-based delay loop, resolution 5ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 597261305 ns
timer #0 at e080a000, irq=17

 

...

 

clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

 

...

 

clocksource: Switched to clocksource arm_global_timer

 

Do I still need the TTC?

 

Thanks,

Sung

0 Kudos
Moderator
Moderator
950 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi @sjmjk429(Sung),

 

PS TTC is mandatory for Zynq-7000 devices to boot linux.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Observer sjmjk429
Observer
620 Views
Registered: ‎04-13-2018

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Sandeep,

 

I enabled PS TTC @ f8001000 in Vivado, but this did not help. Linux is still hanging after the prompt. The new HDF was used to re-configure PetaLinux:

$ petalinux-config --get-hw-description <dir_of_hdf>

$ petalinux-config -c kernel

$ petalinux-build

 

The PetaLinux and kernel config files and the system.dts file did not change after the build. Should these have changed? I know the new HDF changed because in SDK the HW spec project now shows ps7_ttc_0 in the sytem.hdf tab.

 

Thanks,

Sung

 

 

 

 

 

0 Kudos
Moderator
Moderator
1,014 Views
Registered: ‎04-24-2017

Re: PetaLinux hangs at login prompt on zynq-7000

Jump to solution

Hi @sjmjk429,

 

Since you had DTG settings to zc702 for custom board it pulled the zc702 eval board device-tree https://github.com/Xilinx/device-tree-xlnx/blob/master/device_tree/data/kernel_dtsi/2018.1/BOARD/zc702.dtsi

 

CONFIG_SUBSYSTEM_MACHINE_NAME="zc702"

 Right setting for custom board

 

CONFIG_SUBSYSTEM_MACHINE_NAME="template"
Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos