[patch 2/2] kbuild: fix crossbuild base config

[patch 2/2] kbuild: fix crossbuild base config

Post by Roman Zipp » Fri, 05 Nov 2004 02:00:20


Hi,




This rather suggests, there is a problem with UML. Either fix your Kconfig
to prevent nonvalid configurations or detect and report the problem at
runtime.


I don't like the two separate lists, it would be easier to just skip all
absolute path names.
I would also like to avoid this patch at all. If this really should be a
problem, I'd consider to don't run kconfig at all in this case if there
is no configuration and instead suggest running defconfig (or one of
machine specific config targets) first.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Tom Rin » Fri, 05 Nov 2004 03:00:16


No, this is a damn annoying kbuild problem when cross compiling. It's
just nice that the UML folks run into this too and found a better fix
than deleting the /boot and /lib files from the list.


I have a feeling that changing the behavior of 'make {,x,g,q}config' to
fail if there's no .config will upset a lot of users, possibly even more
than would be upset by never looking in /boot or /lib ever.

--
Tom Rini
http://www.yqcomputer.com/ ~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Roman Zipp » Fri, 05 Nov 2004 03:30:15

Hi,




The ability to create a nonworkable UML binary is _not_ a kbuild problem,
especially in the UML case I would expect it should be possible to avoid
this.


I'm only talking about cross compiling here. From people who do this, I
sort of expect, that they know what they do. You can misconfigure a kernel
in native compiles as well, this patch solves the wrong problem.
E.g. if someone wrote a patch which stores the arch in .config and warns/
refuses to load it for a different configuration, I would accept it
happily.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Tom Rin » Fri, 05 Nov 2004 03:40:08


How about how easy it is to create a totally bogus config for any arch?
This isn't a UML problem, this is a cross compiling for any arch
problem.


The following argument makes less sense, possibly, as 2.6 lives on, but
this is new breakage for people moving up from 2.4 that just looked in
.config and arch/$(ARCH)/defconfig and who don't otherwise know that
things have been changed or broken, depending on how you look at it.


I disagree. This solves the "why did the kernel decide to look at
/boot/config when it really should have known better" problem.


We already have part of this, except I don't know for certain of
CONFIG_ARCH == CONFIG_$(SUBARCH) (... to mix syntax all the hell up).

--
Tom Rini
http://www.yqcomputer.com/ ~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Blaisorbla » Fri, 05 Nov 2004 05:40:08

n Wednesday 03 November 2004 19:34, Tom Rini wrote:




I agree that this is a UML problem and I'm addressing it, too (it maybe wasn't
clear in the original mail, but it's obvious). And maybe, it is even
unrelated from this issue.

That said, indipendently from the UML issue, it is *meaningless* to read a
config default from /boot or /etc or /lib/modules. And, in fact, you never
say "it's a good thing to do in that case".

You later say "If possible, I'd avoid this patch at all". Why? Is this code
too intrusive, or implementing a wrong check, or bloating the source?



Ok, fine. I was dubious on this, too (I went the lazy way because it's just 3
duplicated lines).

Would it be ok for this to use:

struct confsource {
char * path;
int * cross_valid;
}

?

Since you didn't comment on this, I also suppose the env.var idea is fine for
you.



When there is no .config and no other source, the last resort is taking the
defaults from defconfig, normally, isn't it? So, when cross-compiling, that
should still be correct.



* UML is always cross-compiled (even if the compiler is the host one), and
most UML user *don't* know what they are doing.

* Looking in /boot, /etc or /lib is not documented at all, and "read the
flaming source" is not a welcome documentation source.




Yes, this is another idea, which is also fine, while not excluding the other
IMHO.

No warning is output. Or better, yes, you get warnings, but tons of not clear
ones, like "warning, undefined symbol".

UML uses currently CONFIG_USERMODE rather than CONFIG_UM (is this a bug?). I
have no idea for other archs. Do you suggest using KCONFIG_ARCH= or
CONFIG_THIS_ARCH= or what?
--
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Roman Zipp » Fri, 05 Nov 2004 09:20:10

Hi,




It adds a special case to the kconfig core to make it behave differently,
but it shouldn't behave differently depending on how the kernel is
compiled.


This is the better solution, because it solves the more general problem,
when a .config doesn't match the Kconfig and not just your special case.


I don't really expect to use CONFIG_$(SUBARCH) and rather add a real
CONFIG_ARCH to Kconfig.

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

[patch 2/2] kbuild: fix crossbuild base config

Post by Roman Zipp » Fri, 05 Nov 2004 09:30:14

Hi,




I'm open to suggestions, but this patch doesn't solve the problem.


In a lot of other cases it does make sense. The kconfig core shouldn't
behave differently if we are cross compiling.

bye, Roman
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/