* kbuild/kconfig for non-Linux projects
@ 2011-02-16 9:08 Thomas De Schampheleire
2011-02-16 13:46 ` Michal Marek
2011-02-16 20:11 ` Sam Ravnborg
0 siblings, 2 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2011-02-16 9:08 UTC (permalink / raw)
To: linux-kbuild
Hi,
I'm interested in using kbuild/kconfig for other projects than the
Linux kernel. I notice that a lot of projects (e.g. Buildroot,
Busybox, uClibc, OpenBricks, ...) are already using this framework,
but it's unclear to me which steps are needed to do so.
I found a related thread on this mailing list that seemed to have died out.
http://www.mail-archive.com/kbuild-devel@lists.sourceforge.net/msg02487.html
I also found a code repository 'menuconfig' here, although I doubt
that this is an official one:
http://code.google.com/p/menuconfig/source/browse/trunk/
Specifically, I'd like to know:
* are there 'official' sources to kbuild in some repository outside
the linux kernel?
* which steps are needed to use kbuild in a project other than the
linux kernel? Is there some documentation available?
* what is the license under which kbuild is distributed? In case it's
GPL, does this impact the license of the software project using
kbuild, i.e. does using kbuild imply the project being a derived work?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-02-16 9:08 kbuild/kconfig for non-Linux projects Thomas De Schampheleire
@ 2011-02-16 13:46 ` Michal Marek
2011-02-16 16:53 ` Arnaud Lacombe
2011-02-16 20:11 ` Sam Ravnborg
1 sibling, 1 reply; 8+ messages in thread
From: Michal Marek @ 2011-02-16 13:46 UTC (permalink / raw)
To: Thomas De Schampheleire; +Cc: linux-kbuild, Arnaud Lacombe
On 16.2.2011 10:08, Thomas De Schampheleire wrote:
> Hi,
>
> I'm interested in using kbuild/kconfig for other projects than the
> Linux kernel. I notice that a lot of projects (e.g. Buildroot,
> Busybox, uClibc, OpenBricks, ...) are already using this framework,
> but it's unclear to me which steps are needed to do so.
You should talk to Arnaud Lacombe, who has done quite some work in this
direction on kconfig (portability and ability to easily "rebrand"
kconfig). Honestly, I don't know if kbuild is used outside of the kernel
and if it would make sense at all. It might be easier to write the
Makefiles yourself. It's not that large and most of it is linux-specific
anyway:
$ wc -l Makefile scripts/Makefile.* scripts/Kbuild.include
1533 Makefile
405 scripts/Makefile.build
104 scripts/Makefile.clean
72 scripts/Makefile.fwinst
103 scripts/Makefile.headersinst
3 scripts/Makefile.help
170 scripts/Makefile.host
244 scripts/Makefile.lib
60 scripts/Makefile.modbuiltin
35 scripts/Makefile.modinst
153 scripts/Makefile.modpost
262 scripts/Kbuild.include
3144 total
> I found a related thread on this mailing list that seemed to have died out.
> http://www.mail-archive.com/kbuild-devel@lists.sourceforge.net/msg02487.html
>
> I also found a code repository 'menuconfig' here, although I doubt
> that this is an official one:
> http://code.google.com/p/menuconfig/source/browse/trunk/
>
> Specifically, I'd like to know:
> * are there 'official' sources to kbuild in some repository outside
> the linux kernel?
No, it is maintained as part of the kernel.
> * which steps are needed to use kbuild in a project other than the
> linux kernel? Is there some documentation available?
> * what is the license under which kbuild is distributed? In case it's
> GPL, does this impact the license of the software project using
> kbuild, i.e. does using kbuild imply the project being a derived work?
The license is GPLv2. Using kconfig as a separate tool to configure
options should probably be OK, I'm not so sure about using kbuild. You
should ask a lawyer. Or ask Kai Germaschewski and Sam Ravnborg if they
will sue you or not :-). Also see the first paragraph.
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-02-16 13:46 ` Michal Marek
@ 2011-02-16 16:53 ` Arnaud Lacombe
0 siblings, 0 replies; 8+ messages in thread
From: Arnaud Lacombe @ 2011-02-16 16:53 UTC (permalink / raw)
To: Michal Marek; +Cc: Thomas De Schampheleire, linux-kbuild
Hi,
On Wed, Feb 16, 2011 at 8:46 AM, Michal Marek <mmarek@suse.cz> wrote:
> On 16.2.2011 10:08, Thomas De Schampheleire wrote:
>> Hi,
>>
>> I'm interested in using kbuild/kconfig for other projects than the
>> Linux kernel. I notice that a lot of projects (e.g. Buildroot,
>> Busybox, uClibc, OpenBricks, ...) are already using this framework,
>> but it's unclear to me which steps are needed to do so.
>
> You should talk to Arnaud Lacombe, who has done quite some work in this
> direction on kconfig (portability and ability to easily "rebrand"
> kconfig).
>
using kconfig outside the linux kernel tree should be trivial,
normally, as you said, all the Linux "branding" should have been made
configurable. The trick might be to have the correct Makefile glue to
let it build. If you want some of the work pre-done, I just pushed an
old repository of mine on github. It should contains only what's
needed to build the various part of kconfig:
https://github.com/lacombar/kconfig/
I did not really touch it since October 2010, so it is certainly
missing parts (especially bug fixes). Moreover, it squashes commit to
keep the history clean, but I tried to keep the shortlog to have an
idea what has been going on. Last warning, I do not guarantee the tree
integrity (ie. I love rebasing :))
'hope that would help,
- Arnaud
> Honestly, I don't know if kbuild is used outside of the kernel
> and if it would make sense at all. It might be easier to write the
> Makefiles yourself. It's not that large and most of it is linux-specific
> anyway:
>
> $ wc -l Makefile scripts/Makefile.* scripts/Kbuild.include
> 1533 Makefile
> 405 scripts/Makefile.build
> 104 scripts/Makefile.clean
> 72 scripts/Makefile.fwinst
> 103 scripts/Makefile.headersinst
> 3 scripts/Makefile.help
> 170 scripts/Makefile.host
> 244 scripts/Makefile.lib
> 60 scripts/Makefile.modbuiltin
> 35 scripts/Makefile.modinst
> 153 scripts/Makefile.modpost
> 262 scripts/Kbuild.include
> 3144 total
>
>
>
>> I found a related thread on this mailing list that seemed to have died out.
>> http://www.mail-archive.com/kbuild-devel@lists.sourceforge.net/msg02487.html
>>
>> I also found a code repository 'menuconfig' here, although I doubt
>> that this is an official one:
>> http://code.google.com/p/menuconfig/source/browse/trunk/
>>
>> Specifically, I'd like to know:
>> * are there 'official' sources to kbuild in some repository outside
>> the linux kernel?
>
> No, it is maintained as part of the kernel.
>
>
>> * which steps are needed to use kbuild in a project other than the
>> linux kernel? Is there some documentation available?
>> * what is the license under which kbuild is distributed? In case it's
>> GPL, does this impact the license of the software project using
>> kbuild, i.e. does using kbuild imply the project being a derived work?
>
> The license is GPLv2. Using kconfig as a separate tool to configure
> options should probably be OK, I'm not so sure about using kbuild. You
> should ask a lawyer. Or ask Kai Germaschewski and Sam Ravnborg if they
> will sue you or not :-). Also see the first paragraph.
>
> Michal
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-02-16 9:08 kbuild/kconfig for non-Linux projects Thomas De Schampheleire
2011-02-16 13:46 ` Michal Marek
@ 2011-02-16 20:11 ` Sam Ravnborg
2011-02-18 15:55 ` Thomas De Schampheleire
1 sibling, 1 reply; 8+ messages in thread
From: Sam Ravnborg @ 2011-02-16 20:11 UTC (permalink / raw)
To: Thomas De Schampheleire; +Cc: linux-kbuild
On Wed, Feb 16, 2011 at 10:08:08AM +0100, Thomas De Schampheleire wrote:
> Hi,
>
> I'm interested in using kbuild/kconfig for other projects than the
> Linux kernel. I notice that a lot of projects (e.g. Buildroot,
> Busybox, uClibc, OpenBricks, ...) are already using this framework,
> but it's unclear to me which steps are needed to do so.
>
> I found a related thread on this mailing list that seemed to have died out.
> http://www.mail-archive.com/kbuild-devel@lists.sourceforge.net/msg02487.html
>
> I also found a code repository 'menuconfig' here, although I doubt
> that this is an official one:
> http://code.google.com/p/menuconfig/source/browse/trunk/
>
> Specifically, I'd like to know:
> * are there 'official' sources to kbuild in some repository outside
> the linux kernel?
> * which steps are needed to use kbuild in a project other than the
> linux kernel? Is there some documentation available?
You could take a look at klibc - the kbuild integration used
there is much simpler than what we have in the kernel.
It may need a little refresh - but copying over
Kbuild.include should be 90% of the update.
As for documentation - you should at least read Documentation/kbuild/*
> * what is the license under which kbuild is distributed? In case it's
> GPL, does this impact the license of the software project using
> kbuild, i.e. does using kbuild imply the project being a derived work?
kbuild is part of the build-system. So there is nothing wrong using kbuild
to build your proprietary (closed source) stuff.
So kbuild are under GPLv2 - but that does not impact you program.
Good luck!
Sam
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-02-16 20:11 ` Sam Ravnborg
@ 2011-02-18 15:55 ` Thomas De Schampheleire
0 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2011-02-18 15:55 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kbuild
Hi,
On Wed, Feb 16, 2011 at 9:11 PM, Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Feb 16, 2011 at 10:08:08AM +0100, Thomas De Schampheleire wrote:
>> Hi,
>>
>> I'm interested in using kbuild/kconfig for other projects than the
>> Linux kernel. I notice that a lot of projects (e.g. Buildroot,
>> Busybox, uClibc, OpenBricks, ...) are already using this framework,
>> but it's unclear to me which steps are needed to do so.
>>
>> I found a related thread on this mailing list that seemed to have died out.
>> http://www.mail-archive.com/kbuild-devel@lists.sourceforge.net/msg02487.html
>>
>> I also found a code repository 'menuconfig' here, although I doubt
>> that this is an official one:
>> http://code.google.com/p/menuconfig/source/browse/trunk/
>>
>> Specifically, I'd like to know:
>> * are there 'official' sources to kbuild in some repository outside
>> the linux kernel?
>> * which steps are needed to use kbuild in a project other than the
>> linux kernel? Is there some documentation available?
>
> You could take a look at klibc - the kbuild integration used
> there is much simpler than what we have in the kernel.
> It may need a little refresh - but copying over
> Kbuild.include should be 90% of the update.
>
> As for documentation - you should at least read Documentation/kbuild/*
>
>> * what is the license under which kbuild is distributed? In case it's
>> GPL, does this impact the license of the software project using
>> kbuild, i.e. does using kbuild imply the project being a derived work?
>
> kbuild is part of the build-system. So there is nothing wrong using kbuild
> to build your proprietary (closed source) stuff.
> So kbuild are under GPLv2 - but that does not impact you program.
Thank you all for the input! I'll take a look at the links you
provided and try it out.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
@ 2011-10-02 9:30 Alexander Kriegisch
2011-10-02 10:56 ` Alexander Kriegisch
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kriegisch @ 2011-10-02 9:30 UTC (permalink / raw)
To: linux-kbuild
I am new to this list, but trying to reply to an older thread, re-using
its title/subject. I am going to quote Arnaud's message because my
question relates to it.
@Arnaud: I have successfully downloaded, installed and built a tarball
from your 2.6.39 branch. So far, so good. What I am trying to do,
though, is to refresh an older kbuild version, taken from Buildroot some
about years ago. It works nicely and I especially like the warnings for
cyclic references and missing direct dependencies.
There is one issue we are facing in our open source project
(http://freetz.org), though: Our previous kconfig version used symbols
which were identical in .config with the names in Config.in, i.e. they
had no "CONFIG_" prefixes. Now kconfig writes .config files with those
prefixes, so in order not to break our build system we had to add
scripts replacing names back and forth before we start conf/mconf and
after they terminate.
Question: Is there a straightforward way to make kconfig read/write
symbols *without* "CONFIG_" prefixes? As I am not a C programmer, would
you mind providing a patch if necessary?
Respectfully
--
Alexander Kriegisch
> using kconfig outside the linux kernel tree should be trivial,
> normally, as you said, all the Linux "branding" should have been made
> configurable. The trick might be to have the correct Makefile glue to
> let it build. If you want some of the work pre-done, I just pushed an
> old repository of mine on github. It should contains only what's
> needed to build the various part of kconfig:
>
> https://github.com/lacombar/kconfig/
>
> I did not really touch it since October 2010, so it is certainly
> missing parts (especially bug fixes). Moreover, it squashes commit to
> keep the history clean, but I tried to keep the shortlog to have an
> idea what has been going on. Last warning, I do not guarantee the tree
> integrity (ie. I love rebasing :))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-10-02 9:30 Alexander Kriegisch
@ 2011-10-02 10:56 ` Alexander Kriegisch
2011-10-02 11:06 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Alexander Kriegisch @ 2011-10-02 10:56 UTC (permalink / raw)
To: linux-kbuild
Okay, another developer in our project found the place where to
configure this (Arnaud, please correct us if this is wrong):
--- scripts/kconfig/lkc.h
+++ scripts/kconfig/lkc.h
@@ -42,7 +42,7 @@
#define N_(text) (text)
#ifndef CONFIG_
-#define CONFIG_ "CONFIG_"
+#define CONFIG_ ""
#endif
#define TF_COMMAND 0x0001
Just in case anyone else wonders how to do this...
--
Alexander Kriegisch
Alexander Kriegisch, 02.10.2011 11:30:
> I am new to this list, but trying to reply to an older thread,
> re-using its title/subject. I am going to quote Arnaud's message
> because my question relates to it.
>
> @Arnaud: I have successfully downloaded, installed and built a
> tarball from your 2.6.39 branch. So far, so good. What I am trying to
> do, though, is to refresh an older kbuild version, taken from
> Buildroot some about years ago. It works nicely and I especially like
> the warnings for cyclic references and missing direct dependencies.
>
> There is one issue we are facing in our open source project
> (http://freetz.org), though: Our previous kconfig version used
> symbols which were identical in .config with the names in Config.in,
> i.e. they had no "CONFIG_" prefixes. Now kconfig writes .config files
> with those prefixes, so in order not to break our build system we had
> to add scripts replacing names back and forth before we start
> conf/mconf and after they terminate.
>
> Question: Is there a straightforward way to make kconfig read/write
> symbols*without* "CONFIG_" prefixes? As I am not a C programmer,
> would you mind providing a patch if necessary?
>
>
>> using kconfig outside the linux kernel tree should be trivial,
>> normally, as you said, all the Linux "branding" should have been
>> made configurable. The trick might be to have the correct Makefile
>> glue to let it build. If you want some of the work pre-done, I just
>> pushed an old repository of mine on github. It should contains only
>> what's needed to build the various part of kconfig:
>>
>> https://github.com/lacombar/kconfig/
>>
>> I did not really touch it since October 2010, so it is certainly
>> missing parts (especially bug fixes). Moreover, it squashes commit
>> to keep the history clean, but I tried to keep the shortlog to have
>> an idea what has been going on. Last warning, I do not guarantee
>> the tree integrity (ie. I love rebasing :))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kbuild/kconfig for non-Linux projects
2011-10-02 10:56 ` Alexander Kriegisch
@ 2011-10-02 11:06 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2011-10-02 11:06 UTC (permalink / raw)
To: Alexander Kriegisch; +Cc: linux-kbuild
Alexander, All,
On Sunday 02 October 2011 12:56:46 Alexander Kriegisch wrote:
> Okay, another developer in our project found the place where to
> configure this (Arnaud, please correct us if this is wrong):
>
>
> --- scripts/kconfig/lkc.h
> +++ scripts/kconfig/lkc.h
> @@ -42,7 +42,7 @@
> #define N_(text) (text)
>
> #ifndef CONFIG_
> -#define CONFIG_ "CONFIG_"
> +#define CONFIG_ ""
> #endif
>
> #define TF_COMMAND 0x0001
The proper way to do it is to pass it to the compiler with the -D option:
-DCONFIG_=\"\"
You should put it in your Makefile, in the proper CFLAGS (or CPPFLAGS).
If you change the code, you may have /merge/ issues later if you have to
resync again.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-02 11:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-16 9:08 kbuild/kconfig for non-Linux projects Thomas De Schampheleire
2011-02-16 13:46 ` Michal Marek
2011-02-16 16:53 ` Arnaud Lacombe
2011-02-16 20:11 ` Sam Ravnborg
2011-02-18 15:55 ` Thomas De Schampheleire
-- strict thread matches above, loose matches on Subject: below --
2011-10-02 9:30 Alexander Kriegisch
2011-10-02 10:56 ` Alexander Kriegisch
2011-10-02 11:06 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox