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: 
Contributor
Contributor
674 Views
Registered: ‎07-29-2018

zynq linux

Hello everyone ,

i am Anil Rathore , i have a one question in my mind related to booting linux, on zynq 7000 AP Soc , i am using zybo board .

i have downloaded and build all required file booting linux on zynq,,

linux-xlnx

u-boot-xlnx

devicetree.dtb

uramdisk.image.gz

FSBL

and all this files are succesfully downloaded on zybo RAM  using JTAG,

but trere is one problem , which is , it is showing that "kernel is loading" but after nothing is happening

i am attcahing the same issue.

please find the attachment,,,,

your response will be very helpfull for me ,,,,

Thanks

Best Regards

Anil rathore

linux_issue.jpg
0 Kudos
11 Replies
Voyager
Voyager
659 Views
Registered: ‎09-14-2016

Re: zynq linux

Hi,

Maybe check load adresses :

 

Zynq> fatload usb 0 0x1000000 filesfromyocto/uimage
reading filesfromyocto/uimage
3532576 bytes read in 200 ms (16.8 MiB/s)

Zynq> fatload usb 0 0x2000000 filesfromyocto/core-image-minimal-picozed-zynq7.cpio
reading filesfromyocto/core-image-minimal-picozed-zynq7.cpio
5104640 bytes read in 236 ms (20.6 MiB/s)

Zynq> fatload usb 0 0x3000000 filesfromyocto/picozed-zynq7.dtb
reading filesfromyocto/picozed-zynq7.dtb
21900 bytes read in 106 ms (201.2 KiB/s)

Zynq> bootm 0x1000000 0x2000000 0x3000000

 

Cheers,

Trigger

0 Kudos
Moderator
Moderator
640 Views
Registered: ‎09-12-2007

Re: zynq linux

pack the image, rootfs, and dtb in a fit image that is readable in uboot. Then boot uisng this fit image file.

This is explained in the wiki here (see Creating the FIT image:):

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

0 Kudos
Contributor
Contributor
604 Views
Registered: ‎07-29-2018

Re: zynq linux

Hi,
Thanks for your reply...
I changed the load address as you mentioned in your comment.
but still, I am getting the same results, that loading kernel image...
if you have any alternate solution for this case then please reply.
thanks,
regards
Rathore
0 Kudos
Highlighted
Visitor dwjbosman
Visitor
599 Views
Registered: ‎06-17-2018

Re: zynq linux

Maybe turn on earlyprintk in uEnv.txt to get more debugging output

I have this line:

bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1

 

 

0 Kudos
Voyager
Voyager
583 Views
Registered: ‎09-14-2016

Re: zynq linux

Hi,

 

As your Kernel is not started yet, enable debug mode is not really usefull at this time.

 

Please give us a full copy/paste log if you want more help: As always just say "it doesn't work is not enought to test ;-)"

 

Cheers,

Trigger 

0 Kudos
Contributor
Contributor
553 Views
Registered: ‎07-29-2018

Re: zynq linux

Hi,

trigger...

I am attaching complete log ..

one file containing ther information of  terminal of zynq ...

second file containing information of which files i am loading into ZYBO zynq board...

 

 

######################ZYNQ terminal log########################

[root@IITI boot]# /usr/bin/picocom --b 115200 --f n --p n /dev/ttyUSB1
picocom v2.2

port is : /dev/ttyUSB1
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is :
emap is : crcrlf,delbs,

Type [C-a] [C-h] to see available commands

Terminal ready


U-Boot 2018.01-dirty (Feb 21 2019 - 19:00:30 +0530)

Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
Silicon: v3.1
I2C: ready
DRAM: ECC disabled 512 MiB
MMC: sdhci@e0100000: 0 (SD)
SF: Detected s25fl128s_64k with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
I2C EEPROM MAC address read failed
eth0: ethernet@e000b000
Hit any key to stop autoboot: 0
Zynq> bootm 0x1000000 0x2000000 0x3000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux kernel
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3955184 Bytes = 3.8 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5309954 Bytes = 5.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 03000000
Booting using the fdt blob at 0x3000000
Loading Kernel Image ...

 

##############LOADING DATA INTO ZYBO BOARD RAM USING JTAG  ###############

[root@IITI boot]# /prog/Xilinx/SDK/2017.4/bin/xmd

****** Xilinx Microprocessor Debugger (XMD) Engine
****** XMD v2017.4 (64-bit)
**** SW Build 2086221 on Fri Dec 15 20:54:30 MST 2017
** Copyright 1986-2017 Xilinx, Inc. All Rights Reserved.

WARNING: XMD has been deprecated and will be removed in future.
XSDB replaces XMD and provides additional functionality.
We recommend you switch to XSDB for commandline debugging.
Please refer to SDK help for more details.

XMD%
XMD% connect arm hw

JTAG chain configuration
--------------------------------------------------
Device ID Code IR Length Part Name
1 4ba00477 4 arm_dap
2 13722093 6 xc7z010

--------------------------------------------------
Enabling extended memory access checks for Zynq.
Writes to reserved memory are not permitted and reads return 0.
To disable this feature, run "debugconfig -memory_access_check disable".

--------------------------------------------------

CortexA9 Processor Configuration
-------------------------------------
Version.............................0x00000003
User ID.............................0x00000000
No of PC Breakpoints................6
No of Addr/Data Watchpoints.........4

Connected to "arm" target. id = 64
Starting GDB server for "arm" target (id = 64) at TCP port no 1234
XMD% dow fsbl_1.elf
Processor Reset .... DONE
Downloading Program -- fsbl_1.elf
section, .text: 0x00000000-0x0000f113
section, .handoff: 0x0000f114-0x0000f15f
section, .init: 0x0000f160-0x0000f177
section, .fini: 0x0000f178-0x0000f18f
section, .rodata: 0x0000f190-0x0000f4c7
section, .data: 0x0000f4c8-0x000122bb
section, .eh_frame: 0x000122bc-0x000122bf
section, .mmu_tbl: 0x00014000-0x00017fff
section, .init_array: 0x00018000-0x00018003
section, .fini_array: 0x00018004-0x00018007
section, .rsa_ac: 0x00018008-0x0001903f
section, .bss: 0x00019040-0x0001ae71
section, .heap: 0x0001ae72-0x0001ce7f
section, .stack: 0xffff0000-0xffffd3ff
Download Progress.10.20.30.40.50.60.70.80.90.Done
Setting PC with Program Start Address 0x00000000
XMD% dow -data devicetree.dtb 0x3000000
Downloading Data File -- devicetree.dtb at 0x03000000
Progress ..ERROR:
Cannot access DDR: the controller is held in reset

XMD% con
Processor started. Type "stop" to stop processor

RUNNING> XMD% stop
Processor stopped

XMD% User Interrupt, Processor Stopped at 0x0000f134

XMD% dow -data devicetree.dtb 0x3000000
Downloading Data File -- devicetree.dtb at 0x03000000
Progress .....Done
Progress ...             ramdisk.image.gz......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................Done
.uimage.......................................................................................................................................................................................................................................................................................................Done
XMD% dow /root/Desktop/linux3/u-boot-xlnx/u-boot
Processor Reset .... DONE
Downloading Program -- /root/Desktop/linux3/u-boot-xlnx/u-boot
section, .text: 0x04000000-0x0405ac0f
section, .efi_runtime: 0x040755a0-0x0407569f
section, .rodata: 0x0405ac10-0x0406f0d7
section, .hash: 0x0406f0d8-0x0406f0ef
section, .dtb.init.rodata: 0x0406f0f0-0x0407146f
section, .data: 0x04071470-0x04074087
section, .got.plt: 0x04074088-0x04074093
section, .u_boot_list: 0x04074094-0x0407559b
section, .efi_runtime_rel: 0x040756a0-0x0407572f
section, .rel.dyn: 0x04075730-0x04081be7
section, .bss: 0x04075730-0x040b6667
Download Progress.10.20.30.40.50.60.70.80.90.Done
Setting PC with Program Start Address 0x04000000
XMD% con
Processor started. Type "stop" to stop processor

RUNNING> XMD%

############################################

thanks

0 Kudos
Visitor dwjbosman
Visitor
532 Views
Registered: ‎06-17-2018

Re: zynq linux

I had a similar problem. To debug I first used a devicetree blob from a working example and then checked if would still hang If not there is a problem in the device tree.  So step by step convert a 'working example' to your design and see at which step the failure arises. 

0 Kudos
Voyager
Voyager
516 Views
Registered: ‎09-14-2016

Re: zynq linux

Wrong kernel load address.

 

Please follow Xilinx Wiki ...

 

[Edit] -> https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842481/Build+kernel

0 Kudos
Contributor
Contributor
499 Views
Registered: ‎07-29-2018

Re: zynq linux

Hey guyz..

Thanks for your valuable responses ...

problem has been solved ,,, i use bootz command instead of bootm and i use zimage in place of uImage..with addr.. 0x1000000

and it is perfectly working ...

once again thanks for your comments...

regards

rathore

0 Kudos
Contributor
Contributor
465 Views
Registered: ‎07-29-2018

Re: zynq linux

Hello guyz,,

booting linux on zynq using JTAG has done ..

now i am trying to boot linux on zynq using SD card ..but during making partition into sd card ..i am facing some problem ...

log....

SELinux: initialized (dev sdb1, type vfat), uses genfs_contexts
[root@IITI boot]# dd if=/dev/zero of=/dev/sdb1 bs=1024 count=1
1+0 records in
1+0 records out
1024 bytes (1.0 kB) copied, 0.000232867 s, 4.4 MB/s
[root@IITI boot]# fdisk -l /dev/sdb1

Disk /dev/sdb1: 15.9 GB, 15927345152 bytes
64 heads, 32 sectors/track, 15189 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@IITI boot]# fdisk /dev/sdb1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x41b5dde3.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): o
Building a new DOS disklabel with disk identifier 0x71a83ecf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

[root@IITI boot]# fdisk /dev/sdb1

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').

Command (m for help): x

Expert command (m for help): h
Number of heads (1-256, default 64): 255

Expert command (m for help): s
Number of sectors (1-63, default 32): 63
Warning: setting sector offset for DOS compatiblity

Expert command (m for help): c
Number of cylinders (1-1048576, default 15189): 1960

Expert command (m for help): r

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1960, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1960, default 1960): +200M

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (27-1960, default 27):
Using default value 27
Last cylinder, +cylinders or +size{K,M,G} (27-1960, default 1960):
Using default value 1960

Command (m for help): a
Partition number (1-4): 1

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 83

Command (m for help): p

Disk /dev/sdb1: 15.9 GB, 15927345152 bytes
255 heads, 63 sectors/track, 1960 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x1bbfc74f

Device Boot Start End Blocks Id System
/dev/sdb1p1 * 1 26 208813+ c W95 FAT32 (LBA)
/dev/sdb1p2 27 1960 15534855 83 Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
[root@IITI boot]# mkfs.vfat -F 32 -n boot /dev/sdb1p1
mkfs.vfat 3.0.9 (31 Jan 2010)
/dev/sdb1p1: No such file or directory
[root@IITI boot]#

#############################################################################

Thanks

rathore

0 Kudos
Voyager
Voyager
458 Views
Registered: ‎09-14-2016

Re: zynq linux

Hi,

Please open a new post.

Cheers,

Trigger

0 Kudos