Author Topic: TEBF0808 booting from remote machine  (Read 821 times)

adamdunc

  • Active Member
  • *
  • Posts: 12
TEBF0808 booting from remote machine
« on: March 10, 2017, 05:29:59 PM »
Hi,

I am trying to establish a process for booting a kernel on the TE0808 from a remote machine and had a few questions.

1. Is there a way to build images in petalinux and then boot them all over JTAG with one command?

The command I am issuing that fails is:
petalinux-boot --jtag --bitstream ../Carrier_TEBF0808/vivado/Carrier_TEBF0808.runs/impl_1/zusys_wrapper.bit --kernel --pmufw no
I thought that this would work but I get an error "cma: Failed to reserve 128 MiB"
The full error log is below at the end of this post.

I can issue a similar command and boot into a U-boot shell and then do TFTBOOT successfully like so:
petalinux-boot --jtag --bitstream ../Carrier_TEBF0808/vivado/Carrier_TEBF0808.runs/impl_1/zusys_wrapper.bit --pmufw no --u-boot
then enter U-boot prompt, and type "run netboot"

2. Every once in a while the TEBF0808 system seems to get stuck in a weird state where I can download a bitstream just fine but I get a memory write error during download of the ELF file
The error goes away if I manually push the board reset switch and rerun the command, but I am not able to do this remotely. Is there a way to do the same kind of reset remotely? Ideally from a linux command line?

adamdunc@rose:/home/adamdunc/TEBF0808_2016_4_ref/r11$ petalinux-boot --jtag --bitstream ../Carrier_TEBF0808/vivado/Carrier_TEBF0808.runs/impl_1/zusys_wrapper.bit --pmufw no --u-boot
INFO: Launching XSDB for file download and boot.
INFO: This may take a few minutes, depending on the size of your image.
rlwrap: warning: your $TERM is 'xterm' but rlwrap couldn't find it in the terminfo database. Expect some problems.: Inappropriate ioctl for device
INFO: Configuring the FPGA...                                                                                             
INFO: Downloading bitstream to the target.
INFO: Downloading ELF file to the target.                                                                                 
Memory write error at 0xFFFC0000. MMU fault at VA 0xFFFC0000. Translation fault, first level                               
    invoked from within
