mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: liqin.chen@sunplusct.com
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	torvalds@linux-foundation.org
Subject: Re: [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
Date: Tue, 9 Jun 2009 21:12:26 +0200	[thread overview]
Message-ID: <20090609191226.GB7181@uranus.ravnborg.org> (raw)
In-Reply-To: <OF2086513E.4B4F803C-ON482575D0.0022E294-482575D0.0023688F@sunplusct.com>

Some comments below.
Mostly nitpicking.

	Sam

> +
> +config GENERIC_IOMAP
> +       bool
> +       default y

The preference these days is the shorter:
config GENERIC_IOMAP
	def_bool y

Note that default for bool is n,
so a standalone "bool" is the same as "def_bool n".


This comment applies to all symbols
listed below this one.

> +config EARLY_PRINTK
> +       bool "Early printk" if EMBEDDED
> +       depends on SYS_HAS_EARLY_PRINTK

Arnd already commented on your "select EMBEDDED".
We usually hide "expert only" options behind EMBEDDED.

Do you really consider EARLY_PRINTK an expert only option?

> +config PAGE_SIZE_4KB
> +       bool
> +       default y

I see no need for this symbol unless you plan to support other
page sizes. "PAGE_SIZE_4KB" is not used outside arch/*


> diff --git a/arch/score/Makefile b/arch/score/Makefile
> new file mode 100644
> index 0000000..b86ec22
> --- /dev/null
> +++ b/arch/score/Makefile
> @@ -0,0 +1,50 @@
> +#
> +# arch/score/Makefile
> +#
> +# This file is subject to the terms and conditions of the GNU General 
> Public
> +# License.  See the file "COPYING" in the main directory of this archive
> +# for more details.
> +#
> +
> +KBUILD_DEFCONFIG := spct6600_defconfig
> +CROSS_COMPILE := score-linux-

This is a bit brutal to always assume a specific CROSS_COMPILE setting.
Consider using cc-cross-prefix - see arch/m68k/Makefile +
Documentation/kbuild/makefiles.txt


> +
> +#
> +# CPU-dependent compiler/assembler options for optimization.
> +#
> +cflags-y += -g -O2 -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \
> +       -D__linux__ -ffunction-sections -ffreestanding

-g is picked up using a kernel option (CONFIG_DEBUG_ something).
Do not hard code it.

-O2 setting likewise - CONFIG_CC_OPTIMIZE_FOR_SIZE
-G0 ??
-ffunction-sections - Does this really work for you?
                      We have potential conflicts with
                      hardcoded section names.


> +#
> +# Board-dependent options and extra files
> +#
> +KBUILD_AFLAGS += $(cflags-y)
> +KBUILD_CFLAGS += $(cflags-y)
> +MODFLAGS += -mlong-calls

Grepping it is a mess how we do this today.
So MODFLAGS usage is as good as the other ways we do this.
I may clean this up one day.

> +LDFLAGS += --oformat elf32-littlescore
> +LDFLAGS_vmlinux        += -G0 -static -nostdlib

> +CLEAN_FILES += arch/score/kernel/vmlinux.lds
This is not needed.

> +
> +#
> +# Choosing incompatible machines durings configuration will result in
> +# error messages during linking.  Select a default linkscript if
> +# none has been choosen above.
> +#
Bogus comment?

> +
> +head-y := arch/score/kernel/head.o
> +libs-y += arch/score/lib/
> +core-y += arch/score/kernel/ arch/score/mm/
> +
> +boot := arch/score/boot
> +
> +vmlinux.bin: vmlinux
> +       $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
> +
> +archclean:
> +       @$(MAKE) $(clean)=$(boot)
> +
> +define archhelp
> +       echo '  vmlinux.bin          - Raw binary boot image'
> +       echo
> +       echo '  These will be default as apropriate for a configured 
> platform.'
> +endef

	Sam

  parent reply	other threads:[~2009-06-09 19:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-09  6:22 liqin.chen
2009-06-09 16:47 ` Arnd Bergmann
2009-06-09 19:12 ` Sam Ravnborg [this message]
2009-06-13 22:44 ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090609191226.GB7181@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liqin.chen@sunplusct.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®