All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
@ 2009-06-09  6:22 ` liqin.chen
  0 siblings, 0 replies; 5+ messages in thread
From: liqin.chen @ 2009-06-09  6:22 UTC (permalink / raw)
  To: linux-arch, linux-kernel; +Cc: Arnd Bergmann, Andrew Morton, torvalds

>From 8737362d631454e26c559188fef4db5a0192ed24 Mon Sep 17 00:00:00 2001
From: Chen Liqin <liqin.chen@sunplusct.com>
Date: Tue, 9 Jun 2009 13:43:04 +0800


Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
---
 arch/score/Kconfig       |  243 
++++++++++++++++++++++++++++++++++++++++++++++
 arch/score/Kconfig.debug |   37 +++++++
 arch/score/Makefile      |   50 ++++++++++
 3 files changed, 330 insertions(+), 0 deletions(-)
 create mode 100644 arch/score/Kconfig
 create mode 100644 arch/score/Kconfig.debug
 create mode 100644 arch/score/Makefile

diff --git a/arch/score/Kconfig b/arch/score/Kconfig
new file mode 100644
index 0000000..9e09b6a
--- /dev/null
+++ b/arch/score/Kconfig
@@ -0,0 +1,243 @@
+config SCORE
+       bool
+       default y
+       select EMBEDDED
+
+mainmenu "Linux/SCORE Kernel Configuration"
+
+menu "Machine selection"
+
+choice
+       prompt "System type"
+       default MACH_SPCT6600
+
+config ARCH_SCORE7
+       bool "SCORE7 processor"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+
+config MACH_SPCT6600
+       bool "SPCT6600 series based machines"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+
+config SCORE_SIM
+       bool "Score simulator"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+endchoice
+
+endmenu
+
+config CPU_SCORE7
+       bool
+
+config GENERIC_IOMAP
+       bool
+       default y
+
+config NO_DMA
+       bool
+       default y
+
+config RWSEM_GENERIC_SPINLOCK
+       bool
+       default y
+
+config GENERIC_FIND_NEXT_BIT
+       bool
+       default y
+
+config GENERIC_HWEIGHT
+       bool
+       default y
+
+config GENERIC_CALIBRATE_DELAY
+       bool
+       default y
+
+config GENERIC_CLOCKEVENTS
+       bool
+       default y
+
+config GENERIC_TIME
+       bool
+       default y
+
+config SCHED_NO_NO_OMIT_FRAME_POINTER
+       bool
+       default y
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       bool
+       default y
+
+config GENERIC_SYSCALL_TABLE
+       bool
+       def_bool y
+
+config EARLY_PRINTK
+       bool "Early printk" if EMBEDDED
+       depends on SYS_HAS_EARLY_PRINTK
+       default y
+       help
+         This option enables special console drivers which allow the 
kernel
+         to print messages very early in the bootup process.
+
+         This is useful for kernel debugging when your machine crashes 
very
+         early before the console code is initialized. For normal 
operation,
+         it is not recommended because it looks ugly on some machines and
+         doesn't cooperate with an X server. You should normally say N 
here,
+         unless you want to debug such a crash.
+
+config SYS_HAS_EARLY_PRINTK
+       bool
+
+config SCORE_L1_CACHE_SHIFT
+       int
+       default "5"
+
+menu "Kernel type"
+
+config 32BIT
+       bool
+       default y
+
+config PAGE_SIZE_4KB
+       bool
+       default y
+
+config GENERIC_HARDIRQS
+       bool
+       default y
+
+config ARCH_FLATMEM_ENABLE
+       bool
+       default y
+
+config ARCH_POPULATES_NODE_MAP
+       bool
+       default y
+
+source "mm/Kconfig"
+
+config MEMORY_START
+       hex
+       default 0xa0000000
+
+source "kernel/time/Kconfig"
+
+config HZ
+       int
+       default 100
+
+source "kernel/Kconfig.preempt"
+
+config KEXEC
+       bool "Kexec system call (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+         kexec is a system call that implements the ability to shutdown 
your
+         current kernel, and to start another kernel.  It is like a 
reboot
+         but it is independent of the system firmware.   And like a 
reboot
+         you can start any kernel with it, not just Linux.
+
+         The name comes from the similarity to the exec system call.
+
+         It is an ongoing process to be certain the hardware in a machine
+         is properly shutdown, so do not be surprised if this code does 
not
+         initially work for you.  It may help to enable device 
hotplugging
+         support.  As of this writing the exact hardware interface is
+         strongly in flux, so no good recommendation can be made.
+
+config SECCOMP
+       bool "Enable seccomp to safely compute untrusted bytecode"
+       depends on PROC_FS
+       default y
+       help
+         This kernel feature is useful for number crunching applications
+         that may need to compute untrusted bytecode during their
+         execution. By using pipes or other transports made available to
+         the process as file descriptors supporting the read/write
+         syscalls, it's possible to isolate those applications in
+         their own address space using seccomp. Once seccomp is
+         enabled via /proc/<pid>/seccomp, it cannot be disabled
+         and the task is only allowed to execute a few safe syscalls
+         defined by each seccomp mode.
+
+         If unsure, say Y. Only embedded should say N here.
+
+endmenu
+
+config RWSEM_GENERIC_SPINLOCK
+       bool
+       default y
+
+config LOCKDEP_SUPPORT
+       bool
+       default y
+
+config STACKTRACE_SUPPORT
+       bool
+       default y
+
+source "init/Kconfig"
+
+config PROBE_INITRD_HEADER
+       bool "Probe initrd header created by addinitrd"
+       depends on BLK_DEV_INITRD
+       help
+         Probe initrd header at the last page of kernel image.
+         Say Y here if you are using arch/score/boot/addinitrd.c to
+         add initrd or initramfs image to the kernel image.
+         Otherwise, say N.
+
+menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
+
+config MMU
+       bool
+       default y
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/pci/hotplug/Kconfig"
+
+endmenu
+
+menu "Executable file formats"
+
+source "fs/Kconfig.binfmt"
+
+config SYSVIPC_COMPAT
+       bool
+       depends on COMPAT && SYSVIPC
+       default y
+
+endmenu
+
+menu "Power management options"
+
+config ARCH_SUSPEND_POSSIBLE
+       def_bool y
+       depends on !SMP
+
+source "kernel/power/Kconfig"
+
+endmenu
+
+source "net/Kconfig"
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+source "arch/score/Kconfig.debug"
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
diff --git a/arch/score/Kconfig.debug b/arch/score/Kconfig.debug
new file mode 100644
index 0000000..451ed54
--- /dev/null
+++ b/arch/score/Kconfig.debug
@@ -0,0 +1,37 @@
+menu "Kernel hacking"
+
+config TRACE_IRQFLAGS_SUPPORT
+       bool
+       default y
+
+source "lib/Kconfig.debug"
+
+config CMDLINE
+       string "Default kernel command string"
+       default ""
+       help
+         On some platforms, there is currently no way for the boot loader 
to
+         pass arguments to the kernel. For these platforms, you can 
supply
+         some command-line options at build time by entering them here. 
In
+         other cases you can specify kernel args so that you don't have
+         to set them up in board prom initialization routines.
+
+config DEBUG_STACK_USAGE
+       bool "Enable stack utilization instrumentation"
+       depends on DEBUG_KERNEL
+       help
+         Enables the display of the minimum amount of free stack which 
each
+         task has ever had available in the sysrq-T and sysrq-P debug 
output.
+
+         This option will slow down process creation somewhat.
+
+config RUNTIME_DEBUG
+       bool "Enable run-time debugging"
+       depends on DEBUG_KERNEL
+       help
+         If you say Y here, some debugging macros will do run-time 
checking.
+         If you say N here, those macros will mostly turn to no-ops.  See
+         include/asm-score/debug.h for debuging macros.
+         If unsure, say N.
+
+endmenu
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-
+
+#
+# CPU-dependent compiler/assembler options for optimization.
+#
+cflags-y += -g -O2 -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \
+       -D__linux__ -ffunction-sections -ffreestanding
+
+#
+# Board-dependent options and extra files
+#
+KBUILD_AFLAGS += $(cflags-y)
+KBUILD_CFLAGS += $(cflags-y)
+MODFLAGS += -mlong-calls
+LDFLAGS += --oformat elf32-littlescore
+LDFLAGS_vmlinux        += -G0 -static -nostdlib
+CLEAN_FILES += arch/score/kernel/vmlinux.lds
+
+#
+# Choosing incompatible machines durings configuration will result in
+# error messages during linking.  Select a default linkscript if
+# none has been choosen above.
+#
+
+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
-- 
1.6.2


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

* [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
@ 2009-06-09  6:22 ` liqin.chen
  0 siblings, 0 replies; 5+ messages in thread
