2018-06-27 18:55:02

by Guenter Roeck

[permalink] [raw]
Subject: Linux kernel configurations for various Microblaze systems

Hi,

I would like to add Microblaze "petalogix-ml605" and "xlnx-zynqmp-pmu"
to my list of qemu boot tests of upstream and stable release kernels.

Unfortunately I have been unable to locate working kernel configurations
for the those systems, nor working qemu command lines. I found a few links,
but they are all dead.

I would appreciate any help to get this working.

Thanks,
Guenter


2018-06-27 20:46:22

by Philippe Mathieu-Daudé

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

Hi Guenter,

On 06/27/2018 03:52 PM, Guenter Roeck wrote:
> Hi,
>
> I would like to add Microblaze "petalogix-ml605" and "xlnx-zynqmp-pmu"
> to my list of qemu boot tests of upstream and stable release kernels.

Do you mind sharing your tests on this thread?

"Who is running QEMU automated tests, and when?"
http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg04695.html

> Unfortunately I have been unable to locate working kernel configurations
> for the those systems, nor working qemu command lines. I found a few links,
> but they are all dead.

I got more lucky using the Xilinx downstream code from:
https://github.com/Xilinx

In particular using their downstream DeviceTree:

https://github.com/Xilinx/device-tree-xlnx

I also used those links:

http://www.wiki.xilinx.com/MicroBlaze
http://www.wiki.xilinx.com/Build%20kernel

Regards,

Phil.


Attachments:
signature.asc (849.00 B)
OpenPGP digital signature

2018-06-27 21:36:44

by Guenter Roeck

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

On Wed, Jun 27, 2018 at 05:01:34PM -0300, Philippe Mathieu-Daud? wrote:
> Hi Guenter,
>
> On 06/27/2018 03:52 PM, Guenter Roeck wrote:
> > Hi,
> >
> > I would like to add Microblaze "petalogix-ml605" and "xlnx-zynqmp-pmu"
> > to my list of qemu boot tests of upstream and stable release kernels.
>
> Do you mind sharing your tests on this thread?
>
Nothing secret about it. The test results are always available at
http://kerneltests.org/. The scripts are published at
https://github.com/groeck/linux-build-test. My qemu clone (I carry a few
patches on top of upstream qemu) is at https://github.com/groeck/qemu.

> "Who is running QEMU automated tests, and when?"
> http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg04695.html
>
> > Unfortunately I have been unable to locate working kernel configurations
> > for the those systems, nor working qemu command lines. I found a few links,
> > but they are all dead.
>
> I got more lucky using the Xilinx downstream code from:
> https://github.com/Xilinx
>
> In particular using their downstream DeviceTree:
>
> https://github.com/Xilinx/device-tree-xlnx
>
> I also used those links:
>
> http://www.wiki.xilinx.com/MicroBlaze
> http://www.wiki.xilinx.com/Build%20kernel
>

AFAICS they are all generic, and don't reference specific boards
(other than maybe the possibility to configure those boards). There are
comments such as "start with mmu_defconfig and modify all parameters
which are special on your board". That is great, but trying to do that
for an evaluation board that I don't own and just try to get running
under qemu is a bit difficult since I don't really know what I am doing.

The best I was able to accomplish was to boot petalogix-ml605 without crash,
but with no console output either. I could try to debug further, but I don't
really want to waste my time.

Thanks,
Guenter

2018-06-27 23:50:45

by Edgar E. Iglesias

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

On Wed, Jun 27, 2018 at 01:59:15PM -0700, Guenter Roeck wrote:
> On Wed, Jun 27, 2018 at 05:01:34PM -0300, Philippe Mathieu-Daud? wrote:
> > Hi Guenter,
> >
> > On 06/27/2018 03:52 PM, Guenter Roeck wrote:
> > > Hi,
> > >
> > > I would like to add Microblaze "petalogix-ml605" and "xlnx-zynqmp-pmu"
> > > to my list of qemu boot tests of upstream and stable release kernels.
> >
> > Do you mind sharing your tests on this thread?
> >
> Nothing secret about it. The test results are always available at
> http://kerneltests.org/. The scripts are published at
> https://github.com/groeck/linux-build-test. My qemu clone (I carry a few
> patches on top of upstream qemu) is at https://github.com/groeck/qemu.
>
> > "Who is running QEMU automated tests, and when?"
> > http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg04695.html
> >
> > > Unfortunately I have been unable to locate working kernel configurations
> > > for the those systems, nor working qemu command lines. I found a few links,
> > > but they are all dead.
> >
> > I got more lucky using the Xilinx downstream code from:
> > https://github.com/Xilinx
> >
> > In particular using their downstream DeviceTree:
> >
> > https://github.com/Xilinx/device-tree-xlnx
> >
> > I also used those links:
> >
> > http://www.wiki.xilinx.com/MicroBlaze
> > http://www.wiki.xilinx.com/Build%20kernel
> >
>
> AFAICS they are all generic, and don't reference specific boards
> (other than maybe the possibility to configure those boards). There are
> comments such as "start with mmu_defconfig and modify all parameters
> which are special on your board". That is great, but trying to do that
> for an evaluation board that I don't own and just try to get running
> under qemu is a bit difficult since I don't really know what I am doing.
>
> The best I was able to accomplish was to boot petalogix-ml605 without crash,
> but with no console output either. I could try to debug further, but I don't
> really want to waste my time.

