[meta-xilinx] [PATCH 0/5] ZCU102 Multiarch QEMU
Nathan Rossi
nathan at nathanrossi.com
Thu May 25 22:26:44 PDT 2017
On 26 May 2017 at 03:51, Alistair Francis <alistair23 at gmail.com> wrote:
> On Wed, May 24, 2017 at 6:28 PM, Nathan Rossi <nathan at nathanrossi.com> wrote:
>> On 25 May 2017 at 07:17, Alistair Francis <alistair23 at gmail.com> wrote:
>>> On Wed, May 24, 2017 at 8:47 AM, Nathan Rossi <nathan at nathanrossi.com> wrote:
>>>> This series of changes enables the execution of a multiarch set of QEMU
>>>> instances to allow for the ZCU102 to be emulated with a PMU processor
>>>> for the setup and availability of the PMU firmware at run time.
>>>>
>>>> This is handled by runqemu launching a script instead of QEMU, the
>>>> script handles starting the PMU instance of QEMU after which the script
>>>> starts the APU QEMU instance using the QEMU args passed by runqemu.
>>>>
>>>> Currently this setup requires the PMU ROM exist in the image deploy
>>>> directory with the name 'pmu-rom.elf', which is not at this time
>>>> available for independent download without a Xilinx account. The PMU ROM
>>>> can be obtained from the ZCU102 PetaLinux BSP:
>>>>
>>>> https://www.xilinx.com/member/forms/download/xef.html?filename=xilinx-zcu102-v2017.1-final.bsp&akdm=1
>>>>
>>>> Download the BSP, extract the BSP using tar, and grab the file named
>>>> 'pmu_rom_qemu_sha3.elf' from deep in the directory tree.
>>>>
>>>
>>> Cool!
>>>
>>> Do you have a branch I can test?
>>
>> I do (includes the PMU build series as well):
>>
>> https://github.com/nathanrossi/meta-xilinx/commits/nrossi/next
>
> Great thanks. I have tested it today and I have some notes:
>
> 1. The script doesn't check if the PMU ROM exists. Instead it blindly
> passes it to QEMU and then relies on QEMU to warn the user that no
> file was passed. Unfortunately QEMU doesn't abort when the file is
> missing (it does warn the user though) so the error message is very
> confusing. Can you add a PMU ROM check to see if the file exists and
> prints helpful information if it doesn't?
> 2. Can the PMU ROM be a variable that can be overwritten in the local.conf?
To handle this it would need to pass the info via qemuboot.conf, but
runqemu doesn't pass QB_* variables to QEMU itself.
So to handle both points, it makes sense to improve how the args are
passed for the PMU instance. A reasonable solution to this is to make
the PMU qemu args a string arg of the qemu multiarch script (as if it
was a arg to QEMU). And have the script split the args for the
instances. This allows for qemuboot.conf to set all the PMU args
including the -kernel for the pmu rom.
https://github.com/nathanrossi/meta-xilinx/commit/b1f7eebf07ab22be99804d725e06fd061a55c9be
To handle 1. the script just scans for the value of "-kernel" and
treats it as the pmu-rom.elf file path, and checks/errors on it
missing. The error should point to some readme, but I guess that
depends on whether it will be possible for the pmu-rom to be fetched
and deployed by the layer as opposed to expecting the user to source
it? If Xilinx it is not going to be distributing it that way then some
readme content will need to be added describing similar to the info in
cover letter of this series.
>
> Once you have the ROM in the location everything seems to work, I can
> boot to Linux login prompt :)
>
> Once you have addressed the two comments above feel free to add my
> tested by to this series and the PMU build series as well:
> Tested-by: Alistair Francis <alistair.francis at xilinx.com>
Will do.
Thanks,
Nathan
More information about the meta-xilinx
mailing list