From: liqin.chen @ 2009-06-09  6:22 UTC (permalink / raw)
  To: linux-arch, linux-kernel; +Cc: Arnd Bergmann, Andrew Morton, torvalds

From 8737362d631454e26c559188fef4db5a0192ed24 Mon Sep 17 00:00:00 2001
From: Chen Liqin <liqin.chen@sunplusct.com>
Date: Tue, 9 Jun 2009 13:43:04 +0800


Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com>
---
 arch/score/Kconfig       |  243 
++++++++++++++++++++++++++++++++++++++++++++++
 arch/score/Kconfig.debug |   37 +++++++
 arch/score/Makefile      |   50 ++++++++++
 3 files changed, 330 insertions(+), 0 deletions(-)
 create mode 100644 arch/score/Kconfig
 create mode 100644 arch/score/Kconfig.debug
 create mode 100644 arch/score/Makefile

diff --git a/arch/score/Kconfig b/arch/score/Kconfig
new file mode 100644
index 0000000..9e09b6a
--- /dev/null
+++ b/arch/score/Kconfig
@@ -0,0 +1,243 @@
+config SCORE
+       bool
+       default y
+       select EMBEDDED
+
+mainmenu "Linux/SCORE Kernel Configuration"
+
+menu "Machine selection"
+
+choice
+       prompt "System type"
+       default MACH_SPCT6600
+
+config ARCH_SCORE7
+       bool "SCORE7 processor"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+
+config MACH_SPCT6600
+       bool "SPCT6600 series based machines"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+
+config SCORE_SIM
+       bool "Score simulator"
+       select SYS_SUPPORTS_32BIT_KERNEL
+       select CPU_SCORE7
+       select GENERIC_HAS_IOMAP
+endchoice
+
+endmenu
+
+config CPU_SCORE7
+       bool
+
+config GENERIC_IOMAP
+       bool
+       default y
+
+config NO_DMA
+       bool
+       default y
+
+config RWSEM_GENERIC_SPINLOCK
+       bool
+       default y
+
+config GENERIC_FIND_NEXT_BIT
+       bool
+       default y
+
+config GENERIC_HWEIGHT
+       bool
+       default y
+
+config GENERIC_CALIBRATE_DELAY
+       bool
+       default y
+
+config GENERIC_CLOCKEVENTS
+       bool
+       default y
+
+config GENERIC_TIME
+       bool
+       default y
+
+config SCHED_NO_NO_OMIT_FRAME_POINTER
+       bool
+       default y
+
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       bool
+       default y
+
+config GENERIC_SYSCALL_TABLE
+       bool
+       def_bool y
+
+config EARLY_PRINTK
+       bool "Early printk" if EMBEDDED
+       depends on SYS_HAS_EARLY_PRINTK
+       default y
+       help
+         This option enables special console drivers which allow the 
kernel
+         to print messages very early in the bootup process.
+
+         This is useful for kernel debugging when your machine crashes 
very
+         early before the console code is initialized. For normal 
operation,
+         it is not recommended because it looks ugly on some machines and
+         doesn't cooperate with an X server. You should normally say N 
here,
+         unless you want to debug such a crash.
+
+config SYS_HAS_EARLY_PRINTK
+       bool
+
+config SCORE_L1_CACHE_SHIFT
+       int
+       default "5"
+
+menu "Kernel type"
+
+config 32BIT
+       bool
+       default y
+
+config PAGE_SIZE_4KB
+       bool
+       default y
+
+config GENERIC_HARDIRQS
+       bool
+       default y
+
+config ARCH_FLATMEM_ENABLE
+       bool
+       default y
+
+config ARCH_POPULATES_NODE_MAP
+       bool
+       default y
+
+source "mm/Kconfig"
+
+config MEMORY_START
+       hex
+       default 0xa0000000
+
+source "kernel/time/Kconfig"
+
+config HZ
+       int
+       default 100
+
+source "kernel/Kconfig.preempt"
+
+config KEXEC
+       bool "Kexec system call (EXPERIMENTAL)"
+       depends on EXPERIMENTAL
+       help
+         kexec is a system call that implements the ability to shutdown 
your
+         current kernel, and to start another kernel.  It is like a 
reboot
+         but it is independent of the system firmware.   And like a 
reboot
+         you can start any kernel with it, not just Linux.
+
+         The name comes from the similarity to the exec system call.
+
+         It is an ongoing process to be certain the hardware in a machine
+         is properly shutdown, so do not be surprised if this code does 
not
+         initially work for you.  It may help to enable device 
hotplugging
+         support.  As of this writing the exact hardware interface is
+         strongly in flux, so no good recommendation can be made.
+
+config SECCOMP
+       bool "Enable seccomp to safely compute untrusted bytecode"
+       depends on PROC_FS
+       default y
+       help
+         This kernel feature is useful for number crunching applications
+         that may need to compute untrusted bytecode during their
+         execution. By using pipes or other transports made available to
+         the process as file descriptors supporting the read/write
+         syscalls, it's possible to isolate those applications in
+         their own address space using seccomp. Once seccomp is
+         enabled via /proc/<pid>/seccomp, it cannot be disabled
+         and the task is only allowed to execute a few safe syscalls
+         defined by each seccomp mode.
+
+         If unsure, say Y. Only embedded should say N here.
+
+endmenu
+
+config RWSEM_GENERIC_SPINLOCK
+       bool
+       default y
+
+config LOCKDEP_SUPPORT
+       bool
+       default y
+
+config STACKTRACE_SUPPORT
+       bool
+       default y
+
+source "init/Kconfig"
+
+config PROBE_INITRD_HEADER
+       bool "Probe initrd header created by addinitrd"
+       depends on BLK_DEV_INITRD
+       help
+         Probe initrd header at the last page of kernel image.
+         Say Y here if you are using arch/score/boot/addinitrd.c to
+         add initrd or initramfs image to the kernel image.
+         Otherwise, say N.
+
+menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
+
+config MMU
+       bool
+       default y
+
+source "drivers/pcmcia/Kconfig"
+
+source "drivers/pci/hotplug/Kconfig"
+
+endmenu
+
+menu "Executable file formats"
+
+source "fs/Kconfig.binfmt"
+
+config SYSVIPC_COMPAT
+       bool
+       depends on COMPAT && SYSVIPC
+       default y
+
+endmenu
+
+menu "Power management options"
+
+config ARCH_SUSPEND_POSSIBLE
+       def_bool y
+       depends on !SMP
+
+source "kernel/power/Kconfig"
+
+endmenu
+
+source "net/Kconfig"
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+source "arch/score/Kconfig.debug"
+
+source "security/Kconfig"
+
+source "crypto/Kconfig"
+
+source "lib/Kconfig"
diff --git a/arch/score/Kconfig.debug b/arch/score/Kconfig.debug
new file mode 100644
index 0000000..451ed54
--- /dev/null
+++ b/arch/score/Kconfig.debug
@@ -0,0 +1,37 @@
+menu "Kernel hacking"
+
+config TRACE_IRQFLAGS_SUPPORT
+       bool
+       default y
+
+source "lib/Kconfig.debug"
+
+config CMDLINE
+       string "Default kernel command string"
+       default ""
+       help
+         On some platforms, there is currently no way for the boot loader 
to
+         pass arguments to the kernel. For these platforms, you can 
supply
+         some command-line options at build time by entering them here. 
In
+         other cases you can specify kernel args so that you don't have
+         to set them up in board prom initialization routines.
+
+config DEBUG_STACK_USAGE
+       bool "Enable stack utilization instrumentation"
+       depends on DEBUG_KERNEL
+       help
+         Enables the display of the minimum amount of free stack which 
each
+         task has ever had available in the sysrq-T and sysrq-P debug 
output.
+
+         This option will slow down process creation somewhat.
+
+config RUNTIME_DEBUG
+       bool "Enable run-time debugging"
+       depends on DEBUG_KERNEL
+       help
+         If you say Y here, some debugging macros will do run-time 
checking.
+         If you say N here, those macros will mostly turn to no-ops.  See
+         include/asm-score/debug.h for debuging macros.
+         If unsure, say N.
+
+endmenu
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-
+
+#
+# CPU-dependent compiler/assembler options for optimization.
+#
+cflags-y += -g -O2 -G0 -pipe -mel -mnhwloop -D__SCOREEL__ \
+       -D__linux__ -ffunction-sections -ffreestanding
+
+#
+# Board-dependent options and extra files
+#
+KBUILD_AFLAGS += $(cflags-y)
+KBUILD_CFLAGS += $(cflags-y)
+MODFLAGS += -mlong-calls
+LDFLAGS += --oformat elf32-littlescore
+LDFLAGS_vmlinux        += -G0 -static -nostdlib
+CLEAN_FILES += arch/score/kernel/vmlinux.lds
+
+#
+# Choosing incompatible machines durings configuration will result in
+# error messages during linking.  Select a default linkscript if
+# none has been choosen above.
+#
+
+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
-- 
1.6.2

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

