kbuild & kconfig: sync with Linux 4.1
cover kbuild & kconfig: sync with Linux 4.1
These change sets have been imported from Linux.
This series should not change any boards.
Masahiro Yamada (4):
kconfig: sync with Linux 4.1
kbuild: sync with Linux 4.1
kbuild: do not add $((generic-)offsets-file) to targets
kbuild: use relative path more to include Makefile
Kbuild | 3 +- Makefile | 33 ++++-------- scripts/Kbuild.include | 25 +++++++-- scripts/Makefile.build | 5 +- scripts/Makefile.clean | 29 ++++------ scripts/Makefile.lib | 25 +++++---- scripts/kconfig/Makefile | 80 ++++++++++++++-------------- scripts/kconfig/conf.c | 8 ++- scripts/kconfig/confdata.c | 6 +++ scripts/kconfig/expr.c | 22 ++++---- scripts/kconfig/expr.h | 5 -- scripts/kconfig/gconf.c | 29 ++-------- scripts/kconfig/list.h | 6 +-- scripts/kconfig/lkc.h | 14 ----- scripts/kconfig/lkc_proto.h | 85 ++++++++++++++---------------- scripts/kconfig/lxdialog/check-lxdialog.sh | 6 ++- scripts/kconfig/mconf.c | 35 +++++++----- scripts/kconfig/menu.c | 4 +- scripts/kconfig/merge_config.sh | 30 +++++++---- scripts/kconfig/nconf.c | 5 ++ scripts/kconfig/qconf.cc | 5 +- scripts/kconfig/symbol.c | 42 +++++++-------- scripts/kconfig/util.c | 10 ---- 23 files changed, 244 insertions(+), 268 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/4 kconfig: sync with Linux 4.1
Update the files under scripts/kconfig/ to match Linux 4.1. Some Kconfig sources have diverged from those in the kernel, so commit-base syncing was done not to lose U-Boot specific updates.
The commits cherry-picked from Linux are:
[1] commit be8af2d54a66911693eddc556e4f7a866670082b
Author: Bj?rn Forsman <[email protected]> kconfig/lxdialog: get ncurses CFLAGS with pkg-config
[2] commit 3943f42c11896ce82ad3da132c8a5630313bdd0e
Author: Andrey Utkin <[email protected]> Replace mentions of "list_struct" to "list_head"
[3] commit e4e458b45c5861808674eebfea94cee2258bb2ea
Author: Arjun Sreedharan <[email protected]> calloc/xcalloc: Fix argument order
[4] commit 09950bc256e3628d275f90e016e6f5a039fbdcab
Author: Olof Johansson <[email protected]> merge_config.sh: Display usage if given too few arguments
[5] commit b6a2ab2cd4739a9573ed41677e53171987b8da34
Author: Colin Ian King <[email protected]>
kconfig: use va_end to match corresponding va_start
[6] commit 70529b1a1784503169416df19ce3d68746401340
Author: Michal Marek <[email protected]>
kconfig: Get rid of the P() macro in headers
[7] commit 463157444e377bf9b279101b1f16a94c4648c03a
Author: Michal Marek <[email protected]>
kconfig: Remove dead code
[8] commit ad8d40cda3ad22ad9e8863d55a5c88f85c0173f0
Author: Michal Marek <[email protected]>
kconfig: Remove unnecessary prototypes from headers
[9] commit de4619937229378e81f95e99c9866acc8e207d34
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: fix "jobserver unavailable" warning
[10] commit b9fe99c5b994c6ddc57780993966b18899526c0b
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: move an error check to merge_config.sh
[11] commit 371cfd4ff0611d8bc5d18bbb9cc6a2bc3d56cd3d
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: remove redundant $(objtree)
[12] commit 3a975b8cfcbe026b535f83bde9a3c009bae214f9
Author: Masahiro Yamada <[email protected]> merge_config.sh: improve indentation
[13] commit bc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd
Author: Masahiro Yamada <[email protected]> merge_config.sh: rename MAKE to RUNMAKE
[14] commit 63a91033d52e64a22e571fe84924c0b7f21c280d
Author: Masahiro Yamada <[email protected]>
kbuild: add generic mergeconfig target, %.config
[15] commit 1cba0c305758c3c1786ecaceb03e142c95a4edc9
Author: Michal Marek <[email protected]>
kconfig: Simplify Makefile
[16] commit 0a1f00a1c86421cc07cec87011c7cf4df68ee54b
Author: Michal Marek <[email protected]>
kconfig: Do not print status messages in make -s mode
---
scripts/kconfig/Makefile | 80 ++++++++++++++-------------- scripts/kconfig/conf.c | 8 ++- scripts/kconfig/confdata.c | 6 +++ scripts/kconfig/expr.c | 22 ++++---- scripts/kconfig/expr.h | 5 -- scripts/kconfig/gconf.c | 29 ++-------- scripts/kconfig/list.h | 6 +-- scripts/kconfig/lkc.h | 14 ----- scripts/kconfig/lkc_proto.h | 85 ++++++++++++++---------------- scripts/kconfig/lxdialog/check-lxdialog.sh | 6 ++- scripts/kconfig/mconf.c | 35 +++++++----- scripts/kconfig/menu.c | 4 +- scripts/kconfig/merge_config.sh | 30 +++++++---- scripts/kconfig/nconf.c | 5 ++ scripts/kconfig/qconf.cc | 5 +- scripts/kconfig/symbol.c | 42 +++++++-------- scripts/kconfig/util.c | 10 ---- 17 files changed, 189 insertions(+), 203 deletions(-)
scripts/kconfig/Makefile +39 -41
@@ -2,7 +2,7 @@ # Kernel configuration targets # These targets are used from top-level makefile -PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ +PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \ localmodconfig localyesconfig # Added for U-Boot
@@ -17,30 +17,31 @@ else Kconfig := Kconfig endif +ifeq ($(quiet),silent_) +silent := -s +endif + # We need this, in case the user has it in its environment unexport CONFIG_ xconfig: $(obj)/qconf - $< $(Kconfig) + $< $(silent) $(Kconfig) gconfig: $(obj)/gconf - $< $(Kconfig) + $< $(silent) $(Kconfig) menuconfig: $(obj)/mconf - $< $(Kconfig) + $< $(silent) $(Kconfig) config: $(obj)/conf - $< --oldaskconfig $(Kconfig) + $< $(silent) --oldaskconfig $(Kconfig) nconfig: $(obj)/nconf - $< $(Kconfig) - -oldconfig: $(obj)/conf - $< --$@ $(Kconfig) + $< $(silent) $(Kconfig) silentoldconfig: $(obj)/conf $(Q)mkdir -p include/config include/generated - $< --$@ $(Kconfig) + $< $(silent) --$@ $(Kconfig) localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf $(Q)mkdir -p include/config include/generated
@@ -49,18 +50,18 @@ localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ + $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \ mv -f .config.old.1 .config.old) \ else \ mv -f .tmp.config .config; \ - $(obj)/conf --silentoldconfig $(Kconfig); \ + $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \ fi $(Q)rm -f .tmp.config # Create new linux.pot file # Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h - $(Q)echo " GEN config.pot" + $(Q)$(kecho) " GEN config.pot" $(Q)xgettext --default-domain=linux \ --add-comments --keyword=_ --keyword=N_ \ --from-code=UTF-8 \
@@ -71,65 +72,62 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ $(srctree)/arch/*/um/Kconfig`; \ do \ - echo " GEN $$i"; \ + $(kecho) " GEN $$i"; \ $(obj)/kxgettext $$i \ >> $(obj)/config.pot; \ done ) - $(Q)echo " GEN linux.pot" + $(Q)$(kecho) " GEN linux.pot" $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ --output $(obj)/linux.pot $(Q)rm -f $(obj)/config.pot -PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig +# These targets map 1:1 to the commandline options of 'conf' +simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ + alldefconfig randconfig listnewconfig olddefconfig +PHONY += $(simple-targets) -allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf - $< --$@ $(Kconfig) +$(simple-targets): $(obj)/conf + $< $(silent) --$@ $(Kconfig) -PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig - -listnewconfig olddefconfig: $(obj)/conf - $< --$@ $(Kconfig) +PHONY += oldnoconfig savedefconfig defconfig # oldnoconfig is an alias of olddefconfig, because people already are dependent # on its behavior(sets new symbols to their default value but not 'n') with the # counter-intuitive name. -oldnoconfig: $(obj)/conf - $< --olddefconfig $(Kconfig) +oldnoconfig: olddefconfig savedefconfig: $(obj)/conf - $< --$@=defconfig $(Kconfig) + $< $(silent) --$@=defconfig $(Kconfig) defconfig: $(obj)/conf ifeq ($(KBUILD_DEFCONFIG),) - $< --defconfig $(Kconfig) + $< $(silent) --defconfig $(Kconfig) else - @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) + @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" + $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) endif %_defconfig: $(obj)/conf - $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) # Added for U-Boot (backward compatibility) %_config: %_defconfig @: -configfiles=$(wildcard $(srctree)/kernel/configs/$(1).config $(srctree)/arch/$(SRCARCH)/configs/$(1).config) +configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) -define mergeconfig -$(if $(wildcard $(objtree)/.config),, $(error You need an existing .config for this target)) -$(if $(call configfiles,$(1)),, $(error No configuration exists for this target on this architecture)) -$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m -O $(objtree) $(objtree)/.config $(call configfiles,$(1)) -$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig -endef +%.config: $(obj)/conf + $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) + +$(Q)yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig PHONY += kvmconfig -kvmconfig: - $(call mergeconfig,kvm_guest) +kvmconfig: kvm_guest.config + @: PHONY += tinyconfig -tinyconfig: allnoconfig - $(call mergeconfig,tiny) +tinyconfig: + $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config # Help text used by make help help:
@@ -231,7 +229,7 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile # QT needs some extra effort... $(obj)/.tmp_qtcheck: - @set -e; echo " CHECK qt"; dir=""; pkg=""; \ + @set -e; $(kecho) " CHECK qt"; dir=""; pkg=""; \ if ! pkg-config --exists QtCore 2> /dev/null; then \ echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ pkg-config --exists qt 2> /dev/null && pkg=qt; \
scripts/kconfig/conf.c +6 -2
@@ -471,7 +471,7 @@ static struct option long_opts[] = {static void conf_usage (const char *progname) { -printf ("Usage: %s [option] <kconfig-file>\n" , progname); +printf ("Usage: %s [-s] [option] <kconfig-file>\n" , progname);printf ("[option] is _one_ of the following:\n" );printf (" --listnewconfig List new options\n" );printf (" --oldaskconfig Start a new configuration using a line-oriented program\n" );
@@ -501,7 +501,11 @@ int main(int ac, char **av) tty_stdio =isatty (0 ) &&isatty (1 ) &&isatty (2 ); -while ((opt =getopt_long (ac, av,"" , long_opts,NULL )) !=-1 ) { +while ((opt =getopt_long (ac, av,"s" , long_opts,NULL )) !=-1 ) { +if (opt =='s' ) { +conf_set_message_callback (NULL ); +continue ; + } input_mode = (enum input_mode )opt;switch (opt) {case silentoldconfig:
scripts/kconfig/confdata.c +6 -0
@@ -16,6 +16,11 @@#include "lkc.h" +struct conf_printer { +void (*print_symbol)(FILE *,struct symbol *,const char *,void *); +void (*print_comment)(FILE *,const char *,void *); +}; +static void conf_warning (const char *fmt, ...) __attribute__ ((format (printf,1 ,2 )));
@@ -59,6 +64,7 @@ static void conf_message(const char *fmt, ...)va_start (ap, fmt);if (conf_message_callback)conf_message_callback (fmt, ap); +va_end (ap); }const char *conf_get_configname (void )
scripts/kconfig/expr.c +12 -10
@@ -11,6 +11,12 @@#define DEBUG_EXPR 0 +static int expr_eq (struct expr *e1,struct expr *e2); +static struct expr *expr_eliminate_yn (struct expr *e); +static struct expr *expr_extract_eq_and (struct expr **ep1,struct expr **ep2); +static struct expr *expr_extract_eq_or (struct expr **ep1,struct expr **ep2); +static void expr_extract_eq (enum expr_type type,struct expr **ep,struct expr **ep1,struct expr **ep2); +struct expr *expr_alloc_symbol (struct symbol *sym) {struct expr *e =xcalloc (1 ,sizeof (*e));
@@ -186,7 +192,7 @@ void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)#undef e1#undef e2 -int expr_eq (struct expr *e1,struct expr *e2) +static int expr_eq (struct expr *e1,struct expr *e2) {int res, old_count;
@@ -228,7 +234,7 @@ int expr_eq(struct expr *e1, struct expr *e2)return 0 ; } -struct expr *expr_eliminate_yn (struct expr *e) +static struct expr *expr_eliminate_yn (struct expr *e) {struct expr *tmp;
@@ -823,7 +829,7 @@ bool expr_depends_symbol(struct expr *dep, struct symbol *sym)return false; } -struct expr *expr_extract_eq_and (struct expr **ep1,struct expr **ep2) +static struct expr *expr_extract_eq_and (struct expr **ep1,struct expr **ep2) {struct expr *tmp =NULL ;expr_extract_eq (E_AND , &tmp, ep1, ep2);
@@ -834,7 +840,7 @@ struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)return tmp; } -struct expr *expr_extract_eq_or (struct expr **ep1,struct expr **ep2) +static struct expr *expr_extract_eq_or (struct expr **ep1,struct expr **ep2) {struct expr *tmp =NULL ;expr_extract_eq (E_OR , &tmp, ep1, ep2);
@@ -845,7 +851,7 @@ struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)return tmp; } -void expr_extract_eq (enum expr_type type,struct expr **ep,struct expr **ep1,struct expr **ep2) +static void expr_extract_eq (enum expr_type type,struct expr **ep,struct expr **ep1,struct expr **ep2) {#define e1 (*ep1)#define e2 (*ep2)
@@ -976,11 +982,8 @@ tristate expr_calc_value(struct expr *e) } } -int expr_compare_type (enum expr_type t1,enum expr_type t2) +static int expr_compare_type (enum expr_type t1,enum expr_type t2) { -#if 0 -return 1 ; -#else if (t1 == t2)return 0 ;switch (t1) {
@@ -1005,7 +1008,6 @@ int expr_compare_type(enum expr_type t1, enum expr_type t2) }printf ("[%dgt%d?]" , t1, t2);return 0 ; -#endif } static inline struct expr *
scripts/kconfig/expr.h +0 -5
@@ -205,18 +205,13 @@ struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);struct expr *expr_alloc_or (struct expr *e1,struct expr *e2);struct expr *expr_copy (const struct expr *org);void expr_free (struct expr *e); -int expr_eq (struct expr *e1,struct expr *e2);void expr_eliminate_eq (struct expr **ep1,struct expr **ep2);tristate expr_calc_value (struct expr *e); -struct expr *expr_eliminate_yn (struct expr *e);struct expr *expr_trans_bool (struct expr *e);struct expr *expr_eliminate_dups (struct expr *e);struct expr *expr_transform (struct expr *e);int expr_contains_symbol (struct expr *dep,struct symbol *sym);bool expr_depends_symbol (struct expr *dep,struct symbol *sym); -struct expr *expr_extract_eq_and (struct expr **ep1,struct expr **ep2); -struct expr *expr_extract_eq_or (struct expr **ep1,struct expr **ep2); -void expr_extract_eq (enum expr_type type,struct expr **ep,struct expr **ep1,struct expr **ep2);struct expr *expr_trans_compare (struct expr *e,enum expr_type type,struct symbol *sym);struct expr *expr_simplify_unmet_dep (struct expr *e1,struct expr *e2);
scripts/kconfig/gconf.c +4 -25
@@ -169,14 +169,6 @@ void init_main_window(const gchar * glade_file) style =gtk_widget_get_style (main_wnd); widget =glade_xml_get_widget (xml,"toolbar1" ); -#if 0 /* Use stock Gtk icons instead */ -replace_button_icon (xml, main_wnd->window, style, -"button1" , (gchar **) xpm_back); -replace_button_icon (xml, main_wnd->window, style, -"button2" , (gchar **) xpm_load); -replace_button_icon (xml, main_wnd->window, style, -"button3" , (gchar **) xpm_save); -#endif replace_button_icon (xml, main_wnd->window, style,"button4" , (gchar **) xpm_single_view); replace_button_icon(xml, main_wnd->window, style,
@@ -184,22 +176,6 @@ void init_main_window(const gchar * glade_file)replace_button_icon (xml, main_wnd->window, style,"button6" , (gchar **) xpm_tree_view); -#if 0 -switch (view_mode) { -case SINGLE_VIEW : - widget =glade_xml_get_widget (xml,"button4" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; -case SPLIT_VIEW : - widget =glade_xml_get_widget (xml,"button5" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; -case FULL_VIEW : - widget =glade_xml_get_widget (xml,"button6" ); -g_signal_emit_by_name (widget,"clicked" ); -break ; - } -#endif txtbuf =gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_w)); tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", "foreground", "red",
@@ -1498,9 +1474,12 @@ int main(int ac, char *av[])case 'a' ://showAll = 1; break ; +case 's' : +conf_set_message_callback (NULL ); +break ;case 'h' :case '?' : -printf ("%s <config>\n" , av[0 ]); +printf ("%s [-s] <config>\n" , av[0 ]);exit (0 ); } name = av[2 ];
scripts/kconfig/list.h +3 -3
@@ -34,7 +34,7 @@ struct list_head {* list_entry - get the struct for this entry * @ptr: the &struct list_head pointer. * @type: the type of the struct this is embedded in. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_entry (ptr, type, member) \ container_of(ptr, type, member)
@@ -43,7 +43,7 @@ struct list_head {* list_for_each_entry - iterate over list of given type * @pos: the type * to use as a loop cursor. * @head: the head for your list. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_for_each_entry (pos, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member); \
@@ -55,7 +55,7 @@ struct list_head {* @pos: the type * to use as a loop cursor. * @n: another type * to use as temporary storage * @head: the head for your list. -* @member: the name of the list_struct within the struct. +* @member: the name of the list_head within the struct. */ #define list_for_each_entry_safe (pos, n, head, member) \ for (pos = list_entry((head)->next, typeof(*pos), member), \
scripts/kconfig/lkc.h +0 -14
@@ -21,9 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;extern "C" {#endif -#define P (name,type,arg) extern type name arg#include "lkc_proto.h" -#undef P#define SRCTREE "srctree"
@@ -70,9 +68,6 @@ struct kconf_id {enum symbol_type stype; }; -extern int zconfdebug; - -int zconfparse (void );void zconfdump (FILE *out);void zconf_starthelp (void );FILE *zconf_fopen (const char *name);
@@ -90,11 +85,6 @@ void sym_add_change_count(int count);bool conf_set_all_new_symbols (enum conf_def_mode mode);void set_all_choice_values (struct symbol *csym); -struct conf_printer { -void (*print_symbol)(FILE *,struct symbol *,const char *,void *); -void (*print_comment)(FILE *,const char *,void *); -}; -/* confdata.c and expr.c */ static inline void xfwrite (const void *str,size_t len,size_t count,FILE *out) {
@@ -113,7 +103,6 @@ void menu_add_entry(struct symbol *sym);void menu_end_entry (void );void menu_add_dep (struct expr *dep);void menu_add_visibility (struct expr *dep); -struct property *menu_add_prop (enum prop_type type,char *prompt,struct expr *expr,struct expr *dep);struct property *menu_add_prompt (enum prop_type type,char *prompt,struct expr *dep);void menu_add_expr (enum prop_type type,struct expr *expr,struct expr *dep);void menu_add_symbol (enum prop_type type,struct symbol *sym,struct expr *dep);
@@ -137,7 +126,6 @@ struct gstr {int max_width; };struct gstr str_new (void ); -struct gstr str_assign (const char *s);void str_free (struct gstr *gs);void str_append (struct gstr *gs,const char *s);void str_printf (struct gstr *gs,const char *fmt, ...);
@@ -148,8 +136,6 @@ extern struct expr *sym_env_list;void sym_init (void );void sym_clear_all_valid (void ); -void sym_set_all_changed (void ); -void sym_set_changed (struct symbol *sym);struct symbol *sym_choice_default (struct symbol *sym);const char *sym_get_string_default (struct symbol *sym);struct symbol *sym_check_deps (struct symbol *sym);
scripts/kconfig/lkc_proto.h +40 -45
97 lines not on this page · raw message
scripts/kconfig/lxdialog/check-lxdialog.sh +5 -1
@@ -21,7 +21,11 @@ ldflags() # Where is ncurses.h? ccflags() { - if [ -f /usr/include/ncursesw/curses.h ]; then + if pkg-config --cflags ncursesw 2>/dev/null; then + echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1' + elif pkg-config --cflags ncurses 2>/dev/null; then + echo '-DCURSES_LOC="<ncurses.h>"' + elif [ -f /usr/include/ncursesw/curses.h ]; then echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"' echo ' -DNCURSES_WIDECHAR=1' elif [ -f /usr/include/ncurses/ncurses.h ]; then
scripts/kconfig/mconf.c +23 -12
@@ -279,6 +279,7 @@ static int child_count;static int single_menu_mode;static int show_all_options;static int save_and_exit; +static int silent;static void conf (struct menu *menu,struct menu *active_menu);static void conf_choice (struct menu *menu);
@@ -330,10 +331,10 @@ static void set_subtitle(void)list_for_each_entry (sp, &trail, entries) {if (sp->text) {if (pos) { - pos->next =xcalloc (sizeof (*pos),1 ); + pos->next =xcalloc (1 ,sizeof (*pos)); pos = pos->next; }else { - subtitles = pos =xcalloc (sizeof (*pos),1 ); + subtitles = pos =xcalloc (1 ,sizeof (*pos)); } pos->text = sp->text; }
@@ -777,10 +778,12 @@ static void conf_message_callback(const char *fmt, va_list ap)char buf[PATH_MAX +1 ];vsnprintf (buf,sizeof (buf), fmt, ap); -if (save_and_exit) -printf ("%s" , buf); -else +if (save_and_exit) { +if (!silent) +printf ("%s" , buf); + }else {show_textbox (NULL , buf,6 ,60 ); + } }static void show_help (struct menu *menu)
@@ -977,16 +980,18 @@ static int handle_exit(void) }/* fall through */ case -1 : -printf (_ ("\n\n" -"*** End of the configuration.\n" -"*** Execute 'make' to start the build or try 'make help'." -"\n\n" )); +if (!silent) +printf (_ ("\n\n" +"*** End of the configuration.\n" +"*** Execute 'make' to start the build or try 'make help'." +"\n\n" )); res =0 ;break ;default : -fprintf (stderr,_ ("\n\n" -"Your configuration changes were NOT saved." -"\n\n" )); +if (!silent) +fprintf (stderr,_ ("\n\n" +"Your configuration changes were NOT saved." +"\n\n" ));if (res !=KEY_ESC ) res =0 ; }
@@ -1010,6 +1015,12 @@ int main(int ac, char **av)signal (SIGINT , sig_handler); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) { + silent =1 ; +/* Silence conf_read() until the real callback is set up */ +conf_set_message_callback (NULL ); + av++; + }conf_parse (av[1 ]);conf_read (NULL );
scripts/kconfig/menu.c +2 -2
@@ -125,7 +125,7 @@ void menu_set_type(int type) sym_type_name(sym->type), sym_type_name(type)); } -struct property *menu_add_prop (enum prop_type type,char *prompt,struct expr *expr,struct expr *dep) +static struct property *menu_add_prop (enum prop_type type,char *prompt,struct expr *expr,struct expr *dep) {struct property *prop =prop_alloc (type, current_entry->sym);
@@ -615,7 +615,7 @@ static struct property *get_symbol_prop(struct symbol *sym)/* * head is optional and may be NULL */ -void get_symbol_str (struct gstr *r,struct symbol *sym, +static void get_symbol_str (struct gstr *r,struct symbol *sym,struct list_head *head) {bool hit;
scripts/kconfig/merge_config.sh +19 -11
@@ -35,7 +35,7 @@ usage() { echo " -O dir to put generated output files" } -MAKE=true +RUNMAKE=true ALLTARGET=alldefconfig WARNREDUN=false OUTPUT=.
@@ -48,7 +48,7 @@ while true; do continue ;; "-m") - MAKE=false + RUNMAKE=false shift continue ;;
@@ -77,9 +77,19 @@ while true; do esac done +if [ "$#" -lt 2 ] ; then + usage + exit +fi + INITFILE=$1 shift; +if [ ! -r "$INITFILE" ]; then + echo "The base file '$INITFILE' does not exist. Exit." >&2 + exit 1 +fi + MERGE_LIST=$* SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX)
@@ -93,25 +103,23 @@ for MERGE_FILE in $MERGE_LIST ; do CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) for CFG in $CFG_LIST ; do - grep -q -w $CFG $TMP_FILE - if [ $? -eq 0 ] ; then - PREV_VAL=$(grep -w $CFG $TMP_FILE) - NEW_VAL=$(grep -w $CFG $MERGE_FILE) - if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then + grep -q -w $CFG $TMP_FILE || continue + PREV_VAL=$(grep -w $CFG $TMP_FILE) + NEW_VAL=$(grep -w $CFG $MERGE_FILE) + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then echo Value of $CFG is redefined by fragment $MERGE_FILE: echo Previous value: $PREV_VAL echo New value: $NEW_VAL echo - elif [ "$WARNREDUN" = "true" ]; then + elif [ "$WARNREDUN" = "true" ]; then echo Value of $CFG is redundant by fragment $MERGE_FILE: - fi - sed -i "/$CFG[ =]/d" $TMP_FILE fi + sed -i "/$CFG[ =]/d" $TMP_FILE done cat $MERGE_FILE >> $TMP_FILE done -if [ "$MAKE" = "false" ]; then +if [ "$RUNMAKE" = "false" ]; then cp $TMP_FILE $OUTPUT/.config echo "#" echo "# merged configuration written to $OUTPUT/.config (needs make)"
scripts/kconfig/nconf.c +5 -0
@@ -1482,6 +1482,11 @@ int main(int ac, char **av)bindtextdomain (PACKAGE ,LOCALEDIR );textdomain (PACKAGE ); +if (ac >1 &&strcmp (av[1 ],"-s" ) ==0 ) { +/* Silence conf_read() until the real callback is set up */ +conf_set_message_callback (NULL ); + av++; + }conf_parse (av[1 ]);conf_read (NULL );
scripts/kconfig/qconf.cc +4 -1
@@ -1746,7 +1746,7 @@ static const char *progname; static void usage(void) { - printf(_("%s <config>\n"), progname); + printf(_("%s [-s] <config>\n"), progname); exit(0); }
@@ -1762,6 +1762,9 @@ int main(int ac, char** av) configApp = new QApplication(ac, av); if (ac > 1 && av[1][0] == '-') { switch (av[1][1]) { + case 's': + conf_set_message_callback(NULL); + break; case 'h': case '?': usage();
scripts/kconfig/symbol.c +21 -21
60 lines not on this page · raw message
scripts/kconfig/util.c +0 -10
@@ -88,16 +88,6 @@ struct gstr str_new(void)return gs; } -/* Allocate and assign growable string */ -struct gstr str_assign (const char *s) -{ -struct gstr gs; - gs.s =strdup (s); - gs.len =strlen (s) +1 ; - gs.max_width =0 ; -return gs; -} -/* Free storage for growable string */ void str_free (struct gstr *gs) {
Signature · 1 line
1.9.1
PATCH 1/4 kconfig: sync with Linux 4.1
Quoted 70 lines · Masahiro Yamada
Update the files under
scripts/kconfig/to match Linux 4.1. SomeKconfigsources have diverged from those in the kernel, so commit-base syncing was done not to lose U-Boot specific updates.The commits cherry-picked from Linux are:
[1] commit
be8af2d54a66911693eddc556e4f7a866670082b
Author: Bj?rn Forsman <[email protected]> kconfig/lxdialog: get ncurses CFLAGS with pkg-config[2] commit
3943f42c11896ce82ad3da132c8a5630313bdd0e
Author: Andrey Utkin <[email protected]> Replace mentions of "list_struct" to "list_head"[3] commit
e4e458b45c5861808674eebfea94cee2258bb2ea
Author: Arjun Sreedharan <[email protected]> calloc/xcalloc: Fix argument order[4] commit
09950bc256e3628d275f90e016e6f5a039fbdcab
Author: Olof Johansson <[email protected]>merge_config.sh: Display usage if given too few arguments[5] commit
b6a2ab2cd4739a9573ed41677e53171987b8da34
Author: Colin Ian King <[email protected]>
kconfig: useva_endto match correspondingva_start[6] commit
70529b1a1784503169416df19ce3d68746401340
Author: Michal Marek <[email protected]>
kconfig: Get rid of theP()macro in headers[7] commit
463157444e377bf9b279101b1f16a94c4648c03a
Author: Michal Marek <[email protected]>
kconfig: Remove dead code[8] commit
ad8d40cda3ad22ad9e8863d55a5c88f85c0173f0
Author: Michal Marek <[email protected]>
kconfig: Remove unnecessary prototypes from headers[9] commit
de4619937229378e81f95e99c9866acc8e207d34
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: fix "jobserver unavailable" warning[10] commit
b9fe99c5b994c6ddc57780993966b18899526c0b
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: move an error check tomerge_config.sh[11] commit
371cfd4ff0611d8bc5d18bbb9cc6a2bc3d56cd3d
Author: Masahiro Yamada <[email protected]>
kbuild: mergeconfig: remove redundant $(objtree)[12] commit
3a975b8cfcbe026b535f83bde9a3c009bae214f9
Author: Masahiro Yamada <[email protected]>merge_config.sh: improve indentation[13] commit
bc8f8f5fc47cd02c2c5f3580dac2fe6695af1edd
Author: Masahiro Yamada <[email protected]>merge_config.sh: rename MAKE to RUNMAKE[14] commit
63a91033d52e64a22e571fe84924c0b7f21c280d
Author: Masahiro Yamada <[email protected]>
kbuild: add generic mergeconfig target, %.config[15] commit
1cba0c305758c3c1786ecaceb03e142c95a4edc9
Author: Michal Marek <[email protected]>
kconfig: SimplifyMakefile[16] commit
0a1f00a1c86421cc07cec87011c7cf4df68ee54b
Author: Michal Marek <[email protected]>
kconfig: Do not print status messages in make -s mode
Quoted 9 lines
Signed-off-by Masahiro Yamada <[email protected]>Signed-off-by Bj?rn Forsman <[email protected]>Signed-off-by Andrey Utkin <[email protected]>Signed-off-by Jiri Kosina <[email protected]>Signed-off-by Arjun Sreedharan <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>Signed-off-by Olof Johansson <[email protected]>Signed-off-by Colin Ian King <[email protected]>Signed-off-by Michal Marek <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150728/f1e633df/attachment.sig>
PATCH 2/4 kbuild: sync with Linux 4.1
In reply to Masahiro YamadaUpdate some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes.
The previous big sync was from Linux 3.18-rc1 by commit 176d09827725 (kbuild: sync misc scripts with Linux 3.18-rc1).
The commits imported from Linux (some with adjustments) are:
[1] commit 9fb5e5372208973984a23ee6f5f025c05d364633
Author: Robert Richter <[email protected]>
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst
[2] commit 371fdc77af44f4cb32475fd499e1d912ccc30890
Author: Masahiro Yamada <[email protected]>
kbuild: collect shorthands into scripts/Kbuild.include
[3] commit a29b82326ed4eb5567b03c85b52c6891578d5a03
Author: Michal Marek <[email protected]>
kbuild: Remove duplicate $(cmd) definition in Makefile.clean
[4] commit 1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d
Author: Masahiro Yamada <[email protected]>
kbuild: remove redundant -rR flag of hdr-inst
[5] commit 34948e0bbf98640fc1821751b01d2f0cd17d84d5
Author: Michal Marek <[email protected]>
kbuild: Drop support for clean-rule
[6] commit a16c5f99a28c9945165c46da27fff8e6f26f8736
Author: Michal Marek <[email protected]>
kbuild: Fix removal of the debian/ directory
[7] commit d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4
Author: Masahiro Yamada <[email protected]>
kbuild: use mixed-targets when two or more config targets are given
[8] commit dd33c03b18b3f2db791eb6a17c37d2de66e4de18
Author: Masahiro Yamada <[email protected]>
kbuild: fix cc-ifversion macro
[9] commit 665d92e38f65d70796aad2b8e49e42e80815d4a4
Author: Masahiro Yamada <[email protected]>
kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion
[10] commit 6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808
Author: Masahiro Yamada <[email protected]>
kbuild: allow cc-ifversion to have the argument for false condition
[11] commit c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3
Author: Heiko Carstens <[email protected]>
ftrace: allow architectures to specify ftrace compile options
[12] commit 0b24becc810dc3be6e3f94103a866f214c282394
Author: Andrey Ryabinin <[email protected]>
kasan: add kernel address sanitizer infrastructure
[13] commit 4218affdf57f938c04e3a916a9685ee27079f377
Author: Masahiro Yamada <[email protected]>
kbuild: remove warning about "make depend"
[14] commit 77479b38e2f58890eb221a0418357502a5b41cd6
Author: Nathan Rossi <[email protected]>
kbuild: Create directory for target DTB
---
Makefile | 13 +------------ scripts/Kbuild.include | 25 ++++++++++++++++++++----- scripts/Makefile.build | 5 +++-- scripts/Makefile.clean | 29 +++++++++-------------------- scripts/Makefile.lib | 25 ++++++++++++------------- 5 files changed, 45 insertions(+), 52 deletions(-)
Makefile +1 -12
@@ -437,7 +437,7 @@ endif ifeq ($(KBUILD_EXTMOD),) ifneq ($(filter config %config,$(MAKECMDGOALS)),) config-targets := 1 - ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) + ifneq ($(words $(MAKECMDGOALS)),1) mixed-targets := 1 endif endif
@@ -1243,12 +1243,6 @@ $(timestamp_h): $(srctree)/Makefile FORCE $(call filechk,timestamp.h) # --------------------------------------------------------------------------- - -PHONY += depend dep -depend dep: - @echo '*** Warning: make $@ is unnecessary now.' - -# --------------------------------------------------------------------------- quiet_cmd_cpp_lds = LDS $@ cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \ -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $<
@@ -1548,11 +1542,6 @@ ifneq ($(cmd_files),) include $(cmd_files) endif -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir -# Usage: -# $(Q)$(MAKE) $(clean)=dir -clean := -f $(srctree)/scripts/Makefile.clean obj - endif # skip-makefile PHONY += FORCE
scripts/Kbuild.include +20 -5
@@ -131,17 +131,15 @@ cc-disable-warning = $(call try-run,\ $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) # cc-version -# Usage gcc-ver := $(call cc-version) cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) # cc-fullversion -# Usage gcc-ver := $(call cc-fullversion) cc-fullversion = $(shell $(CONFIG_SHELL) \ $(srctree)/scripts/gcc-version.sh -p $(CC)) # cc-ifversion # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) -cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) +cc-ifversion = $(shell [ $(cc-version) $(1) $(2) ] && echo $(3) || echo $(4)) # added for U-Boot binutils-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/binutils-version.sh $(AS))
@@ -163,13 +161,12 @@ ld-option = $(call try-run,\ ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) # ld-version -# Usage: $(call ld-version) # Note this is mainly for HJ Lu's 3 number binutil versions ld-version = $(shell $(LD) --version | $(srctree)/scripts/ld-version.sh) # ld-ifversion # Usage: $(call ld-ifversion, -ge, 22252, y) -ld-ifversion = $(shell [ $(call ld-version) $(1) $(2) ] && echo $(3)) +ld-ifversion = $(shell [ $(ld-version) $(1) $(2) ] && echo $(3) || echo $(4)) ######
@@ -185,6 +182,24 @@ build := -f $(srctree)/scripts/Makefile.build obj # $(Q)$(MAKE) $(modbuiltin)=dir modbuiltin := -f $(srctree)/scripts/Makefile.modbuiltin obj +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.dtbinst obj= +# Usage: +# $(Q)$(MAKE) $(dtbinst)=dir +dtbinst := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.dtbinst obj + +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj= +# Usage: +# $(Q)$(MAKE) $(clean)=dir +clean := -f $(srctree)/scripts/Makefile.clean obj + +### +# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.headersinst obj= +# Usage: +# $(Q)$(MAKE) $(hdr-inst)=dir +hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj + # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter addtree = $(if $(patsubst -I%,%,$(1)), \
scripts/Makefile.build +3 -2
@@ -253,8 +253,9 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH "$(if $(part-of-module),1,0)" "$(@)"; recordmcount_source := $(srctree)/scripts/recordmcount.pl endif -cmd_record_mcount = \ - if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ +cmd_record_mcount = \ + if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \ + "$(CC_FLAGS_FTRACE)" ]; then \ $(sub_cmd_record_mcount) \ fi; endif
scripts/Makefile.clean +9 -20
@@ -7,10 +7,7 @@ src := $(obj) PHONY := __clean __clean: -# Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir -# Usage: -# $(Q)$(MAKE) $(clean)=dir -clean := -f $(srctree)/scripts/Makefile.clean obj +include scripts/Kbuild.include # The filename Kbuild has precedence over Makefile kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
@@ -50,19 +47,19 @@ __clean-files := $(extra-y) $(extra-m) $(extra-) \ __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) -# as clean-files is given relative to the current directory, this adds -# a $(obj) prefix, except for absolute paths +# clean-files is given relative to the current directory, unless it +# starts with $(objtree)/ (which means "./", so do not add "./" unless +# you want to delete a file from the toplevel object directory). __clean-files := $(wildcard \ - $(addprefix $(obj)/, $(filter-out /%, $(__clean-files))) \ - $(filter /%, $(__clean-files))) + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(__clean-files))) \ + $(filter $(objtree)/%, $(__clean-files))) -# as clean-dirs is given relative to the current directory, this adds -# a $(obj) prefix, except for absolute paths +# same as clean-files __clean-dirs := $(wildcard \ - $(addprefix $(obj)/, $(filter-out /%, $(clean-dirs))) \ - $(filter /%, $(clean-dirs))) + $(addprefix $(obj)/, $(filter-out $(objtree)/%, $(clean-dirs))) \ + $(filter $(objtree)/%, $(clean-dirs))) # ==========================================================================
@@ -79,9 +76,6 @@ endif ifneq ($(strip $(__clean-dirs)),) +$(call cmd,cleandir) endif -ifneq ($(strip $(clean-rule)),) - +$(clean-rule) -endif @:
@@ -96,11 +90,6 @@ PHONY += $(subdir-ymn) $(subdir-ymn): $(Q)$(MAKE) $(clean)=$@ -# If quiet is set, only print short version of command - -cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) - - # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable se we can use it in if_changed and friends.
scripts/Makefile.lib +12 -13
@@ -119,6 +119,16 @@ _c_flags += $(if $(patsubst n%,, \ $(CFLAGS_GCOV)) endif +# +# Enable address sanitizer flags for kernel except some files or directories +# we don't want to check (depends on variables KASAN_SANITIZE_obj.o, KASAN_SANITIZE) +# +ifeq ($(CONFIG_KASAN),y) +_c_flags += $(if $(patsubst n%,, \ + $(KASAN_SANITIZE_$(basetarget).o)$(KASAN_SANITIZE)y), \ + $(CFLAGS_KASAN)) +endif + # If building the kernel in a separate objtree expand all occurrences # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
@@ -274,7 +284,8 @@ $(obj)/%.dtb.S: $(obj)/%.dtb quiet_cmd_dtc = DTC $@ # Modified for U-Boot -cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ +cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ + $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(DTC) -O dtb -o $@ -b 0 \ -i $(dir $<) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
@@ -285,18 +296,6 @@ $(obj)/%.dtb: $(src)/%.dts FORCE dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) -# Helper targets for Installing DTBs into the boot directory -quiet_cmd_dtb_install = INSTALL $< - cmd_dtb_install = cp $< $(2) - -_dtbinst_pre_: - $(Q)if [ -d $(INSTALL_DTBS_PATH).old ]; then rm -rf $(INSTALL_DTBS_PATH).old; fi - $(Q)if [ -d $(INSTALL_DTBS_PATH) ]; then mv $(INSTALL_DTBS_PATH) $(INSTALL_DTBS_PATH).old; fi - $(Q)mkdir -p $(INSTALL_DTBS_PATH) - -%.dtb_dtbinst_: $(obj)/%.dtb _dtbinst_pre_ - $(call cmd,dtb_install,$(INSTALL_DTBS_PATH)) - # Bzip2 # ---------------------------------------------------------------------------
Signature · 1 line
1.9.1
PATCH 2/4 kbuild: sync with Linux 4.1
Quoted 63 lines · Masahiro Yamada
Update some build scripts to match Linux 4.1. Commit-based syncing was done so as not to break U-Boot specific changes.
The previous big sync was from Linux 3.18-rc1 by commit176d09827725(kbuild: sync misc scripts with Linux 3.18-rc1).The commits imported from Linux (some with adjustments) are:
[1] commit
9fb5e5372208973984a23ee6f5f025c05d364633
Author: Robert Richter <[email protected]>
dts, kbuild: Factor out dtbs install rules to Makefile.dtbinst[2] commit
371fdc77af44f4cb32475fd499e1d912ccc30890
Author: Masahiro Yamada <[email protected]>
kbuild: collect shorthands intoscripts/Kbuild.include[3] commit
a29b82326ed4eb5567b03c85b52c6891578d5a03
Author: Michal Marek <[email protected]>
kbuild: Remove duplicate $(cmd) definition in Makefile.clean[4] commit
1846dfbde3e8a53f3673dcb1c1b79fd9b3f8d40d
Author: Masahiro Yamada <[email protected]>
kbuild: remove redundant -rR flag of hdr-inst[5] commit
34948e0bbf98640fc1821751b01d2f0cd17d84d5
Author: Michal Marek <[email protected]>
kbuild: Drop support for clean-rule[6] commit
a16c5f99a28c9945165c46da27fff8e6f26f8736
Author: Michal Marek <[email protected]>
kbuild: Fix removal of the debian/ directory[7] commit
d0d38cd9e853db11e0242b3df4c9c3c4a663fbb4
Author: Masahiro Yamada <[email protected]>
kbuild: use mixed-targets when two or more config targets are given[8] commit
dd33c03b18b3f2db791eb6a17c37d2de66e4de18
Author: Masahiro Yamada <[email protected]>
kbuild: fix cc-ifversion macro[9] commit
665d92e38f65d70796aad2b8e49e42e80815d4a4
Author: Masahiro Yamada <[email protected]>
kbuild: do not add $(call ...) to invoke cc-version or cc-fullversion[10] commit
6dcb4e5edf39e3b65a75ca76f087b2fdbee8a808
Author: Masahiro Yamada <[email protected]>
kbuild: allow cc-ifversion to have the argument for false condition[11] commit
c0a80c0c27e5e65b180a25e6c4c2f7ef9e386cd3
Author: Heiko Carstens <[email protected]>
ftrace: allow architectures to specify ftrace compile options[12] commit
0b24becc810dc3be6e3f94103a866f214c282394
Author: Andrey Ryabinin <[email protected]>
kasan: add kernel address sanitizer infrastructure[13] commit
4218affdf57f938c04e3a916a9685ee27079f377
Author: Masahiro Yamada <[email protected]>
kbuild: remove warning about "make depend"[14] commit
77479b38e2f58890eb221a0418357502a5b41cd6
Author: Nathan Rossi <[email protected]>
kbuild: Create directory for target DTB
Quoted 10 lines
Signed-off-by Masahiro Yamada <[email protected]>Signed-off-by Robert Richter <[email protected]>Signed-off-by Heiko Carstens <[email protected]>Signed-off-by Martin Schwidefsky <[email protected]>Signed-off-by Andrey Ryabinin <[email protected]>Signed-off-by Nathan Rossi <[email protected]>Signed-off-by Michal Simek <[email protected]>Signed-off-by Olof Johansson <[email protected]>Signed-off-by Michal Marek <[email protected]>Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150728/df415144/attachment.sig>
PATCH 3/4 kbuild: do not add $((generic-)offsets-file) to targets
In reply to Masahiro Yamada$(always) is added to targets by scripts/Makefile.build. Moreover, filechk does not need .*.cmd files.
Adding these two files to targets is redundant.
---
Kbuild | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Kbuild +1 -2
@@ -36,7 +36,7 @@ endef generic-offsets-file := include/generated/generic-asm-offsets.h always := $(generic-offsets-file) -targets := $(generic-offsets-file) lib/asm-offsets.s +targets := lib/asm-offsets.s # We use internal kbuild rules to avoid the "is up to date" message from make lib/asm-offsets.s: lib/asm-offsets.c FORCE
@@ -55,7 +55,6 @@ offsets-file := include/generated/asm-offsets.h endif always += $(offsets-file) -targets += $(offsets-file) targets += arch/$(ARCH)/lib/asm-offsets.s CFLAGS_asm-offsets.o := -DDO_DEPS_ONLY
Signature · 1 line
1.9.1
PATCH 3/4 kbuild: do not add $((generic-)offsets-file) to targets
Quoted 6 lines · Masahiro Yamada
$(always) is added to targets by
scripts/Makefile.build. Moreover, filechk does not need .*.cmd files.Adding these two files to targets is redundant.
Signed-off-by Masahiro Yamada <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150728/bca0e763/attachment.sig>
PATCH 4/4 kbuild: use relative path more to include Makefile
In reply to Masahiro YamadaPrior to this commit, it was impossible to use relative path to include Makefiles from the top level Makefile because the option "--include-dir=$(srctree)" becomes effective when Make enters into sub Makefiles.
To use relative path in any places, this commit moves the option above the "sub-make" target.
This was imported from Linux (commit a436bb7b8063) and adjusted for U-Boot.
---
Makefile | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-)
Makefile +9 -11
@@ -10,9 +10,10 @@ NAME = # Comments in this file are targeted only to the developer, do not # expect to learn how to build the kernel reading this file. -# Do not use make's built-in rules and variables -# (this increases performance and avoids hard-to-debug behaviour); -MAKEFLAGS += -rR +# o Do not use make's built-in rules and variables +# (this increases performance and avoids hard-to-debug behaviour); +# o Look for make include files relative to root of kernel src +MAKEFLAGS += -rR --include-dir=$(CURDIR) # Avoid funny character set dependencies unexport LC_ALL
@@ -319,12 +320,9 @@ endif export KBUILD_MODULES KBUILD_BUILTIN export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD -# Look for make include files relative to root of kernel src -MAKEFLAGS += --include-dir=$(srctree) - # We need some generic definitions (do not try to remake the file). -$(srctree)/scripts/Kbuild.include: ; -include $(srctree)/scripts/Kbuild.include +scripts/Kbuild.include: ; +include scripts/Kbuild.include # Make variables (CC, etc...)
@@ -518,8 +516,8 @@ ifneq ($(wildcard include/config/auto.conf),) autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \ include/config/auto.conf) ifeq ($(autoconf_is_old),) -include $(srctree)/config.mk -include $(srctree)/arch/$(ARCH)/Makefile +include config.mk +include arch/$(ARCH)/Makefile endif endif endif
@@ -594,7 +592,7 @@ endif export CONFIG_SYS_TEXT_BASE -include $(srctree)/scripts/Makefile.extrawarn +include scripts/Makefile.extrawarn # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments KBUILD_CPPFLAGS += $(KCPPFLAGS)
Signature · 1 line
1.9.1
PATCH 4/4 kbuild: use relative path more to include Makefile
Quoted 5 lines · Masahiro Yamada
Prior to this commit, it was impossible to use relative path to include Makefiles from the top level
Makefilebecause the option "--include-dir=$(srctree)" becomes effective when Make enters into sub Makefiles.
Quoted 8 lines
To use relative path in any places, this commit moves the option above the "sub-make" target.
This was imported from Linux (commit
a436bb7b8063) and adjusted for U-Boot.Signed-off-by Masahiro Yamada <[email protected]>Signed-off-by Michal Marek <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150728/40c10f73/attachment.sig>