Jump to content
  • 0

device-tree (spartan 6)


Gaston1980

Question

Hi to all, im using ISE 14.7 and plataform spartan 6.  Reading the Xilinx wiki I need this two files device-tree.mld and device-tree.tcl to generate the dts file. I try to find it in github without luck. Is there other way to generate the dts file for this device using SDK? 

Thanks

Gaston

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

Hi jpeyron, thanks for you help. I finally generate the dts file for the spartan 6. about the dts file i found the bootargs with quotes. What arguments do i need to put in there to use with usb? can you point me to pdf to read about this?

Is there a tutorial to read about configuring kernel for fpga? How to download the kernel image to fpga, can I only use the USB II plataform or can be use the USB? 

Thanks for your help.

Gaston

Link to comment
Share on other sites

thanks for the tip. Already see this one (among others) but still have a few questions:

1) the bootargs = "" in the dts file, what should I put there to download Kernel image from usb? Is there a pdf to read about this?

2) I have a digilent nexys3 board. If I replace the bootargs="" line with "console=ttyUL0,115200"; linux,stdout-path = &ft232_uart; stdout-path = &ft232_uart; I have error compiling kernel.

3) In case I made my custom board using ft232 chip, What should I put in the bootargs?

4) Finally, what should be the size of the linux kernel optimize to be downloaded? The image I have is in the 50MB, maybe I should start uncheking parameters....

totally newbie in this

Thanks for your help.

Gaston

Link to comment
Share on other sites

Thanks I already see this one too. But I was able to compile kernel (aldo have some doubts about bootargs="" and parameters to put in there). Now I have problems with the uart comunication with the nexys board. Im using ubuntu 18.04 and installed ISE 14.7. Im able to program nexys board with Impact without problems, the problem is that there is no ttyUSBx when I check in terminal  through lsusb. How can I solve this problem? why the jtag works but the uart connection not?

regards

gaston

Link to comment
Share on other sites

hi jpeyron, I finally made uart works. I tested the microblaze with the hello world and it works (using uart at 9600). I build a kernel from the dts file (simpleImage.xilinx). Using xmd terminal a tried downloading the simpleImage to the microbalze, without errors, but I cant see anything in the terminal window. 

I put this in the dts file 

        bootargs = "console=ttyS0,9600 root=/dev/ram";
        linux,stdout-path = &rs232_port;
        stdout-path = &rs232_port;

(this board has rs_232 connector but Im using other fpga pins to connect to a usb converter)

in the kernel:

console=ttyS0,9600

force default kernel  command string

im following this link http://docs.numato.com/knowledge/saturn-microblaze-and-linux-how-to-run-linux-on-saturn-spartan-6-fpga-module-part-ii/ .

the base address of the ram memory is 0x80000000 (where kernel is set).

why I cant see linux booting?

Any idea?

Thanks in advance for your help till now.

Gaston

Link to comment
Share on other sites

Im following this steps:

1) Download linux-xlnx from github

2) follow this tutorial http://xilinx.wikidot.com/microblaze-linux

3) kernel mmu_defconfig

4) design microblaze in XPS and export to SDK (Im using ISE 14.7)

5) program hello world example

6) open XMD terminal and ...dow -data simpleImage.xilinx 0x80000000 (DDR basseaddr location)

7) check boot in teraterm (No console output in this step ------ why?)

is possible to use linux-xlnx kernel with spartan 6?

are those steps correct?

is this dts correct? i edit the flash name beacuse have the same location that DDR at 0x80000000 (dont know why) and change name to micron_ram1.

nexys2.dts

Link to comment
Share on other sites

Unfortunately you are trying to do something hard on a old board using outdated tutorials. This will not be easy because you seam to lack the experience with embedded linux as well. I'l try to help you as much as I can but you will need to read up on the following terms and understand how they fit together and interact: hardware platform, device tree, first stage boot loader (aka FSBL), second stage boot loader (u-Boot), kernel, ramFS, root FS, user space and kernel space.

