Re: [Qemu-devel] Running linux on qemu omap
On Mon, 27 May 2019 at 16:56, Guenter Roeck wrote: > I'd be happy to use a different (supported) branch, but the Linaro branch > was the only one I could find that supports those boards. Unfortunately, > qemu changed so much since 2.3 that it is all but impossible to merge > the code into mainline qemu without spending a lot of effort on it. Even back at 2.3 it wasn't possible to merge the code into mainline without spending a lot of effort -- that's why it was not merged :-) thanks -- PMM
Re: [Qemu-devel] Running linux on qemu omap
On 5/27/19 5:56 PM, Guenter Roeck wrote: > On 5/26/19 11:32 PM, Tony Lindgren wrote: >> Hi, >> >> * Philippe Mathieu-Daudé [190523 12:01]: >>> What I use as reference for testing ARM boards [*] is the work of >>> Guenter Roeck: >>> https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh >>> >> >> I think Guenter also has v2.3.50-local-linaro branch in his >> github repo that has support for few extra boards like Beagleboard. >> Not sure what's the current branch to use though. >> > I'd be happy to use a different (supported) branch, but the Linaro branch > was the only one I could find that supports those boards. Unfortunately, > qemu changed so much since 2.3 that it is all but impossible to merge > the code into mainline qemu without spending a lot of effort on it. Peter commented on that here: https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00137.html "This is not a trivial job (my estimate was that it would be a couple of months work to get the complete set sorted out and upstreamed ..."
Re: [Qemu-devel] Running linux on qemu omap
On 5/26/19 11:32 PM, Tony Lindgren wrote: Hi, * Philippe Mathieu-Daudé [190523 12:01]: What I use as reference for testing ARM boards [*] is the work of Guenter Roeck: https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh I think Guenter also has v2.3.50-local-linaro branch in his github repo that has support for few extra boards like Beagleboard. Not sure what's the current branch to use though. I'd be happy to use a different (supported) branch, but the Linaro branch was the only one I could find that supports those boards. Unfortunately, qemu changed so much since 2.3 that it is all but impossible to merge the code into mainline qemu without spending a lot of effort on it. Guenter
Re: [Qemu-devel] Running linux on qemu omap
Hi, * Philippe Mathieu-Daudé [190523 12:01]: > What I use as reference for testing ARM boards [*] is the work of > Guenter Roeck: > https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh I think Guenter also has v2.3.50-local-linaro branch in his github repo that has support for few extra boards like Beagleboard. Not sure what's the current branch to use though. Regards, Tony
Re: [Qemu-devel] Running linux on qemu omap
On 24/05/2019 20.59, Aaro Koskinen wrote: > Hi, > > On Fri, May 24, 2019 at 06:00:18PM +0300, Aaro Koskinen wrote: >> Please don't delete OMAP boards quite yet :) In the mainline kernel >> they are not orphaned, they frequently get tested using actual hardware, >> and QEMU would help in additional testing. I'll try to get N8x0 boot to >> work with the minimal kernel I use on real HW. > > So it was only a matter of attaching the serial console at the QEMU side > (a hackish patch at the end of the mail). Does not look too much hackish to me. Could you please send it as a proper patch to the list (with patch description and Signed-off-by line)? Thomas > > diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c > index 906b7ca22d43..52ff83ec5147 100644 > --- a/hw/arm/nseries.c > +++ b/hw/arm/nseries.c > @@ -792,6 +792,7 @@ static void n8x0_uart_setup(struct n800_s *s) > qdev_connect_gpio_out(s->mpu->gpio, N8X0_BT_WKUP_GPIO, > csrhci_pins_get(radio)[csrhci_pin_wakeup]); > > +omap_uart_attach(s->mpu->uart[2], serial_hd(0)); > omap_uart_attach(s->mpu->uart[BT_UART], radio); > } > >
Re: [Qemu-devel] Running linux on qemu omap
Hi, On Fri, May 24, 2019 at 06:00:18PM +0300, Aaro Koskinen wrote: > Please don't delete OMAP boards quite yet :) In the mainline kernel > they are not orphaned, they frequently get tested using actual hardware, > and QEMU would help in additional testing. I'll try to get N8x0 boot to > work with the minimal kernel I use on real HW. So it was only a matter of attaching the serial console at the QEMU side (a hackish patch at the end of the mail). $ qemu-system-arm --version QEMU emulator version 4.0.0 (v4.0.0-dirty) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers $ qemu-system-arm -M n810 -kernel zImage -nographic Uncompressing Linux... done, booting the kernel. [0.00] Booting Linux on physical CPU 0x0 [0.00] Linux version 5.1.0-n8x0_tiny-los_b1ac4+-7-g7435e73d8ac4 (aaro@amd-fx-6350) (gcc version 8.3.0 (GCC)) #1 Fri May 24 20:43:02 EEST 2019 [0.00] CPU: ARMv6-compatible processor [4107b362] revision 2 (ARMv6TEJ), cr=00c5387d [0.00] CPU: VIPT aliasing data cache, unknown instruction cache [0.00] OF: fdt: Machine model: Nokia N810 [0.00] printk: bootconsole [earlycon0] enabled [0.00] Memory policy: Data cache writeback [0.00] OMAP2420 [...] However there are plenty of WARNs that are not present on real hardware. Anyway, it's a start. A. ... diff --git a/hw/arm/nseries.c b/hw/arm/nseries.c index 906b7ca22d43..52ff83ec5147 100644 --- a/hw/arm/nseries.c +++ b/hw/arm/nseries.c @@ -792,6 +792,7 @@ static void n8x0_uart_setup(struct n800_s *s) qdev_connect_gpio_out(s->mpu->gpio, N8X0_BT_WKUP_GPIO, csrhci_pins_get(radio)[csrhci_pin_wakeup]); +omap_uart_attach(s->mpu->uart[2], serial_hd(0)); omap_uart_attach(s->mpu->uart[BT_UART], radio); }
Re: [Qemu-devel] Running linux on qemu omap
Hi, On Fri, May 24, 2019 at 10:08:09AM +0100, Peter Maydell wrote: > On Thu, 23 May 2019 at 19:36, Aaro Koskinen wrote: > > Cheetah works with serial console. I tried with console on display, > > and it seems to boot up, and the frame buffer window gets correctly > > sized but for some reason it just stays blank. > > As a general question, when you're doing these tests are you > using a kernel image that is known to work on real hardware? With Cheetah (I wonder where that name comes from?), yes, same for N8x0. SX1 I don't have, but the SoC is the same as on Palm TE. > One problem we have with some of these older QEMU platforms > is that it turns out that QEMU is only tested with the kernel, > and the kernel support for the platform is only tested with > QEMU, and so you get equal and opposite bugs in QEMU and the > kernel that cancel each other out and don't get noticed... > > (On the QEMU side these platforms are all basically orphaned: > if somebody submits patches to fix bugs we'll review them, > but they're unlikely to get a great deal of attention otherwise. > They're also quite near the top of the "maybe we'll just > deprecate and then delete these" list, since we have not > historically had any working guest images to test against. > If there's a real userbase that wants them to continue to > exist that's a different matter, of course.) Please don't delete OMAP boards quite yet :) In the mainline kernel they are not orphaned, they frequently get tested using actual hardware, and QEMU would help in additional testing. I'll try to get N8x0 boot to work with the minimal kernel I use on real HW. Regarding N8x0 and bluetooth (mentioned in one of the linked threads), I guess the removal of the bluetooth subsystem can be done without removing the whole machine: just don't pass the OMAP BT TAG to the kernel anymore, and it should ignore the BT hardware (just an idea based on quick read of vendor kernel sources, the mainline kernel does not support BT on this board). A.
Re: [Qemu-devel] Running linux on qemu omap
On Thu, 23 May 2019 at 19:36, Aaro Koskinen wrote: > Cheetah works with serial console. I tried with console on display, > and it seems to boot up, and the frame buffer window gets correctly > sized but for some reason it just stays blank. As a general question, when you're doing these tests are you using a kernel image that is known to work on real hardware? One problem we have with some of these older QEMU platforms is that it turns out that QEMU is only tested with the kernel, and the kernel support for the platform is only tested with QEMU, and so you get equal and opposite bugs in QEMU and the kernel that cancel each other out and don't get noticed... (On the QEMU side these platforms are all basically orphaned: if somebody submits patches to fix bugs we'll review them, but they're unlikely to get a great deal of attention otherwise. They're also quite near the top of the "maybe we'll just deprecate and then delete these" list, since we have not historically had any working guest images to test against. If there's a real userbase that wants them to continue to exist that's a different matter, of course.) thanks - PMM
Re: [Qemu-devel] Running linux on qemu omap
Hi, On Thu, May 23, 2019 at 02:00:41PM +0200, Philippe Mathieu-Daudé wrote: > On 5/23/19 1:27 PM, Thomas Huth wrote: > > On 22/05/2019 20.19, Aaro Koskinen wrote: > >> On Wed, May 22, 2019 at 11:33:41AM +0200, Corentin Labbe wrote: > >>> qemu-system-arm -M help |grep OMAP > >>> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310) > >>> n800 Nokia N800 tablet aka. RX-34 (OMAP2420) > >>> n810 Nokia N810 tablet aka. RX-44 (OMAP2420) > >>> sx1 Siemens SX1 (OMAP310) V2 > >>> sx1-v1 Siemens SX1 (OMAP310) V1 > >>> > > The maximum I can get with omap1_defconfig is > > qemu-system-arm -kernel zImage -nographic -machine cheetah -append > > 'root=/dev/ram0 console=ttyO0' > > Uncompressing Linux... done, booting the kernel. > > then nothing more. > >> > >> With N800/N810 omap2plus_defconfig should be used instead. However, > >> I don't think that works either (but haven't tried recently). Also with > >> N800/N810 you need to append the DTB file to the kernel image. > > > > FWIW, Philippe recently posted a mail how to run older kernels on n810: > > > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg610653.html So it seems the issue with N8x0 is that serial console does not work. And we are missing the display support in the mainline kernel. > However I can see than none of the board listed by Corentin are tested > ... That reminder me I never succeed at using the Cheetah PDA. So the > OMAP310 is probably bitroting in QEMU... Cheetah works with serial console. I tried with console on display, and it seems to boot up, and the frame buffer window gets correctly sized but for some reason it just stays blank. A.
Re: [Qemu-devel] Running linux on qemu omap
On 5/23/19 1:27 PM, Thomas Huth wrote: > On 22/05/2019 20.19, Aaro Koskinen wrote: >> Hi, >> >> On Wed, May 22, 2019 at 11:33:41AM +0200, Corentin Labbe wrote: >>> qemu-system-arm -M help |grep OMAP >>> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310) >>> n800 Nokia N800 tablet aka. RX-34 (OMAP2420) >>> n810 Nokia N810 tablet aka. RX-44 (OMAP2420) >>> sx1 Siemens SX1 (OMAP310) V2 >>> sx1-v1 Siemens SX1 (OMAP310) V1 >>> > The maximum I can get with omap1_defconfig is > qemu-system-arm -kernel zImage -nographic -machine cheetah -append > 'root=/dev/ram0 console=ttyO0' > Uncompressing Linux... done, booting the kernel. > then nothing more. >> >> With N800/N810 omap2plus_defconfig should be used instead. However, >> I don't think that works either (but haven't tried recently). Also with >> N800/N810 you need to append the DTB file to the kernel image. > > FWIW, Philippe recently posted a mail how to run older kernels on n810: > > https://www.mail-archive.com/qemu-devel@nongnu.org/msg610653.html What I use as reference for testing ARM boards [*] is the work of Guenter Roeck: https://github.com/groeck/linux-build-test/blob/master/rootfs/arm/run-qemu-arm.sh However I can see than none of the board listed by Corentin are tested ... That reminder me I never succeed at using the Cheetah PDA. So the OMAP310 is probably bitroting in QEMU... [*] and slowly add to upstream patches he sent that fell through the cracks of qemu-devel. Regards, Phil. signature.asc Description: OpenPGP digital signature
Re: [Qemu-devel] Running linux on qemu omap
On 22/05/2019 20.19, Aaro Koskinen wrote: > Hi, > > On Wed, May 22, 2019 at 11:33:41AM +0200, Corentin Labbe wrote: >> qemu-system-arm -M help |grep OMAP >> cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310) >> n800 Nokia N800 tablet aka. RX-34 (OMAP2420) >> n810 Nokia N810 tablet aka. RX-44 (OMAP2420) >> sx1 Siemens SX1 (OMAP310) V2 >> sx1-v1 Siemens SX1 (OMAP310) V1 >> The maximum I can get with omap1_defconfig is qemu-system-arm -kernel zImage -nographic -machine cheetah -append 'root=/dev/ram0 console=ttyO0' Uncompressing Linux... done, booting the kernel. then nothing more. > > With N800/N810 omap2plus_defconfig should be used instead. However, > I don't think that works either (but haven't tried recently). Also with > N800/N810 you need to append the DTB file to the kernel image. FWIW, Philippe recently posted a mail how to run older kernels on n810: https://www.mail-archive.com/qemu-devel@nongnu.org/msg610653.html HTH, Thomas