* Re: [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
  2009-06-09  6:22 ` liqin.chen
  (?)
@ 2009-06-09 16:47 ` Arnd Bergmann
  -1 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2009-06-09 16:47 UTC (permalink / raw)
  To: liqin.chen; +Cc: linux-arch, linux-kernel, Andrew Morton, torvalds

On Tuesday 09 June 2009, liqin.chen@sunplusct.com wrote:

> +++ b/arch/score/Kconfig
> @@ -0,0 +1,243 @@
> +config SCORE
> +       bool
> +       default y
> +       select EMBEDDED

I don't think you should select EMBEDDED. The option is slightly
misnamed and just enables some other config options. If you need
any of those that are protected by EMBEDDED, then maybe select those
directly.

> +config NO_DMA
> +       bool
> +       default y

Are you planning to implement DMA support? We just had a lenghty
discussion about how to do it generically. While we did not find
a solution, you can probably easily take the
asm-generic/dma-mapping-linear.h I posted and adapt that to your
needs.

> +config SCORE_L1_CACHE_SHIFT
> +       int
> +       default "5"

Your arch/score/include/asm/cache.h contains

#define L1_CACHE_SHIFT         4

One of the two looks wrong ;-)

If you have different cache implementations, this value
should probably be the maximum of all CPUs that are configured
in the kernel.

