Skip to contentSkip to conversation

make ARCH=sparc allmodconfig change

DISCUSSION Alexey Dobriyan 5 participants 9 messages Feb 1, 2009 – Feb 3, 2009

lore
Share & tools
lore
#0 lore raw

After commit 761b602620b4627dbd8f1b0bd2896022dc168a6d aka "sparc: Use 64BIT config entry"

make ARCH=sparc allmodconfig

generates 64-bit kernel, while earlier it generated 32-bit kernel.

It's easy to see why sparc case different from x86 case:
common arch for sparc has same name as one of arches, while for x86 it's different. This makes 64BIT option visible.

Dunno, if this warrants revert, it's trivial to workaround here, still...

#1 lore raw
Quoted 1 line · Alexey Dobriyan

generates 64-bit kernel, while earlier it generated 32-bit kernel.

This is in line with the other 32/64bit arches, s390 and powerpc. If you think this is a problem, you should bring that to the kbuild maintainers, because they need to find something then.

Bastian

Signature · 2 lines
Suffocating together ... would create heroic camaraderie.
		-- Khan Noonian Singh, "Space Seed", stardate 3142.8
#2 lore raw
In reply to Alexey Dobriyan

Hi all.

Silly question. If ARCH=sparc is not 64bit then how do you make a 32bit sparc kernel?

Regards
Mark.

Quoted 17 lines · Bastian Blank
Quoted 1 line · Alexey Dobriyan

generates 64-bit kernel, while earlier it generated 32-bit kernel.

This is in line with the other 32/64bit arches, s390 and powerpc. If you think this is a problem, you should bring that to the kbuild maintainers, because they need to find something then.

Bastian

Signature · 6 lines
Suffocating together ... would create heroic camaraderie.
		-- Khan Noonian Singh, "Space Seed", stardate 3142.8
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw
In reply to Alexey Dobriyan
Quoted 2 lines · Mark Fortescue

Silly question. If ARCH=sparc is not 64bit then how do you make a 32bit sparc kernel?

I ended up with

	$ cat x
	ARCH=sparc
	CROSS_COMPILE=sparc64-unknown-linux-gnu-
	# CONFIG_64BIT is not set
	$ make ARCH=sparc KCONFIG_ALLCONFIG=x allmodconfig
#4 lore raw
In reply to Alexey Dobriyan
Quoted 6 lines · Bastian Blank
Quoted 1 line · Alexey Dobriyan

generates 64-bit kernel, while earlier it generated 32-bit kernel.

This is in line with the other 32/64bit arches, s390 and powerpc. If you think this is a problem, you should bring that to the kbuild maintainers, because they need to find something then.

The sparc situation differs from x86.
For x86 we have three valid archs that we can specify: x86, i386 and x86_&4. For sparc we have only two: sparc and sparc64.

And we really need to find a better way to create a 32 bit all*config. I looked at it last time it was brought up - but I did not come up with anything that I was really happy with.

Sam

#5 lore raw
In reply to Alexey Dobriyan
Quoted 4 lines · Mark Fortescue

Hi all.

Silly question. If ARCH=sparc is not 64bit then how do you make a 32bit sparc kernel?

make arch=sparc menuconfig give you the option to select if the kernel is 64 bit or not.

And this "64 bit?" option is what is causing us troubles for the all*config targets.
allyesconfig and allmodconfig will both set this option to 'y' so we cannot in any simple way generate a 32bit all{yes,mod}config.

Sam

#6 lore raw
In reply to Alexey Dobriyan
Quoted 6 lines · Sam Ravnborg
Quoted 4 lines · Mark Fortescue

Hi all.

Silly question. If ARCH=sparc is not 64bit then how do you make a 32bit sparc kernel?

Quoted 7 lines

make arch=sparc menuconfig give you the option to select if the kernel is 64 bit or not.

And this "64 bit?" option is what is causing us troubles for the all*config targets.
allyesconfig and allmodconfig will both set this option to 'y' so we cannot in any simple way generate a 32bit all{yes,mod}config.

Why not have a sparc32 arch also, which would force 64bit to false. So:
1. If we detect a 32 bit sparc, we select sparc32.
2. If we detect a 64 bit sparc, we select sparc64.
3. Otherwise we select sparc and let the user decide.

I believe that powerpc also works in this manner, as does x86.

Thanks,

Signature · 4 lines
Julian Calaby

Email: [email protected]
.Plan: http://sites.google.com/site/juliancalaby/
#7 lore raw
In reply to Alexey Dobriyan
Quoted 1 line · Julian Calaby

I believe that powerpc also works in this manner, as does x86.

No. Only x86 does this for backward compatibility. Neither s390 nor powerpc allows such arch overrides.

Bastian

Signature · 1 line
Captain's Log, star date 21:34.5...
#8 lore raw
In reply to Alexey Dobriyan

Hi All,

Quoted 15 lines · Julian Calaby
Quoted 6 lines · Sam Ravnborg
Quoted 4 lines · Mark Fortescue

Hi all.

Silly question. If ARCH=sparc is not 64bit then how do you make a 32bit sparc kernel?

Quoted 7 lines

make arch=sparc menuconfig give you the option to select if the kernel is 64 bit or not.

And this "64 bit?" option is what is causing us troubles for the all*config targets.
allyesconfig and allmodconfig will both set this option to 'y' so we cannot in any simple way generate a 32bit all{yes,mod}config.

Quoted 6 lines

Why not have a sparc32 arch also, which would force 64bit to false. So:
1. If we detect a 32 bit sparc, we select sparc32.
2. If we detect a 64 bit sparc, we select sparc64.
3. Otherwise we select sparc and let the user decide.

I believe that powerpc also works in this manner, as does x86.

I always cross compile as building on a sun4c takes days so detection is not an option.
Having an ARCH alias to preset the 32/64bit flag would seem to me to make sence i.e.:

ARCH=sparc would give the current or previous characteristics (see below) ARCH=sparc32 would overide CONFIG_64BIT to N (is not set) ARCH=sparc64 would overide CONFIG_64BIT to Y

Using a 2.6.28.3 kernel source tree for reference (my sparc git trees are on a machine that is not turned on at the moment):

The current toplevel Makefile explicitaly processes the x86 alias. This could be changed to use a small script/alias file (so that, where apropriate for other architectures, it can easilly be extended) to get SRCARCH e.g.:

SRCARCH=$(shell $(srctree)/scripts/get_srcarch $(ARCH))

get_srcarch could use a simple 'case $1 in' statement get SRCARCH e.g.:

#! /bin/sh
case "$1" in
# ARCH SRCARCH
i386) echo "x86" ;;
x86_64) echo "x86" ;;
sparc32) echo "sparc" ;;
sparc64) echo "sparc" ;;
*) echo "$1" ;;
esac

In the arch/sparc/Kconfig some alterations would be needed to get the desired overriding of CONFIG_64BIT. Maybe somthing like:

# Select 32 or 64 bit
config 64BIT
bool "64-bit kernel" if ARCH = "sparc"
default ARCH = "sparc64"
# default !(ARCH = "sparc32") would be an alternative
help
Say yes to build a 64-bit kernel - formerly known as sparc64 Say no to build a 32-bit kernel - formerly known as sparc

Sam, given your work on the sparc32/64 merge, you probably know your way arround recent changes and the current plans for the future a lot better than I ever will. Would this set of ideas be somthing that would be in keeping with current plans?

If you think it worth while, I could probably find a few hours this week to generate a patch along these lines and do some simple testing.

Regards
Mark.