linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SH Port - Makefile
@ 2003-06-14 19:30 Sam Ravnborg
  2003-06-14 19:45 ` Paul Mundt
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2003-06-14 19:30 UTC (permalink / raw)
  To: lethal; +Cc: linux-kernel

Hi Lethal.

Browsing the changes for SH - which mostly look really good - a few
questions popped up:

>From arch/sh/Makefile:
# We don't necessarily agree with the top-level Makefile with regards to what
# does and does not qualify as a noconfig_targets rule. In this case, we're
# still dependant on .config settings in order for core-y (machdir-y in
# particular) to resolve the proper directory. So we just manually include it
# if it hasn't been already..
#
ifndef include_config
-include .config
endif

Could you elaborate a bit more about this.
I cannot see why core-y is really needed for any noconfig_targets.
Note that "make clean" do not need to descend in all directories to
delete .o files, a find is used for that.


target_links
Will it be possible for SH to implement the scheme used for i386 instead.
We have one symlink today, and I like to keep it down on that level.

arch/sh/tools
Something not yet merged?

BOOTIMAGE
No need to define a variable and then only use it once.

	Sam

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

* Re: SH Port - Makefile
  2003-06-14 19:30 SH Port - Makefile Sam Ravnborg
@ 2003-06-14 19:45 ` Paul Mundt
  2003-06-14 20:07   ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Mundt @ 2003-06-14 19:45 UTC (permalink / raw)
  To: linux-kernel

On Sat, Jun 14, 2003 at 09:30:55PM +0200, Sam Ravnborg wrote:
> From arch/sh/Makefile:
> # We don't necessarily agree with the top-level Makefile with regards to what
> # does and does not qualify as a noconfig_targets rule. In this case, we're
> # still dependant on .config settings in order for core-y (machdir-y in
> # particular) to resolve the proper directory. So we just manually include it
> # if it hasn't been already..
> #
> ifndef include_config
> -include .config
> endif
> 
> Could you elaborate a bit more about this.
> I cannot see why core-y is really needed for any noconfig_targets.
> Note that "make clean" do not need to descend in all directories to
> delete .o files, a find is used for that.
> 
Okay, the main reason why I needed to do this was so that a make clean
would get the proper directory path. The problem was that machdir-y
wasn't getting the board name correctly since at make clean time the
CONFIG_SH_xxx names weren't being resolved.

Thus, in the case of:

core-y                          += arch/sh/boards/$(machdir-y)/

make clean was only getting arch/sh/boards/, which doesn't have a
Makefile in it, which resulted in an error when doing the clean.

I'll admit I haven't spent much time investigating this further and just
used the .config include as a quick workaround, so if there's a better
solution for this, I'll gladly adopt it.

> 
> target_links
> Will it be possible for SH to implement the scheme used for i386 instead.
> We have one symlink today, and I like to keep it down on that level.
> 
I haven't looked at the i386 code for this yet, I'll look into this.

> arch/sh/tools
> Something not yet merged?
> 
Not merged yet, will be shortly. I just wanted to get the board stuff
out of the way.

> BOOTIMAGE
> No need to define a variable and then only use it once.
> 
Thanks for catching this, I'll clean that up.


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

