[U-Boot] qemu-system-arm segfaults on zynq_zed

Sören Brinkmann soren.brinkmann at xilinx.com
Mon Nov 24 19:34:31 CET 2014


I suppose the uboot.bin files you are talking about are binaries that
had been converted with objcopy or similar from ELF to binary. That
probably works well. The Zynq boot.bin is a container file that contains
the Zynq bootloader and (optionally) other things (like U-Boot). I doubt
QEMU is able to parse this Zynq specific file (though, it's all
documented, so it could be implemented I guess). So, you probably want to
pass the u-boot.elf as kernel, but I don't know to what extend that works
currently. For that we need input from Peter.
For more information about the Zynq boot.bin format, please have a look
at section 6.3.2 in the Zynq TRM
(http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf)
and the Zynq SW developer guide
(http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf).

	Sören

On Mon, 2014-11-24 at 10:24AM -0800, Douglas Rupp wrote:
> For versatilepb arm, there's a blog post that describes a recipe of how to
> build and boot "uboot.bin" in qemu.  It works fine, here's the link if
> you're interested.
> https://balau82.wordpress.com/2010/03/10/u-boot-for-arm-on-qemu/
> 
> I assumed that uboot was standardized enough so that it would work the same
> for other machine/board emulations. I'd like to understand why it's not
> working.
> 
> The problem I'm trying to solve is to configure networking in uboot for the
> xilinx-zynq-a9 bsp for vxworks7 running under qemu.  Vxworks7 uses uboot
> where 6.9 didn't, and the default device tree isn't set correctly for my
> network, it just has some random defaults that are expected to be
> customized.  The alternative is to use real hardware, which should work
> well enough for debugging but in general it's much easier to debug and run
> tests in qemu especially when working remotely.
> 
> So any ideas you might have on what's special about zynq utboot would be
> appreciated.
> 
> On Mon, Nov 24, 2014 at 9:45 AM, Sören Brinkmann <soren.brinkmann at xilinx.com
> > wrote:
> 
> > I don't think boot.bin is a legal "kernel". IIRC, I had issues running
> > on QEMU, but it was slightly better than what you describe.
> >
> >         Sören
> >
> > On Mon, 2014-11-24 at 09:40AM -0800, Douglas Rupp wrote:
> > >    The result is:
> > >
> > >    arm-softmmu/qemu-system-arm -M arm-generic-fdt -nographic -smp 2
> > -machine
> > >    linux=on -serial mon:stdio -dtb devicetree.dtb -kernel boot.bin
> > >    SPI device 0x7f8161521ee0
> > >    qemu: fatal: Trying to execute code outside RAM or ROM at 0xfffffff0
> > >
> > >    then a register dump
> > >
> > >    The "boot.bin" and "devicetree.dtb" is from xilinx binary release
> > >    2014.3-release/zed
> > >
> > >    I tried removing -smp 2 -machine linux=on, and same error.
> > >    On Mon, Nov 24, 2014 at 9:21 AM, Sören Brinkmann
> > >    <[1]soren.brinkmann at xilinx.com> wrote:
> > >
> > >      Could you try whether these instructions work?
> > >      [2]http://www.wiki.xilinx.com/QEMU
> > >
> > >              Sören
> > >      On Mon, 2014-11-24 at 08:58AM -0800, Douglas Rupp wrote:
> > >      > I built qemu-system-arm from the xilinx-master branch.
> > >       xilinx-zynq-a9 is
> > >      > not a supported machine. :(
> > >      >
> > >      > On Mon, Nov 24, 2014 at 7:02 AM, Douglas Rupp
> > >      <[3]douglas.b.rupp at gmail.com>
> > >      > wrote:
> > >      >
> > >      > > It's the version of qemu-system-arm downloaded for Ubuntu 14.04
> > >      > > Version info:
> > >      > > qemu-system-arm --version
> > >      > > QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.7)
> > >      > >
> > >      > > I also tried the three "boot.bin" files in
> > "2014.3-release.tar.gz"
> > >      > > downloaded from the Xilinx website, those in subdirectories
> > >      zc70x/zc706/
> > >      > > and zc70x/zc702/, and zed/ .  Same command line.  Hangs with no
> > >      output.
> > >      > >
> > >      > > I also tried the version 2.0.0 version of qemu-system-arm from
> > the
> > >      > > [4]open-do.org website that we regular use with xlnx-zynq-a9
> > bsp for
> > >      > > vxworks7, it boots vxworks without uboot, but hangs with uboot.
> > >      > >
> > >      > > You're suggesting that only the qemu-system-arm built from the
> > >      xilinx repo
> > >      > > is functional with uboot?  I used that version of qemu about a
> > year
> > >      ago,
> > >      > > and it worked fine for Linux but it was an ancient version of
> > qemu
> > >      (at that
> > >      > > time).
> > >      > >
> > >      > > On Sun, Nov 23, 2014 at 10:17 PM, Jagan Teki
> > >      <[5]jagannadh.teki at gmail.com>
> > >      > > wrote:
> > >      > >
> > >      > >> On 24 November 2014 at 06:03, Douglas Rupp
> > >      <[6]douglas.b.rupp at gmail.com>
> > >      > >> wrote:
> > >      > >> > I'm brand new to Uboot, so hopefully this is just some
> > missing
> > >      switch.
> > >      > >> I
> > >      > >> > did search the archive, and I was able to build and u-boot a
> > >      > >> versaatilepb
> > >      > >> > version, but xilinx-zynq-a9 is the one I really need.
> > >      > >> >
> > >      > >> > u-boot-2014.10$ make zynq_zed_defconfig
> > >      > >> > u-boot-2014.10$ make all CROSS_COMPILE=arm-none-eabi-
> > ARCH=arm
> > >      > >> > u-boot-2014.10$ qemu-system-arm -M xilinx-zynq-a9 -m 1024M
> > >      -nographic
> > >      > >> > -kernel u-boot-dtb.bin
> > >      > >> > Segmentation fault (core dumped)
> > >      > >>
> > >      > >> I guess it may be qemu usage issue, is qemu from
> > >      > >> [7]https://github.com/Xilinx/qemu ?
> > >      > >>
> > >      > >> + Peter
> > >      > >> Hope, he will give some inputs
> > >      > >>
> > >      > >> >
> > >      > >> > What am I doing wrong?
> > >      > >>
> > >      > >> thanks!
> > >      > >> --
> > >      > >> Jagan.
> > >      > >>
> > >      > >
> > >      > >
> > >
> > >      > _______________________________________________
> > >      > U-Boot mailing list
> > >      > [8]U-Boot at lists.denx.de
> > >      > [9]http://lists.denx.de/mailman/listinfo/u-boot
> > >
> > > Links:
> > > 1. mailto:soren.brinkmann at xilinx.com/
> > > 2. http://www.wiki.xilinx.com/QEMU
> > > 3. mailto:douglas.b.rupp at gmail.com/
> > > 4. http://open-do.org/
> > > 5. mailto:jagannadh.teki at gmail.com/
> > > 6. mailto:douglas.b.rupp at gmail.com/
> > > 7. https://github.com/Xilinx/qemu
> > > 8. mailto:U-Boot at lists.denx.de/
> > > 9. http://lists.denx.de/mailman/listinfo/u-boot
> >

> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot



More information about the U-Boot mailing list