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]