* Re: SH Port - Makefile
  2003-06-14 19:45 ` Paul Mundt
@ 2003-06-14 20:07   ` Sam Ravnborg
  2003-06-15  4:50     ` Paul Mundt
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2003-06-14 20:07 UTC (permalink / raw)
  To: Paul Mundt; +Cc: linux-kernel

On Sat, Jun 14, 2003 at 02:45:12PM -0500, Paul Mundt wrote:
> Okay, the main reason why I needed to do this was so that a make clean
> would get the proper directory path. The problem was that machdir-y
> wasn't getting the board name correctly since at make clean time the
> CONFIG_SH_xxx names weren't being resolved.

The following should do the trick.
I also rearranged a few things.

Whith respect to removing the framepointer from CFLAGS.
There is already a CONFIG option for that CONFIG_FRAME_POINTER.
It would be much cleaner using that one in combination
with CONFIG_SH_KGDB

	Sam

===== arch/sh/Makefile 1.16 vs edited =====
--- 1.16/arch/sh/Makefile	Sat Jun 14 14:30:11 2003
+++ edited/arch/sh/Makefile	Sat Jun 14 22:03:10 2003
@@ -14,17 +14,6 @@
 # this architecture
 #
 
-#
-# We don't necessarily agree with the top-level Makefile with regards to what
-# does and does not qualify as a noconfig_targets rule. In this case, we're
-# still dependant on .config settings in order for core-y (machdir-y in
-# particular) to resolve the proper directory. So we just manually include it
-# if it hasn't been already..
-# 
-ifndef include_config
--include .config
-endif
-
 cpu-y				:= -mb
 cpu-$(CONFIG_CPU_LITTLE_ENDIAN)	:= -ml
 
@@ -66,24 +55,24 @@
 core-y				+= arch/sh/kernel/ arch/sh/mm/
 
 # Boards
-machdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se/770x
-machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se/7751
-machdir-$(CONFIG_SH_STB1_HARP)			:= harp
-machdir-$(CONFIG_SH_STB1_OVERDRIVE)		:= overdrive
-machdir-$(CONFIG_SH_HP620)			:= hp6xx/hp620
-machdir-$(CONFIG_SH_HP680)			:= hp6xx/hp680
-machdir-$(CONFIG_SH_HP690)			:= hp6xx/hp690
-machdir-$(CONFIG_SH_CQREEK)			:= cqreek
-machdir-$(CONFIG_SH_DMIDA)			:= dmida
-machdir-$(CONFIG_SH_EC3104)			:= ec3104
-machdir-$(CONFIG_SH_SATURN)			:= saturn
-machdir-$(CONFIG_SH_DREAMCAST)			:= dreamcast
-machdir-$(CONFIG_SH_CAT68701)			:= cat68701
-machdir-$(CONFIG_SH_BIGSUR)			:= bigsur
-machdir-$(CONFIG_SH_SH2000)			:= sh2000
-machdir-$(CONFIG_SH_ADX)			:= adx
-machdir-$(CONFIG_SH_MPC1211)			:= mpc1211
-machdir-$(CONFIG_SH_UNKNOWN)			:= unknown
+machdir-$(CONFIG_SH_SOLUTION_ENGINE)		:= se/770x/
+machdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se/7751/
+machdir-$(CONFIG_SH_STB1_HARP)			:= harp/
+machdir-$(CONFIG_SH_STB1_OVERDRIVE)		:= overdrive/
+machdir-$(CONFIG_SH_HP620)			:= hp6xx/hp620/
+machdir-$(CONFIG_SH_HP680)			:= hp6xx/hp680/
+machdir-$(CONFIG_SH_HP690)			:= hp6xx/hp690/
+machdir-$(CONFIG_SH_CQREEK)			:= cqreek/
+machdir-$(CONFIG_SH_DMIDA)			:= dmida/
+machdir-$(CONFIG_SH_EC3104)			:= ec3104/
+machdir-$(CONFIG_SH_SATURN)			:= saturn/
+machdir-$(CONFIG_SH_DREAMCAST)			:= dreamcast/
+machdir-$(CONFIG_SH_CAT68701)			:= cat68701/
+machdir-$(CONFIG_SH_BIGSUR)			:= bigsur/
+machdir-$(CONFIG_SH_SH2000)			:= sh2000/
+machdir-$(CONFIG_SH_ADX)			:= adx/
+machdir-$(CONFIG_SH_MPC1211)			:= mpc1211/
+machdir-$(CONFIG_SH_UNKNOWN)			:= unknown/
 
 incdir-y			:= $(machdir-y)
 
@@ -91,7 +80,7 @@
 incdir-$(CONFIG_SH_7751_SOLUTION_ENGINE)	:= se7751
 incdir-$(CONFIG_SH_HP600)			:= hp6xx
 
-core-y				+= arch/sh/boards/$(machdir-y)/
+core-y				+= arch/sh/boards/$(machdir-y)
 
 # Companion chips
 core-$(CONFIG_HD64461)	+= arch/sh/cchips/hd6446x/hd64461/
@@ -103,7 +92,6 @@
 
 libs-y				+= arch/sh/lib/	$(LIBGCC)
 
-boot := arch/sh/boot
 
 AFLAGS_vmlinux.lds.o := -traditional
 
@@ -119,11 +107,10 @@
 
 	$(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
 
-BOOTIMAGE=arch/sh/boot/zImage
-zImage: vmlinux
-	$(Q)$(MAKE) $(build)=$(boot) $(BOOTIMAGE)
+boot := arch/sh/boot
 
-compressed: zImage
+zImage: vmlinux
+	$(Q)$(MAKE) $(build)=$(boot) arch/sh/boot/zImage
 
 archclean:
 	$(Q)$(MAKE) $(clean)=$(boot)


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

* Re: SH Port - Makefile
  2003-06-14 20:07   ` Sam Ravnborg
@ 2003-06-15  4:50     ` Paul Mundt
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Mundt @ 2003-06-15  4:50 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

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

On Sat, Jun 14, 2003 at 10:07:44PM +0200, Sam Ravnborg wrote:
> On Sat, Jun 14, 2003 at 02:45:12PM -0500, Paul Mundt wrote:
> > Okay, the main reason why I needed to do this was so that a make clean
> > would get the proper directory path. The problem was that machdir-y
> > wasn't getting the board name correctly since at make clean time the
> > CONFIG_SH_xxx names weren't being resolved.
> 
> The following should do the trick.
> I also rearranged a few things.
> 
Unfortunately this still yields the same problem as before when it comes to
resolving machdir-y properly at make clean time:

[lethal@unusual linux-sh-2.5.71]$ make ARCH=sh CROSS_COMPILE=sh-uclibc- clean
scripts/Makefile.clean:10: arch/sh/boards/Makefile: No such file or directory
make[1]: *** No rule to make target `arch/sh/boards/Makefile'.  Stop.
make: *** [_clean_arch/sh/boards] Error 2

At make clean time, .config isn't available properly due to it not being
included since its a noconfig_targets target, which causes the above problem.
This will also happen for the rest of the noconfig_targets, hence the manual
inclusion of .config to fixup the path lookup issue.

Any other suggestions?

> Whith respect to removing the framepointer from CFLAGS.
> There is already a CONFIG option for that CONFIG_FRAME_POINTER.
> It would be much cleaner using that one in combination
> with CONFIG_SH_KGDB
> 
Agreed, I'll add this in. Thanks.


[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

end of thread, other threads:[~2003-06-15  4:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-14 19:30 SH Port - Makefile Sam Ravnborg
2003-06-14 19:45 ` Paul Mundt
2003-06-14 20:07   ` Sam Ravnborg
2003-06-15  4:50     ` Paul Mundt

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).