mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886
@ 2010-08-27  5:49 Jean-Christophe PLAGNIOL-VILLARD
  2010-08-27  5:49 ` [PATCH 2/2] Makefile: fix autoconf.h location Jean-Christophe PLAGNIOL-VILLARD
  2010-08-27  5:56 ` [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Baruch Siach
  0 siblings, 2 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27  5:49 UTC (permalink / raw)
  To: barebox

as autoconf.h is store in include/generated and not include/linux anymore

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 scripts/basic/fixdep.c |   55 ++++++++++++++++++++++++++---------------------
 1 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 668a11a..ea26b23 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -16,21 +16,22 @@
  * tells make when to remake a file.
  *
  * To use this list as-is however has the drawback that virtually
- * every file in the kernel includes <linux/config.h> which then again
- * includes <linux/autoconf.h>
+ * every file in the kernel includes autoconf.h.
  *
- * If the user re-runs make *config, linux/autoconf.h will be
+ * If the user re-runs make *config, autoconf.h will be
  * regenerated.  make notices that and will rebuild every file which
  * includes autoconf.h, i.e. basically all files. This is extremely
  * annoying if the user just changed CONFIG_HIS_DRIVER from n to m.
  *
  * So we play the same trick that "mkdep" played before. We replace
- * the dependency on linux/autoconf.h by a dependency on every config
+ * the dependency on autoconf.h by a dependency on every config
  * option which is mentioned in any of the listed prequisites.
  *
- * To be exact, split-include populates a tree in include/config/,
- * e.g. include/config/his/driver.h, which contains the #define/#undef
- * for the CONFIG_HIS_DRIVER option.
+ * kconfig populates a tree in include/config/ with an empty file
+ * for each config symbol and when the configuration is updated
+ * the files representing changed config options are touched
+ * which then let make pick up the changes and the files that use
+ * the config symbols are rebuilt.
  *
  * So if the user changes his CONFIG_HIS_DRIVER option, only the objects
  * which depend on "include/linux/config/his/driver.h" will be rebuilt,
@@ -72,7 +73,7 @@
  *   cmd_<target> = <cmdline>
  *
  * and then basically copies the .<target>.d file to stdout, in the
- * process filtering out the dependency on linux/autoconf.h and adding
+ * process filtering out the dependency on autoconf.h and adding
  * dependencies on include/config/my/option.h for every
  * CONFIG_MY_OPTION encountered in any of the prequisites.
  *
@@ -123,8 +124,7 @@ char *target;
 char *depfile;
 char *cmdline;
 
-void usage(void)
-
+static void usage(void)
 {
 	fprintf(stderr, "Usage: fixdep <depfile> <target> <cmdline>\n");
 	exit(1);
@@ -133,7 +133,7 @@ void usage(void)
 /*
  * Print out the commandline prefixed with cmd_<target filename> :=
  */
-void print_cmdline(void)
+static void print_cmdline(void)
 {
 	printf("cmd_%s := %s\n\n", target, cmdline);
 }
@@ -146,7 +146,7 @@ int    len_config  = 0;
  * Grow the configuration string to a desired length.
  * Usually the first growth is plenty.
  */
-void grow_config(int len)
+static void grow_config(int len)
 {
 	while (len_config + len > size_config) {
 		if (size_config == 0)
@@ -162,7 +162,7 @@ void grow_config(int len)
 /*
  * Lookup a value in the configuration string.
  */
-int is_defined_config(const char * name, int len)
+static int is_defined_config(const char * name, int len)
 {
 	const char * pconfig;
 	const char * plast = str_config + len_config - len;
@@ -178,7 +178,7 @@ int is_defined_config(const char * name, int len)
 /*
  * Add a new value to the configuration string.
  */
-void define_config(const char * name, int len)
+static void define_config(const char * name, int len)
 {
 	grow_config(len + 1);
 
@@ -190,7 +190,7 @@ void define_config(const char * name, int len)
 /*
  * Clear the set of configuration strings.
  */
-void clear_config(void)
+static void clear_config(void)
 {
 	len_config = 0;
 	define_config("", 0);
@@ -199,7 +199,7 @@ void clear_config(void)
 /*
  * Record the use of a CONFIG_* word.
  */
-void use_config(char *m, int slen)
+static void use_config(char *m, int slen)
 {
 	char s[PATH_MAX];
 	char *p;
@@ -220,7 +220,7 @@ void use_config(char *m, int slen)
 	printf("    $(wildcard include/config/%s.h) \\\n", s);
 }
 
-void parse_config_file(char *map, size_t len)
+static void parse_config_file(char *map, size_t len)
 {
 	int *end = (int *) (map + len);
 	/* start at +1, so that p can never be < map */
@@ -245,12 +245,16 @@ void parse_config_file(char *map, size_t len)
 		continue;
 
 	found:
+		if (!memcmp(q - 7, "_MODULE", 7))
+			q -= 7;
+		if( (q-p-7) < 0 )
+			continue;
 		use_config(p+7, q-p-7);
 	}
 }
 
 /* test is s ends in sub */
-int strrcmp(char *s, char *sub)
+static int strrcmp(char *s, char *sub)
 {
 	int slen = strlen(s);
 	int sublen = strlen(sub);
@@ -261,7 +265,7 @@ int strrcmp(char *s, char *sub)
 	return memcmp(s + slen - sublen, sub, sublen);
 }
 
-void do_config_file(char *filename)
+static void do_config_file(char *filename)
 {
 	struct stat st;
 	int fd;
@@ -292,7 +296,7 @@ void do_config_file(char *filename)
 	close(fd);
 }
 
-void parse_dep_file(void *map, size_t len)
+static void parse_dep_file(void *map, size_t len)
 {
 	char *m = map;
 	char *end = m + len;
@@ -320,7 +324,7 @@ void parse_dep_file(void *map, size_t len)
 			p++;
 		}
 		memcpy(s, m, p-m); s[p-m] = 0;
-		if (strrcmp(s, "include/linux/autoconf.h") &&
+		if (strrcmp(s, "include/generated/autoconf.h") &&
 		    strrcmp(s, "arch/um/include/uml-config.h") &&
 		    strrcmp(s, ".ver")) {
 			printf("  %s \\\n", s);
@@ -332,7 +336,7 @@ void parse_dep_file(void *map, size_t len)
 	printf("$(deps_%s):\n", target);
 }
 
-void print_deps(void)
+static void print_deps(void)
 {
 	struct stat st;
 	int fd;
@@ -364,13 +368,14 @@ void print_deps(void)
 	close(fd);
 }
 
-void traps(void)
+static void traps(void)
 {
 	static char test[] __attribute__((aligned(sizeof(int)))) = "CONF";
+	int *p = (int *)test;
 
-	if (*(int *)test != INT_CONF) {
+	if (*p != INT_CONF) {
 		fprintf(stderr, "fixdep: sizeof(int) != 4 or wrong endianess? %#x\n",
-			*(int *)test);
+			*p);
 		exit(2);
 	}
 }
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] Makefile: fix autoconf.h location
  2010-08-27  5:49 [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Jean-Christophe PLAGNIOL-VILLARD
@ 2010-08-27  5:49 ` Jean-Christophe PLAGNIOL-VILLARD
  2010-08-27  5:56 ` [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Baruch Siach
  1 sibling, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27  5:49 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index b4c7ae5..90252cc 100644
--- a/Makefile
+++ b/Makefile
@@ -290,7 +290,7 @@ LINUXINCLUDE    := -Iinclude \
                    $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
 		   -I$(srctree)/arch/$(ARCH)/include \
 		   -I$(objtree)/arch/$(ARCH)/include \
-		   -include include/linux/autoconf.h
+                   -include include/generated/autoconf.h
 
 CPPFLAGS        := -D__KERNEL__ -D__BAREBOX__ $(LINUXINCLUDE) -fno-builtin -ffreestanding
 
@@ -979,7 +979,7 @@ CLEAN_FILES +=	barebox System.map include/barebox_default_env.h \
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include2 usr/include
 MRPROPER_FILES += .config .config.old include/asm .version .old_version \
-                  include/linux/autoconf.h include/linux/version.h      \
+                  include/generated/autoconf.h include/linux/version.h      \
                   include/linux/utsrelease.h include/config.h           \
 		  Module.symvers tags TAGS cscope*
 
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886
  2010-08-27  5:49 [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Jean-Christophe PLAGNIOL-VILLARD
  2010-08-27  5:49 ` [PATCH 2/2] Makefile: fix autoconf.h location Jean-Christophe PLAGNIOL-VILLARD
@ 2010-08-27  5:56 ` Baruch Siach
  2010-08-27  6:05   ` Jean-Christophe PLAGNIOL-VILLARD
  1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2010-08-27  5:56 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

Hi Jean-Christophe,

On Fri, Aug 27, 2010 at 07:49:16AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> as autoconf.h is store in include/generated and not include/linux anymore

This log entry seems to belong to the next patch in this series.

baruch

> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
>  scripts/basic/fixdep.c |   55 ++++++++++++++++++++++++++---------------------
>  1 files changed, 30 insertions(+), 25 deletions(-)

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886
  2010-08-27  5:56 ` [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Baruch Siach
@ 2010-08-27  6:05   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2010-08-27  6:05 UTC (permalink / raw)
  To: Baruch Siach; +Cc: barebox

On 08:56 Fri 27 Aug     , Baruch Siach wrote:
> Hi Jean-Christophe,
> 
> On Fri, Aug 27, 2010 at 07:49:16AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > as autoconf.h is store in include/generated and not include/linux anymore
> 
> This log entry seems to belong to the next patch in this series.
???

it's patch 1 not patch 0

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2010-08-27  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-27  5:49 [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Jean-Christophe PLAGNIOL-VILLARD
2010-08-27  5:49 ` [PATCH 2/2] Makefile: fix autoconf.h location Jean-Christophe PLAGNIOL-VILLARD
2010-08-27  5:56 ` [PATCH 1/2] udpate fixdep.c to linux kernel v2.6.36-rc1-168-ge36c886 Baruch Siach
2010-08-27  6:05   ` Jean-Christophe PLAGNIOL-VILLARD

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox