hw/arm: Don't specify any default board
cover hw/arm: Don't specify any default board
Currently for both qemu-system-arm and qemu-system-aarch64 the default board model if the user doesn't specify one is the 'integratorcp'. This is a totally arbitrary historical accident since it was the first board to be modelled. That board is now just one target among many for us, and is a very poor choice of default:
* it's an ancient board that is now only found in the junkpiles of longtime ARM/Linux hackers, if at all
* it's an ARMv5 CPU, when most distros are now assuming ARMv7
* it's pretty much unmaintained in QEMU
* it doesn't even have versatilepb's advantage of supporting PCI
Making it or any other board the default serves only to confuse people new to ARM who expect something more like the x86 monoculture, and try to run a Linux kernel built for some random devboard on QEMU's integratorcp model by mistake
This series removes the is_default marker from integratorcp, to give users a nudge that they need to think about which board they want a QEMU model of.
Since it's now more likely that users will hit it, patch 2 improves the slightly cryptic error "No machine found." to align with the rather more helpful text produced if you ask -M no-such-machine.
This is a little late in the 2.0 cycle, but on the other hand the patches themselves are trivially simple, and the only question really is if we want to do this. It does break backwards compatibility of command lines with anybody who is still really running integratorcp kernels and not bothering to specify "-M integratorcp". But 2.0 is a nice round number to do that, and I think we improve usability for people who don't realise that the default is wrong for 99%+ of users.
Peter Maydell (2):
hw/arm: Stop specifying integratorcp as the default board vl.c: Improve message when no default machine is found
hw/arm/integratorcp.c | 1 - vl.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.9.0
PATCH 1/2 hw/arm: Stop specifying integratorcp as the default board
Currently for both qemu-system-arm and qemu-system-aarch64 the default board model if the user doesn't specify one is the 'integratorcp'. This is a totally arbitrary historical accident since it was the first board to be modelled. That board is now just one target among many for us, and is a very poor choice of default:
* it's an ancient board that is now only found in the junkpiles of longtime ARM/Linux hackers, if at all
* it's an ARMv5 CPU, when most distros are now assuming ARMv7
* it's pretty much unmaintained in QEMU
* it doesn't even have versatilepb's advantage of supporting PCI
Making it or any other board the default serves only to confuse people new to ARM who expect something more like the x86 monoculture. Remove the is_default marker from integratorcp, and don't set it for any other board, to give users a nudge that they need to think about which board they want a QEMU model of. (QEMU will produce the admittedly slightly cryptic error "No machine found.")
--- hw/arm/integratorcp.c | 1 - 1 file changed, 1 deletion(-)
hw/arm/integratorcp.c +0 -1
@@ -534,7 +534,6 @@ static QEMUMachine integratorcp_machine = { .name = "integratorcp", .desc = "ARM Integrator/CP (ARM926EJ-S)", .init = integratorcp_init, - .is_default = 1, };static void integratorcp_machine_init (void )
Signature · 1 line
1.9.0
Re: [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd
Peter Maydell <[email protected]> writes:
<snip>
Quoted 1 line
- .is_default = 1,
<snip>
Signature · 1 line
Alex Bennée
Re: [Qemu-devel] [maybe-for-2.0 1/2] hw/arm: Stop specifyingintegratorcp as the default boardd
Quoted 8 lines · Alex Bennée
Peter Maydell <[email protected]> writes:
<snip>
Quoted 1 line
- .is_default = 1,
<snip>
Reviewed-by Alex Bennée <[email protected]>
Bit late, this was applied to master yesterday :-)
thanks
-- PMM
PATCH 2/2 vl.c: Improve message when no default machine is found
In reply to Peter MaydellImprove the clarity of the message QEMU prints when the user doesn't specify a machine model to use and there is no default.
--- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
vl.c +2 -1
@@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)#endif if (machine_class ==NULL ) { -fprintf (stderr,"No machine found.\n" ); +fprintf (stderr,"No machine specified, and there is no default.\n" +"Use -machine help to list supported machines!\n" );exit (1 ); }
Signature · 1 line
1.9.0
Re: [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when no default machine is found
Quoted 13 lines · Peter Maydell
Improve the clarity of the message QEMU prints when the user doesn't specify a machine model to use and there is no default.
Signed-off-by Peter Maydell <[email protected]>--- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)vl.c +0
-0
vl.c int main(int argc, char **argv, char **envp) · line 3933
Quoted 6 lines
vl.c +2
-1@@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)#endif if (machine_class ==NULL ) { -fprintf (stderr,"No machine found.\n" ); +fprintf (stderr,"No machine specified, and there is no default.\n" +"Use -machine help to list supported machines!\n" );
+1
Quoted 3 lines
vl.c +0
-0exit (1 ); }
Re: [Qemu-devel] [maybe-for-2.0 2/2] vl.c: Improve message when nodefault machine is foundd
In reply to Peter MaydellQuoted 13 lines · Peter Maydell
Improve the clarity of the message QEMU prints when the user doesn't specify a machine model to use and there is no default.
Signed-off-by Peter Maydell <[email protected]>--- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)vl.c +0
-0
vl.c int main(int argc, char **argv, char **envp) · line 3935
Quoted 8 lines
vl.c +2
-1@@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)#endif if (machine_class ==NULL ) { -fprintf (stderr,"No machine found.\n" ); +fprintf (stderr,"No machine specified, and there is no default.\n" +"Use -machine help to list supported machines!\n" );exit (1 ); }
Signature · 1 line
Alex Bennée
Il 25/03/2014 20:26, Peter Maydell ha scritto:
Quoted 35 lines
Currently for both qemu-system-arm and qemu-system-aarch64 the default board model if the user doesn't specify one is the 'integratorcp'. This is a totally arbitrary historical accident since it was the first board to be modelled. That board is now just one target among many for us, and is a very poor choice of default:
* it's an ancient board that is now only found in the junkpiles of longtime ARM/Linux hackers, if at all
* it's an ARMv5 CPU, when most distros are now assuming ARMv7
* it's pretty much unmaintained in QEMU
* it doesn't even have versatilepb's advantage of supporting PCIMaking it or any other board the default serves only to confuse people new to ARM who expect something more like the x86 monoculture, and try to run a Linux kernel built for some random devboard on QEMU's integratorcp model by mistake
This series removes the
is_defaultmarker from integratorcp, to give users a nudge that they need to think about which board they want a QEMU model of.Since it's now more likely that users will hit it, patch 2 improves the slightly cryptic error "No machine found." to align with the rather more helpful text produced if you ask -M no-such-machine.
This is a little late in the 2.0 cycle, but on the other hand the patches themselves are trivially simple, and the only question really is if we want to do this. It does break backwards compatibility of command lines with anybody who is still really running integratorcp kernels and not bothering to specify "-M integratorcp". But 2.0 is a nice round number to do that, and I think we improve usability for people who don't realise that the default is wrong for 99%+ of users.
Quoted 8 lines
Peter Maydell (2):
hw/arm: Stop specifying integratorcp as the default boardvl.c: Improve message when no default machine is foundhw/arm/integratorcp.c | 1 - vl.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
series
Quoted 4 lines · Peter Maydell
Since it's now more likely that users will hit it, patch 2 improves the slightly cryptic error "No machine found." to align with the rather more helpful text produced if you ask -M no-such-machine.
I did a scan of other targets, and it turns out that ppcemb also currently doesn't specify any default board. So the improving of the error message will also help there.
thanks
-- PMM