linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.5][RFC] Make mconf inform user about supported make targets
@ 2003-03-04 11:30 Erlend Aasland
  2003-03-04 19:13 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Erlend Aasland @ 2003-03-04 11:30 UTC (permalink / raw)
  To: lkml

[-- Attachment #1: Type: text/plain, Size: 2886 bytes --]

Scenario: I do a make menuconfig on my sparc64 machine. When mconf exits, it
tells me "Next, you may run 'make bzImage', 'make bzdisk', or 'make install'."

Problem: These are i386-specific targets. Issuing a "make help", I see
that {vmlinux{,.aout},tftpboot.img} are the sparc64-specific targets.

Solution: Get mconf to tell the user about arch-specific targets,
instead of i386 targets.

So, here is a trivial patch that change scripts/kconfig/Makefile and
scripts/kconfig/mconf.c. Small changes are also needed in most of the
arch/*/Makefiles. I've attached patches for all arch's that define
archhelp.

(I'm not shure if this is the easiest way to accomplish this, but
I've tested it (on sparc64) and it seems to work ok)

Patches are against 2.5.63.


Erlend Aasland


diff -urN linux-2.5.63/scripts/kconfig/Makefile linux-2.5.63-conf/scripts/kconfig/Makefile
--- linux-2.5.63/scripts/kconfig/Makefile	Mon Feb 17 22:57:19 2003
+++ linux-2.5.63-conf/scripts/kconfig/Makefile	Fri Feb 21 15:35:26 2003
@@ -19,7 +19,7 @@
 qconf-cxxobjs	:= qconf.o
 
 clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
-		   zconf.tab.c zconf.tab.h lex.zconf.c
+		   zconf.tab.c zconf.tab.h lex.zconf.c arch.h
 
 # generated files seem to need this to find local include files
 HOSTCFLAGS_lex.zconf.o	:= -I$(src)
@@ -28,6 +28,8 @@
 HOSTLOADLIBES_qconf	= -L$(QTDIR)/lib -Wl,-rpath,$(QTDIR)/lib -l$(QTLIB) -ldl
 HOSTCXXFLAGS_qconf.o	= -I$(QTDIR)/include 
 
+$(obj)/mconf.o: $(src)/arch.h
+
 $(obj)/conf.o $(obj)/mconf.o $(obj)/qconf.o: $(obj)/zconf.tab.h
 
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
@@ -91,3 +93,24 @@
 	flex -P$(notdir $*) -o$@ $<
 
 endif
+
+include arch/$(ARCH)/Makefile
+
+ifndef generate_kconfig_arch.h
+define generate_kconfig_arch.h
+  (echo "#ifndef ARCH_H"; \
+   echo "#define ARCH_H"; \
+   echo ""; \
+   echo "/*"; \
+   echo " * This file was automatically generated"; \
+   echo " *"; \
+   echo ""; \
+   echo 'static const char arch_maketargets[] = "";'; \
+   echo '";'; \
+   echo ""; \
+   echo "#endif";
+endef
+endif
+
+$(src)/arch.h:
+	@$(generate_kconfig_arch.h) > $(src)/arch.h
diff -urN linux-2.5.63/scripts/kconfig/mconf.c linux-2.5.63-conf/scripts/kconfig/mconf.c
--- linux-2.5.63/scripts/kconfig/mconf.c	Mon Feb 17 22:56:02 2003
+++ linux-2.5.63-conf/scripts/kconfig/mconf.c	Fri Feb 21 15:35:26 2003
@@ -19,6 +19,7 @@
 #include <termios.h>
 #include <unistd.h>
 
+#include "arch.h"
 #define LKC_DIRECT_LINK
 #include "lkc.h"
 
@@ -772,7 +773,7 @@
 		printf("\n\n"
 			"*** End of Linux kernel configuration.\n"
 			"*** Check the top-level Makefile for additional configuration.\n"
-			"*** Next, you may run 'make bzImage', 'make bzdisk', or 'make install'.\n\n");
+			"*** Next, you may run %s 'make modules', 'make vmlinux' or 'make all'.\n\n", arch_maketargets);
 	} else
 		printf("\n\nYour kernel configuration changes were NOT saved.\n\n");
 

[-- Attachment #2: make-alpha.patch --]
[-- Type: text/plain, Size: 683 bytes --]

--- linux-2.5.63/arch/alpha/Makefile	Mon Feb 17 22:56:20 2003
+++ linux-2.5.63-conf/arch/alpha/Makefile	Fri Feb 21 15:52:42 2003
@@ -134,3 +134,17 @@
   echo '  bootimage	- SRM bootable image (arch/alpha/boot/bootimage)'
   echo '  bootpfile	- BOOTP bootable image (arch/alpha/boot/bootpfile)'
 endef
+
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make boot\\', \\'make bootimage\\', \\'make bootpfile\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #3: make-arm.patch --]
[-- Type: text/plain, Size: 749 bytes --]

--- linux-2.5.63/arch/arm/Makefile	Mon Feb 17 22:56:11 2003
+++ linux-2.5.63-conf/arch/arm/Makefile	Fri Feb 21 16:00:12 2003
@@ -226,3 +226,18 @@
   echo  '                  (distribution) /sbin/installkernel or'
   echo  '                  install to $$(INSTALL_PATH) and run lilo'
 endef
+
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make zImage\\', \\'make Image\\', \\'make bootpImage\\', \\'make initrd\\',\n"; \
+  echo -n "\\'make install\\', \\'make zinstall\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #4: make-i386.patch --]
[-- Type: text/plain, Size: 573 bytes --]

--- linux-2.5.63/arch/i386/Makefile	Mon Feb 17 22:56:11 2003
+++ linux-2.5.63-conf/arch/i386/Makefile	Fri Feb 21 15:50:45 2003
@@ -124,3 +124,16 @@
   echo  '		   install to $$(INSTALL_PATH) and run lilo'
 endef
 
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make bzImage\\', \\'make install\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #5: make-ia64.patch --]
[-- Type: text/plain, Size: 636 bytes --]

--- linux-2.5.63/arch/ia64/Makefile	Mon Feb 17 22:55:50 2003
+++ linux-2.5.63-conf/arch/ia64/Makefile	Fri Feb 21 15:54:11 2003
@@ -91,3 +91,17 @@
   echo '  compressed	- Build compressed kernel image'
   echo '  boot		- Build vmlinux and bootloader for Ski simulator'
 endef
+
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make compressed\\', \\'make boot\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #6: make-parisc.patch --]
[-- Type: text/plain, Size: 607 bytes --]

--- linux-2.5.63/arch/parisc/Makefile	Mon Feb 17 22:56:56 2003
+++ linux-2.5.63-conf/arch/parisc/Makefile	Fri Feb 21 16:00:57 2003
@@ -102,3 +102,17 @@
 	@echo  '* vmlinux	- Uncompressed kernel image (./vmlinux)'
 	@echo  '  palo		- Bootable image (./lifimage)'
 endef
+
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make palo\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #7: make-sparc64.patch --]
[-- Type: text/plain, Size: 582 bytes --]

--- linux-2.5.63/arch/sparc64/Makefile	Mon Feb 17 22:57:18 2003
+++ linux-2.5.63-conf/arch/sparc64/Makefile	Fri Feb 21 15:46:35 2003
@@ -80,3 +80,16 @@
   echo  '  tftpboot.img  - Image prepared for tftp'
 endef

+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make vmlinux.aout\\', \\'make tftpboot.img\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

[-- Attachment #8: make-x86_64.patch --]
[-- Type: text/plain, Size: 589 bytes --]

--- linux-2.5.63/arch/x86_64/Makefile	Mon Feb 17 22:56:54 2003
+++ linux-2.5.63-conf/arch/x86_64/Makefile	Fri Feb 21 16:02:00 2003
@@ -106,4 +106,16 @@
 
 CLEAN_FILES += arch/$(ARCH)/boot/fdimage arch/$(ARCH)/boot/mtools.conf
 
-
+define generate_kconfig_arch.h
+( echo "#ifndef ARCH_H"; \
+  echo "#define ARCH_H"; \
+  echo "/*"; \
+  echo " * This file was automatically generated"; \
+  echo " */"; \
+  echo ""; \
+  echo -n 'static const char arch_maketargets[] = "'; \
+  echo -n "\\'make bzImage\\', \\'make install\\',"; \
+  echo '";'; \
+  echo ""; \
+  echo "#endif"; )
+endef

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

* Re: [PATCH 2.5][RFC] Make mconf inform user about supported make targets
  2003-03-04 11:30 [PATCH 2.5][RFC] Make mconf inform user about supported make targets Erlend Aasland
@ 2003-03-04 19:13 ` Sam Ravnborg
  2003-03-05  1:21   ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2003-03-04 19:13 UTC (permalink / raw)
  To: Erlend Aasland; +Cc: lkml, Roman Zippel

On Tue, Mar 04, 2003 at 12:30:54PM +0100, Erlend Aasland wrote:
> Scenario: I do a make menuconfig on my sparc64 machine. When mconf exits, it
> tells me "Next, you may run 'make bzImage', 'make bzdisk', or 'make install'."
> 
> Problem: These are i386-specific targets. Issuing a "make help", I see
> that {vmlinux{,.aout},tftpboot.img} are the sparc64-specific targets.
> 
> Solution: Get mconf to tell the user about arch-specific targets,
> instead of i386 targets.

I see no need for this patch.
Most architectures today (if not all) has a sensible default target.

So changing mconf to print something like:
"Next, you may run 'make' to build your kernel."

Should be a good enough guide for the user.

	Sam

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

* Re: [PATCH 2.5][RFC] Make mconf inform user about supported make targets
  2003-03-04 19:13 ` Sam Ravnborg
@ 2003-03-05  1:21   ` Roman Zippel
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Zippel @ 2003-03-05  1:21 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Erlend Aasland, lkml

Hi,

On Tue, 4 Mar 2003, Sam Ravnborg wrote:

> > Solution: Get mconf to tell the user about arch-specific targets,
> > instead of i386 targets.
> 
> I see no need for this patch.
> Most architectures today (if not all) has a sensible default target.
> 
> So changing mconf to print something like:
> "Next, you may run 'make' to build your kernel."
> 
> Should be a good enough guide for the user.

I agree and actually I'd like to remove that message completely from the 
config tools. It's the job of kbuild to tell the user what to do next.

bye, Roman


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

end of thread, other threads:[~2003-03-05  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-04 11:30 [PATCH 2.5][RFC] Make mconf inform user about supported make targets Erlend Aasland
2003-03-04 19:13 ` Sam Ravnborg
2003-03-05  1:21   ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).