> +config HZ
> +       int
> +       default 100

Have you looked into implementing NO_HZ? It is not required in any
way, but can probably reduce your power consumption, which may be
interesting for embedded systems.

> +config KEXEC
> +       bool "Kexec system call (EXPERIMENTAL)"
> +       depends on EXPERIMENTAL
> +       help

Do you actually support this? I did not look very closely,
but could not find anything about kexec in the other patches.
If not, just drop the config option.

	Arnd <><

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

* Re: [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
  2009-06-09  6:22 ` liqin.chen
  (?)
  (?)
@ 2009-06-09 19:12 ` Sam Ravnborg
  -1 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2009-06-09 19:12 UTC (permalink / raw)
  To: liqin.chen
  Cc: linux-arch, linux-kernel, Arnd Bergmann, Andrew Morton, torvalds

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

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

* Re: [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile
  2009-06-09  6:22 ` liqin.chen
                   ` (2 preceding siblings ...)
  (?)
@ 2009-06-13 22:44 ` Arnd Bergmann
  -1 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2009-06-13 22:44 UTC (permalink / raw)
  To: liqin.chen; +Cc: linux-arch, linux-kernel, Andrew Morton, torvalds

On Tuesday 09 June 2009, liqin.chen@sunplusct.com wrote:
> +
> +config MMU
> +       bool
> +       default y
> +

After reading through the code again, I came across this defintion, which
confused me a bit. The source code clearly assumes a NOMMU architecture, but
this one enables the kernel support for MMU.

Is MMU support something that you plan to add later and is possible with
the hardware, or is this one wrong?

	Arnd <><

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

end of thread, other threads:[~2009-06-13 22:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-09  6:22 [PATCH 01/27] score: create Kconfig Kconfig.debug Makefile liqin.chen
2009-06-09  6:22 ` liqin.chen
2009-06-09 16:47 ` Arnd Bergmann
2009-06-09 19:12 ` Sam Ravnborg
2009-06-13 22:44 ` Arnd Bergmann

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.