"::tcf::eval -progress {
       apply {{info} {
      switch -- [lindex $info 0] {
          "info" {
         puts -nonewline "\r[lindex $info 1]"
          }
          "warning" {
         puts "\n[lindex $info 1]"
          }
          "data" {
         puts -nonewline "\r[lindex $info 1] of [lindex $info 2] complete"
          }
          "done" {
         puts "\n[lindex $info 1]"
          }
      }
      flush stdout
      ::xsdb::abort_check
       }}} {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {download_cache_client ::tcfclient#0::arg}}}"
    (procedure "::tcf::cache_eval_with_progress" line 2)
    invoked from within
"::tcf::cache_eval_with_progress $params(chan) [list download_cache_client $argvar] {
       apply {{info} {
      switch -- [lindex $info 0] {
          "info" ..."
    (procedure "dow" line 67)
    invoked from within
"dow "/home/adamdunc/TEBF0808_2016_4_ref/r11/images/linux/zynqmp_fsbl.elf""
    (file "/tmp/tmp.SqmuvEDXce" line 13)
INFO: The XSDB log is as follows
100%    5MB   1.8MB/s  00:02   
Downloading Program -- /home/adamdunc/TEBF0808_2016_4_ref/r11/images/linux/zynqmp_fsbl.elf
   section, .text: 0xfffc0000 - 0xfffd7e3f
   section, .init: 0xfffd7e40 - 0xfffd7e73
   section, .fini: 0xfffd7e80 - 0xfffd7eb3
   section, .note.gnu.build-id: 0xfffd7eb4 - 0xfffd7ed7
   section, .rodata: 0xfffd7f00 - 0xfffd9247
   section, .data: 0xfffd9280 - 0xfffd9d0f
   section, .eh_frame: 0xfffd9d10 - 0xfffd9d13
   section, .mmu_tbl0: 0xfffda000 - 0xfffda00f
   section, .mmu_tbl1: 0xfffdb000 - 0xfffdcfff
   section, .mmu_tbl2: 0xfffdd000 - 0xfffe0fff
   section, .init_array: 0xfffe1000 - 0xfffe1007
   section, .fini_array: 0xfffe1040 - 0xfffe1047
   section, .sbss: 0xfffe1048 - 0xfffe107f
   section, .bss: 0xfffe1080 - 0xfffe353f
   section, .heap: 0xfffe3540 - 0xfffe393f
   section, .stack: 0xfffe3940 - 0xfffe593f
   section, .handoff_params: 0xfffe9e00 - 0xfffe9e87
aborting, 1 pending requests...
Failed to download /home/adamdunc/TEBF0808_2016_4_ref/r11/images/linux/zynqmp_fsbl.elf



#####################################
Error on JTAG boot:
Xilinx Zynq MP First Stage Boot Loader                                         
Release 2016.4   Mar 10 2017  -  07:30:14                                       
                                                                               
--------------------------------------------------------------------------------
TE0808 Board Initialisation                                                     
Si534x Init Function                                                           
Si534x Init Complete                                                           
PCIe Reset Complete                                                             
NOTICE:  ATF running on XCZU9EG/silicon v1/RTL5.1 at 0xfffea000                 
NOTICE:  BL31: Secure code at 0x60000000                                       
NOTICE:  BL31: Non secure code at 0x8000000                                     
NOTICE:  BL31: v1.3(release):1bb0730                                           
NOTICE:  BL31: Built : 08:09:12, Mar 10 2017                                   
                                                                               
                                                                               
U-Boot 2016.07 (Mar 10 2017 - 08:13:19 -0500) Xilinx ZynqMP ZCU102 revB         
                                                                               
DRAM:  2 GiB                                                                   
EL Level:       EL2                                                             
Chip ID:        xczuunknown                                                     
MMC:   sdhci@ff160000: 0, sdhci@ff170000: 1                                     
SF: Detected N25Q256A with page size 512 Bytes, erase size 8 KiB, total 64 MiB 
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Net:   ZYNQ GEM: ff0e0000, phyaddr -1, interface rgmii-id                       
eth0: ethernet@ff0e0000                                                         
Hit any key to stop autoboot:  0                                               
ZynqMP>                                                                         
ZynqMP>                                                                         
ZynqMP> Xilinx Zynq MP First Stage Boot Loader                                 
Release 2016.4   Mar 10 2017  -  07:30:14                                       
                                                                               
--------------------------------------------------------------------------------
TE0808 Board Initialisation                                                     
Si534x Init Function                                                           
Si534x Init Complete                                                           
PCIe Reset Complete                                                             
NOTICE:  ATF running on XCZU9EG/silicon v1/RTL5.1 at 0xfffea000                 
NOTICE:  BL31: Secure code at 0x60000000                                       
NOTICE:  BL31: Non secure code at 0x8000000                                     
NOTICE:  BL31: v1.3(release):1bb0730                                           
NOTICE:  BL31: Built : 08:09:12, Mar 10 2017                                   
[    0.000000] Booting Linux on physical CPU 0x0                               
[    0.000000] Linux version 4.6.0-xilinx (adamdunc@rose) (gcc version 5.2.1 207
[    0.000000] Boot CPU: AArch64 Processor [410fd034]                           
[    0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8') 
[    0.000000] bootconsole [cdns0] enabled                                     
[    0.000000] efi: Getting EFI parameters from FDT:                           
[    0.000000] efi: UEFI not found.                                             
[    0.000000] cma: Failed to reserve 128 MiB                                   
[    0.000000] Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 byt.
[    0.000000]                                                                 
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.6.0-xilinx #2         
[    0.000000] Hardware name: ZynqMP TEBF0808 (DT)                             
[    0.000000] Call trace:                                                     
[    0.000000] [<ffffff8008089860>] dump_backtrace+0x0/0x198                   
[    0.000000] [<ffffff8008089a0c>] show_stack+0x14/0x20                       
[    0.000000] [<ffffff80083c596c>] dump_stack+0x94/0xb8                       
[    0.000000] [<ffffff8008127860>] panic+0x110/0x254                           
[    0.000000] [<ffffff8008b4e0d4>] memblock_alloc_base+0x30/0x3c               
[    0.000000] [<ffffff8008b4e0f0>] memblock_alloc+0x10/0x18                   
[    0.000000] [<ffffff8008b40b24>] early_pgtable_alloc+0x18/0x98               
[    0.000000] [<ffffff8008b40dec>] paging_init+0x24/0x66c                     
[    0.000000] [<ffffff8008b3e390>] setup_arch+0x1c0/0x6a8                     
[    0.000000] [<ffffff8008b3b658>] start_kernel+0x70/0x3f0                     
[    0.000000] [<ffffff80080811d8>] 0xffffff80080811d8                         
[    0.000000] ---[ end Kernel panic - not syncing: ERROR: Failed to allocate 0.
[    0.000000]   
[/list]

Thorsten Trenz

  • Administrator
  • Full Member
  • *****
  • Posts: 150
    • Trenz Electronic GmbH
Re: TEBF0808 booting from remote machine
« Reply #1 on: March 13, 2017, 04:39:23 PM »
Hi,

can you check boot mode (DIP-Switch S5), is it set to JTAG boot?

br
John

adamdunc

  • Active Member
  • *
  • Posts: 12
Re: TEBF0808 booting from remote machine
« Reply #2 on: March 14, 2017, 02:29:24 AM »
John,

I have S5 set to 0000 which I believe should be the JTAG boot setting. The following command executes just fine:

petalinux-boot --jtag --bitstream ../Carrier_TEBF0808/vivado/Carrier_TEBF0808.runs/impl_1/zusys_wrapper.bit --pmufw no --u-boot

The command that does not execute OK is:
petalinux-boot --jtag --bitstream ../Carrier_TEBF0808/vivado/Carrier_TEBF0808.runs/impl_1/zusys_wrapper.bit --kernel --pmufw no

Thanks,
Adam

Thorsten Trenz

  • Administrator
  • Full Member
  • *****
  • Posts: 150
    • Trenz Electronic GmbH
Re: TEBF0808 booting from remote machine
« Reply #3 on: March 14, 2017, 12:22:12 PM »
Hi,

I'm on Embedded World at the moment.  I will test this next week.

br
John

adamdunc

  • Active Member
  • *
  • Posts: 12
Re: TEBF0808 booting from remote machine
« Reply #4 on: March 21, 2017, 02:09:31 AM »
John,

Did you get a chance to test this?

Thanks,
Adam

JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #5 on: March 23, 2017, 09:56:31 AM »
Hi,

i will try this in the next days.
I never used petalinux to configure fpga.

br
John

JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #6 on: March 23, 2017, 10:15:07 AM »
Hi,
did you try following command:
  • petalinux-boot --jtag --prebuilt 3

For Zynq UltraScale+ MPSoC: Download the prebuilt FPGA bitstream, the prebuilt FSBL, the prebuilt PMUFW, the prebuilt ATF and the prebuilt kernel on target.

See page 27, 33:

br John

adamdunc

  • Active Member
  • *
  • Posts: 12
Re: TEBF0808 booting from remote machine
« Reply #7 on: March 23, 2017, 08:23:48 PM »
John,

I tried the "petalinux-boot --jtag --prebuilt 3" and am still getting stuck after the BL31 line in the console. Have you verified this to work on your end?

Here are my specific steps and results:

I copied the following files from your 2016.4-build05 to the pre-built folder in my petalinux project:
Carrier_TEBF0808/prebuilt/software/te0808_es1_tebf0808/zynqmp_fsbl.elf to pre-built/linux/images/zynqmp_fsbl.elf
Carrier_TEBF0808/prebuilt/hardware/te0808_es1_tebf0808/Carrier_TEBF0808.bit to pre-built/linux/implementation/download.bit
Carrier_TEBF0808/prebuilt/os/petalinux/default/bl31.elf to pre-built/linux/images/bl31.elf
Carrier_TEBF0808/prebuilt/os/petalinux/default/image.ub to pre-built/linux/images/Image

"
adamdunc@rose:~/TEBF0808_2016_4_ref/r11$ petalinux-boot --jtag --prebuilt 3
WARNING: Failed to load PMUFW, doesn't exist in pre-built.See help to load custom PMUFW
INFO: Launching XSDB for file download and boot.
INFO: This may take a few minutes, depending on the size of your image.
rlwrap: warning: your $TERM is 'xterm' but rlwrap couldn't find it in the terminfo database. Expect some problems.: Inappropriate ioctl for device
INFO: Configuring the FPGA...                                                                                                                                                       
INFO: Downloading bitstream to the target.
INFO: Downloading ELF file to the target.                                                                                                                                           
INFO: Downloading ELF file to the target.                                                                                                                                           
INFO: Downloading ELF file to the target.
"

"
Xilinx Zynq MP First Stage Boot Loader
Release 2016.4   Feb 14 2017  -  11:31:40

--------------------------------------------------------------------------------
TE0808 Board Initialisation
Si534x Init Function
Si534x Init Complete
PCIe Reset Complete
NOTICE:  ATF running on XCZU9EG/silicon v1/RTL5.1 at 0xfffea000
NOTICE:  BL31: Secure code at 0x60000000
NOTICE:  BL31: Non secure code at 0x8000000
NOTICE:  BL31: v1.3(release):1bb0730
NOTICE:  BL31: Built : 08:09:12, Mar 10 2017
"


JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #8 on: March 24, 2017, 08:12:44 AM »
I've not verified it, but i will do as soon as possible.
I've only read this in the documentation and I think it is worth trying out this.
br
John

adamdunc

  • Active Member
  • *
  • Posts: 12
Re: TEBF0808 booting from remote machine
« Reply #9 on: March 28, 2017, 08:57:34 PM »
John,

Did you get a chance to look at this?

Thanks,
Adam

JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #10 on: March 29, 2017, 10:25:53 AM »
Hi,

i try it at the moment, but i have a other problem at the moment with my vm.
https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_4/ug1144-petalinux-tools-reference-guide.pdf
Can you try following:
  • Generate pre-built folder with(page 26) after you has run the petalinux build: petalinux-package --prebuilt --fpga ./images/linux/zusys_wrapper.bit
  • PMUFW is not included automatically, copy manually:cp images/linux/pmufw.elf ./prebuilt/linux/images/
  • Run: petalinux-boot --jtag --prebuilt 3
Does it work?
I try it when i solved my problem with vm
br
John

JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #11 on: March 29, 2017, 02:56:53 PM »
Hi,

at the moment i can't startup JTAG with Linux on VM. I think there are problems with the driver, but in the moment I've not enough time to solve this problem. We only use WinOS for programming FPGA over JTAG.
So can you test the steps from my last post.

br
John

adamdunc

  • Active Member
  • *
  • Posts: 12
Re: TEBF0808 booting from remote machine
« Reply #12 on: April 01, 2017, 11:14:11 PM »
John,

I tried this and am still getting the same error. I have resorted back to loading files onto the SD card and booting from the SD card.

-Adam

JH

  • Full Member
  • ***
  • Posts: 189
Re: TEBF0808 booting from remote machine
« Reply #13 on: April 05, 2017, 11:23:52 AM »
Hi,

Ok, sorry that i can't help at the moment.

Of my own interest: Appears another warning wenn you add PMUFW? Or it's the same log as  Reply #7 on: March 23, 2017, 08:23:48 PM without the PMUFW warning?

br
John