linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Building sh4 without CONFIG_EXPERT.
@ 2014-05-11 23:53 Rob Landley
  2014-05-16 21:14 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Landley @ 2014-05-11 23:53 UTC (permalink / raw)
  To: linux-sh, linux-kernel

I got sh4 to work under QEMU years ago as part of my aboriginal linux
project, which builds the smallest Linux system capable of rebuilding
itself natively from source code. (You can download and run the system
images from http://landley.net/aboriginal/bin if you're curious.)

One of the goals of Aboriginal is to make different architectures behave
the same way, and one of the ways I do that is by having a basic kernel
miniconfig file defining the config symbols common across platforms:

  http://landley.net/hg/aboriginal/file/1651/sources/baseconfig-linux

And then append target-specific chunks, ala the LINUX_CONFIG sections
from each of:

  http://landley.net/hg/aboriginal/file/1651/sources/targets

The problem is, the sh4 target's target-specific chunk is an INSANE 45
config symbols (armv5l needs 15 symbols, powerpc needs 16, i686 needs 7,
mips needs 6...) and the reason for the verbosity is that sh4 forces on
CONFIG_EXPERT.

As far as I can tell, the only reason sh4 is forcing on CONFIG_EXPERT is
to get CONFIG_PATA_PLATFORM. The patch to make sh4 _not_ force on
CONFIG_EXPERT is just:

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 834b67c..7d0d44d 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -1,7 +1,7 @@
 config SUPERH
 	def_bool y
 	select ARCH_MIGHT_HAVE_PC_PARPORT
-	select EXPERT
+	select HAVE_PATA_PLATFORM
 	select CLKDEV_LOOKUP
 	select HAVE_IDE if HAS_IOPORT_MAP
 	select HAVE_MEMBLOCK

Which swaps EXPERT for HAVE_PATA_PLATFORM, so I can still provide a hard
drive qemu can see as /dev/sda. The result builds, boots, and works for
me in very basic smoke testing, and lets me get my sh4-specific config
symbol set down to 27 symbols.

(P.S. I have no idea why hitting ctrl-C kills the _emulator_ rather than
passing it along to the emulated system. The other qemu targets don't do
that...)

Rob

P.S. I'm using linux 3.14, qemu 2.0, and the sh4 cross compiler
toolchain from the URL at the top of the post. I can be more explicit if
you care...

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Building sh4 without CONFIG_EXPERT.
  2014-05-11 23:53 Building sh4 without CONFIG_EXPERT Rob Landley
@ 2014-05-16 21:14 ` Randy Dunlap
  2015-01-05  9:58   ` Geert Uytterhoeven
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2014-05-16 21:14 UTC (permalink / raw)
  To: Rob Landley, linux-sh, linux-kernel

On 05/11/2014 04:53 PM, Rob Landley wrote:
> I got sh4 to work under QEMU years ago as part of my aboriginal linux
> project, which builds the smallest Linux system capable of rebuilding
> itself natively from source code. (You can download and run the system
> images from http://landley.net/aboriginal/bin if you're curious.)
> 
> One of the goals of Aboriginal is to make different architectures behave
> the same way, and one of the ways I do that is by having a basic kernel
> miniconfig file defining the config symbols common across platforms:
> 
>   http://landley.net/hg/aboriginal/file/1651/sources/baseconfig-linux
> 
> And then append target-specific chunks, ala the LINUX_CONFIG sections
> from each of:
> 
>   http://landley.net/hg/aboriginal/file/1651/sources/targets
> 
> The problem is, the sh4 target's target-specific chunk is an INSANE 45
> config symbols (armv5l needs 15 symbols, powerpc needs 16, i686 needs 7,
> mips needs 6...) and the reason for the verbosity is that sh4 forces on
> CONFIG_EXPERT.
> 
> As far as I can tell, the only reason sh4 is forcing on CONFIG_EXPERT is
> to get CONFIG_PATA_PLATFORM. The patch to make sh4 _not_ force on
> CONFIG_EXPERT is just:
> 
> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
> index 834b67c..7d0d44d 100644
> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig
> @@ -1,7 +1,7 @@
>  config SUPERH
>  	def_bool y
>  	select ARCH_MIGHT_HAVE_PC_PARPORT
> -	select EXPERT
> +	select HAVE_PATA_PLATFORM
>  	select CLKDEV_LOOKUP
>  	select HAVE_IDE if HAS_IOPORT_MAP
>  	select HAVE_MEMBLOCK

Since PATA_PLATFORM is:

config PATA_PLATFORM
	tristate "Generic platform device PATA support"
	depends on EXPERT || PPC || HAVE_PATA_PLATFORM

then any of EXPERT, PPC, or HAVE_PATA_PLATFORM should be sufficient.
and using HAVE_PATA_PLATFORM is more direct and obvious.

Acked-by: Randy Dunlap <rdunlap@infradead.org>


> Which swaps EXPERT for HAVE_PATA_PLATFORM, so I can still provide a hard
> drive qemu can see as /dev/sda. The result builds, boots, and works for
> me in very basic smoke testing, and lets me get my sh4-specific config
> symbol set down to 27 symbols.
> 
> (P.S. I have no idea why hitting ctrl-C kills the _emulator_ rather than
> passing it along to the emulated system. The other qemu targets don't do
> that...)
> 
> Rob
> 
> P.S. I'm using linux 3.14, qemu 2.0, and the sh4 cross compiler
> toolchain from the URL at the top of the post. I can be more explicit if
> you care...


-- 
~Randy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Building sh4 without CONFIG_EXPERT.
  2014-05-16 21:14 ` Randy Dunlap
@ 2015-01-05  9:58   ` Geert Uytterhoeven
  2015-01-12 23:00     ` [PATCH] Build superh " Rob Landley
  0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2015-01-05  9:58 UTC (permalink / raw)
  To: Rob Landley; +Cc: Linux-sh list, linux-kernel@vger.kernel.org, Randy Dunlap

On Fri, May 16, 2014 at 11:14 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 05/11/2014 04:53 PM, Rob Landley wrote:
>> I got sh4 to work under QEMU years ago as part of my aboriginal linux
>> project, which builds the smallest Linux system capable of rebuilding
>> itself natively from source code. (You can download and run the system
>> images from http://landley.net/aboriginal/bin if you're curious.)
>>
>> One of the goals of Aboriginal is to make different architectures behave
>> the same way, and one of the ways I do that is by having a basic kernel
>> miniconfig file defining the config symbols common across platforms:
>>
>>   http://landley.net/hg/aboriginal/file/1651/sources/baseconfig-linux
>>
>> And then append target-specific chunks, ala the LINUX_CONFIG sections
>> from each of:
>>
>>   http://landley.net/hg/aboriginal/file/1651/sources/targets
>>
>> The problem is, the sh4 target's target-specific chunk is an INSANE 45
>> config symbols (armv5l needs 15 symbols, powerpc needs 16, i686 needs 7,
>> mips needs 6...) and the reason for the verbosity is that sh4 forces on
>> CONFIG_EXPERT.
>>
>> As far as I can tell, the only reason sh4 is forcing on CONFIG_EXPERT is
>> to get CONFIG_PATA_PLATFORM. The patch to make sh4 _not_ force on
>> CONFIG_EXPERT is just:
>>
>> diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
>> index 834b67c..7d0d44d 100644
>> --- a/arch/sh/Kconfig
>> +++ b/arch/sh/Kconfig
>> @@ -1,7 +1,7 @@
>>  config SUPERH
>>       def_bool y
>>       select ARCH_MIGHT_HAVE_PC_PARPORT
>> -     select EXPERT
>> +     select HAVE_PATA_PLATFORM
>>       select CLKDEV_LOOKUP
>>       select HAVE_IDE if HAS_IOPORT_MAP
>>       select HAVE_MEMBLOCK
>
> Since PATA_PLATFORM is:
>
> config PATA_PLATFORM
>         tristate "Generic platform device PATA support"
>         depends on EXPERT || PPC || HAVE_PATA_PLATFORM
>
> then any of EXPERT, PPC, or HAVE_PATA_PLATFORM should be sufficient.
> and using HAVE_PATA_PLATFORM is more direct and obvious.
>
> Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Note that you have to resent to akpm to get sh-patches applied.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Build superh without CONFIG_EXPERT.
  2015-01-05  9:58   ` Geert Uytterhoeven
@ 2015-01-12 23:00     ` Rob Landley
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Landley @ 2015-01-12 23:00 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux-sh list, linux-kernel@vger.kernel.org, Randy Dunlap,
	Geert Uytterhoeven

From: Rob Landley <rob@landley.net>

What sh4 actually wants is HAVE_PATA_PLATFORM, so select that instead.

Signed-off-by: Rob Landley <rob@landley.net>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

---

 arch/sh/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

A follow-up patch could simplify the defconfigs in arch/sh/configs...

--- linux/arch/sh/Kconfig
+++ linux/arch/sh/Kconfig
@@ -1,7 +1,7 @@
 config SUPERH
 	def_bool y
 	select ARCH_MIGHT_HAVE_PC_PARPORT
-	select EXPERT
+	select HAVE_PATA_PLATFORM
 	select CLKDEV_LOOKUP
 	select HAVE_IDE if HAS_IOPORT_MAP
 	select HAVE_MEMBLOCK

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-12 23:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11 23:53 Building sh4 without CONFIG_EXPERT Rob Landley
2014-05-16 21:14 ` Randy Dunlap
2015-01-05  9:58   ` Geert Uytterhoeven
2015-01-12 23:00     ` [PATCH] Build superh " Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).