* make help ARCH=xx fun @ 2004-02-21 14:26 James H. Cloos Jr. 2004-02-22 9:50 ` Sam Ravnborg 0 siblings, 1 reply; 11+ messages in thread From: James H. Cloos Jr. @ 2004-02-21 14:26 UTC (permalink / raw) To: linux-kernel I was looking at the arch-specific make options for various archs, and found this bit of fun: :; make help ARCH=sh [elided] Architecture specific targets (sh): zImage - Compressed kernel image (arch/sh/boot/zImage) SCCS - Build for arch/sh/configs/SCCS defconfig-adx - Build for adx defconfig-cqreek - Build for cqreek defconfig-dreamcast - Build for dreamcast defconfig-hp680 - Build for hp680 defconfig-se7751 - Build for se7751 defconfig-snapgear - Build for snapgear defconfig-systemh - Build for systemh [elided] The defconfig options only show up after a bk get in arch/sh/configs/. There are also several archs that do not have any arch-specific help. ppc64 (unlike ppc) is one such example. -JimC ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-21 14:26 make help ARCH=xx fun James H. Cloos Jr. @ 2004-02-22 9:50 ` Sam Ravnborg 2004-02-22 14:28 ` James H. Cloos Jr. 2004-02-24 21:55 ` Tom Rini 0 siblings, 2 replies; 11+ messages in thread From: Sam Ravnborg @ 2004-02-22 9:50 UTC (permalink / raw) To: James H. Cloos Jr.; +Cc: linux-kernel On Sat, Feb 21, 2004 at 09:26:41AM -0500, James H. Cloos Jr. wrote: > I was looking at the arch-specific make options for various archs, > and found this bit of fun: > > :; make help ARCH=sh > [elided] > Architecture specific targets (sh): > zImage - Compressed kernel image (arch/sh/boot/zImage) > SCCS - Build for arch/sh/configs/SCCS > defconfig-adx - Build for adx > defconfig-cqreek - Build for cqreek > defconfig-dreamcast - Build for dreamcast > defconfig-hp680 - Build for hp680 > defconfig-se7751 - Build for se7751 > defconfig-snapgear - Build for snapgear > defconfig-systemh - Build for systemh > [elided] > > The defconfig options only show up after a bk get in arch/sh/configs/. The sh people have decided to create the list based on the content of the directory. Therefore you see the SCCS entry, and that's why you need to do a 'bk bet'. In general you cannot expect the konfig and build system to work 100% if there is random files missing in the tree. Those files bk can checkout automatically is more by luck - and no effort has been put into making this a trustworthy way to do it. I expect sh to change their defconfig system to the same infrastructure as used by ppc, arm and others. > There are also several archs that do not have any arch-specific > help. ppc64 (unlike ppc) is one such example. Patches are welcome. Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-22 9:50 ` Sam Ravnborg @ 2004-02-22 14:28 ` James H. Cloos Jr. 2004-02-24 21:55 ` Tom Rini 1 sibling, 0 replies; 11+ messages in thread From: James H. Cloos Jr. @ 2004-02-22 14:28 UTC (permalink / raw) To: linux-kernel >>>>> "Sam" == Sam Ravnborg <sam@ravnborg.org> writes: Sam> The sh people have decided to create the list based on the Sam> content of the directory. Therefore you see the SCCS entry, I thought that went w/o saying.... The points were that if doing a readdir(3) in the tree for config files, it would not be a bad idea to ignore directories and that each arch should have arch-specific make help support (the cited example was that ppc64 lacked it even though ppc had some). -JimC ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-22 9:50 ` Sam Ravnborg 2004-02-22 14:28 ` James H. Cloos Jr. @ 2004-02-24 21:55 ` Tom Rini 2004-02-25 19:00 ` Sam Ravnborg 1 sibling, 1 reply; 11+ messages in thread From: Tom Rini @ 2004-02-24 21:55 UTC (permalink / raw) To: James H. Cloos Jr., linux-kernel On Sun, Feb 22, 2004 at 10:50:21AM +0100, Sam Ravnborg wrote: > On Sat, Feb 21, 2004 at 09:26:41AM -0500, James H. Cloos Jr. wrote: > > I was looking at the arch-specific make options for various archs, > > and found this bit of fun: > > > > :; make help ARCH=sh > > [elided] > > Architecture specific targets (sh): > > zImage - Compressed kernel image (arch/sh/boot/zImage) > > SCCS - Build for arch/sh/configs/SCCS > > defconfig-adx - Build for adx > > defconfig-cqreek - Build for cqreek > > defconfig-dreamcast - Build for dreamcast > > defconfig-hp680 - Build for hp680 > > defconfig-se7751 - Build for se7751 > > defconfig-snapgear - Build for snapgear > > defconfig-systemh - Build for systemh > > [elided] > > > > The defconfig options only show up after a bk get in arch/sh/configs/. > The sh people have decided to create the list based on the content of the directory. > Therefore you see the SCCS entry, and that's why you need to do a 'bk bet'. > In general you cannot expect the konfig and build system to work 100% if there is > random files missing in the tree. Those files bk can checkout automatically is > more by luck - and no effort has been put into making this a trustworthy way > to do it. Hmm. Would something (untested) like the following be horribly wrong/bad? define archhelp @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' @if [ -d arch/$(ARCH)/configs/SCCS ]; then bk get -q arch/$(ARCH)/configs/;fi # Assume board_defconfig for board in arch/$(ARCH)/configs/*defconfig; \ do \ echo -n ' ' $$board | sed -e 's|arch/$(ARCH)/configs/||g' ; \ echo -n ' - Build for ' ; \ echo -e $$board | sed -e 's|.*_||g'; \ done endef I kinda like the idea of documenting the various defconfig targets, in make help, so maybe even adding that to the normal help section iff arch/$(ARCH)/configs exists... Thoughts? -- Tom Rini http://gate.crashing.org/~trini/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-24 21:55 ` Tom Rini @ 2004-02-25 19:00 ` Sam Ravnborg 2004-02-25 18:08 ` Tom Rini 0 siblings, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2004-02-25 19:00 UTC (permalink / raw) To: Tom Rini; +Cc: James H. Cloos Jr., linux-kernel > > Hmm. Would something (untested) like the following be horribly > wrong/bad? > > define archhelp > @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' > @if [ -d arch/$(ARCH)/configs/SCCS ]; then bk get -q arch/$(ARCH)/configs/;fi > # Assume board_defconfig > for board in arch/$(ARCH)/configs/*defconfig; \ > do \ > echo -n ' ' $$board | sed -e 's|arch/$(ARCH)/configs/||g' ; \ > echo -n ' - Build for ' ; \ > echo -e $$board | sed -e 's|.*_||g'; \ > done > endef I do not want kbuild to be cluttered with bk specific stuff. Also the "- Build for xxxxx" is not good enough. I will try to come up with a patch the uses a file named arch/$(ARCH)/configs/index.txt to actually display the help text. Gim'me a few hours. Sam ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 19:00 ` Sam Ravnborg @ 2004-02-25 18:08 ` Tom Rini 2004-02-25 18:30 ` Paul Mundt 2004-02-25 20:39 ` Sam Ravnborg 0 siblings, 2 replies; 11+ messages in thread From: Tom Rini @ 2004-02-25 18:08 UTC (permalink / raw) To: James H. Cloos Jr., linux-kernel On Wed, Feb 25, 2004 at 08:00:49PM +0100, Sam Ravnborg wrote: > > > > Hmm. Would something (untested) like the following be horribly > > wrong/bad? > > > > define archhelp > > @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' > > @if [ -d arch/$(ARCH)/configs/SCCS ]; then bk get -q arch/$(ARCH)/configs/;fi > > # Assume board_defconfig > > for board in arch/$(ARCH)/configs/*defconfig; \ > > do \ > > echo -n ' ' $$board | sed -e 's|arch/$(ARCH)/configs/||g' ; \ > > echo -n ' - Build for ' ; \ > > echo -e $$board | sed -e 's|.*_||g'; \ > > done > > endef > > I do not want kbuild to be cluttered with bk specific stuff. I can understand that. How about: for board in arch/$(ARCH)/configs/*defconfig; \ do \ if [ -f $board ]; then ... fi done > Also the "- Build for xxxxx" is not good enough. Erm, it's usually something descriptive enough, if one is firmiliar with the platform / what's intended to build. > I will try to come up with a patch the uses a file named > arch/$(ARCH)/configs/index.txt The 'issue' with configs/index.txt, I'll wager, is that for every new board, that's one more file to modify (and thus possibly conflict on). -- Tom Rini http://gate.crashing.org/~trini/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 18:08 ` Tom Rini @ 2004-02-25 18:30 ` Paul Mundt 2004-02-25 18:39 ` Tom Rini 2004-02-25 20:39 ` Sam Ravnborg 1 sibling, 1 reply; 11+ messages in thread From: Paul Mundt @ 2004-02-25 18:30 UTC (permalink / raw) To: Tom Rini; +Cc: James H. Cloos Jr., linux-kernel [-- Attachment #1: Type: text/plain, Size: 1158 bytes --] On Wed, Feb 25, 2004 at 11:08:59AM -0700, Tom Rini wrote: > I can understand that. How about: > for board in arch/$(ARCH)/configs/*defconfig; \ > do \ > if [ -f $board ]; then > ... > fi > done > Simply just matching on *defconfig should be fine. I already changed this on matching defconfig-* for sh to get around matching SCCS. > > Also the "- Build for xxxxx" is not good enough. > > Erm, it's usually something descriptive enough, if one is firmiliar with > the platform / what's intended to build. > > > I will try to come up with a patch the uses a file named > > arch/$(ARCH)/configs/index.txt > > The 'issue' with configs/index.txt, I'll wager, is that for every new > board, that's one more file to modify (and thus possibly conflict on). > Agreed. The whole reason I did the automated "- Build for foo" thing is that it's completely automated, and people building should already know what their target is (if not, they can look at arch/$(ARCH)/Kconfig and figure it out). I suppose it's not particularly descriptive, but it seems more sensible to have an abbreviated help text then none whatsoever. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 18:30 ` Paul Mundt @ 2004-02-25 18:39 ` Tom Rini 2004-02-25 18:44 ` Paul Mundt 0 siblings, 1 reply; 11+ messages in thread From: Tom Rini @ 2004-02-25 18:39 UTC (permalink / raw) To: Paul Mundt, James H. Cloos Jr., linux-kernel On Wed, Feb 25, 2004 at 01:30:38PM -0500, Paul Mundt wrote: > On Wed, Feb 25, 2004 at 11:08:59AM -0700, Tom Rini wrote: > > I can understand that. How about: > > for board in arch/$(ARCH)/configs/*defconfig; \ > > do \ > > if [ -f $board ]; then > > ... > > fi > > done > > > Simply just matching on *defconfig should be fine. I already changed this on > matching defconfig-* for sh to get around matching SCCS. Would you mind changing to foo_defconfig from defconfig-foo ? Then you get the make foo_defconfig rule for free. -- Tom Rini http://gate.crashing.org/~trini/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 18:39 ` Tom Rini @ 2004-02-25 18:44 ` Paul Mundt 0 siblings, 0 replies; 11+ messages in thread From: Paul Mundt @ 2004-02-25 18:44 UTC (permalink / raw) To: Tom Rini; +Cc: James H. Cloos Jr., linux-kernel [-- Attachment #1: Type: text/plain, Size: 499 bytes --] On Wed, Feb 25, 2004 at 11:39:34AM -0700, Tom Rini wrote: > > Simply just matching on *defconfig should be fine. I already changed this on > > matching defconfig-* for sh to get around matching SCCS. > > Would you mind changing to foo_defconfig from defconfig-foo ? Then you > get the make foo_defconfig rule for free. > Yes, I plan on doing this in the next sh update. I did the defconfig-foo stuff before foo_defconfig existed, that's the only reason it's different at this point.. [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 18:08 ` Tom Rini 2004-02-25 18:30 ` Paul Mundt @ 2004-02-25 20:39 ` Sam Ravnborg 2004-02-25 19:45 ` Tom Rini 1 sibling, 1 reply; 11+ messages in thread From: Sam Ravnborg @ 2004-02-25 20:39 UTC (permalink / raw) To: Tom Rini; +Cc: James H. Cloos Jr., linux-kernel > > > I will try to come up with a patch the uses a file named > > arch/$(ARCH)/configs/index.txt > > The 'issue' with configs/index.txt, I'll wager, is that for every new > board, that's one more file to modify (and thus possibly conflict on). What about the following patch. This adds the support to the top-level Makefile, enabling this for all _defconfig users. I used 'printf' to get proper alignment. Otherwise arm for example looked really ugly. Is printf generally supported? Sam ===== Makefile 1.456 vs edited ===== --- 1.456/Makefile Sun Feb 15 03:42:40 2004 +++ edited/Makefile Wed Feb 25 21:34:34 2004 @@ -889,6 +889,9 @@ # Brief documentation of the typical targets used # --------------------------------------------------------------------------- +boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) +boards := $(notdir $(boards)) + help: @echo 'Cleaning targets:' @echo ' clean - remove most generated files but keep the config' @@ -914,6 +917,11 @@ @$(if $(archhelp),$(archhelp),\ echo ' No architecture specific help defined for $(ARCH)') @echo '' + @$(if $(boards), \ + $(foreach b, $(boards), \ + printf " %24s - Build for %s\\n" $(b) $(b);) \ + echo '') + @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' @echo ' make O=dir [targets] Locate all output files in "dir", including .config' @echo ' make C=1 [targets] Check all c source with checker tool' ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: make help ARCH=xx fun 2004-02-25 20:39 ` Sam Ravnborg @ 2004-02-25 19:45 ` Tom Rini 0 siblings, 0 replies; 11+ messages in thread From: Tom Rini @ 2004-02-25 19:45 UTC (permalink / raw) To: James H. Cloos Jr., linux-kernel On Wed, Feb 25, 2004 at 09:39:27PM +0100, Sam Ravnborg wrote: > > > > > I will try to come up with a patch the uses a file named > > > arch/$(ARCH)/configs/index.txt > > > > The 'issue' with configs/index.txt, I'll wager, is that for every new > > board, that's one more file to modify (and thus possibly conflict on). > > What about the following patch. > This adds the support to the top-level Makefile, enabling this for all > _defconfig users. > I used 'printf' to get proper alignment. Otherwise arm for example > looked really ugly. Looks quite good, thanks. > Is printf generally supported? It's part of coreutils on debian (and shellutils on others), so I'll wager a yes. -- Tom Rini http://gate.crashing.org/~trini/ ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2004-02-25 19:45 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2004-02-21 14:26 make help ARCH=xx fun James H. Cloos Jr. 2004-02-22 9:50 ` Sam Ravnborg 2004-02-22 14:28 ` James H. Cloos Jr. 2004-02-24 21:55 ` Tom Rini 2004-02-25 19:00 ` Sam Ravnborg 2004-02-25 18:08 ` Tom Rini 2004-02-25 18:30 ` Paul Mundt 2004-02-25 18:39 ` Tom Rini 2004-02-25 18:44 ` Paul Mundt 2004-02-25 20:39 ` Sam Ravnborg 2004-02-25 19:45 ` Tom Rini
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.