summaryrefslogtreecommitdiffstats
path: root/arch/h8300
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2015-05-08 10:23:18 -0400
committerYoshinori Sato <ysato@users.sourceforge.jp>2015-06-23 00:35:54 -0400
commit8dbdef22d5a720e66ac3939d4c4f7004ef9dd7b4 (patch)
tree3b85c10115ad7e95be5637cb90457c6ca2c9c0c4 /arch/h8300
parenta71a29de4c2f95563220a472f265f0bd74701d52 (diff)
h8300: Build scripts
h8300's Makefile, Kconfig and memory layout. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Diffstat (limited to 'arch/h8300')
-rw-r--r--arch/h8300/Kconfig77
-rw-r--r--arch/h8300/Kconfig.cpu99
-rw-r--r--arch/h8300/Makefile55
-rw-r--r--arch/h8300/kernel/Makefile19
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S67
5 files changed, 317 insertions, 0 deletions
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
new file mode 100644
index 000000000000..696415e58593
--- /dev/null
+++ b/arch/h8300/Kconfig
@@ -0,0 +1,77 @@
1config H8300
2 def_bool y
3 select GENERIC_ATOMIC64
4 select HAVE_UID16
5 select VIRT_TO_BUS
6 select ARCH_WANT_IPC_PARSE_VERSION
7 select GENERIC_IRQ_SHOW
8 select FRAME_POINTER
9 select GENERIC_CPU_DEVICES
10 select MODULES_USE_ELF_RELA
11 select GENERIC_CLOCKEVENTS
12 select CLKDEV_LOOKUP
13 select COMMON_CLK
14 select ARCH_WANT_FRAME_POINTERS
15 select OF
16 select OF_IRQ
17 select OF_EARLY_FLATTREE
18 select HAVE_MEMBLOCK
19 select HAVE_DMA_ATTRS
20
21config RWSEM_GENERIC_SPINLOCK
22 def_bool y
23
24config GENERIC_HWEIGHT
25 def_bool y
26
27config NO_IOPORT_MAP
28 def_bool y
29
30config GENERIC_CSUM
31 def_bool y
32
33config HZ
34 int
35 default 100
36
37config NR_CPUS
38 int
39 default 1
40
41source "init/Kconfig"
42
43source "kernel/Kconfig.freezer"
44
45source "arch/h8300/Kconfig.cpu"
46
47menu "Kernel Features"
48
49source "kernel/Kconfig.preempt"
50
51source "mm/Kconfig"
52
53endmenu
54
55menu "Executable file formats"
56
57source "fs/Kconfig.binfmt"
58
59endmenu
60
61source "net/Kconfig"
62
63source "drivers/Kconfig"
64
65source "fs/Kconfig"
66
67menu "Kernel hacking"
68
69source "lib/Kconfig.debug"
70
71endmenu
72
73source "security/Kconfig"
74
75source "crypto/Kconfig"
76
77source "lib/Kconfig"
diff --git a/arch/h8300/Kconfig.cpu b/arch/h8300/Kconfig.cpu
new file mode 100644
index 000000000000..8d0ff20c749a
--- /dev/null
+++ b/arch/h8300/Kconfig.cpu
@@ -0,0 +1,99 @@
1config CPU_H8300H
2 bool
3
4config CPU_H8S
5 bool
6
7config H83069
8 bool
9 select CPU_H8300H
10 select H8300_TMR16
11 select RENESAS_H8300H_INTC
12
13config H8S2678
14 bool
15 select CPU_H8S
16 select H8300_TPU
17 select RENESAS_H8S_INTC
18
19config RAMKERNEL
20 bool
21
22config ROMKERNEL
23 bool
24
25menu "Processor type and features"
26
27choice
28prompt "H8/300 platform"
29
30config H8300_AE3068
31 bool "AE-3068/69"
32 select H83069
33 select RAMKERNEL
34 help
35 AKI-H8/3068F / AKI-H8/3069F Flashmicom LAN Board Support
36 More Information. (Japanese Only)
37 <http://akizukidenshi.com/catalog/default.aspx>
38 AE-3068/69 Evaluation Board Support
39 More Information.
40 <http://www.microtronique.com/ae3069lan.htm>
41
42config H8300_H8MAX
43 bool "H8MAX"
44 select H83069
45 select RAMKERNEL
46 select HAVE_IDE
47 help
48 H8MAX Evaluation Board Support
49 More Information. (Japanese Only)
50 <http://strawberry-linux.com/h8/index.html>
51
52config H8300_KANEBEBE
53 bool "KaneBebe"
54 select H83069
55 select RAMKERNEL
56 help
57 KaneBebe Evalition Board Support
58 More Information. (Japanese Only)
59 <http://www.nissin-tech.com/2009/10/uclinuxkane-bebe-h83069f.html>
60
61config H8300H_SIM
62 bool "H8/300H GDB Simulator"
63 select H83069
64 select ROMKERNEL
65 help
66 GDB Simulator Support
67 More Information.
68 <http://sourceware.org/sid/>
69
70config H8S_EDOSK2674
71 bool "EDOSK-2674"
72 select H8S2678
73 select RAMKERNEL
74 help
75 Renesas EDOSK-2674 Evaluation Board Support
76 More Information.
77 <http://www.azpower.com/H8-uClinux/index.html>
78 <http://www.renesas.eu/products/tools/introductory_evaluation_tools/evaluation_development_os_kits/edosk2674r/edosk2674r_software_tools_root.jsp>
79
80config H8S_SIM
81 bool "H8S GDB Simulator"
82 select H8S2678
83 select ROMKERNEL
84 help
85 GDB Simulator Support
86 More Information.
87 <http://sourceware.org/sid/>
88
89endchoice
90
91config H8300_BUILTIN_DTB
92 string "Builtin DTB"
93 default ""
94
95config OFFSET
96 hex "Load offset"
97 default 0
98
99endmenu
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
new file mode 100644
index 000000000000..0d2d96e52d9f
--- /dev/null
+++ b/arch/h8300/Makefile
@@ -0,0 +1,55 @@
1#
2# arch/h8300/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8# (C) Copyright 2002-2015 Yoshinori Sato <ysato@users.sourceforge.jp>
9#
10
11cflags-$(CONFIG_CPU_H8300H) := -mh
12aflags-$(CONFIG_CPU_H8300H) := -mh -Wa,--mach=h8300h
13ldflags-$(CONFIG_CPU_H8300H) := -mh8300helf_linux
14cflags-$(CONFIG_CPU_H8S) := -ms
15aflags-$(CONFIG_CPU_H8S) := -ms -Wa,--mach=h8300s
16ldflags-$(CONFIG_CPU_H8S) := -mh8300self_linux
17
18KBUILD_CFLAGS += $(cflags-y)
19KBUILD_CFLAGS += -mint32 -fno-builtin
20KBUILD_CFLAGS += -D__linux__
21KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
22KBUILD_AFLAGS += $(aflags-y)
23LDFLAGS += $(ldflags-y)
24
25CROSS_COMPILE := h8300-unknown-linux-
26
27core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
28ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
29core-y += arch/h8300/boot/dts/
30endif
31
32libs-y += arch/$(ARCH)/lib/
33
34boot := arch/h8300/boot
35
36%.dtb %.dtb.S %.dtb.o: | scripts
37 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
38
39PHONY += dtbs
40dtbs: scripts
41 $(Q)$(MAKE) $(build)=arch/h8300/boot/dts
42
43archmrproper:
44
45archclean:
46 $(Q)$(MAKE) $(clean)=$(boot)
47
48vmlinux.srec vmlinux.bin zImage uImage.bin: vmlinux
49 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
50
51define archhelp
52 @echo 'vmlinux.bin - Create raw binary'
53 @echo 'vmlinux.srec - Create srec binary'
54 @echo 'zImage - Compressed kernel image'
55endef
diff --git a/arch/h8300/kernel/Makefile b/arch/h8300/kernel/Makefile
new file mode 100644
index 000000000000..5bc33f2fcc08
--- /dev/null
+++ b/arch/h8300/kernel/Makefile
@@ -0,0 +1,19 @@
1#
2# Makefile for the linux kernel.
3#
4
5extra-y := vmlinux.lds
6
7obj-y := process.o traps.o ptrace.o \
8 signal.o setup.o syscalls.o \
9 irq.o entry.o dma.o
10
11obj-$(CONFIG_ROMKERNEL) += head_rom.o
12obj-$(CONFIG_RAMKERNEL) += head_ram.o
13
14obj-$(CONFIG_MODULES) += module.o h8300_ksyms.o
15obj-$(CONFIG_H8300H_SIM) += sim-console.o
16obj-$(CONFIG_H8S_SIM) += sim-console.o
17
18obj-$(CONFIG_CPU_H8300H) += ptrace_h.o
19obj-$(CONFIG_CPU_H8S) += ptrace_s.o
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
new file mode 100644
index 000000000000..7c302dcf5249
--- /dev/null
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -0,0 +1,67 @@
1#include <asm-generic/vmlinux.lds.h>
2#include <asm/page.h>
3
4#define ROMTOP 0x000000
5#define RAMTOP 0x400000
6
7jiffies = jiffies_64 + 4;
8
9ENTRY(_start)
10
11SECTIONS
12{
13#if defined(CONFIG_ROMKERNEL)
14 . = ROMTOP;
15 .vectors :
16 {
17 _vector = . ;
18 *(.vector*)
19 }
20#else
21 . = RAMTOP;
22 _ramstart = .;
23 . = . + CONFIG_OFFSET;
24#endif
25 _text = .;
26 HEAD_TEXT_SECTION
27 .text : {
28 _stext = . ;
29 TEXT_TEXT
30 SCHED_TEXT
31 LOCK_TEXT
32#if defined(CONFIG_ROMKERNEL)
33 *(.int_redirect)
34#endif
35 _etext = . ;
36 }
37 EXCEPTION_TABLE(16)
38 NOTES
39 RO_DATA_SECTION(4)
40 ROMEND = .;
41#if defined(CONFIG_ROMKERNEL)
42 . = RAMTOP;
43 _ramstart = .;
44#define ADDR(x) ROMEND
45#else
46#endif
47 _sdata = . ;
48 __data_start = . ;
49 RW_DATA_SECTION(0,0,0)
50#if defined(CONFIG_ROMKERNEL)
51#undef ADDR
52#endif
53 . = ALIGN(0x4) ;
54 __init_begin = .;
55 INIT_TEXT_SECTION(4)
56 INIT_DATA_SECTION(4)
57 SECURITY_INIT
58 __init_end = .;
59 _edata = . ;
60 _begin_data = LOADADDR(.data);
61 _sbss =.;
62 BSS_SECTION(0, 0 ,0)
63 _ebss =.;
64 _ramend = .;
65 _end = .;
66 DISCARDS
67}