On 27 April 2017 at 04:17, Alistair Francis <[email protected]> wrote: > On Wed, Apr 26, 2017 at 7:52 AM, Alistair Francis <[email protected]> > wrote: >> On Tue, Apr 25, 2017 at 10:53 PM, Nathan Rossi <[email protected]> >> wrote: >>> On 26 April 2017 at 04:11, Alistair Francis <[email protected]> wrote: >>>> On Tue, Apr 25, 2017 at 10:54 AM, Alistair Francis <[email protected]> >>>> wrote: >>>>> On Thu, Apr 20, 2017 at 3:35 AM, Nathan Rossi <[email protected]> >>>>> wrote: >>>>>> This change reworks how the meta-xilinx layer enables and provides the >>>>>> custom version of QEMU based on Xilinx's fork of QEMU. The existing >>>>>> implementation relied on the single sysroot which was changed in oe-core >>>>>> such that now recipes have their own sysroots (RSS support). >>>>>> Additionally oe-core now provides the QEMU binaries to the runqemu >>>>>> script via the 'qemu-helper-native' recipes sysroot as opposed to the >>>>>> image sysroot. >>>>>> >>>>>> These rework changes allow for a single machine to select the targeted >>>>>> QEMU version as well as to provide the qemuboot config specific to the >>>>>> targeted QEMU version. The selection of QEMU version is now handled by >>>>>> PREFERRED_PROVIDER mechanics with the meta-xilinx layer providing an >>>>>> additional recipe that is equivalent to qemu-helper-native and which >>>>>> also provides said target allowing for the machine to select via the use >>>>>> of PREFERRED_PROVIDER_qemu-helper-native. This recipe >>>>>> (qemu-xilinx-helper-native) however instead provides the sysroot >>>>>> populated with qemu-xilinx instead of qemu. >>>>>> >>>>>> Additionally the XILINX_QEMUBOOT variable is replaced with the >>>>>> qemuboot-xilinx.bbclass, this provides the overrides for setting up >>>>>> qemu-xilinx specific QB_* args. Additionally this bbclass points runqemu >>>>>> at the qemu-xilinx-helper-native sysroot for QEMU binaries. >>>>>> >>>>>> These changes also work towards making the meta-xilinx layer better >>>>>> handle multiple qemuboot.conf variants as well as handling different >>>>>> QEMU versions. >>>>>> >>>>>> This change also removes the 'qemu-system-xilinx' MACHINE_FEATURES, this >>>>>> is due to MACHINE_FEATURES no longer being available for native recipes. >>>>>> Additionally there is no longer any logic that needs to know this any >>>>>> way. >>>>>> >>>>>> Signed-off-by: Nathan Rossi <[email protected]> >>>>>> --- >>>>>> classes/qemuboot-xilinx.bbclass | 27 +++++++++++++++ >>>>>> conf/machine/include/machine-xilinx-qemu.inc | 39 >>>>>> ++++------------------ >>>>>> conf/machine/ml605-qemu-microblazeel.conf | 1 + >>>>>> conf/machine/qemu-zynq7.conf | 1 + >>>>>> conf/machine/s3adsp1800-qemu-microblazeeb.conf | 1 + >>>>>> conf/machine/zcu102-zynqmp.conf | 8 +++-- >>>>>> .../qemu/qemu-xilinx-helper-native_1.0.bb | 20 +++++++++++ >>>>>> 7 files changed, 61 insertions(+), 36 deletions(-) >>>>>> create mode 100644 classes/qemuboot-xilinx.bbclass >>>>>> create mode 100644 >>>>>> recipes-devtools/qemu/qemu-xilinx-helper-native_1.0.bb >>>>>> >>>>>> diff --git a/classes/qemuboot-xilinx.bbclass >>>>>> b/classes/qemuboot-xilinx.bbclass >>>>>> new file mode 100644 >>>>>> index 0000000000..a2f5ef3eb6 >>>>>> --- /dev/null >>>>>> +++ b/classes/qemuboot-xilinx.bbclass >>>>>> @@ -0,0 +1,27 @@ >>>>>> + >>>>>> +inherit qemuboot >>>>>> + >>>>>> +# enable the overrides for the context of the conf only >>>>>> +OVERRIDES .= ":qemuboot-xilinx" >>>>>> + >>>>>> +# setup the target binary >>>>>> +QB_SYSTEM_NAME_prepend = "qemu-xilinx/" >>>>>> + >>>>>> +# Default machine targets for Xilinx QEMU (FDT Generic) >>>>>> +QB_MACHINE_aarch64 = "-machine arm-generic-fdt" >>>>>> +QB_MACHINE_arm = "-machine arm-generic-fdt-plnx" >>>>> >>>>> Hey Nathan, >>>>> >>>>> This should be: "arm-generic-fdt-7series", that name is the old name >>>>> >>>>>> +QB_MACHINE_microblaze = "-machine microblaze-generic-fdt" >>>>> >>>>> This should be "microblaze-generic-fdt-plnx", I'm not sure why this >>>>> wasn't always this. >>> >>> I just moved them from the .inc to the .bbclass. You should ask past >>> Alistair why he used those values ;). They are currently not used, but >>> i've updated the patch to make them the values you provided above. >> >> Yeah, I know. Past Alistair didn't know what he was doing apparently. >> >> Thanks for updating it. >> >>> >>>>> >>>>>> + >>>>>> +# defaults >>>>>> +QB_DEFAULT_KERNEL ?= "none" >>>>> >>>>> For the newer QEMU builds (my other patch that hangs after ATF) we >>>>> need to ensure that QB_DEFAULT_KERNEL is NULL when booting Xilinx's >>>>> fork of QEMU. It appears that using the QEMU -kernel loader must >>>>> somehow overwrite images that we want to boot which is why the boot >>>>> fails. >>>>> >>>>> Adding a QB_DEFAULT_KERNEL_qemuboot-xilinx = "none" in >>>>> machine-xilinx-qemu.inc fixes the issue, can you add that in somewhere >>>>> in this patch? >>> >>> I did transfer that over in the qemuboot-xilinx.bbclass, however it >>> was not taking effect due to "?=" not overriding the "?=" from >>> qemuboot.bbclass. I have shifted the inherit such that it is after the >>> QB_* setup in qemuboot-xilinx.bbclass so that setting via ?= takes >>> precedence over the qemuboot.bbclass. Which results in it set to >>> "none" when using qemuboot-xilinx. >>> >>> Updated version: >>> https://github.com/nathanrossi/meta-xilinx/commit/0a02e2f114079d9cc056536ad2b16a9379d8e3d9 > > qemuboot-xilinx.bbclass: Rework qemu-xilinx setup > > Reviewed-by: Alistair Francis <[email protected]> > >> >> Great! Thanks, that should fix the issue I was seeing. >> >>> >>>> >>>> Woops, forgot to mention that with with the kernel set to none the RAM >>>> sizes don't line up. The old QEMU version will work, but new QEMU >>>> releases default to only 2GB of RAM being created, while Linux expects >>>> 4GB as the command line arguments aren't passed in. The QB_MEM >>>> variable needs to be updated to 4GB of RAM for Linux to boot. >>> >>> I've created a separate patch which updates QB_MEM, since it is >>> related to the 2017.1 QEMU updates. >>> >>> https://github.com/nathanrossi/meta-xilinx/commit/e5bb84593da7835a36d846994faee17547919084 > > zcu102-zynqmp: Update QB_MEM to 4GB to match board > > Reviewed-by: Alistair Francis <[email protected]> > >>> >>> I've queued up this series, your QEMU version updates and the above >>> patch in nrossi/next. If you are good with the above changes I will >>> merge it all into master. > > I also tested the whole series for ZynqMP if you want to add that. > Looks good to me.
Thanks for testing, I've now merged it all to master. Thanks, Nathan -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