Hi Guenter,

Re: ml605
The thing to watch out for with kernel configs for microblaze systems is the
physmem address setting. Unfortunately the kernel does not auto-detect this.

I'm attaching a kernelconfig for the ml605 that works for me and a qemu commandline.

qemu-system-microblazeel -M petalogix-ml605 -m 256 -serial mon:stdio -dtb petalogix-ml605.dtb -kernel arch/microblaze/boot/linux.bin -append rdinit=/bin/sh

Re: pmu
The PMU board does not run Linux, it runs baremetal power-management related firmware.

Cheers,
Edgar


Attachments:
(No filename) (2.53 kB)
.config (52.02 kB)
Download all attachments

2018-06-28 01:29:25

by Guenter Roeck

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

Hi Edgar,

On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote:

>
> Hi Guenter,
>
> Re: ml605
> The thing to watch out for with kernel configs for microblaze systems is the
> physmem address setting. Unfortunately the kernel does not auto-detect this.
>
> I'm attaching a kernelconfig for the ml605 that works for me and a qemu commandline.
>
> qemu-system-microblazeel -M petalogix-ml605 -m 256 -serial mon:stdio -dtb petalogix-ml605.dtb -kernel arch/microblaze/boot/linux.bin -append rdinit=/bin/sh
>

Can you also send me the dtb file or even better its source ? I don't think
the one in qemu is correct. It lists the serial port at 0x83e00000, but qemu
instantiates it at 0x83e01000.

> Re: pmu
> The PMU board does not run Linux, it runs baremetal power-management related firmware.
>

Ah, good to know.

Thanks!
Guenter


2018-06-28 04:14:48

by Edgar E. Iglesias

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

On Wed, Jun 27, 2018 at 05:34:15PM -0700, Guenter Roeck wrote:
> Hi Edgar,
>
> On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote:
>
> >
> > Hi Guenter,
> >
> > Re: ml605
> > The thing to watch out for with kernel configs for microblaze systems is the
> > physmem address setting. Unfortunately the kernel does not auto-detect this.
> >
> > I'm attaching a kernelconfig for the ml605 that works for me and a qemu commandline.
> >
> > qemu-system-microblazeel -M petalogix-ml605 -m 256 -serial mon:stdio -dtb petalogix-ml605.dtb -kernel arch/microblaze/boot/linux.bin -append rdinit=/bin/sh
> >
>
> Can you also send me the dtb file or even better its source ? I don't think
> the one in qemu is correct. It lists the serial port at 0x83e00000, but qemu
> instantiates it at 0x83e01000.

I used the one from QEMU. IIRC, there's some offsetting going on there
that differs between the Xilinx version and the PC version of these
UARTs...

Can you try again and see how it goes?
If it doesn't work, I can share my kernel Image and we can compare from there.

Cheers,
Edgar

>
> > Re: pmu
> > The PMU board does not run Linux, it runs baremetal power-management related firmware.
> >
>
> Ah, good to know.
>
> Thanks!
> Guenter
>

2018-06-28 05:14:25

by Guenter Roeck

[permalink] [raw]
Subject: Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

On 06/27/2018 09:12 PM, Edgar E. Iglesias wrote:
> On Wed, Jun 27, 2018 at 05:34:15PM -0700, Guenter Roeck wrote:
>> Hi Edgar,
>>
>> On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote:
>>
>>>
>>> Hi Guenter,
>>>
>>> Re: ml605
>>> The thing to watch out for with kernel configs for microblaze systems is the
>>> physmem address setting. Unfortunately the kernel does not auto-detect this.
>>>
>>> I'm attaching a kernelconfig for the ml605 that works for me and a qemu commandline.
>>>
>>> qemu-system-microblazeel -M petalogix-ml605 -m 256 -serial mon:stdio -dtb petalogix-ml605.dtb -kernel arch/microblaze/boot/linux.bin -append rdinit=/bin/sh
>>>
>>
>> Can you also send me the dtb file or even better its source ? I don't think
>> the one in qemu is correct. It lists the serial port at 0x83e00000, but qemu
>> instantiates it at 0x83e01000.
>
> I used the one from QEMU. IIRC, there's some offsetting going on there
> that differs between the Xilinx version and the PC version of these
> UARTs...

Yes, I noticed after I sent the previous e-mail.

>
> Can you try again and see how it goes?
> If it doesn't work, I can share my kernel Image and we can compare from there.
>

I tried lots of things, nothing worked. Until I got your e-mail, tried again,
and suddenly it works just great. Go figure. Turns out I had used a big endian
toolchain to build a little endian target. Shameface.

I do get this odd gcc warning:

cc1: warning: -mxl-multiply-high can be used only with -mcpu=v6.00.a or greater

Actual parameters are "-mcpu=v10.0 -mxl-multiply-high", so that doesn't really make
sense to me. I tried various toolchains, all with the same result. Any idea what
that is about ?

Thanks,
Guenter