Because you are using a soft core processor (microblaze) we cannot determine if the dts (device tree source) is ok or not, the device tree is a representation on what you have in your hardware configuration and what addresses you have at base address for each IP therefore without the EDK project or at least the address editor we cannot validate you source file.

From what I've read, you seam to have everything up and going except linux booting, I'm guessing there is a problem with your second stage boot loader (probably using uBoot) which has not configured properly (uBoot also has a defconfig which needs to have UART and debug capabilities active), unfortunately that's the most I can tell you about this without actually seeing the sources.

There is no tutorial that I know of which will take you step by step through this process but I recommand you focus on this:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842560/MicroBlaze

- Ciprian

Link to comment
Share on other sites

Hi Ciprian, thanks for your answer. Yes I know is an old board (but still is in the market) and im trying to learn how to embedd linux on it. I found a lot of pages about linux on spartan 6 using xilinx kernel or builroot. In those tutorials there is not uBoot ( iread about it in xilinx) just is compiling kernel for plataform (simpleImage) and then uploading it.

Vivado not support spartan 6 and petalinux need to have the same version to work (so i have read).

As you may have read, my problem is in the console output.  thanks anyway for your time.

Gaston

Link to comment
Share on other sites

I finally manage to get console output. This is the output message:

------------[ cut here ]------------␍␊
WARNING: CPU: 0 PID: 0 at mm/memblock.c:519 memblock_add_range+0x90/0x2c0␍␊
Modules linked in:␍␊
CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.0 #36␍␊
Kernel Stack:␍␊
c0551dfc: c000ceb8␍␊
c0551e00: 00000000 00000000 c00c31d4 00000800 00000000 c04333f8 c000cef4 c04209e4␍␊
c0551e20: 00000000 00000000 c04333f8 00000207 c00c466c 01000000 c06083c0 80000000␍␊
c0551e40: 00000000 81000000 c0561250 c00c466c 00000800 000000dc 00000000 c040cc0c␍␊
c0551e60: 000007ec c040cc20 c00c4960 00000008 c040c3fc c03eb514 00000000 00000008␍␊
c0551e80: c040c3fc 01000000 c040c3fc 01000000 00000000 80000000 00000000 81000000␍␊
c0551ea0: c040cc34 00000001 00000001 00400000 00000300 c058adfc 00000001 80000000␍␊
c0551ec0: c03eabbc c03eabbc c058a66c 00000004 80ffffff 80000000 c058af44 80000000␍␊
c0551ee0: 000007c4 c040cbfc c058aef4 00000038 00000000 00000000 01000000 00000000␍␊
c0551f00: 00000000 c058a4e0 c040c3fc 00000000 c040c3fc c058a49c 0000014c 000007d8␍␊
c0551f20: 00000008 c040cc34 000007c4 c040cbfc c040c3fc c058ae44 00000000 c0551f5c␍␊
c0551f40: c058b450 00000000 c058a378 00000000 00400000 00000300 c058b4bc 00000001␍␊
c0551f60: 00000000 00000000 00400000 00400000 00000180 00000000 c058b47c 00400000␍␊
c0551f80: 00400000 0000015c 00000000 c058a378 00000000 c05745ec c1000000 00000000␍␊
c0551fa0: 00000000 00400000 00400000 0000015c c057473c c0576388 00000010 80000000␍␊
c0551fc0: 00000067 00000000 00000000 c0000294 c041d12c c041d4f4 c0608350 c00054c4␍␊
c0551fe0: c05b69b0 00000003 00086f60 00000001 00087028 c05582e0 00000000 00000000␍␊
␍␊
␍␊
Call Trace:␍␊
[<c0003db4>] microblaze_unwind+0x64/0x7c␍␊
[<c0003a90>] show_stack+0xdc/0x160␍␊
[<c03ea810>] dump_stack+0x20/0x38␍␊
[<c000ceb4>] __warn+0x104/0x130␍␊
[<c000cef0>] warn_slowpath_null+0x10/0x28␍␊
[<c00c4668>] memblock_add_range+0x8c/0x2c0␍␊
[<c00c495c>] memblock_add+0x40/0x80␍␊
[<c058adf8>] early_init_dt_add_memory_arch+0x1dc/0x204␍␊
[<c058af40>] early_init_dt_scan_memory+0xfc/0x1a4␍␊
[<c058a4dc>] of_scan_flat_dt+0xa8/0x11c␍␊
[<c058b44c>] early_init_dt_scan_nodes+0x34/0x4c␍␊
[<c058b478>] early_init_dt_scan+0x14/0x30␍␊
[<c05745e8>] early_init_devtree+0x8/0x60␍␊
[<c0574738>] machine_early_init+0x78/0x178␍␊
[<c0000290>] start_here+0x24/0x5c␍␊
␍␊
random: get_random_bytes called from init_oops_id+0x5c/0x74 with crng_init=0␍␊
---[ end trace 24d4c3827f83863f ]---␍␊
Early console on uartlite at 0x84000000␍␊
bootconsole [earlyser0] enabled␍␊
Ramdisk addr 0x00000180, ␍␊
Compiled-in FDT at c040c3fc␍␊
------------[ cut here ]------------␍␊
WARNING: CPU: 0 PID: 0 at mm/memblock.c:519 memblock_add_range+0x90/0x2c0␍␊
Modules linked in:␍␊
CPU: 0 PID: 0 Comm: swapper Tainted: G        W       4.14.0 #36␍␊
Kernel Stack:␍␊
c0551efc: c000ceb8␍␊
c0551f00: 0000001b 00000000 00006100 00000000 00000000 c04333f8 c000cef4 c04209e4␍␊
c0551f20: 00000000 00000000 c04333f8 00000207 c00c466c 00626000 c0608bc0 00087028␍␊
c0551f40: c05582e0 80626000 c0561264 c00c466c 00000000 00000001 00000001 00400000␍␊
c0551f60: 00000300 c0045a64 c00c48e0 00000001 00400000 00000300 c0575c74 c0424b94␍␊
c0551f80: c00455a0 00626000 00000000 00626000 00000001 00087028 c05582e0 00000000␍␊
c0551fa0: 00000000 00000001 00000001 00400000 00000300 c0576388 00000010 80000000␍␊
c0551fc0: 00000067 00000001 00000000 c0000294 80625fff 00000004 c00002a0 80000000␍␊
c0551fe0: 00000019 302c2000 00086f60 00000001 00087028 00000000 00086f60 00000000␍␊
␍␊
␍␊
Call Trace:␍␊
[<c0003db4>] microblaze_unwind+0x64/0x7c␍␊
[<c0003a90>] show_stack+0xdc/0x160␍␊
[<c03ea810>] dump_stack+0x20/0x38␍␊
[<c000ceb4>] __warn+0x104/0x130␍␊
[<c000cef0>] warn_slowpath_null+0x10/0x28␍␊
[<c00c4668>] memblock_add_range+0x8c/0x2c0␍␊
[<c00c48dc>] memblock_reserve+0x40/0x80␍␊
[<c0576384>] mmu_init+0x16c/0x1e4␍␊
[<c000029c>] start_here+0x30/0x5c␍␊
␍␊
---[ end trace 24d4c3827f838640 ]---␍␊
Linux version 4.14.0 (gaston@linux-clkp) (gcc version 4.6.4 20120924 (Xilinx 14.1 Build EDK_P.13 28 Sep 2013) (crosstool-NG 1.18.0)) #36 Mon Dec 10 14:51:00 -03 2018␍␊
BUG: failure at mm/memblock.c:447/memblock_merge_regions()!␍␊
Kernel panic - not syncing: BUG!␍␊
---[ end Kernel panic - not syncing: BUG

anybody know about this kernel panic?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...